/* ==========================================================================
   Magnolia Assurant Group — Quote wizard (quote.html)
   Builds on styles.css form components; behavior lives in quote.js.
   ========================================================================== */

.quote-page { background: var(--cream); }

/* ---------- Slim intro band ---------- */
.quote-intro {
  background:
    radial-gradient(700px 260px at 92% -40%, rgba(236, 168, 52, .2), transparent 65%),
    linear-gradient(160deg, var(--teal) 0%, var(--teal-900) 100%);
  padding: clamp(1.4rem, 3vw, 2rem) 0;
  --heading: #fff; --text: #C9D8D7; color: var(--text);
}
.quote-intro__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2.5rem; }
.quote-intro__title { font-size: clamp(1.55rem, 3.2vw, 2.2rem); margin: 0 0 .3rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; }
.quote-intro__time {
  font-family: var(--font-display); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-900); background: var(--gold); border-radius: var(--r-pill); padding: .35em .85em; white-space: nowrap;
}
.quote-intro__sub { margin: 0; font-size: 1rem; max-width: 60ch; }
.quote-intro__points { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .92rem; }
.quote-intro__points li { display: flex; gap: .55rem; align-items: center; color: #DCE7E6; }
.quote-intro__points .icon { color: var(--gold); }
@media (max-width: 760px) {
  .quote-intro__points { grid-auto-flow: row; }
  .quote-intro__points li:nth-child(n+2) { display: none; }
}

/* ---------- Layout ---------- */
.quote-body { padding: clamp(1.25rem, 3vw, 2.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(1.25rem, 3vw, 2.25rem); align-items: start; }
@media (max-width: 960px) { .quote-layout { grid-template-columns: 1fr; } }

/* ---------- Wizard card ---------- */
.wizard {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--header-h) + 12px); position: relative;
  --heading: var(--ink); --text: var(--body); color: var(--text);
}
.wizard__form { padding: clamp(1.25rem, 3.5vw, 2.25rem); padding-top: 0; gap: 0; }
.wizard__panel { display: grid; gap: 1.35rem; padding-top: clamp(1.1rem, 2.5vw, 1.6rem); }
.wizard__panel.is-entering { animation: q-in-next .38s var(--ease) both; }
.wizard__panel.is-entering.from-back { animation-name: q-in-back; }
@keyframes q-in-next { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes q-in-back { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.wizard__head { display: grid; gap: .3rem; }
.wizard__kicker { font-family: var(--font-display); font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); }
.wizard__title { font-size: clamp(1.45rem, 2.8vw, 1.95rem); margin: 0; outline: none; }
.wizard__intro { margin: 0; color: var(--muted); }

/* Progress */
.wizard__progress { padding: clamp(1rem, 2.5vw, 1.4rem) clamp(1.25rem, 3.5vw, 2.25rem) .9rem; border-bottom: 1px solid var(--line); position: relative; }
.wizard__bar { height: 6px; background: var(--teal-100); border-radius: var(--r-pill); overflow: hidden; }
.wizard__bar-fill { display: block; height: 100%; width: var(--progress, 10%); background: linear-gradient(90deg, var(--gold-600), var(--gold)); border-radius: inherit; transition: width .45s var(--ease); }
.wizard__steps { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; }
.wizard__steps button {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .2rem 0;
  background: none; border: 0; font: inherit; color: var(--muted); cursor: default;
}
.wizard__steps button:not([disabled]) { cursor: pointer; }
.wizard__steps button:not([disabled]):hover .wizard__label { color: var(--teal); }
.wizard__dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  background: #fff; border: 2px solid var(--line-strong); color: var(--muted); transition: all .25s var(--ease);
}
.wizard__dot .icon { width: 16px; height: 16px; }
.wizard__label { font-family: var(--font-display); font-size: .78rem; font-weight: 500; letter-spacing: .02em; }
.wizard__steps li.is-current .wizard__dot { background: var(--teal); border-color: var(--teal); color: var(--gold); box-shadow: 0 0 0 4px rgba(30, 56, 61, .12); }
.wizard__steps li.is-current .wizard__label { color: var(--ink); font-weight: 600; }
.wizard__steps li.is-done .wizard__dot { background: var(--gold); border-color: var(--gold); color: var(--teal-900); }
.wizard__steps li.is-skipped { opacity: .4; }
.wizard__steps li.is-skipped .wizard__label { text-decoration: line-through; }
@media (max-width: 480px) { .wizard__label { font-size: .68rem; } .wizard__dot { width: 26px; height: 26px; } }

