/* ============================================================
   QUOTE.CSS — the quoter ("feels like an app" on mobile)
   ============================================================ */
.quote-hero { min-height: clamp(320px, 40vh, 420px) !important; }
.quote-hero .page-hero__content { padding-bottom: clamp(110px, 12vw, 160px); }
.quote-section { padding-top: 0; margin-top: calc(-1 * clamp(60px, 8vw, 110px)); position: relative; z-index: 2; }
.quoter { max-width: 920px; margin-inline: auto; padding: clamp(20px, 4vw, 48px); border-radius: var(--radius-lg); }
.quoter__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 28px; }
.quoter__progress { flex: 1 1 100%; height: 6px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.quoter__progress span { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); transition: width .5s var(--ease-out); }
.quoter__count { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); margin-right: auto; }
.quoter__loading { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); min-height: 200px; }
.quoter__nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.quoter__nav:empty { display: none; }
.quoter__disclaimer { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px auto 0; max-width: 920px; font-size: var(--fs-sm); color: var(--ink-muted); text-align: center; }
/* Housecall Pro lead form: the form inside the iframe is a white box capped
   at 534px and pinned left, so the iframe is sized to it and centered, and
   the card is white so the form and card read as one surface. */
.quoter--hcp { max-width: 600px; min-height: 480px; padding: clamp(8px, 2.5vw, 33px); background: #fff; }
.quoter--hcp iframe { display: block; width: 534px; max-width: 100%; min-height: 480px; margin-inline: auto; border: 0; background: transparent; }
.quoter__noscript { padding: 18px; background: var(--tint); border-radius: var(--radius-sm); }

.qstep--enter { animation: qstep-in .45s var(--ease-out); }
@keyframes qstep-in { from { opacity: 0; transform: translateY(10px); } }
.qstep__head { display: grid; gap: 8px; margin-bottom: 24px; }
.qstep__title { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); outline: none; }
.qstep__title:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 6px; }
.qstep__sub { color: var(--ink-muted); max-width: 60ch; }

