/* ==========================================================================
   PRAGYA TRANSPORT - MODERN MOBILE & PWA DESIGN SYSTEM
   Inspired by Ghanaian warm tones: Gold, Crimson, Forest Green & Charcoal
   ========================================================================== */

:root {
  /* Brand Palette */
  --primary-color: #FFC72C;        /* Ghana Gold */
  --primary-hover: #E5B224;
  --secondary-color: #D21034;      /* Ghana Crimson */
  --success-color: #006B3F;        /* Ghana Forest Green */
  --accent-blue: #007AFF;
  
  /* Light Theme Surfaces */
  --bg-primary: #F7F8FA;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --border-subtle: #E6E8EC;
  --border-focus: #FFC72C;
  
  /* Text — AA-checked 2026-11-22 (see contrast audit):
     muted #4B5563 = 7.6:1 on white / 7.1:1 on --bg-primary;
     light #57606A = 6.4:1 on white; placeholder #5F6873 = 5.7:1 on white.
     Gold is a surface/accent colour only — gold-coloured TEXT on light
     uses --accent-text (dark amber #7A5200, 6.9:1 on white). */
  --text-main: #181A20;
  --text-muted: #4B5563;
  --text-light: #57606A;
  --text-inverted: #FFFFFF;
  --placeholder-color: #5F6873;
  --accent-text: #7A5200;
  --accent-text-strong: #6E4A00;
  --primary-green: #006B3F;
  --primary-gold: #FFC72C;
  --on-gold: #1A1D20;
  
  /* Shadows & Glassmorphism */
  --shadow-sm: 0 2px 8px rgba(24, 26, 32, 0.04);
  --shadow-md: 0 6px 20px rgba(24, 26, 32, 0.08);
  --shadow-lg: 0 12px 32px rgba(24, 26, 32, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.5);
  
  /* Sizing & Transitions */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Tokens */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0F1115;
    --bg-card: #181B22;
    --bg-elevated: #222630;
    --border-subtle: #2A2E39;
    --text-main: #F4F5F7;
    --text-muted: #B4BBC7;
    --text-light: #9AA3B1;
    --placeholder-color: #9AA3B1;
    --accent-text: #FFC72C;
    --accent-text-strong: #FFD147;
    --glass-bg: rgba(24, 27, 34, 0.88);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* Dark mode: booking surfaces with hardcoded light backgrounds switch too,
   otherwise --text-main (near-white in dark) lands on near-white cards */
@media (prefers-color-scheme: dark) {
  .da-card, .vehicle-choice-card, .booking-bottom-bar,
  .da-autocomplete-dropdown, .da-btn-action, .landmark-chip,
  .landmark-chip .code-badge, .gps-badge, .map-control-btn {
    background: var(--bg-card);
  }
  .da-field-wrapper, .da-btn-action:hover, .da-btn-action:active,
  .landmark-chip:hover, .landmark-chip:active,
  .da-autocomplete-item:hover, .da-autocomplete-item:active {
    background: var(--bg-elevated);
  }
  .da-card, .da-field-wrapper, .vehicle-choice-card, .booking-bottom-bar,
  .da-autocomplete-dropdown, .da-btn-action, .landmark-chip, .booking-map-wrapper {
    border-color: var(--border-subtle);
  }
  .vehicle-choice-card.selected { background: var(--bg-elevated); }
  .map-stat-pill { background: rgba(24, 27, 34, 0.95); }
  .action-card .action-icon { color: var(--primary-color); }
}

/* Base Document Setup */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  /* Extra space for floating bottom navigation bar + mobile safe area */
  padding-bottom: calc(85px + env(safe-area-inset-bottom, 16px));
}

/* Bootstrap muted utilities, re-pointed at the AA tokens (Bootstrap's
   #6C757D at 11-13px was the founder's "hard to see" text) */
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-muted) !important; }
.form-control::placeholder, .form-select::placeholder,
input::placeholder, textarea::placeholder {
  color: var(--placeholder-color) !important;
  opacity: 1;
}
input.form-control-sm { font-size: 16px; }

