/* ===== Teez Taxi — first screen ===== */
:root {
  --blue: #2f6bff;
  --blue-dark: #1f4fd6;
  --ink: #111318;
  --muted: #8a8f98;
  --sheet-radius: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* On-screen keyboard height, kept in sync from visualViewport (app.js) */
  --kb: 0px;
  /* Bottom system strip measured by JS (iOS standalone PWA): how much the
     layout viewport falls short of the physical screen. 0 on normal devices. */
  --gap-bottom: 0px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  /* Fill the full physical screen edge-to-edge (Dynamic Island + home bar).
     Chain per checklist item 4: 100% fallback → -webkit-fill-available →
     100vh (standalone PWA ground truth, WebKit #254868) → 100dvh (live
     Safari with collapsing toolbars). html AND body both get the app bg so
     no white UA default can show through anywhere. viewport-fit=cover in
     <head> puts the layout under the notch/home indicator. No margin/padding
     on body that could offset the screen (checklist item 4). */
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  height: 100vh;
  height: 100dvh;
  min-height: 100%;
  min-height: -webkit-fill-available;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #eef1f4;
}

/* iOS standalone PWA (installed via "Add to Home Screen"): 100vh already
   spans the FULL physical screen incl. safe areas, while 100dvh/100svh and
   -webkit-fill-available report the SHORTER layout box (WebKit #254868) and
   would leave the white strip under the home indicator. */
@media all and (display-mode: standalone) {
  html,
  body {
    height: 100vh;
    min-height: 100vh;
  }
  /* Background must not stop at the SHORT layout box: stretch the paint to
     the physical screen via the JS-measured gap (0 elsewhere → no change). */
  html::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: calc(0px - max(var(--gap-bottom), var(--safe-bottom)));
    background: #eef1f4;
    z-index: -1;
    pointer-events: none;
  }
}

body {
  font-family: var(--font);
  font-size: 14.4px;
  color: var(--ink);
  /* Never pure white: match the map so any uncovered sub-pixel at the very
     bottom (bottom safe-area on iOS) blends instead of showing a white strip. */
  background: #eef1f4;
  /* Lock: no page zoom, no text selection, no tap callout */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ===== Map ===== */
#map {
  position: fixed;
  /* Bind to the viewport edges so the map extends behind the home indicator.
     The measured bottom gap compensates for iOS standalone viewport sizing. */
  top: 0;
  right: 0;
  left: 0;
  bottom: calc(0px - var(--gap-bottom));
  z-index: 0;
  background: #eef1f4;
  touch-action: none; /* let MapGL handle pan/pinch, not the page */
}

/* Hide 2GIS attribution across the MapGL renderer's wrapper variants. */
#map .dg-attribution_wrapper,
#map .dg-attribution,
#map [class*="attribution"],
#map [class*="Attribution"] {
  display: none !important;
}

/* ===== Fixed center pickup pin (Uber-style) ===== */
/* The whole pin sits at the center of the screen; the .pin-dot is the
   geographic anchor. Everything above the dot is anchored to its bottom,
   everything below hangs from the dot. */
.center-pin {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(16, 24, 40, 0.22));
}
/* Portion above the dot grows upward, so the dot stays put. */
.stack-up {
  position: absolute;
  bottom: 7px; /* half of the dot (16px) so its center is the anchor */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pin-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(18, 22, 32, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 8px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.pin-icon {
  display: inline-flex;
  opacity: 0.95;
}
.pin-txt {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.05;
}
.pin-txt b {
  display: block;
  font-size: 10.8px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 1px;
}
.pin-line {
  width: 3px;
  height: 24px;
  background: #8a8f98;
  border-radius: 2px;
}
.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  border: 4px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.14);
}

/* ===== Top header ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: calc(var(--safe-top) + 10px) 14px 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}
.locate-btn svg { transform: translate(-2px, 1px); }
.topbar > * {
  pointer-events: auto;
}

/* Left vertical stack: menu on top, locate under it (like Locator) */
.control-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Liquid-glass buttons (Apple-style frosted glass) */
.glass-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  /* frosted glass */
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.15s ease, background 0.2s ease;
}
.glass-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.5);
}
.glass-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}
.menu-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 9.9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}

/* Centered address (top) */
.address {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--safe-top) + 10px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 9px;
  border-radius: 12px;
  max-width: 60vw;
}
.address-label {
  font-size: 9.9px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.address-value {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ===== Bottom sheet ===== */
.sheet {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(0px - var(--gap-bottom));
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--sheet-radius);
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 6px 6px max(6px, var(--safe-bottom));
  display: flex;
  flex-direction: column;
  /* Cap the sheet so the address list always stays scrollable inside it */
  max-height: calc(100vh - var(--safe-top) - var(--kb));
  max-height: calc(100dvh - var(--safe-top) - var(--kb));
  transition: max-height 0.25s ease, bottom 0.25s ease, background 0.25s ease;
}
/* Expanded search menu sizes to its content and stays above the keyboard. */
.sheet.expanded {
  top: auto;
  bottom: calc(var(--kb) - var(--gap-bottom));
  max-height: calc(100vh - var(--safe-top) - var(--kb));
  max-height: calc(100dvh - var(--safe-top) - var(--kb));
  background: #ffffff;
}
.sheet-grabber {
  width: 64px;
  height: 28px;
  margin: 0 auto 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  touch-action: none;
}
.sheet-grabber::before {
  content: "";
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: rgba(61, 66, 75, 0.58);
}

/* Destination search row: tap it to expand the menu */
.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 6px 8px;
  border-bottom: 1px solid #f0f1f4;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.search-field:focus-within {
  background: rgba(47, 107, 255, 0.06);
}
.search-flag {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.search-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.1px;
  line-height: 1.1;
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  /* 16.5px keeps iOS from zooming the page when the field gets focus */
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-user-modify: none;
  padding: 0;
}
.search-chevron { display: none; }

/* ===== Center pin dot — glass style, not blue ===== */
.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  border: 4px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.14);
}
.search-field input::placeholder {
  color: #aab0b9;
  font-weight: 600;
}
.search-clear {
  border: none;
  background: #eef0f4;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  display: none;
  outline: none;
  padding: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  touch-action: manipulation;
}
.search-field.has-text .search-clear {
  display: inline-flex;
  color: var(--ink);
}

.search-map {
  flex-shrink: 0;
  color: var(--ink);
  background: #f1f3f6;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  transition: background 0.15s ease;
}
.search-map:active {
  background: #e5e8ed;
}

/* Pickup row — always visible in the search panel, opens the map picker */
.sheet-pickup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #f0f1f4;
  flex-shrink: 0;
  cursor: pointer;
  touch-action: manipulation;
}
.sheet-pickup:active {
  background: rgba(47, 107, 255, 0.06);
}
.pickup-icon {
  color: var(--ink);
  display: inline-flex;
  flex-shrink: 0;
}
.pickup-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pickup-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.1px;
}
.pickup-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pickup-chevron {
  color: var(--muted);
  display: inline-flex;
  flex-shrink: 0;
}