/* service tiles */
.qtiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.qtile, .qcard { position: relative; display: block; cursor: pointer; }
.qtile input, .qcard input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.qtile__box {
  position: relative;
  display: grid; gap: 8px; align-content: start;
  min-height: 150px; height: 100%;
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s, transform .25s var(--ease);
}
.qtile:hover .qtile__box, .qcard:hover .qcard__box { border-color: var(--ink-muted); transform: translateY(-2px); }
.qtile input:checked + .qtile__box, .qcard input:checked + .qcard__box { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink), var(--shadow-soft); background: var(--surface); }
.qtile input:focus-visible + .qtile__box, .qcard input:focus-visible + .qcard__box { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.qtile.is-disabled { cursor: not-allowed; }
.qtile.is-disabled .qtile__box { opacity: .5; }
.qtile__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--tint); color: var(--accent-text); flex: none; }
.qtile__name { font-weight: 600; font-size: var(--fs-base); }
.qtile__desc { font-size: var(--fs-sm); color: var(--ink-muted); line-height: 1.45; }
.qtile__check {
  position: absolute; top: 16px; right: 16px;
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); color: transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.qtile input:checked + .qtile__box .qtile__check { background: var(--ink); border-color: var(--ink); color: #fff; }
.qbundle { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--bg-2); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-muted); }
.qbundle.is-on { background: #E3F4E8; color: #1D5B33; }

/* option cards */
.qcards { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.qcards--2 { grid-template-columns: 1fr 1fr; }
.qcards--4 { grid-template-columns: repeat(4, 1fr); }
.qcard__box {
  display: grid; gap: 4px; align-content: center;
  min-height: 64px; height: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s, transform .25s var(--ease);
}
.qcards--2 .qcard__box { min-height: 120px; padding: 20px; gap: 8px; align-content: start; }
.qcard__label { font-weight: 600; font-size: var(--fs-sm); }
.qcards--2 .qcard__label { font-size: var(--fs-base); }
.qcard__desc { font-size: var(--fs-xs); color: var(--ink-muted); line-height: 1.4; }
@media (max-width: 760px) { .qcards, .qcards--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .qcards, .qcards--4, .qcards--2 { grid-template-columns: 1fr; } }

.qquestions { display: grid; gap: 28px; }
.qfield { border: 0; display: grid; gap: 10px; min-width: 0; }
.qfield__label { font-weight: 600; font-size: var(--fs-base); }
.qnote { font-size: var(--fs-sm); color: #6A4A00; background: #FFF1D6; border-radius: var(--radius-xs); padding: 10px 14px; }
.qnote:empty { display: none; }

/* stepper */
.qstepper { display: inline-flex; align-items: center; gap: 6px; }
.qstepper__btn { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: 1.4rem; font-weight: 500; background: var(--surface); }
.qstepper__btn:hover { border-color: var(--ink); }
.qstepper__input { width: 110px; text-align: center; font-weight: 600; font-size: 1.2rem; -moz-appearance: textfield; }
.qstepper__input::-webkit-outer-spin-button, .qstepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* switch */
.qswitch { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; cursor: pointer; font-weight: 600; position: relative; }
.qswitch__input { position: absolute; opacity: 0; width: 52px; height: 30px; margin: 0; cursor: pointer; }
.qswitch__track { position: relative; width: 52px; height: 30px; border-radius: 30px; background: var(--line-strong); transition: background .2s; flex: none; }
.qswitch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.qswitch__input:checked + .qswitch__track { background: var(--ink); }
.qswitch__input:checked + .qswitch__track::after { transform: translateX(22px); }
.qswitch__input:focus-visible + .qswitch__track { outline: 2.5px solid var(--focus); outline-offset: 3px; }

/* result */
.qresult__total {
  position: relative; overflow: hidden;
  display: grid; gap: 6px; justify-items: start;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--dark-card); color: #fff;
}
.qresult__total::after { content: ''; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%); opacity: .55; }
.qresult__label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-on-dark); }
.qresult__range { font-family: var(--font-display); text-transform: uppercase; font-weight: 700; font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.2rem); line-height: 1; letter-spacing: var(--track-display); }
.qresult__range--sm { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem); }
.qresult__tax { color: rgba(255, 255, 255, .8); font-size: var(--fs-sm); }
.qresult__bundle { margin-top: 6px; font-weight: 600; font-size: var(--fs-sm); color: #A7E3BB; }
.qresult__sub { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); margin: 28px 0 10px; }
.qresult__rows { list-style: none; display: grid; gap: 8px; }
.qresult__row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bg); }
.qresult__row .qtile__icon { width: 40px; height: 40px; }
.qresult__name { font-weight: 600; font-size: var(--fs-sm); }
.qresult__name small { display: block; font-weight: 500; color: var(--ink-muted); font-size: var(--fs-xs); }
.qresult__row strong { font-size: var(--fs-sm); text-align: right; }
.qresult__row--note .qresult__name { color: #6A4A00; }
.qresult__disclaimer { margin-top: 18px; font-size: var(--fs-sm); color: var(--ink-muted); }
.qresult__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.qresult .form-status { margin-top: 14px; }
@media (max-width: 520px) {
  .qresult__row { grid-template-columns: auto 1fr; }
  .qresult__row strong { grid-column: 2; text-align: left; }
  .qresult__actions .btn { width: 100%; justify-content: space-between; }
}

/* success */
.qsuccess { display: grid; gap: 14px; justify-items: start; }
.qsuccess__icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: #E3F4E8; color: #1D5B33; }
.qsuccess__range { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); font-weight: 700; }
.qsuccess__steps { padding-left: 1.2em; display: grid; gap: 6px; color: var(--ink-muted); }

/* Mobile: full-bleed card, sticky navigation like an app */
@media (max-width: 640px) {
  .quote-section { margin-top: -40px; }
  .quote-section .container { width: 100%; }
  .quoter { border-radius: var(--radius) var(--radius) 0 0; padding: 22px 16px 0; }
  .quoter__nav { position: sticky; bottom: 0; background: var(--surface); margin: 24px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .18); z-index: 5; }
  .quoter__nav .btn[type="submit"] { flex: 1; justify-content: space-between; }
  .page-quote .admin-preview-bar { bottom: 84px; }
}