/* Across-app floor for inline-styled micro-labels (10-11px status/labels in
   driver, history and tracking templates) — raised to a readable 12.5px */
[style*="font-size: 10px"], [style*="font-size: 11px"] {
  font-size: 12.5px !important;
}

/* ==========================================================================
   TOP APP BAR & BRANDING
   ========================================================================== */

.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px;
  transition: var(--transition-fast);
}

.top-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.3px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-navbar .navbar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

/* Flag Accent Stripe on top bar */
.top-navbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #D21034 0%, #FFC72C 50%, #006B3F 100%);
}

/* ==========================================================================
   CARDS & SURFACES
   ========================================================================== */

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  overflow: hidden;
  margin-bottom: 16px;
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 20px;
  font-weight: 700;
}

.card-body {
  padding: 20px;
}

/* Action Card Grid */
.action-card {
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.action-card:active {
  transform: scale(0.97);
}

.action-card .action-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 199, 44, 0.15);
  color: var(--accent-text-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
  transition: transform var(--transition-fast);
}

.action-card:hover .action-icon {
  transform: scale(1.08);
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */

.btn {
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  cursor: pointer;
  min-height: 44px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #FFC72C 0%, #E6AE15 100%);
  color: #1A1D20;
  box-shadow: 0 4px 14px rgba(255, 199, 44, 0.4);
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #FFD147 0%, #EDB823 100%);
  color: #1A1D20;
  box-shadow: 0 6px 20px rgba(255, 199, 44, 0.5);
}

.btn-success {
  background-color: var(--success-color);
  color: #FFFFFF;
}

.btn-success:hover {
  background-color: #005632;
  color: #FFFFFF;
}

.btn-danger {
  background-color: var(--secondary-color);
  color: #FFFFFF;
}

.btn-outline-primary {
  background: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border-subtle);
}

.btn-outline-primary:hover, .btn-outline-primary:active {
  background: var(--bg-primary);
  border-color: var(--primary-color);
  color: var(--text-main);
}

/* ==========================================================================
   MODERN FORM INPUTS (A11Y & Mobile Ergonomics)
   ========================================================================== */

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control, .form-select {
  font-size: 16px; /* Must be >=16px to avoid iOS safari auto-zoom */
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 12px 16px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(255, 199, 44, 0.2);
  outline: none;
  background-color: var(--bg-card);
  color: var(--text-main);
}

.input-group-text {
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-subtle);
  border-right: none;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* ==========================================================================
   VEHICLE SELECTOR CARDS
   ========================================================================== */

.vehicle-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.vehicle-card {
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.vehicle-card .vehicle-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--primary-color);
  color: #1A1D20;
  white-space: nowrap;
}

.vehicle-card .vehicle-emoji {
  font-size: 32px;
  margin-bottom: 6px;
  display: block;
}

.vehicle-card .vehicle-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--text-main);
}

.vehicle-card .vehicle-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.vehicle-card.active, .vehicle-card:has(input:checked) {
  border-color: var(--primary-color);
  background: rgba(255, 199, 44, 0.08);
  box-shadow: 0 4px 16px rgba(255, 199, 44, 0.25);
}

/* ==========================================================================
   DRIVER ONLINE / OFFLINE TOGGLE & RADAR ANIMATION
   ========================================================================== */

.driver-hero-status {
  padding: 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.radar-pulse-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.radar-pulse-ring.online {
  background: rgba(0, 107, 63, 0.12);
  color: var(--success-color);
}

.radar-pulse-ring.online::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--success-color);
  animation: radarPulse 2s infinite ease-out;
}

.radar-pulse-ring.offline {
  background: rgba(108, 114, 127, 0.12);
  color: var(--text-muted);
}

@keyframes radarPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ==========================================================================
   RIDE TRACKING STEPPER
   ========================================================================== */

.ride-tracking-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 20px 0;
}

.ride-tracking-stepper::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--border-subtle);
  z-index: 1;
}

.stepper-step {
  position: relative;
  z-index: 2;
  text-align: center;
}

.stepper-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin: 0 auto 6px;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.stepper-step.completed .stepper-dot {
  background: var(--success-color);
  border-color: var(--success-color);
  color: #FFFFFF;
}

