/* ============================================================
   UK Energy Efficiency Report — Form Component Styles
============================================================ */

/* ── FORM SECTION WRAPPER ── */
.form-section {
  background: var(--navy);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.form-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 80% 0%, rgba(184,150,12,0.07) 0%, transparent 55%);
  pointer-events: none;
}
.form-section .container { position: relative; }

.form-header { text-align: center; margin-bottom: 40px; }
.form-header .section-kicker { display: block; }
.form-header h2 { font-family: var(--serif); font-size: clamp(26px, 4vw, 42px); color: var(--cream); margin-bottom: 12px; line-height: 1.15; }
.form-header p { font-size: 16px; font-weight: 300; color: rgba(247,243,237,0.6); max-width: 480px; margin: 0 auto; line-height: 1.65; }

/* ── FORM CARD ── */
.form-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  padding: clamp(24px, 4vw, 48px);
  max-width: 640px;
  margin: 0 auto;
}

/* ── PROGRESS ── */
.form-progress { margin-bottom: 32px; }
.form-progress-track { height: 3px; background: rgba(255,255,255,0.1); overflow: hidden; }
.form-progress-fill { height: 100%; background: var(--gold); transition: width 0.35s ease; width: 0%; }
.form-progress-label { font-size: 12px; font-weight: 500; color: rgba(247,243,237,0.45); margin-top: 8px; display: block; letter-spacing: 0.5px; }

/* ── STEPS ── */
.form-step { display: none; }
.form-step.active { display: block; animation: stepIn 0.25s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.form-step h3 { font-family: var(--serif); font-size: clamp(20px, 3vw, 28px); color: var(--cream); margin-bottom: 20px; line-height: 1.2; }

/* ── OPTION BUTTONS ── */
.form-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.form-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.12);
  cursor: pointer;
  font-size: 15px;
  font-weight: 400;
  color: rgba(247,243,237,0.8);
  text-align: left;
  transition: border-color var(--trans), background var(--trans), color var(--trans);
  width: 100%;
}
.form-option:hover { border-color: rgba(184,150,12,0.55); background: rgba(184,150,12,0.07); color: var(--cream); }
.form-option.selected { border-color: var(--gold); background: rgba(184,150,12,0.14); color: var(--cream); }
.form-option-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--trans), background var(--trans);
}
.form-option.selected .form-option-dot { border-color: var(--gold); background: var(--gold); }
.form-option.selected .form-option-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }

/* ── TEXT INPUTS ── */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13px; font-weight: 500; color: rgba(247,243,237,0.65); margin-bottom: 6px; }
.form-field input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.14);
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 400;
  color: var(--cream);
  transition: border-color var(--trans), background var(--trans);
}
.form-field input:focus { border-color: var(--gold); background: rgba(184,150,12,0.06); outline: none; }
.form-field input.error { border-color: #d95555; }
.field-error { font-size: 12px; color: #e07777; margin-top: 4px; display: none; }
.form-field input.error ~ .field-error { display: block; }

/* ── GDPR CONSENT ── */
.form-consent { margin-bottom: 24px; }
.form-consent label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 13px; font-weight: 300; color: rgba(247,243,237,0.6); line-height: 1.65; }
.form-consent input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; cursor: pointer; accent-color: var(--gold); }
.form-consent a { color: var(--gold); text-decoration: underline; }
.form-consent.error label { color: rgba(224,85,85,0.85); }
.consent-error { font-size: 12px; color: #e07777; margin-top: 6px; display: none; }
.form-consent.error .consent-error { display: block; }

/* ── NAV BUTTONS ── */
.form-nav { display: flex; gap: 12px; margin-top: 8px; }
.form-btn-next {
  flex: 1;
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--trans), opacity var(--trans), box-shadow var(--trans);
  letter-spacing: 0.3px;
}
.form-btn-next:hover:not(:disabled) { background: var(--gold-dk); box-shadow: 0 4px 18px rgba(184,150,12,0.45); }
.form-btn-next:disabled { opacity: 0.38; cursor: not-allowed; }
.form-btn-back {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.18);
  color: rgba(247,243,237,0.65);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: border-color var(--trans), color var(--trans);
  white-space: nowrap;
}
.form-btn-back:hover { border-color: rgba(255,255,255,0.45); color: var(--cream); }

