/* ==========================================================
   EveryLittle Bit Detailing — online booking / service agreement
   Builds on styles.css (variables, header, buttons, footer).
   ========================================================== */

.book-page { --bar-h: 64px; }
.nowrap { white-space: nowrap; }

/* ---------- Header extras ---------- */
.book-header-actions { display: flex; align-items: center; gap: 14px; }
.book-back {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 12px 0 6px; border-radius: 999px;
  color: var(--muted); font-weight: 600; text-decoration: none;
  border: 1px solid var(--line);
}
.book-back:hover { color: #fff; border-color: rgba(155,180,255,.45); }
.book-fleet { padding: 0 14px; }
.book-header-actions .header-call { width: auto; padding: 0 16px; }
@media (max-width: 479px) { .book-fleet { display: none; } } /* small phones: Fleet stays in the footer links */

/* ---------- Intro ---------- */
.book-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(800px 420px at 85% 0%, rgba(124,58,237,.26), transparent 62%),
              radial-gradient(600px 360px at 0% 100%, rgba(43,108,255,.2), transparent 65%),
              var(--bg);
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--line);
}
.book-hero h1 { font-size: clamp(2rem, 8vw, 3.1rem); font-weight: 800; color: #fff; max-width: 18ch; }
.book-hero h1 .accent {
  display: block;
  background: linear-gradient(90deg, var(--blue-bright), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.book-lead { color: var(--muted); margin-top: 14px; max-width: 60ch; font-size: 1.05rem; }
.book-hero .hero-points { margin-top: 20px; }
.book-hero .hero-points a { color: #fff; font-weight: 700; text-decoration: none; }

/* ---------- Layout ---------- */
.book-layout { display: grid; gap: 28px; padding-top: 28px; padding-bottom: 56px; }
.book-form { display: grid; gap: 18px; min-width: 0; }
.book-aside { display: none; }

/* ---------- Cards ---------- */
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.book-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  min-width: 0;
}
.book-card-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: #fff;
  padding: 0; margin: 0 0 6px; letter-spacing: -0.01em;
  float: left; width: 100%;          /* keeps legend inside the card padding */
}
.book-card-title + * { clear: both; }
.legend-sub { font-family: var(--font-body); font-size: .9rem; font-weight: 500; color: var(--muted); }
.step-badge {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-deep), var(--purple-deep));
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .95rem;
}
.req { color: #ff9db0; font-weight: 700; }
.opt { color: var(--muted); font-weight: 500; font-size: .88em; }

/* ---------- Fields ---------- */
.field-grid { display: grid; gap: 16px; margin-top: 14px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field-label, .choice-group > legend {
  font-weight: 600; color: #e8ecff; font-size: .98rem;
}
.choice-group > legend { padding: 0; margin-bottom: 2px; float: left; width: 100%; }
.choice-group > legend + * { clear: both; }
.field-hint { color: var(--muted); font-size: .9rem; line-height: 1.45; margin-top: 2px; }
.book-card > .field-hint { margin-top: 2px; margin-bottom: 10px; clear: both; }
.field-error { display: none; color: #ff9db0; font-size: .9rem; font-weight: 600; }
.is-invalid > .field-error { display: block; }

input[type="text"], input[type="tel"], input[type="email"], input[type="date"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg-2);
  border: 1.5px solid rgba(155,180,255,.28);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
input[type="date"] { color-scheme: dark; display: block; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
select {
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23a8b0cc' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 22px;
  padding-right: 42px;
}
textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #6d7594; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(77,159,255,.28);
}
input[readonly] { color: var(--muted); background: rgba(255,255,255,.02); border-style: dashed; }
.is-invalid > input, .is-invalid > select, .is-invalid > textarea { border-color: #ff6b8a; }

/* Visually hidden native controls (still focusable / announced) */
.tile input, .pkg input, .addon-opt input, .ack-opt input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.hp-field, .sig-file {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0;
}

/* ---------- Vehicle type tiles ---------- */
.choice-group { margin-top: 18px; }
.book-card.choice-group { margin-top: 0; }
.book-card > legend.book-card-title { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.vt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 92px; padding: 12px 10px; text-align: center;
  background: var(--bg-2); border: 2px solid rgba(155,180,255,.24); border-radius: var(--radius-sm);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.tile-icon { width: 34px; height: 34px; fill: var(--muted); }
.tile-label { font-weight: 700; color: #e8ecff; line-height: 1.25; }
.tile:hover .tile-body { border-color: rgba(155,180,255,.5); }
.tile input:checked + .tile-body {
  border-color: var(--blue); background: rgba(77,159,255,.12);
  box-shadow: 0 0 0 3px rgba(77,159,255,.18);
}
.tile input:checked + .tile-body .tile-icon { fill: var(--blue-bright); }
.tile input:focus-visible + .tile-body, .pkg input:focus-visible + .pkg-body,
.addon-opt input:focus-visible ~ .addon-box, .ack-opt input:focus-visible ~ .addon-box {
  outline: 3px solid var(--gold); outline-offset: 3px;
}
.is-invalid .tile-body, .is-invalid .pkg-body { border-color: rgba(255,107,138,.7); }

/* ---------- Package cards ---------- */
.pkg-grid { display: grid; gap: 12px; margin-top: 6px; }
.pkg { position: relative; display: block; cursor: pointer; }
.pkg-body {
  display: grid; gap: 10px; padding: 16px;
  background: var(--bg-2); border: 2px solid rgba(155,180,255,.22); border-radius: var(--radius);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.pkg:hover .pkg-body { border-color: rgba(155,180,255,.5); }
.pkg input:checked + .pkg-body {
  border-color: var(--blue);
  background: linear-gradient(180deg, rgba(43,108,255,.16), rgba(124,58,237,.1));
  box-shadow: var(--shadow-lg);
}
.pkg-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pkg-check {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(155,180,255,.5); background: transparent; position: relative;
}
.pkg input:checked + .pkg-body .pkg-check { border-color: var(--blue); background: var(--blue); }
.pkg input:checked + .pkg-body .pkg-check::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff;
}
.pkg-name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: #fff; }
.pkg-tag {
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(155,109,255,.18); color: #d7c4ff; border: 1px solid rgba(155,109,255,.4);
}
.pkg-tag-gold { background: var(--gold); color: #1a1200; border-color: var(--gold); }
.pkg-prices { display: flex; flex-wrap: wrap; gap: 8px; }
.pkg-price {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 6px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: opacity .15s ease;
}
.pp-label { font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.pp-amt { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: #fff; line-height: 1.2; }
/* once a vehicle type is chosen, highlight that price and fade the other */
.size-car .pkg-price[data-for="truck"], .size-truck .pkg-price[data-for="car"] { display: none; }
.size-car .pkg-price, .size-truck .pkg-price { border-color: rgba(77,159,255,.45); background: rgba(77,159,255,.1); }
.pkg-desc { color: var(--muted); font-size: .93rem; line-height: 1.45; }

/* ---------- Add-ons & acknowledgements ---------- */
.addon-list, .ack-list { display: grid; gap: 10px; margin-top: 6px; }
.addon-opt, .ack-opt {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 12px 14px; cursor: pointer;
  background: var(--bg-2); border: 1.5px solid rgba(155,180,255,.22); border-radius: var(--radius-sm);
  transition: border-color .15s ease, background-color .15s ease;
}
.ack-opt { align-items: flex-start; color: #e4e8f8; line-height: 1.45; }
.addon-opt:hover, .ack-opt:hover { border-color: rgba(155,180,255,.5); }
.addon-box {
  flex: none; width: 24px; height: 24px; border-radius: 7px;
  border: 2px solid rgba(155,180,255,.55); position: relative; background: transparent;
}
.addon-opt input:checked ~ .addon-box, .ack-opt input:checked ~ .addon-box {
  background: linear-gradient(135deg, var(--blue-deep), var(--purple-deep)); border-color: var(--blue);
}
.addon-opt input:checked ~ .addon-box::after, .ack-opt input:checked ~ .addon-box::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 7px; height: 12px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.addon-opt:has(input:checked), .ack-opt:has(input:checked) { border-color: var(--blue); background: rgba(77,159,255,.08); }
.addon-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.addon-title { font-weight: 600; color: #e8ecff; }
.addon-note { display: none; font-size: .82rem; font-weight: 700; color: var(--gold); }
.addon-cost { font-family: var(--font-head); font-weight: 800; font-size: 1.12rem; color: var(--blue-bright); }
.addon-opt.is-included { cursor: not-allowed; opacity: .6; border-style: dashed; }
.addon-opt.is-included .addon-title, .addon-opt.is-included .addon-cost { text-decoration: line-through; }
.addon-opt.is-included .addon-note { display: block; }
.addon-opt.is-included .addon-box { border-color: rgba(155,180,255,.25); }
.is-invalid > .ack-opt { border-color: rgba(255,107,138,.7); }

/* ---------- Estimate ---------- */
.estimate-card { border-left: 6px solid var(--purple); }
.est-lines { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.est-lines li { display: flex; justify-content: space-between; gap: 12px; color: #e4e8f8; }
.est-lines li span:last-child { font-weight: 700; white-space: nowrap; }
.est-lines .est-sub { color: var(--muted); font-size: .92rem; }
.est-lines .est-included span:last-child { color: var(--gold); font-weight: 700; }
.est-lines .est-empty { color: var(--muted); }
.est-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-weight: 700; color: #fff;
}
.est-total output {
  font-family: var(--font-head); font-weight: 800; font-size: 2.1rem; line-height: 1;
  background: linear-gradient(90deg, var(--blue-bright), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.est-note { color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* ---------- Signature ---------- */
.sig-wrap {
  position: relative; height: 190px; margin-top: 4px;
  border-radius: var(--radius-sm); overflow: hidden;
  background: #fbfcff; border: 2px solid rgba(155,180,255,.4);
}
.sig-pad { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; display: block; }
.sig-line {
  position: absolute; left: 18px; right: 18px; bottom: 44px; height: 0;
  border-bottom: 2px dashed #b9c0da; pointer-events: none;
}
.sig-line::before {
  content: "\00d7"; position: absolute; left: 0; bottom: 2px;
  font-size: 1.4rem; line-height: 1; color: #8a93b4;
}
.sig-placeholder {
  position: absolute; left: 0; right: 0; bottom: 14px; text-align: center;
  font-size: .9rem; color: #7d86a8; pointer-events: none;
}
.sig-wrap.has-ink .sig-placeholder { display: none; }
.sig-wrap:focus-within { box-shadow: 0 0 0 3px rgba(77,159,255,.28); }
.is-invalid > .sig-wrap { border-color: #ff6b8a; }
.sig-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.sig-actions .btn { min-height: 44px; }

/* ---------- Submit ---------- */
.submit-area { display: grid; gap: 12px; padding: 4px 0 8px; }
.submit-btn { width: 100%; }
.submit-btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.submit-fine { color: var(--muted); font-size: .9rem; text-align: center; }
.book-alert {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(77,159,255,.1); border: 1px solid rgba(77,159,255,.3); color: #dbe7ff;
}
.book-alert-error { background: rgba(255,107,138,.1); border-color: rgba(255,107,138,.45); color: #ffd6df; }
.book-alert a { color: #fff; font-weight: 700; }
.book-alert ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Aside (desktop) ---------- */
.aside-card {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 24px 22px;
  border-top: 4px solid var(--blue);
}
.aside-pkg { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: #fff; }
.aside-sub { color: var(--muted); font-size: .95rem; margin-top: 2px; }
.aside-addons { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.aside-addons li { display: flex; justify-content: space-between; gap: 10px; color: #e4e8f8; font-size: .95rem; }
.aside-addons li span:last-child { font-weight: 700; }
.aside-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: #fff; font-weight: 600;
}
.aside-total strong { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; color: var(--blue-bright); }
.aside-note { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.aside-btn { width: 100%; margin-top: 16px; }
.aside-help { color: var(--muted); font-size: .9rem; margin-top: 14px; text-align: center; }

/* ---------- Sticky estimate bar (mobile) ---------- */
.book-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(7,7,15,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0,0,0,.4);
}
.book-bar-total { display: grid; line-height: 1.15; }
.book-bar-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.book-bar-total strong { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; color: #fff; }
.book-bar-btn { min-height: 46px; padding: 0 20px; }

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .book-card { padding: 26px 24px; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-full { grid-column: 1 / -1; }
  .pkg-grid { grid-template-columns: 1fr 1fr; }
  .addon-list { grid-template-columns: 1fr 1fr; }
  .submit-btn { width: auto; justify-self: start; }
  .submit-fine { text-align: left; }
  .sig-wrap { height: 210px; }
}
@media (min-width: 900px) {
  .book-hero { padding: 56px 0 44px; }
  .book-layout {
    grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start;
    padding-top: 40px; padding-bottom: 88px;
  }
  .book-aside { display: block; height: 100%; }
  .book-bar { display: none; }
  .book-card { padding: 30px 30px; }
  .book-back { padding: 0 14px 0 8px; }
}
@media (max-width: 380px) {
  .brand-name { font-size: .92rem; }
  .book-back span { display: none; }
  .book-back { padding: 0 10px; }
}
@media print {
  .site-header, .book-bar, .book-aside, .site-footer, .sig-actions, .submit-area { display: none !important; }
}

/* ---------- Thank-you page ---------- */
.thanks-main { min-height: calc(100vh - 64px - 160px); display: flex; align-items: center; padding: 48px 0 64px; border-bottom: 0; }
.thanks-card {
  max-width: 640px; margin: 0 auto; padding: 32px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border-top: 4px solid var(--blue);
}
.thanks-icon {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--blue-deep), var(--purple-deep));
  box-shadow: 0 10px 28px rgba(43,108,255,.35);
}
.thanks-icon svg { width: 34px; height: 34px; fill: #fff; }
.thanks-card h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); }
.thanks-summary {
  margin-top: 20px; padding: 16px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 8px;
}
.thanks-summary p { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.thanks-summary strong { color: #fff; text-align: right; }
.thanks-help { color: var(--muted); margin-top: 18px; }
.thanks-help a { font-weight: 700; }
.thanks-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.thanks-summary[hidden] { display: none; }
@media (min-width: 560px) { .thanks-card { padding: 40px 40px; } }

/* Signature: don't start text selection when a drag begins on the box edge or label */
#sig-field .field-label, .sig-wrap { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