.stepper-step.active .stepper-dot {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #1A1D20;
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(255, 199, 44, 0.5);
}

.stepper-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (FLOATING SHELL)
   ========================================================================== */

.bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.bottom-navbar .navbar-nav {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bottom-navbar .nav-item {
  flex: 1;
  text-align: center;
}

.bottom-navbar .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), transform var(--transition-fast);
  gap: 4px;
}

.bottom-navbar .nav-link i {
  font-size: 18px;
  transition: transform var(--transition-fast);
}

.bottom-navbar .nav-link.active {
  color: var(--accent-text);
}

@media (prefers-color-scheme: dark) {
  .bottom-navbar .nav-link.active {
    color: var(--primary-color);
  }
}

.bottom-navbar .nav-link.active i {
  transform: translateY(-2px);
}

/* ==========================================================================
   NATIVE MODALS & DIALOGS (Compliant with Modern Web Guidance)
   ========================================================================== */

dialog:modal {
  overscroll-behavior: contain;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
  color: var(--text-main);
  max-width: 90vw;
  width: 440px;
  padding: 24px;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ==========================================================================
   PWA INSTALL BOTTOM DRAWER
   ========================================================================== */

.pwa-install-drawer {
  position: fixed;
  bottom: calc(75px + env(safe-area-inset-bottom, 12px));
  left: 16px;
  right: 16px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  padding: 16px 20px;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-install-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.pwa-app-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.pwa-app-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Network Status Pill */
.network-status-pill {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-md);
}

.network-status-pill.offline {
  display: flex;
  background-color: #D21034;
  color: #FFFFFF;
}

.network-status-pill.online {
  display: flex;
  background-color: var(--success-color);
  color: #FFFFFF;
}

/* Leaflet Map Customizations */
.leaflet-container {
  font-family: inherit;
  border-radius: var(--radius-md);
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 4px;
}

.leaflet-popup-content {
  margin: 10px 14px;
  line-height: 1.4;
  font-size: 13px;
}

/* Ghana Post GPS & Ride Booking Styles */
.gps-banner {
  background: linear-gradient(135deg, rgba(255, 199, 44, 0.15), rgba(0, 107, 63, 0.1));
  border: 1px solid rgba(0, 107, 63, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.gps-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-green);
  background: #FFFFFF;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.da-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid #E5E7EB;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  position: relative;
}

.route-selector-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-connector-line {
  position: absolute;
  left: 20px;
  top: 36px;
  bottom: 36px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, #006B3F 0, #006B3F 4px, transparent 4px, transparent 8px);
  z-index: 1;
}

.da-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.da-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 14px;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(0, 107, 63, 0.15);
}

.da-dot.pickup {
  background-color: var(--primary-green);
}

.da-dot.dropoff {
  background-color: #D21034;
  box-shadow: 0 0 0 4px rgba(210, 16, 52, 0.15);
}

.da-field-wrapper {
  flex-grow: 1;
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.da-field-wrapper:focus-within {
  border-color: var(--primary-gold);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.25);
}

.da-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.da-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.da-status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: none;
}

.da-status-badge.verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 107, 63, 0.1);
  color: var(--primary-green);
}

.da-status-badge.resolving {
  display: inline-flex;
  background: rgba(255, 199, 44, 0.2);
  color: var(--accent-text-strong);
}

.da-status-badge.codeonly {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 199, 44, 0.25);
  color: var(--accent-text-strong);
}

.da-status-badge.estimated {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 143, 0, 0.18);
  color: #7A4D00;
}

/* Place-name pick (2026-11-24): a real place found by name, used like a
   map pin — deliberately neutral slate, NOT the green "Verified". */
.da-status-badge.place {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(71, 85, 105, 0.14);
  color: #3F4C63;
}