/* Step 1 tiles */
.q-audience .choice__box { gap: .5rem; }
.q-audience .choice__box .icon { width: 1.15em; height: 1.15em; color: currentColor; }
.q-tiles { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .7rem; }
.q-tiles--solo { margin-top: -.35rem; }
.q-tile .choice__box {
  flex-direction: column; align-items: flex-start; gap: .55rem; padding: 1rem 2.2rem 1rem 1rem;
}
.q-tile .choice__box > .icon {
  width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: var(--gold-50); color: var(--gold-ink); transition: background-color .15s, color .15s;
}
.q-tile input:checked + .choice__box > .icon { background: var(--teal); color: var(--gold); }
.q-tile input:checked + .choice__box::after { top: .8rem; transform: none; }
.q-tile .choice__title { font-size: 1rem; }
.q-group[hidden] { display: none; }
@media (max-width: 560px) {
  .q-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .q-tile .choice__box { padding: .85rem 1.9rem .85rem .85rem; gap: .45rem; }
  .q-tile .choice__box > .icon { width: 34px; height: 34px; padding: 7px; }
  .q-tile .choice__title { font-size: .94rem; }
  .q-tile .choice__desc { font-size: .78rem; }
  .q-tile input:checked + .choice__box::after { top: .6rem; right: .6rem; width: 20px; height: 20px; }
}
.q-selected-count { margin: -.35rem 0 0; min-height: 1.3em; }

