@font-face {
  font-family: Switzer;
  src: url('assets/Switzer-Regular.otf') format('opentype');
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: Switzer;
  src: url('assets/Switzer-Semibold.otf') format('opentype');
  font-display: swap;
  font-weight: 600 800;
}

:root {
  font-family: Switzer, system-ui, sans-serif;
  color: #181818;
  background: #f1f0ed;
  line-height: 1.4;
  --action-yellow: #f8cf1b;
  --surface: #fff;
  --line: #e0dfe1;
  --muted: #606067;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 520px;
  margin: auto;
  background: var(--surface);
}

.embedded { background: #fff; }
.embedded .app {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: clip;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 62px;
}

.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.12rem; font-weight: 700; }
.brand::before {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--action-yellow);
  content: '';
}

#logout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 14px;
}

.map-board { position: relative; height: clamp(235px, 42vw, 345px); flex: none; }
#map-canvas { width: 100%; height: 100%; }
#fit-map {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 46px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px #0003;
  font-size: 1.6rem;
}
#map-status { margin: 0; padding: 6px 16px; color: var(--muted); font-size: .86rem; }

.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 30px 12px 16px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
}

.sheet::before {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 66px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #c8c5cb;
  content: '';
}

.sheet > h2, .sheet-heading h2 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 1.17rem;
  font-weight: 700;
}

.sheet-heading {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 44px;
  margin-bottom: 4px;
}

.sheet-heading h2 { margin: 0; }
.back { background: transparent; font-size: 1.65rem; padding: 0; }
.sheet p { margin: 0 0 8px; }

.ride-feedback { text-align: center; }
.ride-feedback h2 { margin: 0 0 12px; font-size: 1.5rem; line-height: 1.2; }
#ride[data-searching='true'] {
  align-items: center;
  gap: 28px;
  min-height: 300px;
  justify-content: center;
  padding: 32px 24px;
  background: #f7e0bb;
}
#ride[data-searching='true']::before { display: none; }
.app:has(#ride[data-searching='true']:not([hidden])) :is(#booking-map, #map-status) { display: none; }
.ride-feedback p { max-width: 36ch; margin: 0 auto; }
.ride-spinner {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 24px;
  border: 4px solid #bd831148;
  border-top-color: #a96400;
  border-radius: 50%;
  animation: ride-search 900ms linear infinite;
}
@keyframes ride-search { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ride-spinner { animation: none; } }
.cancel-request { align-self: center; border: 1px solid currentColor; border-radius: 999px; background: transparent; }
#cancel-dialog { width: min(360px, calc(100% - 32px)); border: 0; border-radius: 20px; padding: 20px; }
#cancel-dialog::backdrop { background: #0006; }
#cancel-dialog h2 { margin: 0 0 18px; font-size: 1.125rem; }
.cancel-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.cancel-actions .primary { width: auto; min-height: 44px; }
section form { padding: 0; }
label { display: block; margin: 0 0 8px; }
input, select, button { font: inherit; min-height: 44px; color: inherit; }

input, select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid #7a6507;
  outline-offset: 2px;
}

button {
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

button:disabled { cursor: default; opacity: .55; }

.primary {
  width: 100%;
  min-height: 54px;
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--action-yellow);
  color: #171600;
  font-size: 1.04rem;
  font-weight: 600;
}

.secondary { align-self: flex-start; background: #f3f2ef; }

.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}