.dest-list {
  list-style: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.dest {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 3px;
  border-bottom: 1px solid #f0f1f4;
}
.dest:last-child {
  border-bottom: none;
}
.dest-icon {
  color: #aeb4bd;
  display: inline-flex;
  flex-shrink: 0;
}
.dest-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dest-name {
  font-size: 12.96px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.dest-sub {
  font-size: 10.53px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dest-time {
  font-size: 12.6px;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-top) + 58px);
  bottom: auto;
  transform: translateX(-50%) translateY(-8px);
  z-index: 30;
  background: rgba(255, 255, 255, 0.52);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 16px;
  width: max-content;
  max-width: min(84vw, 420px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.center-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 19, 24, 0.42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.center-dialog-backdrop.show { display: flex; }
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  background: rgba(18, 22, 30, 0.32);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.menu-backdrop.show { display: block; }
.menu-drawer {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: min(84vw, 430px);
  padding: var(--safe-top) 0 calc(var(--safe-bottom) + 16px);
  overflow-y: auto;
  border-radius: 0 18px 18px 0;
  box-shadow: 8px 0 32px rgba(17, 19, 24, 0.14);
  background: #fff;
}
.menu-drawer.menu-root .menu-page-header { display: none; }
.menu-drawer.menu-fullscreen {
  inset: 0;
  width: 100%;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: var(--safe-top) 24px var(--safe-bottom);
  overflow: hidden;
  background: var(--blue);
  color: #fff;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}
.app-splash.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.app-splash > img {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 12px 30px rgba(14, 32, 78, 0.18);
}
.app-splash-spinner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: app-spinner 0.8s linear infinite;
}
.app-splash-spinner { bottom: calc(var(--safe-bottom) + 48px); }
.app-splash-label {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 22px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  opacity: 0.88;
}
@keyframes app-spinner { to { transform: rotate(360deg); } }
.menu-page-header {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 58px;
  padding: 0 14px;
  background: #fff;
}
.menu-page-header h1 {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-page-header button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
}
.menu-page-header button[hidden] { display: none; }
.menu-page-header button:active { background: #f2f3f5; }
.menu-back svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-close {
  justify-self: end;
  background: transparent;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}
.menu-main,
.menu-view {
  flex: 1;
  min-height: 0;
  padding: 8px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu-drawer.menu-root .menu-main {
  display: flex;
  flex-direction: column;
  padding: 0 22px 16px;
}
.menu-main[hidden],
.menu-view[hidden] { display: none; }
.menu-drawer.menu-root .menu-profile {
  gap: 10px;
  padding: 2px 0 14px;
}
.menu-drawer.menu-chat-mode .menu-page-header { display: none; }
.menu-drawer.menu-chat-mode { padding-bottom: 0; }
.menu-drawer.menu-root .menu-profile img {
  width: 48px;
  height: 48px;
}
.menu-drawer.menu-root .menu-profile strong { font-size: 18px; }
.menu-drawer.menu-root .menu-rating { font-size: 12.5px; }
.menu-drawer.menu-root .menu-items { padding-top: 2px; }
.menu-drawer.menu-root .menu-item {
  min-height: 52px;
  padding: 9px 0;
  font-size: 14.5px;
}
.menu-drawer.menu-root .menu-item-copy { gap: 3px; }
.menu-drawer.menu-root .menu-item-copy > small { font-size: 12.5px; }
.menu-version {
  margin: auto 0 0;
  padding: 22px 0 4px;
  color: #9297a1;
  font-size: 12px;
  text-align: center;
}
.menu-profile {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 12px 0 26px;
  text-align: left;
}
.menu-profile img {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f3f6;
}
.menu-profile span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.menu-profile strong { font-size: 20px; letter-spacing: -0.35px; }
.menu-profile .menu-rating {
  color: #858991;
  font-size: 14px;
  font-weight: 500;
}
.menu-rating > span:first-child { font-size: 16px; }
.menu-profile .menu-chevron {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #a0a5ae;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-items {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}
.menu-item {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 12px 0;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
}
.menu-item-copy { display: flex; flex-direction: column; gap: 5px; }
.menu-item-copy > span { display: flex; align-items: center; gap: 8px; }
.menu-item-copy > small { color: #898d95; font-size: 14px; }
.menu-alert-dot { width: 9px; height: 9px; border-radius: 50%; background: #e53935; }
.menu-item > svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: none;
  stroke: #555d69;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-item > span { flex: 1; }
.menu-item .menu-chevron {
  width: 17px;
  height: 17px;
  stroke: #a0a5ae;
}
.menu-profile:active,
.menu-item:active { background: #f7f8fa; }
.menu-footer {
  margin-top: auto;
  padding: 28px 4px 4px;
  color: #a0a5ae;
  font-size: 12px;
}
.menu-view h2 {
  margin: 24px 0 22px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.45px;
}
.menu-view h3 {
  margin: 26px 0 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}
.auth-view {
  display: flex;
  flex-direction: column;
  padding: 0 clamp(24px, 6vw, 38px) 32px;
}
.auth-content {
  width: 100%;
  max-width: 460px;
  margin: clamp(70px, 15vh, 150px) auto 0;
  text-align: center;
}
.auth-content h2 {
  margin: 0 0 10px;
  color: #323740;
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -0.5px;
}
.auth-subtitle {
  color: #8a8f98;
  font-size: 18px;
  line-height: 1.45;
}
.phone-entry {
  display: flex;
  align-items: center;
  min-height: 66px;
  gap: 10px;
  margin-top: clamp(52px, 9vh, 84px);
  padding: 0 16px;
  border: 1.5px solid var(--blue);
  border-radius: 13px;
  background: #f7f8fa;
  text-align: left;
}
.phone-country {
  flex: 0 0 auto;
  color: #343942;
  font-size: 16px;
  font-weight: 550;
  white-space: nowrap;
}
.phone-entry input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
}
.phone-entry input::placeholder { color: #a0a5ae; }
.primary-btn.auth-primary {
  min-height: 60px;
  margin-top: 28px;
  border-radius: 16px;
  background: var(--blue);
  font-size: 20px;
}
.auth-legal {
  margin-top: 24px;
  color: #858b95;
  font-size: 12px;
  line-height: 1.55;
}
.auth-status {
  min-height: 18px;
  margin-top: 10px;
  color: #a33e32;
  font-size: 13px;
  line-height: 1.4;
}
.auth-code-content { margin-top: clamp(70px, 14vh, 140px); }
.auth-phone {
  display: block;
  margin-top: 6px;
  color: #7c838d;
  font-size: 18px;
}
.code-entry {
  display: block;
  margin: clamp(72px, 15vh, 140px) auto 0;
}
.code-entry input {
  width: 220px;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 34px;
  letter-spacing: 18px;
  text-align: center;
  text-indent: 18px;
}
.code-entry input::placeholder { color: #c9cdd4; }
.auth-code-content .auth-status {
  min-height: 38px;
  margin-top: 26px;
  color: #858b95;
}
.auth-code-content .auth-primary { margin-top: 18px; }
.auth-edit-phone { margin-top: 18px; }
.app-install-view { padding-top: 20px; }
.app-install-hero {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  margin: -8px -24px 22px;
  background: var(--blue);
}
.app-install-hero img {
  width: 92px;
  height: 92px;
  border-radius: 23px;
  box-shadow: 0 10px 26px rgba(14, 32, 78, 0.18);
}
.app-install-view h2 { margin-top: 18px; }
.primary-btn.app-install-button { margin-top: 22px; background: var(--blue); }
.app-install-status {
  margin-top: 14px;
  color: #858b95;
  font-size: 12px;
  line-height: 1.45;
}
.app-install-help {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 16px;
  background: #f5f6f8;
  color: #626975;
  font-size: 13px;
  line-height: 1.45;
}
.app-install-help strong { color: var(--ink); font-size: 15px; }
.profile-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 14px;
  padding: 18px 0 28px;
  text-align: left;
}
.profile-identity img {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f3f6;
}
.profile-identity-copy,
.profile-field,
.payment-menu-row > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-identity-copy strong { font-size: 20px; font-weight: 500; }
.profile-identity-copy small,
.profile-field small,
.payment-menu-row small {
  color: #8a8f98;
  font-size: 14px;
}
.profile-fields { position: relative; display: flex; flex-direction: column; }
.menu-view[data-menu-view="profile"]:not([hidden]) {
  display: flex;
  flex-direction: column;
}
.profile-driver-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  border-bottom: 1px solid #eceef2;
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 650;
  text-align: left;
}
.profile-driver-cta span { font-size: 24px; font-weight: 300; }
.profile-field {
  position: relative;
  width: 100%;
  min-height: 74px;
  justify-content: center;
  border-bottom: 1px solid #eceef2;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
}
.payment-menu-row strong { font-size: 16px; font-weight: 550; }
.profile-field.editable:active,
.profile-identity:active { background: #f7f8fa; }
.profile-field.static { padding-right: 34px; }
.profile-chevron {
  position: absolute;
  right: 2px;
  top: 50%;
  color: #a0a5ae;
  font-size: 28px;
  font-weight: 300;
  transform: translateY(-50%);
}
.profile-info-btn {
  position: absolute;
  top: 50%;
  right: 2px;
  color: #333941;
  font-size: 20px;
  transform: translateY(-50%);
}
.profile-inline-note,
.profile-local-note {
  margin-top: 12px;
  color: #8a8f98;
  font-size: 12px;
  line-height: 1.45;
}
.profile-edit-form {
  display: grid;
  gap: 10px;
  padding: 14px 0;
}
.profile-edit-form[hidden] { display: none; }
.profile-edit-form label,
.promo-form label {
  color: #8a8f98;
  font-size: 13px;
}
.profile-edit-form input,
.promo-form input {
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 2px solid #17191e;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.profile-edit-form > div { display: flex; gap: 8px; }
.profile-edit-form > div button {
  flex: 1;
  min-height: 46px;
  border-radius: 12px;
  font-size: 15px;
}
.profile-edit-cancel { background: #f1f2f6; }
.profile-edit-save { background: #2718ee; color: #fff; }
.profile-logout {
  width: 100%;
  min-height: 48px;
  margin: auto 0 0;
  padding: 14px 0 0;
  color: #d14343;
  font-size: 14px;
  text-align: center;
}
.profile-local-note { margin-top: 4px; }
.account-list { display: grid; gap: 4px; }
.account-choice {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 14px;
  min-height: 82px;
  padding: 12px 16px;
  border-radius: 15px;
  background: #f3f4f8;
  text-align: left;
}
.account-choice img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.account-choice span { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.account-choice strong { font-size: 16px; font-weight: 650; }
.account-choice small { color: #727782; font-size: 13px; }
.account-work-badge {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9edff;
  color: #3424d6;
  font-size: 11px;
  font-weight: 600;
}
.account-choice.active::after { content: "✓"; color: #2718ee; font-size: 20px; }
.account-add {
  width: 100%;
  min-height: 56px;
  margin-top: 22px;
  border-radius: 15px;
  background: #f3f4f8;
  font-size: 16px;
}
.menu-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 64px 12px 20px;
  color: #626975;
  text-align: center;
}
.menu-empty-state > span { color: #afb3bb; font-size: 38px; }
.menu-empty-state p { font-size: 16px; }
.menu-empty-state small { color: #8a8f98; font-size: 13px; line-height: 1.4; }
.history-demo-note {
  margin: -10px 0 18px;
  color: #8a8f98;
  font-size: 13px;
}
.history-list { display: grid; gap: 0; }
.history-date {
  margin: 18px 4px 12px;
  color: #8a8f98;
  font-size: 14px;
  font-weight: 600;
}
.history-trip-card {
  display: grid;
  width: 100%;
  gap: 12px;
  margin-bottom: 6px;
  padding: 18px 14px;
  border-radius: 22px;
  background: #f4f4f3;
  color: var(--ink);
  text-align: left;
}
.history-trip-main {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  min-width: 0;
}
.history-car-icon { flex: 0 0 auto; font-size: 22px; }
.history-trip-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.history-trip-copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-trip-copy small {
  overflow: hidden;
  color: #858b95;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-trip-price { flex: 0 0 auto; font-size: 16px; font-weight: 500; }
.history-help {
  display: grid;
  min-height: 64px;
  place-content: center;
  justify-items: center;
  gap: 3px;
  border-radius: 17px;
  background: #e7e7e5;
  color: #25282d;
}
.history-help > span { font-size: 22px; line-height: 1; }
.history-help strong { font-size: 13px; }
.history-detail-view h2 { margin-bottom: 18px; }
.history-detail-section { margin: 18px 0 24px; }
.history-detail-section h3 {
  margin: 0 0 12px;
  font-size: 19px;
}
.history-route-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}
.history-route-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 3px;
  border: 2px solid var(--blue);
  border-radius: 50%;
}
.history-route-dot.destination { border-color: #343942; }
.history-detail-sub { margin: 4px 0 0 22px; color: #858b95; font-size: 13px; }
.history-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  border-bottom: 1px solid #e6e6e4;
  font-size: 15px;
}
.history-detail-row > span:first-child { display: grid; gap: 4px; }
.history-detail-row small { color: #858b95; font-size: 13px; }
.history-detail-rating { flex: 0 0 auto; }
#historyDetailDriver,
#historyDetailCar { overflow-wrap: anywhere; }
.history-cost-card {
  padding: 6px 14px 14px;
  border-radius: 18px;
  background: #f4f4f3;
}
.history-cost-card .history-detail-row { min-height: 54px; }
.history-total-row { font-size: 17px; }
.history-payment {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 16px 14px;
  border-radius: 16px;
  background: #fff;
  font-size: 14px;
}
.history-payment strong { color: #858b95; font-weight: 500; }
.history-actions { margin-top: 18px; overflow: hidden; border-radius: 18px; background: #f4f4f3; }
.history-action-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 58px;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid #e6e6e4;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
}
.history-action-row > span { width: 22px; font-size: 18px; font-weight: 700; text-align: center; }
.history-action-row em { margin-left: auto; color: #777d86; font-size: 23px; font-style: normal; font-weight: 300; }
.history-action-row.delete { color: #d33c37; }
.menu-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  border-bottom: 1px solid #eceef2;
  text-align: left;
  font-size: 16px;
}
.menu-action-row span:last-child { color: #a0a5ae; font-size: 25px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  border-bottom: 1px solid #eceef2;
  font-size: 15px;
}
.settings-row input { width: 42px; height: 24px; accent-color: #2718ee; }
.promo-form { display: grid; gap: 14px; }
.payment-menu-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  border-bottom: 1px solid #eceef2;
}
.payment-menu-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #f1f3f6;
}
.payment-menu-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #353a43;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-description,
.menu-note {
  color: #626975;
  font-size: 15px;
  line-height: 1.55;
}
.menu-description { margin-bottom: 22px; }
.menu-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: #f5f6f8;
}
.center-dialog {
  width: min(100%, 340px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.24);
  animation: dialog-pop 0.18s ease-out;
}
@keyframes dialog-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.center-dialog h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}
.center-dialog p {
  margin: 0 0 18px;
  color: #555b66;
  font-size: 14px;
  line-height: 1.45;
}
.center-dialog > .primary-btn {
  min-height: 46px;
  font-size: 14px;
}
.center-dialog-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}
.center-dialog-actions > button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.center-dialog-actions .dialog-secondary {
  background: #f1f3f6;
  color: var(--ink);
}
.center-dialog-actions .primary-btn {
  font-size: 13px;
  line-height: 1.15;
}
.feedback-disclaimer {
  display: block;
  margin-bottom: 9px;
  color: #707782;
  font-size: 12px;
  line-height: 1.4;
}
.menu-view textarea {
  display: block;
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #e0e3e9;
  border-radius: 14px;
  outline: none;
  background: #f7f8fa;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}
.menu-view textarea:focus { border-color: #9db5ff; }
.feedback-status {
  min-height: 18px;
  margin-top: 8px;
  color: #59616d;
  font-size: 12px;
  line-height: 1.4;
}
.feedback-save {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border-radius: 14px;
  font-size: 14px;
}
.center-dialog-actions .cancel-confirm-btn { background: #b42318; }
.cancel-reasons {
  display: grid;
  gap: 8px;
  margin: 14px 0 4px;
}
.cancel-reasons label {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.cancel-reasons label.selected {
  border-color: var(--ink);
  background: #f6f7f9;
}
.cancel-reasons input {
  width: 16px;
  height: 16px;
  margin: 0 9px 0 0;
  accent-color: var(--ink);
}
.cancel-dialog .center-dialog-actions .primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Shorter screens — raise the toast a bit */
@media (max-height: 700px) {
  .sheet .dest {
    padding: 10px 3px;
  }
}

/* ---- iOS gesture guards: no double-tap-to-zoom on UI chrome (map keeps none) ---- */
.topbar,
.glass-btn,
.address,
.toast {
  touch-action: none;
}
/* The sheet hosts a scrollable address list: allow vertical panning only */
.sheet,
.dest {
  touch-action: pan-y;
}

/* ---- HTTPS / secure-context warning banner (top of viewport) ---- */
.https-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 59, 48, 0.94);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.https-warning.show {
  display: flex;
}
.https-warning-icon {
  font-size: 17px;
  line-height: 1;
}
.https-warning-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.35;
  max-width: 82vw;
}
.https-warning-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.https-warning-body {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.9;
  max-width: 70vw;
}
.https-warning-fix {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
/* Collapsed sheet = floating glass field only (the search pill restyled below):
   no white card behind it so the map shows through edge-to-edge. */



/* ===== Ride-flow panels (one sheet, panels switched by data-panel) ===== */
.sheet .panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 2px 8px 4px;
  min-height: 0;
  /* Panels size to their content — the sheet must not stretch with empty
     space below (only the search list grows to fill the expanded sheet). */
  flex: 0 1 auto;
}
.sheet[data-panel="search"] .panel-search,
.sheet[data-panel="pickup"] .panel-pickup,
.sheet[data-panel="destination"] .panel-destination,
.sheet[data-panel="options"] .panel-options,
.sheet[data-panel="searching"] .panel-searching,
.sheet[data-panel="driver"] .panel-driver,
.sheet[data-panel="trip"] .panel-trip,
.sheet[data-panel="review"] .panel-review {
  display: flex;
}
/* The search panel keeps its scrollable list layout; it alone stretches
   to fill the sheet while the search menu is expanded. */
.panel-search {
  gap: 0;
  overflow: hidden;
}
.sheet.expanded .panel-search {
  flex: 1 1 auto;
}
/* Center pin is only meaningful while choosing points on the map */
body:not([data-stage="search"]):not([data-stage="pickup"]):not([data-stage="destination"]) .center-pin {
  display: none;
}

.panel-headline h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.panel-headline p {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.panel-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.muted {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* Black pill primary button (like Avo) */
.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.primary-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}
.text-btn {
  align-self: center;
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--muted);
  touch-action: manipulation;
}
.text-btn:active {
  color: var(--ink);
}

/* Pickup picker panel */
.pickup-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  background: #f6f7f9;
  border-radius: 16px;
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pickup-current .dest-name {
  font-size: 15.5px;
}
.pickup-manual-field[hidden],
.pickup-map-field[hidden] { display: none; }

/* Options panel: route summary */
.options-route {
  display: flex;
  flex-direction: column;
  background: #f6f7f9;
  border-radius: 16px;
  padding: 4px 14px;
}
.route-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.route-dot {
  display: block;
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: center;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}
.route-dot.origin {
  background: var(--ink);
}
.route-dot.route-destination {
  background: var(--blue);
}
.route-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.route-copy small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.route-copy strong {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-copy .route-address-button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.route-copy .route-address-button:active { color: var(--blue); }
.route-edit {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  padding: 6px 8px;
  touch-action: manipulation;
}
.route-actions {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: #8a8f98;
}
.route-actions.open { z-index: 10; }
.route-actions-trigger {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #8a8f98;
  touch-action: manipulation;
}
.route-actions-trigger:active { background: #e8eaee; }
.route-actions-trigger svg { width: 20px; height: 20px; fill: currentColor; }
.route-actions-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 2px);
  right: 0;
  min-width: 164px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
}
.route-actions-menu[hidden] { display: none; }
.route-actions-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}
.route-actions-menu button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.route-actions-menu button:active { background: #f1f3f6; }
.route-sep {
  height: 1px;
  background: #e8eaee;
}

/* Tariff list — bounded so the sheet stays compact; scrolls if needed */
.ride-options {
  display: flex;
  flex-direction: row;
  gap: 7px;
  overflow: visible;
  min-height: 0;
}
.ride-option {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 42px auto auto;
  align-items: center;
  gap: 2px 4px;
  flex: 1 1 0;
  min-width: 0;
  padding: 8px;
  border-radius: 14px;
  background: #f6f7f9;
  border: 1.5px solid transparent;
  text-align: left;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ride-option .ride-img {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  width: 100%;
  height: 42px;
  margin: 0;
}
.ride-option .ride-copy {
  display: contents;
}
.ride-option .ride-copy strong {
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.ride-option .ride-copy small {
  grid-column: 1;
  grid-row: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.ride-option .ride-price {
  grid-column: 2;
  grid-row: 3;
  font-size: 11px;
}
.ride-option.active {
  border-color: var(--ink);
  background: #fff;
}
.ride-emoji {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.ride-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ride-copy strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.ride-copy small {
  font-size: 12px;
  color: var(--muted);
}
.ride-price {
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Order row: cash badge + primary button */
.order-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
/* Inside the row the button must share width with the badge, not take 100% */
.order-row .primary-btn {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.pay-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: 52px;
  gap: 2px;
  color: var(--ink);
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.pay-badge:active { opacity: 0.7; }
.pay-badge small {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 1px;
}

/* Back button (glass arrow) — tucked to the left edge of the sheet */
.panel-back {
  align-self: flex-start;
  width: 42px;
  height: 42px;
  margin: -4px 0 -8px -6px;
}
.panel-searching .panel-back,
.panel-trip .panel-back {
  align-self: flex-start;
}

/* Tariff car cut-outs (Photoroom PNGs) */
.ride-img {
  width: 66px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  margin: -5px 0;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ride-option.active .ride-img {
  transform: scale(1.05);
  transition: transform 0.15s ease;
}

/* "+ адрес по пути" — intermediate stops under the route card */
.via-add {
  align-self: flex-start;
  margin-top: -6px;
  margin-left: -6px;
  padding: 6px 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--blue);
  touch-action: manipulation;
}
.via-rows {
  display: flex;
  flex-direction: column;
}
.via-row {
  padding: 8px 0;
}
.route-dot.via {
  background: #b8bfca;
}
.via-address-button {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.via-address-button:empty,
.via-address-button:not(:focus) {
  outline: none;
}
.via-address-button:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--blue);
}
.via-address-button:empty {
  color: #aab0b9;
  font-weight: 600;
}

/* Filter button — right of "Заказать", mirrors the pay badge */
.filter-btn {
  position: relative;
  width: 40px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-btn.active {
  color: var(--blue);
}
.filter-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.filter-btn.active .filter-badge {
  display: flex;
}

/* Trip options modal (child seat, pet, heavy luggage…) */
.opts-backdrop {
  position: fixed;
  inset: 0;
  bottom: calc(0px - var(--gap-bottom));
  z-index: 60;
  background: rgba(17, 19, 24, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.opts-backdrop.show {
  display: flex;
}
.opts-sheet {
  width: calc(100% - 16px);
  max-width: 480px;
  margin: 0 8px;
  background: #fff;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  padding: 10px 16px calc(16px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 72vh;
  animation: chat-slide 0.25s ease;
}
.opts-grab {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #e2e5ea;
  margin: 2px auto 4px;
  flex-shrink: 0;
}
.opts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.opts-head strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.opts-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f3f6;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  touch-action: manipulation;
}
.opts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.opts-chips button {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f3f6;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease;
}
.opts-chips button.selected {
  background: var(--ink);
  color: #fff;
}
.opts-note {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 0;
}


/* Searching-for-driver animation */
.panel-searching,
.panel-trip {
  align-items: center;
  text-align: center;
  padding-top: 18px;
  padding-bottom: 10px;
}
.search-animation {
  position: relative;
  width: min(100%, 300px);
  height: 92px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 8px;
}
.search-animation > span,
.search-animation > i {
  display: none;
}
.search-road {
  position: absolute;
  inset: 0;
}
.search-road::before {
  position: absolute;
  right: 12px;
  bottom: -5px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: #d8dde5;
  content: "";
}
#searchingCar {
  position: absolute;
  z-index: 1;
  bottom: -7px;
  left: 50%;
  width: 300px;
  max-width: none;
  height: 70px;
  margin-left: -150px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.16));
  animation: searching-car-sway 3.2s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes searching-car-sway {
  0%, 100% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
}
@keyframes searching-car-leave {
  to { transform: translate(155px, -12px) scale(1.08); opacity: 0; }
}
.search-animation.is-leaving #searchingCar {
  animation: searching-car-leave 750ms cubic-bezier(0.3, 0.75, 0.4, 1) forwards;
}
@media (prefers-reduced-motion: reduce) {
  #searchingCar {
    animation-duration: 7s;
  }
}

/* Driver card */
.driver-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.driver-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.driver-avatar.small {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.driver-photo {
  overflow: hidden;
  background: #dce8ff;
}
.driver-photo svg {
  display: block;
  width: 100%;
  height: 100%;
}
.driver-eta {
  max-width: 275px;
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.15;
}
.driver-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  padding: 14px;
  border: 0;
  background: #f6f7f9;
  color: var(--ink);
  border-radius: 16px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.driver-card > .driver-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}
.driver-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.driver-info strong {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.driver-info small {
  font-size: 12.5px;
  color: var(--muted);
}
.plate {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(17, 19, 24, 0.48);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 21px;
  white-space: nowrap;
}
.plate > span { padding: 0 5px; }
.plate small {
  padding: 0 4px;
  border-left: 1px solid rgba(17, 19, 24, 0.48);
  font-size: 9px;
  line-height: 21px;
}
.driver-vehicle {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.driver-plate-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 72px;
  min-height: 40px;
}
.driver-plate-wrap .plate {
  position: relative;
  z-index: 1;
}
.driver-tariff-car {
  position: absolute;
  right: -3px;
  bottom: -15px;
  z-index: 2;
  display: block;
  width: 42px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;
}
.carrier-details-open {
  align-self: stretch;
  margin: 0;
  width: 100%;
  min-height: 46px;
  background: #111318;
  color: #fff;
  font-size: 13px;
}
.panel-driver .carrier-details-open {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  flex: 0 0 48px;
  padding: 0;
  border-radius: 50%;
  background: #f1f3f6;
  color: var(--ink);
}
.panel-driver .carrier-details-open:active {
  background: #e5e8ed;
}
.panel-trip .carrier-details-open {
  align-self: stretch;
}
.panel-trip {
  align-items: stretch;
  text-align: left;
}
.trip-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.trip-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.trip-price {
  padding: 7px 11px;
  border-radius: 12px;
  background: #f0f3f7;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}
.trip-eta-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #f6f7f9;
  color: var(--ink);
}
.trip-eta-card > svg {
  flex: 0 0 22px;
}
.trip-eta-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.trip-eta-copy small {
  color: #6d737d;
  font-size: 12px;
  font-weight: 600;
}
.trip-eta-copy strong {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -0.8px;
  line-height: 1;
}
.trip-eta-copy i {
  color: var(--ink);
  font-size: 16px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: -0.2px;
}
.trip-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.45px;
  line-height: 1.22;
  text-overflow: ellipsis;
}
.trip-title span {
  color: var(--ink);
}
.trip-route-card {
  display: flex;
  align-items: stretch;
  gap: 11px;
  padding: 12px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #fff;
}
.trip-route-stops {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 14px;
  flex: 0 0 14px;
}
.trip-route-point {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.trip-route-point.pickup {
  border: 2px solid #5f6670;
  background: #fff;
}
.trip-route-point.destination {
  background: #5f6670;
}
.trip-route-connector {
  width: 2px;
  min-height: 22px;
  flex: 1 0 22px;
  margin: 3px 0;
  background: repeating-linear-gradient(to bottom, #c5ccd6 0 3px, transparent 3px 6px);
}
.trip-route-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
}
.trip-route-labels > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.trip-route-labels small,
.trip-vehicle-card small {
  color: var(--muted);
  font-size: 11px;
}
.trip-route-labels strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trip-driver-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 16px;
  background: #f5f7fa;
}
.trip-driver-card .driver-avatar {
  width: 48px;
  height: 48px;
}
.trip-driver-copy,
.trip-vehicle-card > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.trip-driver-copy {
  flex: 1;
}
.trip-driver-copy strong,
.trip-vehicle-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trip-driver-copy small {
  color: var(--muted);
  font-size: 12px;
}
.trip-driver-tag {
  padding: 6px 8px;
  border-radius: 9px;
  background: #fff;
  color: #566273;
  font-size: 10px;
  font-weight: 700;
}
.trip-vehicle-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 5px 12px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fff;
}
.trip-vehicle-copy {
  flex: 1;
}
.trip-vehicle-card .trip-price {
  flex: 0 0 auto;
  margin-left: auto;
}
.trip-tariff-car {
  display: block;
  width: 54px;
  height: 36px;
  flex: 0 0 54px;
  object-fit: contain;
}
.trip-review {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 16px;
  background: #f6f7f9;
}
.trip-review-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.trip-review-heading strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.trip-review-heading small {
  color: #6d737d;
  font-size: 10px;
}
.trip-stars {
  justify-content: flex-start;
  gap: 12px;
}
.trip-stars button {
  padding: 0;
  font-size: 31px;
}
.trip-review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.trip-review-tags button {
  padding: 6px 9px;
  border: 1px solid #dfe2e7;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
  touch-action: manipulation;
}
.trip-review-tags button.selected {
  border-color: #111318;
  background: #111318;
  color: #fff;
}
.trip-details-btn {
  align-self: stretch;
  width: 100%;
  min-height: 46px;
  background: #111318;
  color: #fff;
  font-size: 13px;
}
.trip-details-btn:active {
  background: #33363c;
}
.trip-driver-card {
  width: 100%;
  border: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Call / message buttons */
.driver-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.act-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 16px;
  background: #f1f3f6;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  touch-action: manipulation;
  transition: background 0.15s ease, transform 0.15s ease;
}
.act-btn:active {
  background: #e5e8ed;
  transform: scale(0.98);
}

/* Trip progress */
.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #eceef2;
  overflow: hidden;
  margin-top: 4px;
}
.progress-track span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 3px;
  background: var(--blue);
  animation: trip-progress 3s linear forwards;
}
@keyframes trip-progress {
  0% { width: 8%; }
  100% { width: 100%; }
}


/* ===== Collapse state styles ===== */

/* Back arrow: floats ABOVE the white sheet, outside it, with a gap.
   It is a child of .sheet (position:fixed), anchored just above its top edge
   so it always hugs the top of the current block and leaves a clear gap. */
.panel-back-fixed {
  position: absolute;
  left: 14px;
  bottom: calc(100% + 12px);
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  touch-action: manipulation;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.panel-back-fixed:active { transform: scale(0.92); }
.panel-back-fixed svg { width: 20px; height: 20px; stroke: var(--ink); }
/* Keep the back arrow hidden on the main menu stage */
body[data-stage="search"] .panel-back-fixed { opacity: 0; pointer-events: none; }

/* The grabber doubles as the collapse / expand paddle */
.sheet-grabber {
  cursor: pointer;
  touch-action: manipulation;
}

/* Collapsed sheet: transparent glass pill floating over the map, no white bg.
   The block moves down (closer to the bottom edge) and shrinks. */
.sheet.collapsed {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  max-height: none;
  height: auto;
  bottom: calc(60px - var(--gap-bottom));
  top: auto;
}
.sheet.collapsed .sheet-grabber {
 display: flex;
 height: 14px;
 margin: 0 auto 1px;
}
.sheet[data-panel="search"] .sheet-grabber {
  display: none !important;
}
.sheet.collapsed .sheet-grabber::before {
 width: 34px;
 height: 4px;
 background: rgba(61, 66, 75, 0.58);
}
.sheet:not(.collapsed) .sheet-grabber {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  margin: 0;
  z-index: 25;
}
.sheet.collapsed .panel {
  gap: 0;
  padding: 0;
  min-height: 0;
}
/* Keep only the live destination input inside the inset collapsed panel. */
.sheet.collapsed .panel > *:not(.collapse-pill):not(.search-field):not(.quick-addresses) {
  display: none !important;
}
.quick-addresses {
  display: none;
}
.sheet.collapsed .panel-search .quick-addresses {
  display: flex;
  position: relative;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 0 2px 10px;
}
.quick-address {
  display: flex;
  flex: 0 1 96px;
  min-width: 0;
  min-height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.quick-address svg {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  color: var(--ink);
}
.quick-address[hidden] { display: none !important; }
.quick-address span {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.sheet.collapsed .panel > .quick-addresses {
  display: flex !important;
}
/* The pill is hidden by default and only shown while collapsed (inactive
   panels stay display:none, so only the active panel's pill appears). */
.collapse-pill { display: none; }
.sheet.collapsed .collapse-pill { display: flex !important; }
.sheet.collapsed .collapse-pill {
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: var(--ink);
}
.sheet.collapsed .collapse-pill-text,
.sheet.collapsed .collapse-pill-price { color: var(--ink); }
.sheet.collapsed .collapse-pill-cta { color: var(--blue-dark); }
.sheet.collapsed .collapse-pill-driver {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
}
/* First (search) pill in collapsed state = glass search field: magnifier icon,
   no "Развернуть" CTA — the whole pill expands on tap. Other stage pills
   (pickup/options/searching/driver/trip/review) keep their CTA. */
.sheet.collapsed .panel-search .collapse-pill {
  background: rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: var(--ink);
  min-height: 60px;
  padding: 10px 14px;
  gap: 12px;
  font-size: 17.5px;
  box-shadow: none;
}
.sheet.collapsed .panel-search .search-field { display: none !important; }
.sheet.collapsed .panel-search .collapse-pill { display: flex !important; }
.sheet.collapsed .panel-search .collapse-pill-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  color: var(--ink);
}

/* ---- Floating glass preview pill (no white background) ---- */
.collapse-pill {
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(18, 22, 32, 0.5);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 30px rgba(8, 12, 24, 0.35);
  color: #fff;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
.sheet-grabber:active {
  cursor: grabbing;
}
.collapse-pill:active { transform: scale(0.99); }

.collapse-pill-flag {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.collapse-pill-emoji { font-size: 22px; flex-shrink: 0; width: 34px; text-align: center; }
.collapse-pill-text { flex: 1; font-size: 15px; font-weight: 600; }
.collapse-pill-text b { font-weight: 800; }
.collapse-pill-cta { font-size: 13px; font-weight: 700; color: #a8bcff; flex-shrink: 0; }
.collapse-pill-price { font-size: 15px; font-weight: 800; flex-shrink: 0; }
.sheet[data-panel="trip"] .collapse-pill-cta { color: #6d737d; }

.active-ride-card {
  position: fixed;
  top: calc(var(--safe-top) + 52px);
  left: 68px;
  right: 12px;
  z-index: 12;
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.active-ride-card.show { display: flex; }
.active-ride-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  object-fit: cover;
}
.active-ride-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.active-ride-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-ride-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-ride-time {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.active-ride-aside {
  position: relative;
  display: flex;
  flex: 0 0 72px;
  min-width: 0;
  min-height: 40px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
}
.active-ride-plate {
  position: relative;
  z-index: 1;
  display: none;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(17, 19, 24, 0.48);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 19px;
  white-space: nowrap;
}
.active-ride-plate > span { padding: 0 4px; }
.active-ride-plate small {
  padding: 0 3px;
  border-left: 1px solid rgba(17, 19, 24, 0.48);
  font-size: 9px;
  line-height: 19px;
}
.active-ride-car {
  position: absolute;
  right: -3px;
  bottom: 2px;
  z-index: 2;
  display: none;
  width: 44px;
  height: 29px;
  object-fit: contain;
  pointer-events: none;
}
.active-ride-card.has-vehicle .active-ride-plate,
.active-ride-card.has-vehicle .active-ride-car { display: block; }
.active-ride-card.has-vehicle .active-ride-plate { display: inline-flex; }
.active-ride-card.has-vehicle .active-ride-time { display: none; }

body.sheet-expanded[data-stage="search"] .center-pin {
  top: calc((var(--sheet-top, 50vh) + var(--pin-upper-edge, 106px)) / 2);
  z-index: 25;
}

/* Order (tariff) pill — solid blue "order" bar */
.collapse-pill-order {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-color: rgba(255, 255, 255, 0.22);
}
.collapse-pill-order .collapse-pill-price {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px; border-radius: 10px;
}

/* Driver pill — plate + eta on top, big "Уже выхожу" button below */
.collapse-pill-driver {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.collapse-pill-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.collapse-pill-meta strong {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(17, 19, 24, 0.62);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.collapse-pill-meta strong > span:first-child { padding: 3px 6px; }
.collapse-pill-meta .plate-region {
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  border-left: 1px solid rgba(17, 19, 24, 0.62);
  font-size: 11px;
}
.collapse-pill-meta small { color: var(--ink); font-size: 12px; font-weight: 600; }
.collapse-pill-btn {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: #111318;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  touch-action: manipulation;
}
.collapse-pill-btn:active { transform: scale(0.99); }

/* Review panel */
.review-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #edf0f4;
  background: #fff;
  border-radius: 18px;
}
.review-summary-people {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
}
.review-summary-people .driver-photo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}
.review-driver-meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.review-driver-meta > strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-driver-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.review-driver-rating b {
  color: #f2a900;
  font-size: 14px;
}
.review-summary-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin-left: auto;
}
.review-summary-copy small {
  color: var(--muted);
  font-size: 11px;
}
.review-summary-copy strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.35px;
}
.review-title {
  margin-top: 2px;
}
.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.stars button {
  font-size: 34px;
  line-height: 1;
  color: #d9dde3;
  padding: 4px;
  touch-action: manipulation;
  transition: color 0.15s ease, transform 0.15s ease;
}
.stars button.filled {
  color: #ffb300;
  transform: scale(1.08);
}
.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.review-tags button {
  padding: 9px 13px;
  border-radius: 12px;
  background: #f1f3f6;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease;
}
.review-tags button.selected {
  background: var(--ink);
  color: #fff;
}
.review-comment {
  width: 100%;
  min-height: 64px;
  resize: none;
  border: none;
  background: #f6f7f9;
  border-radius: 16px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.review-comment::placeholder {
  color: #aab0b9;
}


/* ===== Chat with the driver ===== */
.chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(17, 19, 24, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.chat-backdrop.show {
  display: flex;
}
.carrier-details-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 19, 24, 0.42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.carrier-details-backdrop.show {
  display: flex;
}
.carrier-details {
  width: 100%;
  max-width: 480px;
  max-height: min(82vh, 720px);
  overflow-y: auto;
  padding: 10px 18px calc(20px + var(--safe-bottom));
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(16, 24, 40, 0.22);
  animation: chat-slide 0.22s ease;
}
.carrier-details-grabber {
  width: 38px;
  height: 4px;
  margin: 0 auto 18px;
  border-radius: 3px;
  background: #c7cbd2;
}
.carrier-details-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.carrier-details-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f3f6;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.carrier-details-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid #f0f1f4;
  font-size: 14px;
}
.carrier-details-row > span {
  color: var(--muted);
}
.carrier-details-row > strong {
  color: var(--ink);
  text-align: right;
}
.carrier-provider {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f5f6f8;
}
.carrier-provider > img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}
.carrier-provider > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}
.carrier-provider small,
.carrier-details-grid small,
.carrier-details-route small {
  color: var(--muted);
  font-size: 11px;
}
.carrier-provider strong,
.carrier-details-grid strong,
.carrier-details-route strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.carrier-provider-check {
  display: flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e7e9ed;
  color: #1e7b49;
  font-size: 14px;
  font-weight: 900;
}
.carrier-details-vehicle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
}
.carrier-details-vehicle > img {
  width: 76px;
  height: 54px;
  flex: 0 0 76px;
  object-fit: contain;
}
.carrier-details-car-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.carrier-details-car-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.carrier-details-car-copy small {
  color: #626975;
  font-size: 12px;
}
.carrier-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.carrier-details-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #f5f6f8;
}
.carrier-details-route {
  display: flex;
  align-items: stretch;
  gap: 11px;
  padding: 12px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
}
.carrier-details-route > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.carrier-details-route i {
  width: 8px;
  height: 8px;
  border: 2px solid #626975;
  border-radius: 50%;
}
.carrier-details-route b {
  height: 15px;
  border-left: 1px dashed #969ca6;
}
.carrier-details-route > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.carrier-details-route strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
}
.driver-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 19, 24, 0.45);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.driver-profile-backdrop.show {
  display: flex;
}
.driver-profile {
  width: 100%;
  max-width: 480px;
  max-height: min(86vh, 760px);
  overflow-y: auto;
  padding: 10px 20px calc(20px + var(--safe-bottom));
  border-radius: 26px 26px 20px 20px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(16, 24, 40, 0.22);
  animation: chat-slide 0.22s ease;
}
.driver-profile-heading {
  display: flex;
  justify-content: flex-end;
}
.driver-profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 2px 0 18px;
  text-align: center;
}
.driver-profile-photo {
  width: 176px;
  height: 176px;
  border: 5px solid #f1f3f6;
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(16, 24, 40, 0.12);
}
.driver-profile-photo svg {
  display: block;
  width: 100%;
  height: 100%;
}
.driver-profile-hero h2 {
  color: var(--ink);
  font-size: 23px;
  font-weight: 850;
}
.driver-profile-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}
.driver-profile-rating b {
  color: #f2a900;
}
.driver-profile-rating small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.driver-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.driver-profile-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 5px;
  border-radius: 14px;
  background: #f5f6f8;
  text-align: center;
}
.driver-profile-stats strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}
.driver-profile-stats small {
  color: #6d737d;
  font-size: 10px;
  line-height: 1.25;
}
.driver-profile-info {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
}
.driver-profile-info > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.driver-profile-info-icon {
  display: flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f1f3f6;
  color: var(--ink);
  font-size: 14px;
}
.driver-profile-info-icon svg {
  display: block;
}
.driver-profile-info > div > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.driver-profile-info strong {
  color: var(--ink);
  font-size: 12px;
}
.driver-profile-info small {
  color: var(--muted);
  font-size: 11px;
}
.driver-profile-actions {
  display: flex;
  gap: 9px;
}
.driver-profile-backdrop.from-trip .driver-profile-actions {
  display: none;
}
.driver-profile-actions .act-btn {
  min-height: 46px;
  border-radius: 14px;
}
.chat {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  padding: 10px 16px calc(16px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 72vh;
  animation: chat-slide 0.25s ease;
}
@keyframes chat-slide {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f1f4;
  flex-shrink: 0;
}
.chat-head-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.chat-head-copy strong {
  font-size: 15.5px;
}
.destination-current {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 8px;
  border-radius: 16px;
  background: #f6f7f9;
}
.destination-current .pickup-text {
  font-size: 15.5px;
}
.panel-destination {
  gap: 12px;
}
.panel-destination .primary-btn {
  margin-top: 2px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.chat-head-copy small {
  font-size: 12px;
  color: var(--muted);
}
.chat-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f3f6;
  color: var(--ink);
  font-size: 14px;
  flex-shrink: 0;
  touch-action: manipulation;
}
.chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 0;
}
.chat-msg {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.35;
  -webkit-user-select: text;
  user-select: text;
}
.chat-msg.driver {
  align-self: flex-start;
  background: #f1f3f6;
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.chat-msg.me {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.chat-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: none;
  background: #f1f3f6;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 16.5px; /* keeps iOS from zooming on focus */
  font-weight: 600;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: text;
  user-select: text;
}
.chat-form input::placeholder {
  color: #aab0b9;
  font-weight: 500;
}
.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  touch-action: manipulation;
}
.chat-send:active {
  transform: scale(0.92);
}
.menu-view.menu-chat-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}
.menu-view.menu-chat-page[hidden] { display: none; }
.menu-chat-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 8px 16px;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
}
.menu-chat-back {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
}
.menu-chat-back:active { background: #f1f3f6; }
.menu-chat-back svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-view.menu-chat-list-page { padding: 4px 16px 18px; }
.menu-chat-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 92px;
  padding: 11px 0;
  border-bottom: 1px solid #edf0f4;
  background: transparent;
  text-align: left;
}
.menu-chat-list-row:active { background: #f7f8fa; }
.menu-chat-list-row > img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f3f6;
}
.menu-chat-list-row > span {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.menu-chat-list-row strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.menu-chat-list-row small {
  display: block;
  max-height: 38px;
  overflow: hidden;
  color: #818791;
  font-size: 13px;
  line-height: 18px;
}
.menu-chat-list-row time { align-self: flex-start; color: #9298a1; font-size: 11px; white-space: nowrap; }
.menu-chat-header > img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f3f6;
}
.menu-chat-header > span {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.menu-chat-header strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-chat-header small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #248b59;
  font-size: 12px;
}
.menu-chat-header small i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39b878;
}
.menu-chat-messages {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 16px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.menu-chat-message {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 17px;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}
.menu-chat-message.incoming {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: #f1f3f6;
  color: var(--ink);
}
.menu-chat-message.outgoing {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: #e5f5f8;
  color: #20262d;
}
.menu-chat-message-attachments {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}
.menu-chat-attachment-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
}
.menu-chat-attachment-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #5e6671;
}
.menu-chat-attachment-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-chat-attachment-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.menu-chat-attachment-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.menu-chat-attachment-copy small { color: #727985; font-size: 10px; }
.menu-chat-photo-button {
  display: block;
  max-width: min(72vw, 280px);
  max-height: 230px;
  margin-top: 6px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #e9ebef;
}
.menu-chat-photo-button img { display: block; max-width: 100%; max-height: 230px; object-fit: contain; }
.menu-chat-composer {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  background: #fff;
}
.menu-chat-staged {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 14px 0;
}
.menu-chat-staged[hidden],
.menu-chat-order-picker[hidden] { display: none; }
.menu-chat-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 7px 4px 10px;
  border-radius: 16px;
  background: #f1f3f6;
  color: #3d444e;
  font-size: 11px;
}
.menu-chat-attachment-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-chat-attachment-chip button { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 50%; color: #747b86; font-size: 16px; }
.menu-chat-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  max-height: 0;
  padding: 0 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scaleY(0.65);
  transform-origin: bottom left;
  transition: max-height 0.22s ease, padding 0.22s ease, opacity 0.18s ease, transform 0.22s ease;
}
.menu-chat-tools.is-open {
  max-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
  opacity: 1;
  transform: translateY(0) scaleY(1);
}
.menu-chat-tools > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0;
  background: transparent;
  color: #535b66;
  font-size: 12px;
  white-space: nowrap;
}
.menu-chat-tools > button:active { color: var(--blue); }
.menu-chat-tools > button svg {
  width: 38px;
  height: 38px;
  padding: 10px;
  border-radius: 50%;
  background: #f1f3f6;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-chat-order-picker {
  display: flex;
  max-height: 210px;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding: 10px 14px;
  border-top: 1px solid #edf0f4;
  background: #fff;
}
.menu-chat-order-picker > strong { color: #737a85; font-size: 11px; font-weight: 600; }
.menu-chat-order-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 0;
  text-align: left;
}
.menu-chat-order-option svg { width: 23px; height: 23px; flex: 0 0 23px; fill: none; stroke: #68717d; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-chat-order-option span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.menu-chat-order-option strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.menu-chat-order-option small { overflow: hidden; color: #858c96; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.menu-chat-form {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 8px 14px max(8px, var(--safe-bottom));
  border-top: 1px solid #edf0f4;
  background: #fff;
}
.menu-chat-attach {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: #f1f3f6;
  color: #747b86;
}
.menu-chat-form .menu-chat-attach { background: #f1f3f6; color: #747b86; }
.menu-chat-form .menu-chat-attach:active,
.menu-chat-form .menu-chat-attach[aria-expanded="true"] { background: #e5e8ed; color: #515964; }
.menu-chat-form .menu-chat-attach svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-chat-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 22px;
  outline: 0;
  background: #f1f3f6;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  user-select: text;
  -webkit-user-select: text;
}
.menu-chat-form button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
}
.menu-chat-form button:active { transform: scale(0.94); }
.menu-chat-form button svg { width: 20px; height: 20px; fill: currentColor; }
.support-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(18, 20, 24, 0.94);
}
.support-image-viewer[hidden] { display: none; }
.support-image-viewer-photo {
  display: block;
  max-width: 100vw;
  max-height: 100dvh;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.support-image-viewer-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 10px) 18px 10px;
  z-index: 2;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.support-image-viewer.controls-visible .support-image-viewer-header {
  opacity: 1;
  pointer-events: auto;
}
.support-image-viewer.controls-visible::before {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 190px;
  background: linear-gradient(rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.28) 62%, transparent);
  content: "";
  pointer-events: none;
}
.support-image-viewer-header > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.support-image-viewer-header strong { font-size: 16px; font-weight: 650; }
.support-image-viewer-header small { color: rgba(255, 255, 255, 0.76); font-size: 12px; }
.support-image-viewer-header button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(65, 68, 74, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  color: #fff;
}
.support-image-viewer-header button:active { background: rgba(100, 104, 111, 0.65); }
.support-image-viewer-header button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Reduce text in the tariff-selection panel without scaling its layout. */
.panel-options .collapse-pill-text,
.panel-options .collapse-pill-price {
  font-size: calc(15px * 0.95);
}
.panel-options .route-copy small { font-size: calc(11px * 0.95); }
.panel-options .route-copy strong { font-size: calc(14.5px * 0.95); }
.panel-options .route-edit { font-size: calc(13px * 0.95); }
.panel-options .via-add { font-size: calc(13.5px * 0.95); }
.panel-options .via-address-button { font-size: calc(14.5px * 0.95); }
.panel-options .ride-option .ride-copy strong { font-size: calc(13px * 0.95); }
.panel-options .ride-option .ride-copy small { font-size: calc(10px * 0.95); }
.panel-options .ride-option .ride-price { font-size: calc(11px * 0.95); }
.panel-options .pay-badge small { font-size: calc(9px * 0.95); }
.panel-options .order-row .primary-btn { font-size: calc(16px * 0.95); }

/* Compact typography and actions in the driver, trip, and final review panels. */
.panel-driver .eyebrow { font-size: 10.35px; }
.panel-driver .driver-eta { font-size: 18.9px; }
.panel-driver .driver-info strong { font-size: 13.95px; }
.panel-driver .driver-info small { font-size: 11.25px; }
.panel-driver .plate { font-size: 11.7px; }
.panel-driver .plate small { font-size: 8.1px; }
.panel-driver .collapse-pill-meta strong { font-size: 13.5px; }
.panel-driver .collapse-pill-meta .plate-region { font-size: 9.9px; }
.panel-driver .collapse-pill-meta small { font-size: 10.8px; }
.panel-driver .collapse-pill-btn { padding: 11.7px; font-size: 13.5px; }
.panel-driver .driver-card { gap: 10px; padding: 12px; }
.panel-driver .driver-actions { gap: 8px; }
.panel-driver .driver-actions .act-btn {
  min-height: 43px;
  gap: 6px;
  border-radius: 14px;
  font-size: 13.05px;
}
.panel-driver .driver-actions .act-btn svg { width: 17px; height: 17px; }
.panel-driver .carrier-details-open { min-width: 43px; width: 43px; min-height: 43px; flex-basis: 43px; }
.panel-driver #imOutBtn { min-height: 47px; font-size: 14.4px; }
.panel-driver #cancelRideBtn { padding: 9px 14px; font-size: 13.05px; }

.panel-trip .trip-eta-copy small { font-size: 10.8px; }
.panel-trip .trip-eta-copy strong { font-size: 27px; }
.panel-trip .trip-eta-copy i { font-size: 14.4px; }
.panel-trip .trip-title { font-size: 18px; }
.panel-trip .trip-route-labels small,
.panel-trip .trip-vehicle-card small { font-size: 9.9px; }
.panel-trip .trip-route-labels strong { font-size: 11.7px; }
.panel-trip .trip-driver-copy strong,
.panel-trip .trip-vehicle-card strong { font-size: 12.6px; }
.panel-trip .trip-driver-copy small { font-size: 10.8px; }
.panel-trip .trip-driver-tag { font-size: 9px; }
.panel-trip .trip-price { font-size: 13.5px; }
.panel-trip .trip-review-heading strong { font-size: 11.7px; }
.panel-trip .trip-review-heading small { font-size: 9px; }
.panel-trip .trip-stars button { font-size: 27.9px; }
.panel-trip .trip-review-tags button { font-size: 9px; }
.panel-trip .trip-details-btn { min-height: 42px; font-size: 11.7px; }

.panel-review .collapse-pill-text { font-size: 13.5px; }
.panel-review .collapse-pill-cta { font-size: 11.7px; }
.panel-review .review-driver-meta > strong { font-size: 13.5px; }
.panel-review .review-driver-rating { font-size: 10.8px; }
.panel-review .review-driver-rating b { font-size: 12.6px; }
.panel-review .review-summary-copy small { font-size: 9.9px; }
.panel-review .review-summary-copy strong { font-size: 18px; }
.panel-review .review-title { font-size: 18.9px; }
.panel-review > .muted { font-size: 11.7px; }
.panel-review .stars button { font-size: 30.6px; padding: 3.6px; }
.panel-review .review-tags button { padding: 8px 11.7px; font-size: 11.7px; }
.panel-review .review-comment { min-height: 58px; padding: 10.8px 12.6px; font-size: 13.5px; }
.panel-review #submitReviewBtn { min-height: 47px; font-size: 14.4px; }
