:root {
  --navy: #0b1f3a;
  --navy-mid: #143056;
  --navy-soft: #1c3d6b;
  --accent: #c9a227;
  --accent-hover: #dbb42f;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #152238;
  --muted: #5a6a80;
  --border: #d8e0ec;
  --danger: #b42318;
  --warn-bg: #fff8e6;
  --warn-border: #e8c547;
  --ok: #0f6b4c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, #eef2f7 0%, var(--bg) 220px);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--navy-soft);
}

.wrap {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), #8a6d12);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.brand-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-tag {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.75;
}

.header-phone {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  white-space: nowrap;
}

.header-phone:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hero */
.hero {
  padding: 2rem 0 1.25rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--navy);
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Banner */
.banner {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.banner-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: #5c4a00;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem;
}

.form-card fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.form-card legend {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.address-group {
  margin: 0 0 0.35rem;
}

.address-group > legend {
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.field input,
.field select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 3px rgba(28, 61, 107, 0.15);
}

.field input[aria-invalid="true"],
.field input[aria-invalid="true"]:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.15);
}

.field-error {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--danger);
}

.field-error[hidden] {
  display: none;
}

#contact-phone,
#contact-email {
  scroll-margin-top: 110px;
  scroll-margin-bottom: 40px;
}

.hint {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 520px) {
  .row.two {
    grid-template-columns: 1fr;
  }
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.5rem 0 1.2rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.92rem;
  cursor: pointer;
}

.check input {
  margin-top: 0.2rem;
  accent-color: var(--navy);
}

.map {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  background: #e8eef6;
  /* Keep Leaflet's panes/controls under the sticky header and the suggestion lists. */
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.map[hidden] {
  display: none;
}

/* Route map pins (v16) */
.pin-icon {
  background: transparent !important;
  border: none !important;
}

.pin-float {
  width: 88px;
  text-align: center;
  pointer-events: none;
}

.pin-label {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(11, 31, 58, 0.3);
}

.pin-head {
  display: block;
  width: 16px;
  height: 16px;
  margin: 2px auto 0;
  background: var(--accent);
  border: 2px solid var(--navy);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.pin-drop .pin-head {
  background: var(--navy);
  border-color: #fff;
}

.pin-stop .pin-head {
  width: 12px;
  height: 12px;
  background: #fff;
}

/* Get estimate scrolls the estimate card into view below the sticky header. */
#results {
  scroll-margin-top: 5.5rem;
}

.route-status {
  margin: -0.25rem 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.route-status.error {
  color: var(--danger);
}


.form-card .area-group {
  margin: 0 0 1.1rem;
}

.area-group > legend {
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.required-tag {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted);
}

.area-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 520px) {
  .area-options {
    grid-template-columns: 1fr;
  }
}

.area-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  cursor: pointer;
}

.area-option input {
  accent-color: var(--navy);
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.area-option:has(input:checked) {
  border-color: var(--navy-soft);
  background: #f7f9fc;
  box-shadow: 0 0 0 3px rgba(28, 61, 107, 0.15);
}

.area-line {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--navy);
}

.stops-block {
  margin: 0.2rem 0 1.1rem;
}

.stops-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
}

.optional-tag {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted);
}

.stops-price {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
}

.stop-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.9rem 0.15rem;
  margin-bottom: 0.75rem;
  background: #f7f9fc;
}

.stop-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.stop-label {
  margin: 0;
  font-weight: 700;
  color: var(--navy);
}

.btn-remove-stop {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--danger);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-add-stop {
  width: auto;
  margin-top: 0.15rem;
  padding: 0.6rem 0.95rem;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy-soft);
}

.btn-add-stop:hover {
  background: #f7f9fc;
}

.destination-note {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 11px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-mid);
}

.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
  margin-top: 0.55rem;
}

.btn-secondary:hover {
  background: #f7f9fc;
}

.btn-estimate {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, var(--navy-mid), var(--navy));
  box-shadow: 0 6px 16px rgba(11, 31, 58, 0.25);
}

.btn-estimate:hover {
  background: var(--navy-soft);
}

/* Results */
.results-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 4.5rem;
}

@media (max-width: 860px) {
  .results-col {
    position: static;
  }
}

.results-card h2,
.cta-card h3 {
  margin: 0 0 0.75rem;
  color: var(--navy);
  font-size: 1.15rem;
}

.results-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.estimate-badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: #e8eef8;
  border-radius: 999px;
}

.miles-line,
.tier-line {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.line-items {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.line-items li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}

.line-items .label {
  color: var(--text);
}

.line-items .amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  font-size: 1.05rem;
}

.total-row strong {
  font-size: 1.55rem;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.return-note {
  margin: 1rem 0 0;
  padding: 0.75rem 0.85rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 10px;
  font-size: 0.88rem;
  color: #5c4a00;
}

.call-quote {
  margin-top: 1rem;
  padding: 1rem;
  background: #f0f4fa;
  border-radius: 10px;
  text-align: center;
}

.call-quote p {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--navy);
}

