/* ============================================================
   Quote wizard — loaded only on /quote/.

   The page has one job, so it drops the two-column marketing
   layout: a single centred column, one step in view at a time,
   and the confirmed steps collapsing to a line each. Everything
   here builds on the tokens in site.css.
   ============================================================ */

/* The blue-to-teal gradient the home page already uses on its step
   numbers and the floating quote button. Kept identical here so the
   two pages read as one site. */
:root{
  --grad:linear-gradient(135deg,#01ABE6 0%,#00C9B7 100%);
  --grad-shadow:0 7px 16px -9px rgba(1,128,174,.8);
}

/* ---------- Intro ------------------------------------------- */
.quote-hero{padding:clamp(2.75rem,6vw,4.5rem) 0 clamp(1.5rem,3vw,2.25rem)}
.quote-intro{max-width:720px;text-align:center;margin-inline:auto}
.quote-intro h1{font-size:clamp(2.1rem,4.6vw,3.2rem);max-width:14ch;margin-inline:auto}
.quote-intro .lede{margin-inline:auto}
.quote-intro .eyebrow{margin-bottom:.75rem}

/* ---------- Shell ------------------------------------------- */
.quote-main{padding:0 0 clamp(3rem,6vw,5rem)}
/* The confirmation screen drops the intro band above it, so the
   section supplies the top spacing the band used to. */
.quote-main-alone{padding-top:clamp(2.5rem,6vw,4.5rem)}
.quote-main>.wrap{max-width:780px}
.quote-wizard{max-width:none}

/* ---------- Progress rail ----------------------------------- */
.wiz-rail{list-style:none;display:flex;align-items:center;gap:.5rem;
  margin:0 0 1.75rem;padding:0;font-size:.82rem;font-weight:600;color:var(--muted)}
.wiz-rail li{flex:1;display:flex;align-items:center;gap:.5rem;min-width:0;
  padding-bottom:.7rem;border-bottom:3px solid var(--line);
  transition:color .2s ease,border-color .2s ease}
.wiz-rail li span{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;
  background:var(--line);color:var(--muted);font-size:.72rem;transition:background-color .2s ease,color .2s ease}
.wiz-rail .is-done{color:var(--teal-dark);border-bottom-color:var(--teal)}
.wiz-rail .is-done span{background:var(--grad);color:#fff}
.wiz-rail .is-current{color:var(--ink);border-bottom-color:var(--ink)}
.wiz-rail .is-current span{background:var(--grad);color:#fff}

/* ---------- A step ------------------------------------------ */
.wiz-step{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  padding:clamp(1.25rem,3.2vw,1.9rem);margin-bottom:1rem;
  transition:border-color .2s ease,box-shadow .2s ease,opacity .2s ease}
.wiz-step.is-open{border-color:transparent;box-shadow:var(--shadow)}
.wiz-step.is-locked{opacity:.5}
.wiz-step.has-error{border-color:#D92D20}

.wiz-head{display:flex;align-items:flex-start;gap:.95rem}
.wiz-headings{flex:1;min-width:0}
.wiz-head h2{font-size:1.2rem;margin:0;letter-spacing:-.01em;line-height:1.35;
  /* Painted with the same gradient. The colour is the fallback for
     anything that cannot clip a background to text. */
  color:var(--ink)}
@supports (background-clip:text) or (-webkit-background-clip:text){
  .wiz-step.is-open .wiz-head h2,
  .wiz-step.is-done .wiz-head h2{background:var(--grad);
    -webkit-background-clip:text;background-clip:text;color:transparent;
    width:fit-content}
}
.wiz-sub{margin:.3rem 0 0;font-size:.93rem;line-height:1.5;color:var(--muted)}
.wiz-step:not(.is-open) .wiz-sub{display:none}

.wiz-num{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;
  margin-top:.1rem;background:var(--bg-soft);color:var(--teal-dark);font-weight:700;font-size:.92rem;
  box-shadow:inset 0 0 0 1.5px rgba(0,201,183,.35)}
/* Live and finished steps carry the gradient; a step not reached yet
   keeps the plain outline, so the eye still knows where it is. */
.wiz-step.is-open .wiz-num,
.wiz-step.is-done .wiz-num{background:var(--grad);color:#fff;box-shadow:var(--grad-shadow)}

/* Top-right of the step: the thumbnail of what was just added, with
   the Change link under it once the step is folded away. */
.wiz-aside{flex:none;display:flex;align-items:center;gap:.75rem;margin-left:auto}
.wiz-preview{position:relative;flex:none;width:72px;height:72px;margin:0;border-radius:12px;
  overflow:hidden;background:var(--bg-soft);border:1px solid var(--line);
  display:grid;place-items:center}
.wiz-preview[hidden]{display:none}
.wiz-preview img{width:100%;height:100%;object-fit:cover;display:block}
.wiz-preview img[hidden]{display:none}
.wiz-preview-fallback{display:grid;place-items:center;color:var(--teal-dark)}
.wiz-preview-fallback[hidden]{display:none}
/* A play mark, so a video frame is not mistaken for a still. */
.wiz-preview.is-video::after{content:"";position:absolute;left:50%;top:50%;width:0;height:0;
  transform:translate(-40%,-50%);border-left:11px solid #fff;border-top:7px solid transparent;
  border-bottom:7px solid transparent;filter:drop-shadow(0 1px 3px rgba(14,42,47,.7))}
.wiz-preview-more{position:absolute;right:3px;bottom:3px;padding:.05rem .32rem;border-radius:999px;
  background:rgba(14,42,47,.82);color:#fff;font-size:.68rem;font-weight:700;line-height:1.5}
.wiz-preview-more[hidden]{display:none}

.wiz-change{flex:none;align-self:center;background:none;border:0;padding:.35rem .2rem;cursor:pointer;
  font:inherit;font-size:.88rem;font-weight:600;color:var(--blue-dark);text-decoration:underline;
  text-underline-offset:3px}
.wiz-change:hover{color:var(--ink)}

.wiz-body{padding-top:1.35rem}
/* The header is sticky, so anything JavaScript focuses has to leave
   room for it or the field lands underneath. */
.wiz-step,.wiz-step .field,.consent,.choice-set{scroll-margin-top:6.5rem}
.wiz-tips{list-style:none;margin:0 0 1.25rem;padding:0;display:grid;gap:.5rem;
  font-size:.93rem;line-height:1.5;color:var(--muted)}
.wiz-tips li{position:relative;padding-left:1.5rem}
.wiz-tips li::before{content:"";position:absolute;left:.25rem;top:.62em;width:6px;height:6px;
  border-radius:50%;background:var(--teal)}

.wiz-actions{margin:1.4rem 0 0}
.wiz-actions .btn{width:100%}
.wiz-actions .btn[disabled]{opacity:.5;cursor:not-allowed}

.wiz-confirmed{display:flex;align-items:center;gap:.5rem;margin:.9rem 0 0;padding-left:2.7rem;
  font-size:.9rem;font-weight:600;color:var(--teal-dark)}
.wiz-confirmed svg{flex:none}
.wiz-step.is-open .wiz-confirmed{display:none}

/* A display: value outranks the browser's own [hidden] rule, so every
   element this file styles and JavaScript hides has to say so itself. */
.wiz-confirmed[hidden],.media-list[hidden],.wiz-change[hidden],
.wiz-body[hidden],.pref-panel[hidden]{display:none}

/* Without JavaScript nothing is collapsed and nothing is dimmed. */
.quote-wizard:not(.is-live) .wiz-rail{display:none}
.quote-wizard:not(.is-live) .wiz-confirmed{display:none}

/* ---------- Uploader ---------------------------------------- */
.uploader{margin:0}
.uploader .dropzone{display:flex;align-items:center;gap:1rem;position:relative;cursor:pointer;
  padding:1.2rem 1.3rem;background:var(--bg-soft);border:1.5px dashed #BFD3D5;border-radius:14px;
  transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.uploader .dropzone:hover,.uploader .dropzone.is-over{border-color:var(--teal);background:#F7FDFC}
.uploader .dropzone:focus-within{border-color:var(--teal);box-shadow:0 0 0 3px rgba(0,201,183,.18)}
.uploader .dropzone.is-invalid{border-color:#D92D20;background:#FFF7F5}
.uploader .dropzone.is-full{opacity:.55;pointer-events:none}
.dropzone-ico{flex:none;display:grid;place-items:center;width:46px;height:46px;border-radius:12px;
  background:#fff;color:var(--teal-dark)}
.dropzone-text{font-size:.97rem;line-height:1.45}
.dropzone-text strong{color:var(--blue-dark)}
.dropzone-drag{color:var(--muted)}
.dropzone-text small{display:block;margin-top:.25rem;font-size:.82rem;line-height:1.45;color:var(--muted)}

.media-list{list-style:none;margin:.85rem 0 0;padding:0;display:grid;gap:.5rem}
.media-list li{position:relative;display:flex;align-items:center;gap:.75rem;overflow:hidden;
  padding:.7rem .85rem;background:#fff;border:1px solid var(--line);border-radius:12px}
.media-ico{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;
  background:var(--bg-soft);color:var(--teal-dark)}
.media-list li[data-kind="video"] .media-ico{background:rgba(1,171,230,.1);color:var(--blue-dark)}
.media-meta{flex:1;min-width:0}
.media-name{display:block;font-size:.92rem;font-weight:600;line-height:1.3;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.media-size{display:block;font-size:.8rem;color:var(--muted)}
.media-remove{flex:none;width:28px;height:28px;border:0;border-radius:50%;cursor:pointer;
  display:grid;place-items:center;background:var(--bg-soft);color:var(--muted);font-size:17px;line-height:1}
.media-remove:hover{background:var(--ink);color:#fff}
.media-bar{position:absolute;left:0;bottom:0;height:3px;width:0;background:var(--teal);
  transition:width .2s ease}
.media-list li.is-uploading{opacity:.75}

.uploader-status{margin:.6rem 0 0;font-size:.86rem;color:var(--muted)}
.uploader-status:empty{display:none}
.uploader-status.is-bad{color:#B42318;font-weight:600}

/* ---------- Step 3 ------------------------------------------ */
.wiz-step[data-step="3"] .field:last-of-type{margin-bottom:0}

.choice-set{border:0;margin:0 0 1.5rem;padding:0;min-width:0}
.choice-set legend{padding:0;margin-bottom:.6rem;font-size:.93rem;font-weight:600}
.choices{display:grid;gap:.7rem;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.choice{position:relative;display:flex;align-items:flex-start;gap:.8rem;cursor:pointer;
  padding:1rem 1.1rem;background:#fff;border:1.5px solid var(--line);border-radius:14px;
  transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.choice:hover{border-color:#BFD3D5;background:var(--bg-soft)}
.choice input{position:absolute;opacity:0;width:1px;height:1px}
.choice-ico{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:11px;
  background:var(--bg-soft);color:var(--teal-dark)}
.choice-text strong{display:block;font-size:1rem;line-height:1.3}
.choice-text small{display:block;margin-top:.15rem;font-size:.85rem;line-height:1.4;color:var(--muted)}
.choice:has(input:checked),.choice.is-picked{border-color:var(--teal);background:#F7FDFC;
  box-shadow:0 0 0 3px rgba(0,201,183,.16)}
.choice:has(input:checked) .choice-ico,.choice.is-picked .choice-ico{background:var(--teal);color:var(--ink)}
.choice:focus-within{outline:3px solid var(--blue);outline-offset:3px}
.choice-set.is-invalid .choice{border-color:#D92D20}

.pref-panel{margin-bottom:.2rem}

/* ---------- SMS consent ------------------------------------- */
/* Deliberately plain and legible rather than tucked away in small
   print: this is the record of what the customer agreed to. */
.consent{margin:-.3rem 0 1.4rem;padding:1rem 1.15rem;background:var(--bg-soft);
  border:1px solid var(--line);border-radius:14px}
.consent.is-invalid{border-color:#D92D20;background:#FFF7F5}
.consent-line{display:flex;align-items:flex-start;gap:.7rem;cursor:pointer;
  font-size:.92rem;font-weight:500;line-height:1.5}
.consent-line input{flex:none;width:20px;height:20px;margin:.15rem 0 0;accent-color:var(--teal-dark);cursor:pointer}
.consent-small{margin:.6rem 0 0;padding-left:1.9rem;font-size:.82rem;line-height:1.55;color:var(--muted)}
.consent-small strong{color:var(--ink);font-weight:700}
.consent .field-error{padding-left:1.9rem}

/* ---------- Success ----------------------------------------- */
/* The badge, the heading and the opening line are centred on the
   card. The what-happens-next rows below stay left-aligned inside a
   centred block: centring a list of sentences makes every line start
   in a different place and slows reading right down. */
.quote-done{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--shadow);padding:clamp(1.75rem,4.5vw,2.75rem);text-align:center}
.quote-done:focus{outline:none}
.quote-done-ico{display:grid;place-items:center;width:62px;height:62px;border-radius:50%;
  margin:0 auto 1.35rem;background:var(--grad);color:#fff;box-shadow:var(--grad-shadow)}
.quote-done h1,.quote-done h2{font-size:clamp(1.4rem,3vw,1.85rem);margin:0 auto .6rem;
  letter-spacing:-.02em;line-height:1.2;max-width:24ch}
.quote-done-lede{margin:0 auto 2.1rem;font-size:1.02rem;line-height:1.6;color:var(--muted);
  max-width:48ch}

.done-next{list-style:none;margin:0 auto;padding:0;display:grid;gap:0;
  max-width:34rem;text-align:left}
.done-next li{display:grid;grid-template-columns:minmax(0,11rem) minmax(0,1fr);gap:.4rem 1.5rem;
  padding:1.1rem 0;border-top:1px solid var(--line)}
.done-next li:first-child{border-top:0;padding-top:0}
.done-when{font-size:.76rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;
  color:var(--teal-dark);padding-top:.2rem}
.done-what{font-size:.97rem;line-height:1.6;color:var(--ink)}
.done-what strong{font-weight:700;white-space:nowrap}

.done-aside{margin:1.75rem auto 0;padding-top:1.4rem;border-top:1px solid var(--line);
  max-width:34rem;font-size:.9rem;color:var(--muted)}
.done-aside a{font-weight:700}

@media(max-width:560px){
  .done-next li{grid-template-columns:1fr;gap:.3rem}
  .done-when{padding-top:0}
}

@media(max-width:640px){
  .wiz-rail{font-size:0;gap:.35rem}
  .wiz-rail li span{font-size:.72rem}
  .wiz-rail li{padding-bottom:.55rem}
  .uploader .dropzone{flex-direction:column;align-items:flex-start;gap:.75rem}
  .dropzone-drag{display:none}
  .wiz-confirmed{padding-left:0}
  /* Side by side these two eat a third of a phone screen and squeeze
     the heading onto three lines, so they stack instead. */
  .wiz-aside{flex-direction:column;align-items:flex-end;gap:.4rem}
  .wiz-preview{width:56px;height:56px;border-radius:10px}
  .wiz-change{align-self:flex-end;padding:.1rem 0;font-size:.84rem}
}
