/* Public-service style for Planning 4 Homes.
   Plain, high-contrast, accessible. Deliberately NOT the GOV.UK brand:
   no crown, no "GOV.UK" name, no GDS Transport font (this is an independent service). */

:root {
  --text: #0b0c0c;
  --secondary-text: #505a5f;
  --link: #1d70b8;
  --link-hover: #003078;
  --border: #b1b4b6;
  --mid-grey: #f3f2f1;
  --focus: #ffdd00;
  --green: #00703c;
  --green-dark: #005a30;
  --red: #d4351c;
  --orange: #f47738;
  --brand: #1d70b8;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 19px;
  line-height: 1.35;
  color: var(--text) !important;
  background: #fff !important;
}

h1, h2, h3, h4, .hero h1, .report-card h2, .header h1, .nav-logo {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-weight: 700 !important;
  color: var(--text);
  letter-spacing: 0 !important;
}
h1, .checker-box h2 { font-size: 2.25rem !important; line-height: 1.1; margin-bottom: 1.25rem !important; }
h2 { font-size: 1.5rem; line-height: 1.2; }
h3 { font-size: 1.2rem; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }

/* Keyboard focus: yellow with black underline */
a:focus, button:focus, input:focus, select:focus, .btn:focus {
  outline: 3px solid transparent !important;
  background-color: var(--focus) !important;
  box-shadow: 0 -2px var(--focus), 0 4px var(--text) !important;
  color: var(--text) !important;
  text-decoration: none;
}
input:focus, select:focus {
  background-color: #fff !important;
  outline: 3px solid var(--focus) !important;
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--text) !important;
}