.app-row img { width: 24px; height: 24px; flex: none; }
.trip-field > span { flex: 1; min-width: 0; }
.trip-field > span > span { color: var(--muted); font-size: .78rem; }
.trip-field input { border: 0; padding: 0; margin: 0; min-height: 28px; font-weight: 600; }
.address-label[data-kind='pickup'] img { filter: invert(35%) sepia(74%) saturate(574%) hue-rotate(72deg); }
.address-label[data-kind='destination'] img { filter: invert(45%) sepia(61%) saturate(880%) hue-rotate(328deg); }
.passengers img { filter: grayscale(1); }
.vehicle-options, #payment-rows { display: grid; gap: 8px; }
.vehicle-option, .payment-row { width: 100%; border-radius: 12px; cursor: pointer; }
.vehicle-option img { width: 65px; height: 40px; object-fit: contain; }
.vehicle-option small { display: block; font-size: .79rem; color: var(--muted); }
.vehicle-option[aria-pressed='true'], .payment-row:has(:checked) { border-color: #ad8700; }
.vehicle-check {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  height: 24px;
  margin-left: auto;
  border: 1px solid #b9b9b9;
  border-radius: 50%;
  color: transparent;
}
.vehicle-option[aria-pressed='true'] .vehicle-check { border-color: var(--action-yellow); background: var(--action-yellow); color: #181818; }
#payment-options { min-width: 0; border: 0; padding: 0; margin: 0; }
.payment-row img { width: 38px; height: 30px; object-fit: contain; }
.payment-row input { width: 20px; height: 20px; min-height: 0; margin: 0 0 0 auto; accent-color: #a47e00; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.results { list-style: none; padding: 0; margin: 0; }
.results button { display: block; width: 100%; margin-top: 3px; background: #f4f3ef; text-align: left; }
.result-meta { font-size: .78rem; color: var(--muted); }
.results .result-meta { white-space: nowrap; }
.stop-row { border-left: 2px solid #d1c5a0; padding-left: 8px; margin: 0 0 8px; }

#notice { margin: 0; padding: 4px 16px 8px; color: var(--muted); font-size: .88rem; }
#notice:empty { display: none; }
#notice[data-error='true'] { color: #8f2019; }
#price { font-size: 1.6rem; }
#duration { margin-left: 6px; }
#live-booking-note { margin: 0; font-size: .87rem; color: var(--muted); }
#card-element { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
#ride-pin { font-size: 1.15rem; font-weight: 750; background: #fff7d2; padding: 8px; }

/* Rounded groups shared with the Customer booking flow. */
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: end; }
.booking-version { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
:is(#trip, #vehicle, #quote) { padding-top: 24px; }
#trip > h2, .sheet-heading { margin-bottom: 0; }
.booking-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.booking-group .app-row { border: 0; border-radius: 0; min-height: 54px; }
.booking-group .app-row:focus-within { outline-offset: -3px; }
.booking-group button:focus-visible { outline-offset: -3px; }
.booking-group > .app-row + .app-row,
.trip-group #destination, .trip-group .passengers, .trip-group .stop-row { border-top: 1px solid var(--line); }
.trip-group .stop-row { margin: 0; padding-left: 0; border-left: 0; }
.trip-group .results:not(:empty) { padding: 0 8px 8px; }
.trip-group .result-meta:not([hidden]) { padding: 0 12px; }
.booking-group #vehicle-trip { flex: 1; text-align: end; overflow-wrap: anywhere; }
.booking-group #vehicle-passengers { margin-inline-start: auto; }
.distance-icon, .passenger-icon { width: 24px; color: var(--muted); text-align: center; }
.group-title { margin: 0; font-size: 1.04rem; }
.vehicle-options, #payment-rows { gap: 0; }
.vehicle-option[aria-pressed='true'], .payment-row:has(:checked) { background: #fff6d9; }
.payment-row small { display: block; color: #955100; font-weight: 600; }
#quote p:has(> #duration:empty) { display: none; }
#map-canvas { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    color: #f4f3f4;
    background: #111116;
    --surface: #202025;
    --line: #46464e;
    --muted: #c4c2c9;
  }
  .embedded { background: transparent; }
  .secondary, .results button { background: #323239; }
  .vehicle-option[aria-pressed='true'], .payment-row:has(:checked) { background: #392f14; }
  .payment-row small { color: #ffc642; }
  #notice[data-error='true'] { color: #ffb4ad; }
  #ride[data-searching='true'] { background: #392f14; }
  #ride-pin { background: #392f14; }
  #fit-map { color: #181818; }
  .passengers img, .passenger-icon { filter: grayscale(1) brightness(0) invert(.8); }
  :is(input, select, button):focus-visible { outline-color: #ffc642; }
}
