/* ProABD quote widget. The form fills the iframe and keeps that size on every step:
   the header sits at the top, the main button is pinned to the bottom, and only the
   middle scrolls when a step has more than fits. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: transparent; -webkit-text-size-adjust: 100%; }

/* Surface tokens come from the broker's saved setting, not the visitor's theme. */
.wq {
  --wq-surface: #FFFFFF; --wq-ink: #17202E; --wq-muted: #5D6676; --wq-line: #E3E6EB;
  --wq-field: #F5F6F8; --wq-field-line: #D3D9E0; --wq-danger: #B42318;
  --wq-accent: #003054; --wq-on-accent: #FFFFFF; --wq-accent-text: #003054;
  --wq-font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px; --r-sm: 10px; --r-lg: 18px; --r-pill: 999px;
  color-scheme: light;
  container-type: inline-size;
  height: 100%;
  background: var(--wq-surface); color: var(--wq-ink);
  font-family: var(--wq-font); font-size: 16px; line-height: 1.4;
  border: 1px solid var(--wq-line); border-radius: var(--r-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.wq[data-surface="dark"] {
  --wq-surface: #141B26; --wq-ink: #E9EDF3; --wq-muted: #9AA4B4; --wq-line: #273142;
  --wq-field: #1B2432; --wq-field-line: #354257; --wq-danger: #FF8F80;
  color-scheme: dark;
}
.wq[data-corners="sharp"] { --r: 3px; --r-sm: 2px; --r-lg: 4px; --r-pill: 2px; }
.wq { --wq-accent-soft: color-mix(in oklab, var(--wq-accent) 11%, var(--wq-surface)); --wq-ring: color-mix(in oklab, var(--wq-accent) 32%, transparent); }

.wq :where(button, input, select) { font: inherit; color: inherit; }
.wq a { color: var(--wq-accent-text); }
.wq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wq-top { flex: none; display: flex; align-items: center; gap: 12px; min-height: 32px; padding: 16px 20px 0; box-sizing: content-box; }
.wq-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; min-width: 0; }
.wq-brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wq-logo { flex: none; width: 32px; height: 32px; border-radius: calc(var(--r-sm) - 2px); background: var(--wq-accent); color: var(--wq-on-accent); display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.wq-logo-img { flex: none; display: block; height: 32px; max-width: 150px; object-fit: contain; object-position: left center; }
.wq-count { margin-left: auto; color: var(--wq-muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wq-preview-note { flex: none; margin: 10px 20px 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--wq-accent-soft); font-size: 13.5px; line-height: 1.35; }
.wq-noscript { margin: 16px 20px; }

/* Every step fills the same box: content scrolls in the middle, the main button stays put at the bottom */
.wq-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wq-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.wq-foot { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px 20px 20px; border-top: 1px solid transparent; transition: border-color .15s; }
.wq-panel.has-more .wq-foot { border-top-color: var(--wq-line); }
.wq-title { margin: 0; font-weight: 700; font-size: 23px; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.wq-title:focus { outline: none; }

.wq-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wq-label { font-size: 14px; font-weight: 600; line-height: 20px; }
.wq-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.wq-fieldset > legend { padding: 0; margin-bottom: 8px; }
.wq-input, .wq-select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 48px; padding: 0 14px; margin: 0;
  font-size: 16px; color: var(--wq-ink); background: var(--wq-field);
  border: 1px solid var(--wq-field-line); border-radius: var(--r-sm);
  transition: border-color .12s, box-shadow .12s, background-color .12s;
}
.wq-input::placeholder { color: var(--wq-muted); opacity: 1; }
.wq-input:focus, .wq-select:focus { outline: none; border-color: var(--wq-accent); background: var(--wq-surface); box-shadow: 0 0 0 3px var(--wq-ring); }
.wq-input[aria-invalid="true"], .wq-select[aria-invalid="true"] { border-color: var(--wq-danger); }
.wq-select-wrap { position: relative; }
.wq-select-wrap::after { content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--wq-muted); border-bottom: 2px solid var(--wq-muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.wq-select { padding-right: 36px; cursor: pointer; }
.wq-error { margin: 0; color: var(--wq-danger); font-size: 14px; line-height: 1.35; }
.wq-note { margin: 0; color: var(--wq-muted); font-size: 14px; line-height: 1.4; }

/* Suggestions */
.wq-combo { position: relative; }
.wq-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--wq-surface); border: 1px solid var(--wq-field-line); border-radius: var(--r-sm); box-shadow: 0 14px 30px -14px rgba(10, 18, 32, .45); max-height: 264px; overflow-y: auto; }
.wq-list.is-up { top: auto; bottom: calc(100% + 6px); }
.wq-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px; border-radius: max(var(--r-sm) - 4px, 2px); cursor: pointer; }
.wq-list li[aria-selected="true"] { background: var(--wq-accent-soft); }
.wq-list .opt-sub { color: var(--wq-muted); font-size: 14px; font-variant-numeric: tabular-nums; flex: none; }
.wq-list .opt-free, .wq-list .opt-empty { color: var(--wq-muted); }
.wq-list li.opt-empty { cursor: default; }

/* The route: pickup and delivery joined like stops on a line */
.wq-route { display: grid; gap: 14px; }
.wq-stop { position: relative; padding-left: 26px; display: flex; flex-direction: column; gap: 6px; }
.wq-marker { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--wq-field-line); background: var(--wq-surface); transition: background-color .15s, border-color .15s; }
.wq-stop.has-place .wq-marker.is-origin { border-color: var(--wq-ink); }
.wq-stop.has-place .wq-marker.is-dest { border-color: var(--wq-accent); background: var(--wq-accent); }
.wq-stop.is-origin::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: -16px; border-left: 2px dashed var(--wq-field-line); }
.wq-route.is-set .wq-stop.is-origin::after { border-left-style: solid; border-left-color: var(--wq-accent); }
@container (min-width: 600px) {
  .wq-route { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .wq-stop.is-origin::after { display: none; }
}

/* Single-choice chips and tiles */
.wq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wq-choice { position: relative; }
.wq-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.wq-choice label { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--wq-field-line); border-radius: var(--r-pill); background: var(--wq-surface); cursor: pointer; font-weight: 500; transition: border-color .12s, background-color .12s; }
.wq-choice input:checked + label { border-color: var(--wq-accent); background: var(--wq-accent-soft); box-shadow: inset 0 0 0 1px var(--wq-accent); }
.wq-choice input:focus-visible + label { box-shadow: 0 0 0 3px var(--wq-ring), inset 0 0 0 1px var(--wq-accent); }
.wq-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wq-tiles .wq-choice { display: flex; }
.wq-tiles .wq-choice label { flex: 1; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; padding: 10px 14px; border-radius: var(--r); }
.wq-tile-title { font-weight: 600; }
.wq-tile-desc { color: var(--wq-muted); font-size: 13.5px; font-weight: 400; line-height: 1.3; }