.promo-banner {
  margin-top: 1.15rem;
  padding: 1rem;
  background: #f7f2df;
  border: 1px solid #e3cf83;
  border-radius: 12px;
}

.promo-kicker {
  margin: 0 0 0.35rem;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.promo-copy {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 0.9rem;
}

.btn-promo {
  background: var(--accent);
  color: var(--navy);
}

.btn-promo:hover {
  background: var(--accent-hover);
}

.promo-phone {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.promo-phone a {
  font-weight: 600;
}

.cta-card p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-note {
  margin-top: 0.85rem !important;
  font-size: 0.8rem !important;
}

/* Disclaimer */
.disclaimer {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.disclaimer h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--navy);
}

.disclaimer p {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 1.25rem 0;
  font-size: 0.88rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #fff;
}

[hidden] {
  display: none !important;
}

/* —— Under the estimate: Request this ride / Book it —— */
.estimate-actions {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.actions-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.estimate-actions .btn-request {
  display: flex;
  width: 100%;
}

.estimate-actions #text-request-note {
  margin: 0.5rem 0 0;
}

.estimate-actions #request-confirm {
  margin: 0.6rem 0 0;
}

.estimate-actions .booking-panel {
  margin-top: 0.85rem;
}

/* —— Book it (25% deposit) —— */
.booking-panel {
  margin: 1rem 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.booking-panel .btn {
  width: 100%;
  margin-top: 0.6rem;
  text-align: center;
}

.book-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
}

.book-kicker.pending {
  color: #8a5a00;
}

.book-copy,
.book-note {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}

.book-note {
  color: var(--muted);
}

.book-fine {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.deposit-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 1rem;
  color: var(--navy);
}

.deposit-row strong {
  font-size: 1.35rem;
}

.book-warning {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: #5c4a00;
  font-size: 0.9rem;
  line-height: 1.4;
}

.book-warning p {
  margin: 0 0 0.35rem;
}

.book-warning ul {
  margin: 0;
  padding-left: 1.1rem;
}

.book-ack {
  margin-top: 0.7rem;
}

.btn-book-step[aria-disabled="true"] {
  opacity: 0.55;
}

.book-ack.shake {
  animation: book-shake 0.5s;
}

@keyframes book-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.pay-choice {
  margin: 0.75rem 0 0;
  padding: 0;
  border: 0;
}

.pay-choice legend {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.pay-choice .check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0;
  font-size: 0.95rem;
}

.btn-book-step[aria-disabled="true"] {
  opacity: 0.55;
}

.book-code {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: var(--navy);
}

.book-received {
  margin-top: 0.6rem;
  color: var(--ok);
}

.test-flag {
  margin: 0.4rem 0;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.qp-card {
  margin-top: 0.75rem;
  min-height: 90px;
}

.booking-panel [hidden] {
  display: none !important;
}

/* —— v15: From / To / + Add a stop address blocks —— */
.addr-block,
.form-card fieldset.addr-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.1rem;
  margin: 0 0 0.85rem;
  background: #fff;
}

.form-card .addr-block > legend {
  float: left;
  width: 100%;
  margin: 0 0 0.55rem;
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.form-card .addr-block > legend + * {
  clear: both;
}

.addr-note {
  clear: both;
  margin: -0.2rem 0 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.addr-line1 {
  position: relative;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.label-row label {
  margin-bottom: 0 !important;
}

.btn-locate {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--navy-soft);
  background: #eef3fb;
  color: var(--navy);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 34px;
}

.btn-locate:hover {
  background: #e2eaf7;
}

.btn-locate:disabled {
  opacity: 0.65;
  cursor: progress;
}

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 15;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(11, 31, 58, 0.16);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  min-height: 48px;
}

.suggest-item:last-child {
  border-bottom: 0;
}

.suggest-item:hover,
.suggest-item:focus {
  background: #f2f6fc;
  outline: none;
}

.suggest-item strong {
  display: block;
  font-size: 0.94rem;
  color: var(--navy);
}

.suggest-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Nearest-first suggestions with distance (v16, same as the rider app) */
.suggest-item .suggest-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  font-size: 0.94rem;
  color: var(--navy);
}

.suggest-item .suggest-dist {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--navy-soft);
  white-space: nowrap;
}

.suggest-note {
  margin: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: #f7f9fc;
}

.row.three {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.9fr;
  gap: 0.65rem;
}

@media (max-width: 520px) {
  .row.three {
    grid-template-columns: 1fr 1fr;
  }
  .row.three > .field:first-child {
    grid-column: 1 / -1;
  }
}

.stops-block {
  margin: 0 0 1.1rem;
}

.stop-block {
  background: #f7f9fc;
}

.link-add-stop {
  display: inline-block;
  margin: 0.1rem 0 0.25rem;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: var(--navy-soft);
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-add-stop:hover {
  color: var(--navy);
}

.stops-price {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.rate-preview {
  margin: -0.35rem 0 1rem;
  font-size: 0.86rem;
  color: var(--ok);
  font-weight: 600;
}

.rate-preview:empty {
  display: none;
}