/* Address-entry method labels (Digital address / Search / Location) */
.da-method { margin-top: 10px; }
.da-method:first-of-type { margin-top: 2px; }
.da-method-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.da-method-label .step-num {
  background: var(--primary-color);
  color: var(--on-gold);
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.da-code-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.45;
}
.da-search-input {
  width: 100%;
  border: 1.5px solid #D1D5DB;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 16px;
  padding: 10px 12px;
  outline: none;
}
.da-search-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.25); }
@media (prefers-color-scheme: dark) {
  .da-search-input { background: var(--bg-elevated); border-color: var(--border-subtle); }
  .da-status-badge.estimated { color: var(--accent-text-strong); }
}
.da-selected {
  font-size: 14px;
  color: var(--text-main);
  margin-top: 6px;
  line-height: 1.4;
}
.da-selected-label { font-weight: 700; }

.da-code-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 1px;
  padding: 2px 0;
  outline: none;
  text-transform: uppercase;
}

.da-code-input::placeholder {
  font-weight: 400;
  letter-spacing: normal;
  font-size: 14px;
  color: var(--placeholder-color);
  text-transform: none;
}

.da-landmark-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.da-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.da-btn-action {
  font-size: 13.5px;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.da-btn-action:hover, .da-btn-action:active {
  background: #F3F4F6;
  border-color: #9CA3AF;
}

.da-btn-action.gps {
  color: var(--primary-green);
  border-color: rgba(0, 107, 63, 0.3);
  background: rgba(0, 107, 63, 0.05);
}

/* Quick Landmark Chips */
.landmarks-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.landmarks-scroll::-webkit-scrollbar {
  display: none;
}

.landmark-chip {
  flex-shrink: 0;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-full);
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.landmark-chip:hover, .landmark-chip:active {
  background: #E5E7EB;
}

.landmark-chip .code-badge {
  background: #FFFFFF;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-green);
  border: 1px solid rgba(0, 107, 63, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Map Container */
.booking-map-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #E5E7EB;
  margin-bottom: 16px;
}

#bookingMap {
  width: 100%;
  height: 100%;
  background: #F3F4F6;
}

.map-floating-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.map-stat-pill {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.map-control-btn {
  pointer-events: auto;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  color: var(--text-main);
}

/* Vehicle Choice Cards */
.vehicle-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.vehicle-choice-card {
  background: #FFFFFF;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-lg);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.vehicle-choice-card.selected {
  border-color: var(--primary-gold);
  background: #FFFDF5;
  box-shadow: 0 4px 12px rgba(255, 199, 44, 0.25);
  transform: translateY(-2px);
}

.vehicle-choice-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary-green);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-bottom-left-radius: 6px;
}

.vehicle-choice-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
}

.vehicle-choice-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.vehicle-choice-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-green);
  margin-bottom: 2px;
}

.vehicle-choice-eta {
  font-size: 13px;
  color: var(--text-muted);
}

/* Fixed Bottom Action Bar */
.booking-bottom-bar {
  position: sticky;
  bottom: 64px;
  background: #FFFFFF;
  padding: 12px 16px 16px;
  border-top: 1px solid #E5E7EB;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: 0 -16px -16px;
  z-index: 100;
}

/* Instant Autocomplete Suggestions Dropdown */
.da-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
  margin-top: 4px;
}

.da-autocomplete-dropdown.show {
  display: block;
}

/* Anchor wrapper: each method input carries its own dropdown directly
   beneath it (position: relative here makes the absolute dropdown's
   top: 100% resolve against the input, not the whole field card). */
.da-input-anchor {
  position: relative;
}

/* Dropdown items reuse the Browse-places list-group markup; inside the
   dropdown they sit flush with hairline separators, no card borders. */
.da-autocomplete-dropdown .list-group-item {
  border: none;
  border-bottom: 1px solid #F3F4F6;
  border-radius: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}

.da-autocomplete-dropdown .list-group-item:last-child {
  border-bottom: none;
}

.da-autocomplete-item {
  padding: 12px 14px;
  min-height: 44px;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background-color 0.15s ease;
}

.da-autocomplete-item:last-child {
  border-bottom: none;
}

.da-autocomplete-item:hover,
.da-autocomplete-item:active {
  background-color: #FFFDF5;
}