/* Vehicles */
.wq-vehicles { list-style: none; margin: 0; padding: 0; border: 1px solid var(--wq-line); border-radius: var(--r); }
.wq-vehicles li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 6px 8px 14px; }
.wq-vehicles li + li { border-top: 1px solid var(--wq-line); }
.wq-veh-name { font-weight: 600; }
.wq-veh-sub { color: var(--wq-muted); font-size: 14px; }
.wq-icon-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--wq-muted); border-radius: var(--r-sm); cursor: pointer; }
.wq-icon-btn:hover { background: var(--wq-field); color: var(--wq-ink); }
.wq-veh { display: flex; flex-direction: column; gap: 14px; }
.wq-veh-head { display: flex; justify-content: space-between; align-items: center; }
.wq-veh-head p { margin: 0; font-weight: 600; }
.wq-veh-grid { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
.wq-veh-grid .is-model { grid-column: 1 / -1; }
@container (min-width: 560px) {
  .wq-veh-grid { grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1fr); }
  .wq-veh-grid .is-model { grid-column: auto; }
}
.wq-contact-grid { display: grid; gap: 14px; }
@container (min-width: 560px) {
  .wq-contact-grid { grid-template-columns: 1fr 1fr; }
  .wq-contact-grid .is-name { grid-column: 1 / -1; }
}

/* Buttons */
.wq-primary { height: 52px; width: 100%; border: 0; border-radius: var(--r-sm); background: var(--wq-accent); color: var(--wq-on-accent); font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: filter .12s, transform .06s; }
.wq a.wq-primary { color: var(--wq-on-accent); }
.wq-primary:hover { filter: brightness(1.1); }
.wq-primary:active { transform: translateY(1px); }
.wq-primary:focus-visible { outline: 3px solid var(--wq-ring); outline-offset: 2px; }
.wq-primary[aria-busy="true"] { cursor: progress; filter: none; }
.wq-secondary { height: 48px; width: 100%; border: 1px solid var(--wq-field-line); border-radius: var(--r-sm); background: var(--wq-surface); font-weight: 600; cursor: pointer; }
.wq-secondary:hover { background: var(--wq-field); }
.wq-secondary:focus-visible, .wq-link:focus-visible, .wq-icon-btn:focus-visible, .wq-back:focus-visible { outline: 3px solid var(--wq-ring); outline-offset: 1px; }
.wq-link { background: none; border: 0; padding: 4px 0; color: var(--wq-accent-text); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-radius: 4px; align-self: flex-start; }
.wq-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.wq-back { background: none; border: 0; padding: 4px 6px 4px 0; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--wq-ink); cursor: pointer; border-radius: 4px; }
.wq-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: wq-spin .7s linear infinite; }

