/* 2027 ACA Intake Update — branding mirrors medicare-intake (blue #0b3d91 / gold),
   mobile-first, 560px max, designed to sit inside a Wix iframe (no header chrome). */
:root {
  --color-primary: #0b3d91;
  --color-primary-dark: #082c6c;
  --color-accent: #c9a227;
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b7280;
  --color-border: #d1d5db;
  --color-border-focus: var(--color-primary);
  --color-card: #f8fafc;
  --radius: 10px;
  --max-w: 560px;
  --pad: 1.25rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.topbar { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--color-border); }
.progress { height: 4px; background: rgba(11, 61, 145, 0.10); overflow: hidden; }
.progress-bar { height: 100%; background: var(--color-primary); }

main { max-width: var(--max-w); margin: 0 auto; padding: 1.5rem var(--pad) 3rem; }

/* Branded header: VHIA logo (left) + contact (right) */
.brand {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1rem; margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}
.brand-logo { height: auto; max-height: 58px; width: auto; max-width: 62%; display: block; }
.brand-contact { text-align: right; font-size: 0.9rem; line-height: 1.5; }
.brand-contact a { display: block; color: var(--color-primary); text-decoration: none; white-space: nowrap; font-weight: 500; }
.brand-contact a:hover { text-decoration: underline; }
@media (max-width: 430px) {
  .brand-logo { max-height: 50px; max-width: 70%; }
  .brand-contact { text-align: left; width: 100%; font-size: 0.88rem; }
}

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0.5rem 0 1rem; color: var(--color-primary-dark); }
.sub { color: var(--color-muted); margin: -0.5rem 0 1.5rem; font-size: 0.97rem; }
.hint { color: var(--color-muted); font-size: 0.88rem; margin-top: 0.5rem; }
.muted { color: var(--color-muted); font-weight: normal; }
.req { color: #b91c1c; font-weight: 600; }

label { display: block; margin-top: 1.25rem; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.95rem; }

input[type="text"], input[type="date"], select {
  width: 100%;
  padding: 0.85rem 0.9rem;
  font-size: 1.05rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  font-family: inherit;
  transition: border-color 120ms, box-shadow 120ms;
}
input[type="text"]:focus, input[type="date"]:focus, select:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.15);
}
input[type="date"] { min-height: 3.1rem; }  /* consistent height on iOS/Safari */

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7280' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem;
}

/* "No Changes" checkbox row (reuses the medicare-intake .choice look) */
.choice {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer; background: #fff;
  transition: border-color 120ms, background 120ms;
  font-size: 1.02rem; margin: 0.25rem 0 0.5rem;
}
.choice:hover { border-color: var(--color-primary); }
.choice input { accent-color: var(--color-primary); transform: scale(1.2); margin: 0; flex-shrink: 0; }
.choice:has(input:checked) { border-color: var(--color-primary); background: rgba(11, 61, 145, 0.05); }

/* Dimmed/disabled state when "No Changes" is checked */
#fields.dimmed { opacity: 0.5; }
#fields.dimmed label, #fields.dimmed .hint { color: var(--color-muted); }
input:disabled, select:disabled { background: #f3f4f6; color: var(--color-muted); cursor: not-allowed; }

/* Submit button */
button { font-family: inherit; font-size: 1.05rem; cursor: pointer; }
.next {
  display: block; width: 100%; margin-top: 2rem;
  padding: 0.95rem 1.2rem;
  background: var(--color-primary); color: #fff; border: 0; border-radius: var(--radius);
  font-weight: 600; transition: background 120ms, transform 80ms;
}
.next:hover { background: var(--color-primary-dark); }
.next:active { transform: translateY(1px); }
.next:disabled { background: #9ca3af; cursor: not-allowed; }

/* Errors + status */
.field-error { border-color: #b91c1c !important; }
.error-msg { color: #b91c1c; font-size: 0.88rem; margin-top: 0.4rem; }
.status { margin-top: 0.9rem; font-size: 0.95rem; color: var(--color-muted); min-height: 1.4em; }
.status.error { color: #b91c1c; }
.status.loading::after {
  content: ''; display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.4em;
  border: 2px solid rgba(11,61,145,0.25); border-top-color: var(--color-primary);
  border-radius: 50%; animation: spin 700ms linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer {
  max-width: var(--max-w); margin: 0 auto;
  padding: 1.5rem var(--pad) 2.5rem;
  color: var(--color-muted); font-size: 0.78rem; text-align: center;
}

#thanks { animation: fadeIn 220ms ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (min-width: 640px) { h1 { font-size: 1.85rem; } }