.da-autocomplete-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.da-autocomplete-sub {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.da-code-pill {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 107, 63, 0.1);
  color: var(--primary-green);
  border: 1px solid rgba(0, 107, 63, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ==========================================================================
   2026-11-29 — CONTRAST & CLARITY FIX (founder screenshots, dark-mode phone)
   Root cause: the dark-mode surface patch near the top of this file loses
   the cascade — the base rules for .da-card, .da-field-wrapper etc. come
   LATER in the file with hardcoded light backgrounds at equal specificity,
   so on a dark-mode phone the text tokens flipped to near-white while the
   cards stayed white: white text on white cards. This block sits at the
   END of the file so it wins. It also lightens the forest-green text
   (#006B3F is ~2.9:1 on dark surfaces) and enlarges labels, hints and tap
   targets so the booking form reads clearly for less tech-savvy users.
   ========================================================================== */

/* Stronger success green in light mode too (Bootstrap #198754 is ~3.9:1) */
.text-success { color: var(--primary-green) !important; }

/* Autocomplete dropdown rows: Bootstrap .list-group-item and .text-dark
   carry near-black text — force the theme text colour inside dropdowns */
.da-autocomplete-dropdown .list-group-item {
  color: var(--text-main);
}
.da-autocomplete-dropdown .text-dark {
  color: var(--text-main) !important;
}

/* ---- Readability & tap targets (both colour schemes) ---- */
.da-label { font-size: 14px; }
.da-method-label { font-size: 15px; }
.da-code-hint { font-size: 14px; }
.da-selected { font-size: 15px; }
.da-landmark-name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}
.da-actions { flex-wrap: wrap; }
.da-btn-action {
  flex: 1 1 140px;
  justify-content: center;
  font-size: 14.5px;
  min-height: 48px;
  text-align: center;
}
.back-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}
.map-control-btn { width: 44px; height: 44px; }
.landmark-chip { min-height: 44px; }
/* One vehicle on the platform — its card spans the full row, not a third */
.vehicle-selector-grid:has(> :only-child) { grid-template-columns: 1fr; }

/* ---- Dark mode: surfaces actually go dark (end-of-file = wins) ---- */
@media (prefers-color-scheme: dark) {
  .da-card, .vehicle-choice-card, .booking-bottom-bar,
  .da-autocomplete-dropdown, .gps-badge, .map-control-btn {
    background: var(--bg-card);
  }
  .da-card, .vehicle-choice-card, .booking-map-wrapper {
    border-color: var(--border-subtle);
  }
  .booking-bottom-bar { border-top-color: var(--border-subtle); }
  .da-field-wrapper { background: var(--bg-elevated); border-color: var(--border-subtle); }
  .da-field-wrapper:focus-within { background: var(--bg-card); }
  .da-btn-action { background: var(--bg-card); border-color: var(--border-subtle); }
  .da-btn-action:hover, .da-btn-action:active { background: var(--bg-elevated); }
  .landmark-chip { background: var(--bg-elevated); border-color: var(--border-subtle); }
  .landmark-chip:hover, .landmark-chip:active { background: var(--bg-card); }
  .landmark-chip .code-badge { background: var(--bg-card); }
  .vehicle-choice-card.selected { background: var(--bg-elevated); }
  .map-stat-pill { background: rgba(24, 27, 34, 0.95); }
  .gps-banner {
    background: linear-gradient(135deg, rgba(255, 199, 44, 0.16), rgba(0, 107, 63, 0.20));
    border-color: rgba(255, 199, 44, 0.35);
  }

  /* Forest-green text is unreadable on dark — use a light green (~8:1) */
  .gps-badge, .da-code-pill, .da-status-badge.verified,
  .vehicle-choice-price, .landmark-chip .code-badge {
    color: #4ADE80;
  }
  .da-code-pill, .landmark-chip .code-badge {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.10);
  }
  .da-status-badge.verified { background: rgba(74, 222, 128, 0.12); }
  .da-btn-action.gps {
    color: #4ADE80;
    border-color: rgba(74, 222, 128, 0.40);
    background: rgba(74, 222, 128, 0.08);
  }
  .da-status-badge.place { color: #A8B3C7; }
  .text-success { color: #4ADE80 !important; }

  /* Gold welcome block keeps its light gradient in both schemes, so the
     muted line on it must stay dark — the dark token (#B4BBC7) washes out */
  .welcome-section .text-muted { color: #3F3A30 !important; }
}

/* ==========================================================================
   2026-11-29 — VISUAL-FIRST PASS (founder: "more visually instructive,
   less words"). The booking banner is now a 3-icon strip (Code / Search /
   Map) and each address method is led by a big tinted icon instead of a
   numbered paragraph. Hint paragraphs under the code inputs are gone —
   the input placeholder carries the example.
   ========================================================================== */
.gps-banner-visual { padding: 12px 14px; }
.ways-strip {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
}
.way {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}
.way-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
}
.way-icon.code, .method-icon.code { background: rgba(0, 107, 63, 0.14); color: var(--primary-green); }
.way-icon.search, .method-icon.search { background: rgba(255, 199, 44, 0.28); color: var(--accent-text-strong); }
.way-icon.pin, .method-icon.pin { background: rgba(210, 16, 52, 0.12); color: #D21034; }
.method-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.da-btn-action i { font-size: 17px; }
@media (prefers-color-scheme: dark) {
  .way-icon.code, .method-icon.code { color: #4ADE80; }
  .way-icon.search, .method-icon.search { color: #FFD147; }
  .way-icon.pin, .method-icon.pin { color: #FF8FA3; }
}

/* ==========================================================================
   2026-11-29 — APP-WIDE COLOUR PASS, PART 2 (founder My Ride screenshot:
   the driver card kept a cream gradient in dark mode, so the driver name,
   vehicle line and "location paused" note were near-white on cream).
   Template fixes in ride_tracking.html removed the worst inline styles;
   these rules cover the shared leftovers.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  /* Light content boxes (driver history / requests / ride detail blocks)
     flip with the theme. bg-light pills that pair with .text-dark keep
     their light pill + dark text in both colour schemes. */
  .bg-light:not(.text-dark) { background-color: var(--bg-elevated) !important; }
  /* The cream "Where to?" card on passenger home keeps its light gradient
     in both schemes — its muted line must stay dark to read on it. */
  .card[style*="#FFF9E6"] .text-muted { color: #4B5563 !important; }
}

/* ================================================================
   v27 (2026-12-02): unified PragyaMap + one-screen booking sheet
   ================================================================ */

/* Legacy #map blocks (profile / passenger_ride / driver / passenger):
   they never had a height, which is why they collapsed. */
#map {
  height: 300px;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* MapLibre markers built from page HTML must not inherit Leaflet's
   default divIcon chrome. */
.pragya-div-marker { background: transparent; border: none; }

/* Touch fluency: the map owns its gestures; the page never scrolls
   while a finger is on the map. */
.maplibregl-canvas, .leaflet-pane, .leaflet-grab, .leaflet-dragging .leaflet-grab {
  touch-action: none;
}

/* Booking: tall map on top, sheet overlapping its bottom edge. */
.booking-map-wrapper {
  height: 52dvh;
  min-height: 320px;
  margin-bottom: 0;
}
.booking-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 12px;
  margin-top: -16px;
  position: relative;
  z-index: 500;
}
.booking-sheet .da-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 2px 2px 0;
  margin-bottom: 6px;
}
.booking-sheet .da-method { margin-top: 6px; }
.booking-sheet #winnebaChipsSection { margin-top: 4px; }

/* Vehicle card as a slim row inside the sheet */
.booking-sheet .vehicle-choice-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 14px;
}
.booking-sheet .vehicle-choice-icon { font-size: 28px; }
.booking-sheet .vehicle-choice-name { font-weight: 700; }
.booking-sheet .vehicle-choice-price { margin-left: auto; font-weight: 700; }
.booking-sheet .vehicle-choice-badge { position: static; }

/* Sticky booking bar summary line */
.sheet-summary-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
}
.sheet-summary-line #bottomFareText {
  color: var(--success-color);
  font-size: 17px;
  font-weight: 700;
}
#confirmRideBtn:disabled { opacity: 0.55; }

#trackingMap { border-radius: var(--radius-md); overflow: hidden; }