/* ---------- Header ---------- */
.nav, .header {
  background: var(--text) !important;
  color: #fff !important;
  border-bottom: 10px solid var(--brand);
  box-shadow: none !important;
  position: static !important;
}
.nav-container { max-width: 960px; margin: 0 auto; padding: 0.75rem 15px !important; }
.nav-logo { color: #fff !important; font-size: 1.4rem !important; }
.nav-auth button {
  background: none !important; border: 0 !important; color: #fff !important;
  font-size: 1rem !important; text-decoration: underline; cursor: pointer; padding: 0.25rem 0.5rem !important;
  border-radius: 0 !important;
}
.nav-auth button:focus { color: var(--text) !important; }
#userEmail { color: #fff; font-size: 1rem; }

.header { text-align: left !important; padding: 1.25rem 15px !important; }
.header h1 { color: #fff !important; font-size: 1.6rem !important; max-width: 930px; margin: 0 auto 0.25rem !important; }
.header p { max-width: 930px; margin: 0 auto; color: #fff; font-size: 1rem; }

/* Phase banner */
.phase-banner { max-width: 960px; margin: 0 auto; padding: 0.6rem 15px; border-bottom: 1px solid var(--border); font-size: 1rem; }
.phase-tag { display: inline-block; background: var(--brand); color: #fff; font-weight: 700; padding: 2px 8px; margin-right: 0.6rem; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; }

/* ---------- Layout ---------- */
.container { max-width: 960px !important; margin: 0 auto !important; padding: 0 15px !important; }

.hero {
  background: #fff !important; color: var(--text) !important; text-align: left !important;
  max-width: 960px; margin: 0 auto; padding: 2.5rem 15px 1rem !important;
}
.hero h1 { font-size: 3rem !important; color: var(--text) !important; max-width: 680px; }
.hero p { font-size: 1.3rem !important; color: var(--text) !important; max-width: 680px; margin-bottom: 1.5rem !important; opacity: 1 !important; }

.checker-box, .report-card, .dashboard-card, .modal-content {
  background: #fff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.checker-box { padding: 1.5rem 0 !important; border-top: 1px solid var(--border); }
.report-card { padding: 1.5rem 0 !important; margin-bottom: 1rem !important; border-top: 2px solid var(--text); }
.report-card h2 { color: var(--text) !important; margin-bottom: 1rem; }
.report-card h3 { color: var(--text) !important; margin-top: 1.5rem; }

/* ---------- Buttons ---------- */
.btn, .btn-primary, .btn-unlock {
  font-family: inherit !important;
  background: var(--green) !important;
  color: #fff !important;
  border: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: 0 2px 0 #002d18 !important;
  font-size: 1.15rem !important;
  font-weight: 400 !important;
  padding: 0.5rem 1rem !important;
  text-decoration: none !important;
  cursor: pointer;
  transform: none !important;
}
.btn:hover, .btn-primary:hover, .btn-unlock:hover { background: var(--green-dark) !important; }
.hero .btn { font-size: 1.4rem !important; font-weight: 700 !important; padding: 0.6rem 1.2rem !important; }
.hero .btn::after { content: " \2192"; }
.btn-secondary {
  background: var(--mid-grey) !important; color: var(--text) !important;
  box-shadow: 0 2px 0 #929191 !important; border-radius: 0 !important; text-decoration: none !important;
}
.btn-secondary:hover { background: #dbdad9 !important; }
.btn[style*="#d4351c"], button[style*="#d4351c"] { background: var(--red) !important; box-shadow: 0 2px 0 #55150b !important; }
.btn[style*="#1d70b8"], button[style*="#1d70b8"] { background: var(--green) !important; }
button:disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-label { font-weight: 700 !important; font-size: 1.1rem !important; color: var(--text) !important; }
.form-input, .form-select, .modal input {
  font-family: inherit !important; font-size: 1.1rem !important;
  border: 2px solid var(--text) !important; border-radius: 0 !important;
  padding: 0.4rem 0.5rem !important; height: auto !important;
}
#postcode { max-width: 12em; text-transform: uppercase; }

/* ---------- Alerts / notices ---------- */
.alert { border-radius: 0 !important; border: 5px solid var(--brand) !important; background: #fff !important; color: var(--text) !important; }
.alert-success { border-color: var(--green) !important; }
.alert-error { border-color: var(--red) !important; }
.alert h3 { margin: 0; }

/* ---------- Report specifics ---------- */
.info-grid { gap: 0 !important; border-top: 1px solid var(--border); }
.info-item { background: none !important; border-radius: 0 !important; border-bottom: 1px solid var(--border); padding: 0.6rem 0 !important; }
.info-item label { color: var(--secondary-text) !important; font-weight: 700 !important; text-transform: none !important; font-size: 1rem !important; letter-spacing: 0 !important; }
.info-item value { font-size: 1.1rem !important; color: var(--text) !important; }

.risk-badge {
  border-radius: 0 !important; font-weight: 700 !important; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 10px !important; font-size: 1rem !important;
}
.risk-low { background: #cce2d8 !important; color: #005a30 !important; }
.risk-medium { background: #fcd6c3 !important; color: #6e3619 !important; }
.risk-high { background: #f4cdc6 !important; color: #942514 !important; }

.constraint-item {
  background: #fff !important; border-radius: 0 !important;
  border: 0 !important; border-left: 5px solid var(--border) !important;
  padding: 0.75rem 1rem !important; margin: 0.75rem 0 !important;
}
.constraint-item h4 { font-size: 1.15rem !important; color: var(--text) !important; }
.constraint-meta span { background: var(--mid-grey) !important; border-radius: 0 !important; }

.flag-list li { border-radius: 0 !important; background: #fff !important; border: 0 !important; border-left: 5px solid var(--orange) !important; }
.steps-list li { border-radius: 0 !important; background: #fff !important; border-bottom: 1px solid var(--border) !important; box-shadow: none !important; }
.steps-list li::before { border-radius: 0 !important; background: var(--text) !important; }
.steps-list li span { border-radius: 0 !important; }

.disclaimer {
  border-radius: 0 !important; background: #fff !important;
  border: 0 !important; border-left: 10px solid var(--border) !important; padding: 1rem 1.25rem !important;
}
.map-container, .property-map { border-radius: 0 !important; border: 1px solid var(--border); }
.loading-spinner { border-top-color: var(--brand) !important; }

.dashboard-card { border: 1px solid var(--border) !important; padding: 1rem !important; }
.dashboard-card.paid { border-left: 5px solid var(--green) !important; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--mid-grey); border-top: 1px solid var(--border);
  color: var(--secondary-text); font-size: 1rem; margin-top: 3rem; padding: 2rem 0;
}
.site-footer .inner { max-width: 960px; margin: 0 auto; padding: 0 15px; }
.site-footer strong { color: var(--text); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 2rem !important; }
}

@media print {
  .nav, .header { border-bottom-width: 4px; }
  .site-footer, .phase-banner, .actions { display: none !important; }
}

/* Form refinements */
.checker-box { border: 0 !important; border-top: 1px solid var(--border) !important; }
#postcode::placeholder { text-transform: none; }
.form-select {
  -webkit-appearance: none; appearance: none; max-width: 30em;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230b0c0c' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.7rem center !important;
  padding-right: 2.4rem !important;
}
#planningForm button[type="submit"] { width: auto !important; }

/* Remove old decorative borders */
.report-card h2 { border-bottom: 0 !important; padding-bottom: 0 !important; }
.info-item { border-left: 0 !important; padding-left: 0 !important; padding-right: 1rem !important; }
.info-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }

/* Simple pages (payment complete / cancelled) */
body.simple-page { display: block !important; padding: 0 !important; min-height: 0 !important; }
body.simple-page .container {
  max-width: 960px !important; margin: 2rem auto !important; padding: 0 15px !important;
  text-align: left !important; box-shadow: none !important; border-radius: 0 !important;
  animation: none !important; background: #fff !important; color: var(--text) !important;
}
body.simple-page h1 { color: var(--text) !important; font-size: 2.5rem !important; }
body.simple-page p { color: var(--text) !important; max-width: 40em; }
body.simple-page .details, body.simple-page .info-box { border-radius: 0 !important; background: var(--mid-grey) !important; text-align: left; }
body.simple-page .button-group { justify-content: flex-start !important; }
.confirmation-panel { background: var(--green); color: #fff; padding: 2rem 1.5rem; text-align: center; margin-bottom: 2rem; }
.confirmation-panel h1 { color: #fff !important; margin: 0 !important; }
.confirmation-panel p { color: #fff !important; margin: 0.75rem auto 0 !important; font-size: 1.3rem; max-width: none; }
body.simple-page .header h1 { color: #fff !important; font-size: 1.6rem !important; margin: 0 auto !important; }
body.simple-page .confirmation-panel h1, body.simple-page .confirmation-panel p { color: #fff !important; }
body.simple-page [style*="#f0fdf4"] { background: #fff !important; border-radius: 0 !important; border-left: 5px solid var(--border) !important; }

/* Permitted development panel */
.pd-panel { padding: 1rem 1.25rem; margin-bottom: 1rem; border-left: 10px solid var(--border); background: var(--mid-grey); }
.pd-panel.pd-likely_pd { border-left-color: var(--green); background: #e8f1ec; }
.pd-panel.pd-conditional { border-left-color: var(--orange); background: #fdf0e9; }
.pd-panel.pd-needs_permission, .pd-panel.pd-no_pd_rights { border-left-color: var(--red); background: #fbeae7; }
.pd-project { color: var(--secondary-text) !important; margin: 0 0 0.25rem !important; font-size: 1rem; }
.pd-headline { font-size: 1.5rem !important; font-weight: 700; margin: 0 !important; color: var(--text) !important; }
.pd-list { margin: 0.5rem 0 1rem 1.25rem; }
.pd-list li { margin-bottom: 0.4rem; }
#pdReasons p, #pdRoutes p { margin-bottom: 0.75rem; max-width: 40em; }
.pd-basis { color: var(--secondary-text) !important; font-size: 0.9rem; margin-top: 1rem; }

/* Flood likelihood table */
.likelihood-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; font-size: 1rem; }
.likelihood-table th, .likelihood-table td { text-align: left; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.likelihood-table th { border-bottom: 2px solid var(--text); }

/* Logo: white 4H mark beside the name */
.brand { display: flex !important; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { height: 36px; width: auto; flex: none; }
.brand-sm img { height: 24px; }
a.nav-logo { color: #fff !important; }
a.nav-logo:focus { outline: 3px solid #ffdd00; outline-offset: 2px; }

/* Privacy notice and terms */
.legal h2 { font-size: 1.5rem !important; margin: 2rem 0 0.75rem !important; }
.legal ul { margin: 0 0 1rem 1.5rem; max-width: 40em; }
.legal li { margin-bottom: 0.5rem; line-height: 1.5; }
.legal p { margin-bottom: 1rem; line-height: 1.5; }
.legal-updated { color: var(--secondary-text, #505a5f) !important; }
.header-brand { color: #fff !important; font-weight: 700; font-size: 1.6rem; max-width: 930px; margin: 0 auto; }
.header-brand:focus { outline: 3px solid #ffdd00; outline-offset: 2px; }
/* Cancellation-right consent before payment */
.consent-check { display: flex; gap: 0.75rem; align-items: flex-start; text-align: left; max-width: 34em; margin: 0 auto 1rem; font-size: 1rem; line-height: 1.4; cursor: pointer; }
.consent-check input { width: 1.4rem; height: 1.4rem; flex: none; margin-top: 0.1rem; accent-color: #0b0c0c; }
.consent-error { color: #d4351c; font-weight: 700; margin: -0.5rem 0 1rem; }
.auth-legal { font-size: 0.9rem; color: #505a5f; text-align: center; margin-top: 1rem; }