/* ── FLAGS / NOTES ── */
.form-flag {
  background: rgba(184,150,12,0.1);
  border: 1px solid rgba(184,150,12,0.3);
  border-left: 3px solid var(--gold);
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 300;
  color: rgba(247,243,237,0.78);
  line-height: 1.6;
  margin-bottom: 16px;
  display: none;
}
.form-flag.visible { display: block; }

.form-scotland-note {
  background: rgba(44,74,46,0.25);
  border: 1px solid rgba(44,74,46,0.55);
  border-left: 3px solid #5aaa5e;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 300;
  color: rgba(247,243,237,0.78);
  line-height: 1.6;
  margin-bottom: 16px;
  display: none;
}
.form-scotland-note.visible { display: block; }

/* ── DISQUALIFICATION ── */
.form-disqualified { display: none; }
.form-disqualified.active { display: block; animation: stepIn 0.25s ease; }
.form-disqualified h3 { font-family: var(--serif); font-size: 22px; color: var(--cream); margin-bottom: 12px; }
.form-disqualified p { font-size: 15px; color: rgba(247,243,237,0.65); margin-bottom: 14px; line-height: 1.65; }
.form-disqualified .form-field { max-width: 400px; }
.disq-link { display: inline-block; color: var(--gold); font-size: 14px; text-decoration: underline; margin-top: 12px; }

/* ── SUCCESS ── */
.form-success { display: none; text-align: center; padding: 20px 0; }
.form-success.active { display: block; animation: stepIn 0.3s ease; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(184,150,12,0.12); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 28px; }
.form-success h3 { font-family: var(--serif); font-size: clamp(24px, 3.5vw, 32px); color: var(--cream); margin-bottom: 12px; }
.form-success p { font-size: 15px; color: rgba(247,243,237,0.65); line-height: 1.7; max-width: 420px; margin: 0 auto 10px; }

/* ── LIVE REGION (a11y) ── */
[aria-live] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── ATF POSTCODE INPUT ── */
.postcode-form { display: flex; max-width: 420px; margin-top: 28px; }
.postcode-input {
  flex: 1;
  background: rgba(255,255,255,0.96);
  border: none;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.postcode-input::placeholder { text-transform: none; color: #999; font-weight: 300; letter-spacing: 0; }
.postcode-input:focus { outline: 2px solid var(--gold); outline-offset: -2px; }
.postcode-submit {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 16px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--trans);
}
.postcode-submit:hover { background: var(--gold-dk); }

@media (max-width: 480px) {
  .postcode-form { flex-direction: column; }
}

/* ── REGIONAL BLOCK ── */
.regional-block {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(184,150,12,0.3);
  border-left: 3px solid var(--gold);
  padding: 24px 28px;
  margin: 28px 0;
  display: none;
}
.regional-block.visible { display: block; animation: stepIn 0.3s ease; }
.regional-block .region-tag { font-size: 10px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; display: block; }
.regional-block h3 { font-family: var(--serif); font-size: clamp(18px, 2.5vw, 24px); color: var(--cream); margin-bottom: 10px; line-height: 1.25; }
.regional-block p { font-size: 14px; color: rgba(247,243,237,0.65); line-height: 1.65; margin-bottom: 10px; }
.regional-block .local-grant-note { font-size: 13px; color: rgba(184,150,12,0.9); font-style: italic; }
.regional-block .region-link { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--gold); text-decoration: underline; }
.grant-amount-big { font-family: var(--serif); font-size: clamp(32px, 5vw, 48px); font-weight: 700; color: var(--gold); display: block; line-height: 1; margin: 6px 0 4px; }
