/* S+T enquiry form. Brand: blue #3D5B9E, orange #F47B20, ABC Favorit (from the theme). */
.stq {
  --q-blue: #3D5B9E; --q-blue-dark: #2c4579; --q-orange: #F47B20; --q-orange-ink: #1b1b1b;
  --q-ink: #1b2440; --q-muted: #5a6480; --q-line: #d5dbe9; --q-soft: #f2f5fb; --q-bad: #b3261e; --q-warn: #a85a00;
  background: var(--q-blue); border-radius: 16px; padding: clamp(20px, 4vw, 40px) clamp(12px, 3vw, 32px);
  font-family: 'ABC Favorit', system-ui, sans-serif; color: var(--q-ink); scroll-margin-top: 90px;
  max-width: 880px; margin: 32px auto;
}
.stq *, .stq *::before, .stq *::after { box-sizing: border-box; }
.stq [hidden] { display: none !important; }
.stq__intro { color: #fff; margin: 0 auto 20px; max-width: 800px; padding: 0 8px; }
.stq__title { color: #fff; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; margin: 0 0 6px; font-weight: 700; }
.stq__lede { margin: 0; color: rgba(255, 255, 255, .88); font-size: 17px; }
.stq__form { background: #fff; border-radius: 12px; padding: clamp(18px, 3vw, 32px); max-width: 800px; margin: 0 auto; counter-reset: stqstep; }

.stq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Steps */
.stq-step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 16px; }
.stq-step + .stq-step, .stq-rest > .stq-step:first-child { border-top: 1px solid var(--q-line); margin-top: 28px; padding-top: 28px; }
.stq-step[hidden], .stq-rest[hidden] { display: none !important; }
.stq-step__title { float: left; width: 100%; padding: 0; margin: 0; font-size: 22px; font-weight: 700; color: var(--q-blue); line-height: 1.25; }
.stq-step__title + * { clear: both; }
.stq-step:not([hidden]) > .stq-step__title::before { counter-increment: stqstep; content: counter(stqstep) ". "; color: var(--q-orange); }
.stq-subtitle { margin: 6px 0 -4px; font-weight: 700; font-size: 17px; }
.stq-help, .stq-small { margin: -6px 0 0; color: var(--q-muted); font-size: 15px; line-height: 1.45; }
.stq-small { margin: 0; font-size: 14px; }
.stq-small a, .stq-help a { color: var(--q-blue); }

/* Fields */
.stq-row { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stq-field { margin: 0; display: grid; gap: 6px; min-width: 0; }
.stq-field label { font-weight: 600; font-size: 15px; line-height: 1.35; }
.stq-hint { display: block; font-weight: 400; color: var(--q-muted); font-size: 13.5px; }
.stq-narrow { max-width: 260px; }
.stq-field.is-highlight label::after { content: " · recommended"; color: var(--q-warn); font-weight: 600; font-size: 13px; }
.stq input[type=text], .stq input:not([type]), .stq input[type=email], .stq input[type=tel], .stq input[type=number], .stq input[type=date], .stq select, .stq textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--q-line); border-radius: 8px;
  background: #fff; color: var(--q-ink); font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
}
.stq textarea { min-height: 84px; resize: vertical; }
.stq input[type=file] { font-size: 15px; padding: 10px; border: 1.5px dashed var(--q-line); border-radius: 8px; background: var(--q-soft); width: 100%; }
.stq input:focus-visible, .stq select:focus-visible, .stq textarea:focus-visible, .stq button:focus-visible, .stq summary:focus-visible { outline: 3px solid var(--q-orange); outline-offset: 2px; }
.stq [aria-invalid="true"] { border-color: var(--q-bad); background: #fff7f6; }
.stq-check { margin: 0; }
.stq-check label { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; font-size: 15.5px; }
.stq-check input { width: 22px; height: 22px; accent-color: var(--q-blue); flex: 0 0 auto; }
.stq-reveal { display: none; }
.stq-reveal.is-shown, .stq:not(.js) .stq-reveal { display: grid; }
.stq-reveal.stq-row.is-shown { display: grid; }

/* Cards (radio / checkbox) */
.stq-cards { display: grid; gap: 10px; }
.stq-cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stq-cards--three { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.stq-cards--four, .stq-cards--auto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.stq-card {
  position: relative; display: grid; align-content: start; gap: 8px; min-height: 52px; padding: 10px 12px;
  border: 1.5px solid var(--q-line); border-radius: 10px; background: #fff; cursor: pointer; min-width: 0;
  transition: border-color .12s, box-shadow .12s;
}
.stq-card.has-photo { padding: 8px; }
.stq-card:hover { border-color: var(--q-blue); }
.stq-card input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.stq-card:has(input:checked) { border-color: var(--q-orange); box-shadow: inset 0 0 0 2px var(--q-orange); }
.stq-card:has(input:focus-visible) { outline: 3px solid var(--q-orange); outline-offset: 2px; }
.stq-card:has(input:checked)::after {
  content: "✓"; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--q-orange); color: var(--q-orange-ink); font: 700 14px/24px system-ui, sans-serif; text-align: center;
}
.stq-card input[type=checkbox] + .stq-card__img, .stq-card input[type=checkbox] + .stq-card__body { /* same look for ticks */ }
.stq-card__img { display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--q-soft); }
.stq-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stq-card__body { display: grid; gap: 2px; padding-right: 26px; }
.stq-card.has-photo .stq-card__body { padding: 0 4px 4px; }
.stq-card__title { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.stq-card__hint { color: var(--q-muted); font-size: 13.5px; line-height: 1.35; }
.stq-card__warn { color: var(--q-warn); font-size: 13px; font-weight: 600; line-height: 1.35; }
/* Fallback where :has() isn't supported: show the native control. */
@supports not selector(:has(*)) {
  .stq-card input { position: static; opacity: 1; width: 20px; height: 20px; }
}

/* Extras groups */
.stq-group { border: 1.5px solid var(--q-line); border-radius: 10px; background: #fff; }
.stq-group > .stq-cards { padding: 0 10px 10px; }
.stq-group__title { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; margin: 0; font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; }
div.stq-group > .stq-group__title { cursor: default; color: var(--q-blue); }
.stq-group__title::-webkit-details-marker { display: none; }
details.stq-group > .stq-group__title::after { content: "+"; margin-left: auto; color: var(--q-blue); font-size: 22px; font-weight: 400; }
details.stq-group[open] > .stq-group__title::after { content: "−"; }
.stq-count { color: var(--q-orange); font-size: 13px; font-weight: 600; }
details.stq-group > .stq-group__title .stq-count { margin-left: auto; }
details.stq-group > .stq-group__title .stq-count + ::after { margin-left: 0; }

/* Buttons, gate, send bar */
.stq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 8px; font: 700 16px 'ABC Favorit', system-ui, sans-serif; cursor: pointer;
}
.stq-btn--primary { background: var(--q-orange); color: var(--q-orange-ink); }
.stq-btn--primary:hover { filter: brightness(.95); }
.stq-btn[disabled] { opacity: .7; cursor: progress; }
.stq-gate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.stq-gate[hidden] { display: none; }
.stq-send {
  position: sticky; bottom: 0; z-index: 5; display: grid; gap: 10px; margin: 28px calc(-1 * clamp(18px, 3vw, 32px)) calc(-1 * clamp(18px, 3vw, 32px));
  padding: 14px clamp(18px, 3vw, 32px) calc(14px + env(safe-area-inset-bottom, 0px)); background: #fff;
  border-top: 1px solid var(--q-line); border-radius: 0 0 12px 12px; box-shadow: 0 -6px 16px rgba(27, 36, 64, .08);
}
.stq-btn--send { width: 100%; }
/* The site's fixed bottom bar on phones sits under the page; lift the send bar above it. */
body.stn-fit-3 .stq-send { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 1080px) { body.stn-2026:not(.stn-fit-js) .stq-send { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); } }

.stq-alert { margin: 0 0 20px; padding: 12px 14px; border-radius: 8px; background: #fff4f2; border: 1.5px solid var(--q-bad); color: var(--q-bad); font-weight: 600; }
.stq-alert[hidden] { display: none; }

/* No JavaScript: everything shows as one long page. */
.stq:not(.js) .stq-gate { display: none; }

@media (max-width: 600px) {
  .stq { border-radius: 0; margin: 24px -16px; padding: 24px 8px; }
  .stq__form { padding: 18px 14px; }
  .stq-send { margin: 24px -14px -18px; padding-left: 14px; padding-right: 14px; }
  .stq-cards--three, .stq-cards--four, .stq-cards--auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stq-card { padding: 8px 10px; }
  .stq-card__title { font-size: 15px; }
  .stq-step__title { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .stq * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Stretch+Care booking form ---------- */
.stq--care { max-width: 1160px; }
.stq--care .stq__intro, .stq--care .stq__form { max-width: 1080px; }
.stq__eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.stc-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.stc-main { min-width: 0; }
.stc-main > .stq-step:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.stc-main > .stq-step + .stq-step, .stc-main > .stq-rest > .stq-step { border-top: 1px solid var(--q-line); margin-top: 28px; padding-top: 28px; }
.stc-estimate {
  position: sticky; top: 96px; display: grid; gap: 12px; padding: 20px; border: 2px solid var(--q-blue); border-radius: 12px; background: #fff;
}
.stc-estimate__title { margin: 0; font-size: 19px; color: var(--q-blue); }
.stc-estimate__empty { margin: 0; color: var(--q-muted); font-size: 14.5px; line-height: 1.45; }
.stc-estimate__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.stc-estimate__lines li { display: flex; justify-content: space-between; gap: 12px; }
.stc-estimate__lines span { color: var(--q-muted); }
.stc-estimate__lines strong { white-space: nowrap; }
.stc-estimate__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding-top: 12px; border-top: 1px solid var(--q-line); font-size: 15px; }
.stc-estimate__total strong { font-size: 26px; color: var(--q-blue); }
.stq--care:not(.stc-show-estimate) .stc-estimate__lines,
.stq--care:not(.stc-show-estimate) .stc-estimate__total { display: none; }
.stq--care.stc-show-estimate .stc-estimate__empty { display: none; }
.stq--care:not(.js) .stc-estimate { display: none; }

.stc-count { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stc-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--q-line); border-radius: 10px; overflow: hidden; }
.stc-stepper__btn { width: 48px; height: 48px; border: 0; background: var(--q-soft); color: var(--q-blue); font-size: 24px; font-weight: 700; cursor: pointer; }
.stc-stepper__btn:hover { background: #e3e9f6; }
.stc-stepper__n { min-width: 56px; text-align: center; font-size: 20px; font-weight: 700; }
.stc-tents { display: grid; gap: 16px; }
.stc-tent { margin: 0; border: 1.5px solid var(--q-line); border-radius: 12px; padding: 16px; display: grid; gap: 14px; min-width: 0; background: #fff; }
.stc-tent__head { float: left; width: 100%; padding: 0; margin: 0 0 2px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.stc-tent__head + * { clear: both; }
.stc-tent__name { font-size: 18px; font-weight: 700; color: var(--q-blue); }
.stc-tent__price { font-weight: 700; font-size: 16px; }
.stc-tent [hidden] { display: none !important; }
.stc-dims { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.stc-dims .stq-field { flex: 1 1 120px; max-width: 180px; }
.stc-x { padding-bottom: 12px; color: var(--q-muted); font-weight: 700; }
.stc-area { margin: 0 0 12px; flex: 1 1 100%; color: var(--q-muted); font-size: 14.5px; }
.stq-cards--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stq-card--chip { min-height: 48px; align-content: center; padding: 8px 10px; }
.stq-card--chip .stq-card__body { padding-right: 0; }
.stq-card--chip:has(input:checked)::after { display: none; }
.stq-card--chip:has(input:checked) { background: #fff5ec; }
.stc-note { margin: 0; padding: 10px 12px; background: var(--q-soft); border-radius: 8px; font-size: 14px; color: var(--q-muted); line-height: 1.45; }
.stc-stop { margin: 0; padding: 12px 14px; border: 1.5px solid var(--q-warn); border-radius: 8px; background: #fff8ef; color: #6b3a00; font-size: 14.5px; line-height: 1.5; }
.stc-stop p { margin: 0 0 8px; }
.stc-stop p:last-child { margin: 0; }
.stc-damage { display: grid; gap: 14px; }
.stc-panels { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.stc-bell { width: 100%; height: auto; }
.stc-panel { fill: #fff; stroke: #3D5B9E; stroke-width: 1.5; }
.stc-panel--inner { fill: #eef2fb; }
.stc-panel.is-on { fill: #f8b98a; }
.stc-bell text { font: 700 13px system-ui, sans-serif; fill: #23386b; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.stc-pole { fill: #23386b; }
.stc-panel-ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.stc-tick { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; border: 1.5px solid var(--q-line); border-radius: 8px; cursor: pointer; font-size: 14px; }
.stc-tick input { width: 20px; height: 20px; accent-color: #c8560f; flex: 0 0 auto; }
.stc-tick:has(input:checked) { border-color: #c8560f; background: #fff3e8; }
.stc-tick--wide { grid-column: span 2; }
.stc-remove { justify-self: start; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--q-bad); font: 600 14px inherit; text-decoration: underline; cursor: pointer; }
.stc-rules { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: 15px; line-height: 1.5; }
.stq--care .stq-send { margin-top: 28px; }

@media (max-width: 960px) {
  .stc-layout { grid-template-columns: minmax(0, 1fr); }
  .stc-estimate { position: static; }
}
@media (max-width: 600px) {
  .stq-cards--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stc-panels { grid-template-columns: minmax(0, 1fr); }
  .stc-bell { max-width: 240px; justify-self: center; }
  .stc-panel-ticks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stc-tick span { font-size: 13px; }
  .stc-tent { padding: 14px 12px; }
}

/* The theme sets overflow-x:hidden on every .section, which stops sticky elements (the send bar,
   the Care estimate) from sticking. clip still prevents sideways spill but keeps sticky working. */
.section.enquiry_form_block { overflow-x: clip; overflow-y: visible; }

/* Phones: a floating send bar would cover a quarter of the screen, so it sits at the end of the form;
   damage panels show just their number (screen readers still read "Panel 3"). */
@media (max-width: 600px) {
  .stq-send { position: static; box-shadow: none; }
  .stc-tick { justify-content: center; }
  .stc-tick__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
  .stc-tick--wide .stc-tick__word { position: static; width: auto; height: auto; clip: auto; }
}

/* ---------- Stretch+Build project brief ---------- */
.stq--build { --q-blue: #1f5c63; --q-blue-dark: #174a50; } /* S+B teal, as in Jack's design */
.stq--build .stq-step__title { color: var(--q-blue); }
.stb-measure-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stb-measure { width: 100%; height: auto; background: var(--q-soft); border-radius: 10px; padding: 10px; }
.stb-mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stb-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stb-photo { display: grid; gap: 6px; padding: 12px; border: 1.5px dashed var(--q-line); border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.stb-photo input[type=file] { font-size: 13px; padding: 8px; }
@media (max-width: 700px) {
  .stb-measure-wrap { grid-template-columns: minmax(0, 1fr); }
  .stb-measure { max-width: 360px; }
}
@media (max-width: 600px) {
  .stb-photos { grid-template-columns: minmax(0, 1fr); }
}
.stq input[type=file] { min-height: 48px; }

/* Postcode check and address search (assets/address.js) */
.stq-pc-hint { display: block; margin-top: 4px; font-size: 14px; color: var(--q-muted); min-height: 1.2em; }
.stq-pc-hint.is-ok { color: #1f7a4d; font-weight: 600; }
.stq-pc-hint.is-bad { color: var(--q-bad); font-weight: 600; }
.stq-places { display: block; width: 100%; color-scheme: light; }
.stq-places + .stq-places-source { display: none; }
html.stq-no-places .stq-places { display: none; }
html.stq-no-places .stq-places + .stq-places-source { display: block; }
.stq-row:has(.stq-pc-hint) { align-items: start; }

/* Address search (Google's box) never wider than its column; 16px text on phones so iPhones don't zoom (18 Nov 2026). */
.stq .stq-places { min-width: 0 !important; max-width: 100%; box-sizing: border-box; }
.stq .stq-addr-msg { display: block; margin: 6px 0 0; font-size: 13.5px; color: #b4441a; } .stq .stq-addr-msg[hidden] { display: none; }
@media (max-width: 760px) { .stq input[type=text], .stq input[type=email], .stq input[type=tel], .stq input[type=date], .stq input[type=number], .stq textarea, .stq select { font-size: 16px; } }