/* Trip summary carried from step to step */
.wq-ticket { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--wq-field); border-radius: var(--r); }
.wq-ticket-route { display: grid; grid-template-columns: minmax(0, max-content) minmax(28px, 1fr) minmax(0, max-content); align-items: center; gap: 10px; font-weight: 600; font-size: 16px; line-height: 1.25; }
.wq-ticket-route .place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wq-ticket-line { position: relative; height: 12px; }
.wq-ticket-line::before { content: ""; position: absolute; left: 6px; right: 6px; top: 5px; height: 2px; background: var(--wq-accent); }
.wq-ticket-line::after { content: ""; position: absolute; right: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--wq-accent); }
.wq-ticket-line .ring { position: absolute; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--wq-ink); background: var(--wq-field); }
.wq-ticket-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--wq-muted); min-width: 0; }
.wq-ticket-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wq-ticket-row .wq-link { font-size: 14px; flex: none; padding: 0; align-self: auto; }

/* Consent */
.wq-consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 13.5px; line-height: 1.45; color: var(--wq-muted); }
.wq-consent input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--wq-field-line); border-radius: min(var(--r-sm), 5px); background: var(--wq-surface); display: grid; place-items: center; cursor: pointer; }
.wq-consent input::after { content: ""; width: 5px; height: 10px; border: solid var(--wq-on-accent); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); opacity: 0; }
.wq-consent input:checked { background: var(--wq-accent); border-color: var(--wq-accent); }
.wq-consent input:checked::after { opacity: 1; }
.wq-consent input:focus-visible { outline: 3px solid var(--wq-ring); outline-offset: 2px; }
.wq-consent input[aria-invalid="true"] { border-color: var(--wq-danger); }
.wq-consent label { cursor: pointer; }
.wq-consent .wq-error { grid-column: 2; }
.wq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Result */
.wq-result .wq-scroll { gap: 18px; }
.wq-price-block { display: flex; flex-direction: column; gap: 4px; }
.wq-qnum { color: var(--wq-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.wq-qnum:focus { outline: none; }
.wq-price { margin: 0; font-weight: 700; font-size: 54px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.wq-price .cur { font-size: .5em; vertical-align: .7em; margin-right: 2px; }
.wq-price-title { margin: 0; font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.wq-price-title:focus { outline: none; }
.wq-price-note { margin: 4px 0 0; color: var(--wq-muted); font-size: 15px; line-height: 1.45; max-width: 46ch; white-space: pre-line; }
.wq-thanks { margin: 10px 0 0; color: var(--wq-ink); font-size: 15px; line-height: 1.5; max-width: 46ch; white-space: pre-line; }
.wq-trip { display: flex; flex-direction: column; gap: 8px; }
.wq-trip-places { display: flex; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 16px; line-height: 1.25; }
.wq-trip-places span:last-child { text-align: right; }
.wq-trip-line { position: relative; height: 14px; }
.wq-trip-line .track { position: absolute; left: 7px; right: 7px; top: 6px; height: 2px; background: var(--wq-accent); transform-origin: left center; }
.wq-trip-line .stop { position: absolute; top: 0; width: 14px; height: 14px; border-radius: 50%; }
.wq-trip-line .stop.is-origin { left: 0; border: 2px solid var(--wq-ink); background: var(--wq-surface); }
.wq-trip-line .stop.is-dest { right: 0; background: var(--wq-accent); }
.wq-trip-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--wq-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.wq-details { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); border-top: 1px solid var(--wq-line); }
.wq-details dt, .wq-details dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--wq-line); font-size: 15px; }
.wq-details dt { color: var(--wq-muted); padding-right: 20px; }
.wq-details dd { text-align: right; }
.wq-status { margin: 0; font-size: 14px; color: var(--wq-muted); }

@keyframes wq-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .wq-panel.is-entering .wq-scroll { animation: wq-in 200ms ease-out; }
  .wq-result.is-new .wq-trip-line .track { animation: wq-draw 820ms cubic-bezier(.3, .7, .2, 1) both; }
  .wq-result.is-new .wq-trip-line .stop.is-dest { animation: wq-pop 260ms 760ms ease-out both; }
  .wq-result.is-new .wq-price-block { animation: wq-rise 420ms 140ms ease-out both; }
}
@keyframes wq-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes wq-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wq-pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes wq-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