/* Sections (step 2) */
.q-section {
  display: grid; gap: 1.1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r); background: #FCFBF8;
}
.q-section__title {
  display: flex; align-items: center; gap: .55rem; float: left; width: 100%; margin: 0 0 .1rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--ink);
}
.q-section__title + * { clear: both; }
.q-section__title .icon { color: var(--gold-ink); width: 1.35em; height: 1.35em; }
.q-section__note { margin: -.5rem 0 0; }
.q-height { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.wizard .choices--inline { gap: .5rem; }
.wizard .choices--inline .choice__box { padding: .55em 1.05em; font-size: .95rem; }
@media (max-width: 480px) { .q-section { padding: 1rem .9rem; } }

/* Validation */
.was-validated .choice input:invalid + .choice__box { border-color: var(--high); }
.wizard__alert { margin: 0; }

/* Step 3: current coverage */
.q-current { display: grid; gap: .8rem; }
.q-cur { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; background: #FCFBF8; display: grid; gap: .85rem; }
.q-cur__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; }
.q-cur__name { display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.02rem; margin: 0; }
.q-cur__name .icon { color: var(--gold-ink); }
.q-cur__covered { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.q-cur__covered legend { float: left; margin: 0 .2rem 0 0; font-size: .88rem; color: var(--muted); font-family: var(--font-body); font-weight: 400; }
.q-cur__covered .choice__box { padding: .4em .85em !important; font-size: .88rem !important; }
.q-cur__details { display: grid; grid-template-columns: 1.2fr 1fr; gap: .8rem 1rem; }
.q-cur__details .field--wide { grid-column: 1 / -1; }
.q-cur__details[hidden] { display: none; }
@media (max-width: 640px) { .q-cur__details { grid-template-columns: 1fr; } }
.q-total {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem; border-radius: var(--r);
  background: linear-gradient(140deg, var(--teal), var(--teal-800)); color: #C9D8D7;
}
.q-total .icon { color: var(--gold); width: 1.8em; height: 1.8em; }
.q-total strong { color: #fff; font-family: var(--font-display); font-size: 1.35rem; }
.q-total p { margin: 0; }

/* Step 5: review */
.q-review { display: grid; gap: .8rem; }
.q-review__card { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.15rem; background: #FCFBF8; }
.q-review__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; }
.q-review__head h3 { font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.q-review__head h3 .icon { color: var(--gold-ink); }
.q-review__edit {
  background: none; border: 0; padding: .35rem .2rem; cursor: pointer; font: inherit; font-family: var(--font-display);
  font-weight: 600; font-size: .9rem; color: var(--teal); text-decoration: underline; text-underline-offset: 3px;
}
.q-review__edit:hover { color: var(--gold-ink); }
.q-review dl { margin: 0; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .35rem 1rem; font-size: .93rem; }
.q-review dt { color: var(--muted); }
.q-review dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 520px) { .q-review dl { grid-template-columns: 1fr; gap: 0; } .q-review dd { margin-bottom: .45rem; } }
.q-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.q-chip {
  display: inline-flex; align-items: center; gap: .4em; padding: .3em .75em; border-radius: var(--r-pill);
  background: var(--teal-50); color: var(--teal); font-family: var(--font-display); font-weight: 500; font-size: .86rem;
}
.q-chip .icon { width: 1.05em; height: 1.05em; color: var(--gold-ink); }

/* Nav bar (sticky at the bottom on phones) */
.wizard__nav {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.wizard__nav .btn { min-width: 8.5rem; }
.wizard__nav [data-back][hidden] + .wizard__count { margin-right: auto; }
.wizard__count { font-size: .85rem; color: var(--muted); text-align: center; flex: 1; }
.wizard__nav .btn--lg { white-space: normal; }
@media (max-width: 900px) {
  .wizard__nav {
    position: sticky; bottom: 0; z-index: 20;
    margin: 1.4rem calc(-1 * clamp(1.25rem, 3.5vw, 2.25rem)) calc(-1 * clamp(1.25rem, 3.5vw, 2.25rem));
    padding: .7rem clamp(1rem, 3.5vw, 2.25rem) calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: 0 -10px 24px -14px rgba(19, 39, 43, .35);
  }
  .wizard__nav .btn { min-width: 0; flex: 1; }
  .wizard__nav [data-back] { flex: 0 0 auto; }
  .wizard__count { display: none; }
}
@media (max-width: 400px) { .wizard__nav .btn { padding-inline: 1em; } }

.q-restore { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; }
.q-restore button { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; }

/* ---------- Thank-you ---------- */
.wizard__done { padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.5rem); text-align: center; outline: none; }
.wizard__done .icon-badge { margin: 0 auto 1.1rem; background: var(--low-bg); color: var(--low); width: 76px; height: 76px; border-radius: 50%; animation: q-pop .5s var(--ease) both; }
.wizard__done .icon-badge .icon { width: 38px; height: 38px; }
@keyframes q-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.wizard__done h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.wizard__done .lead { margin-inline: auto; }
.q-ref {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .3rem .6rem; align-items: baseline;
  background: var(--gold-50); border: 1px dashed var(--gold-200); border-radius: 10px; padding: .6rem 1rem; margin: .25rem 0 1.4rem;
  font-size: .92rem;
}
.q-ref strong { font-family: var(--font-display); letter-spacing: .06em; }
.q-next { text-align: left; max-width: 560px; margin: 1.75rem auto 0; display: grid; gap: .9rem; counter-reset: qn; list-style: none; padding: 0; }
.q-next li { display: flex; gap: .85rem; align-items: flex-start; }
.q-next li::before {
  counter-increment: qn; content: counter(qn); flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal); color: var(--gold); font-family: var(--font-display); font-weight: 600; font-size: .95rem;
}
.q-next strong { display: block; }
.q-next p { margin: 0; font-size: .95rem; }
.q-done-links { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; font-size: .95rem; }
.wizard__done .btn-row { justify-content: center; }
@media (max-width: 520px) { .wizard__done .btn-row .btn { width: 100%; } }

/* ---------- Sidebar ---------- */
.quote-side { display: grid; gap: 1rem; }
@media (min-width: 961px) { .quote-side { position: sticky; top: calc(var(--header-h) + 1rem); } }
.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem 1.35rem; box-shadow: var(--shadow-sm); }
.side-card h2 { font-size: 1.08rem; margin: 0 0 .85rem; display: flex; align-items: center; gap: .5rem; }
.side-card h2 .icon { color: var(--gold-ink); }
.side-card .checklist { margin: 0; gap: .6rem; font-size: .93rem; }
.side-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; counter-reset: ss; font-size: .93rem; }
.side-steps li { display: grid; grid-template-columns: 28px 1fr; gap: .7rem; align-items: start; }
.side-steps li::before {
  counter-increment: ss; content: counter(ss); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-50); color: var(--gold-ink); font-family: var(--font-display); font-weight: 600; font-size: .85rem;
}
.side-steps strong { display: block; font-size: .95rem; }
.side-card--teal { background: linear-gradient(160deg, var(--teal), var(--teal-800)); border-color: var(--teal); --heading: #fff; --text: #C9D8D7; color: var(--text); }
.side-card--teal h2 .icon { color: var(--gold); }
.side-card--teal p { font-size: .92rem; margin: 0 0 .9rem; }
.side-card--teal .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.side-card--teal .btn { padding-inline: .8em; }
.side-hours { display: flex; gap: .45rem; align-items: center; font-size: .84rem; margin-top: .8rem; color: #9DB5B8; }
.side-hours .icon { color: var(--gold); }
.side-summary__empty { margin: 0; font-size: .92rem; color: var(--muted); }
.side-summary .q-chips { margin-bottom: .2rem; }
.side-summary__total { margin: .8rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .92rem; display: flex; justify-content: space-between; gap: 1rem; }
.side-summary__total strong { font-family: var(--font-display); }
