/* ==========================================================================
   UNKNOWN MOTO - KIGALI MOTORCYCLE TAXI PLATFORM
   Design System & Styling
   ========================================================================== */

:root {
  /* Color Palette (Rwandan Inspired: Emerald, Sun Gold, Night Charcoal) */
  --primary-emerald: #10B981;
  --primary-emerald-hover: #059669;
  --primary-emerald-light: rgba(16, 185, 129, 0.15);
  --primary-emerald-glow: rgba(16, 185, 129, 0.4);

  --accent-yellow: #F59E0B;
  --accent-yellow-bright: #FBBF24;
  --accent-yellow-light: rgba(245, 158, 11, 0.15);

  --dark-bg: #0B1120;
  --dark-surface: #1E293B;
  --dark-surface-elevated: #334155;

  --glass-bg: rgba(15, 23, 42, 0.82);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --danger: #EF4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --success: #10B981;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
}

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

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--dark-bg);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-emerald), var(--accent-yellow));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px var(--primary-emerald-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(90deg, #FFFFFF, var(--accent-yellow-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 11px;
  color: var(--primary-emerald);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Mode Switcher Pill */
.mode-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-btn.active {
  background: var(--primary-emerald);
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--primary-emerald-glow);
}

/* Language Selector */
.lang-selector {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.lang-selector option {
  background: var(--dark-surface);
  color: var(--text-main);
}

/* Main Container Layout */
.main-wrapper {
  margin-top: 70px;
  display: grid;
  grid-template-columns: 420px 1fr;
  height: calc(100vh - 70px);
  position: relative;
  overflow: hidden;
}

@media (max-width: 960px) {
  .main-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 380px;
    height: auto;
  }
}

/* Sidebar Drawer */
.sidebar-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  font-size: 20px;
  color: var(--text-main);
}

.kigali-badge {
  background: var(--primary-emerald-light);
  color: var(--primary-emerald);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Location Inputs Block */
.location-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.location-connector {
  position: absolute;
  left: 31px;
  top: 48px;
  bottom: 48px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-emerald), var(--accent-yellow));
  z-index: 1;
}

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

.pin-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.pin-pickup {
  background: var(--primary-emerald-light);
  color: var(--primary-emerald);
  border: 2px solid var(--primary-emerald);
}

.pin-dropoff {
  background: var(--accent-yellow-light);
  color: var(--accent-yellow);
  border: 2px solid var(--accent-yellow);
}

.input-field {
  width: 100%;
  background: var(--dark-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.input-field:focus {
  border-color: var(--primary-emerald);
  box-shadow: 0 0 0 3px var(--primary-emerald-light);
}

.quick-locations {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.quick-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.quick-chip:hover {
  background: var(--primary-emerald-light);
  color: var(--primary-emerald);
  border-color: var(--primary-emerald);
}

/* Destination Fare Info Card */
.destination-fare-info {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
}

.destination-fare-info strong {
  color: var(--accent-yellow-bright);
}

.eco-tag {
  background: var(--primary-emerald) !important;
  color: #000 !important;
  font-weight: 800 !important;
}

/* Moto Tier Selector Cards */
.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin-top: 4px;
}

.tier-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tier-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.tier-card.selected {
  background: var(--primary-emerald-light);
  border: 2px solid var(--primary-emerald);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.tier-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.tier-icon-wrapper {
  width: 42px;
  height: 42px;
  background: var(--dark-surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tier-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tier-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tier-tag {
  background: var(--accent-yellow);
  color: #000;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.tier-right {
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}

.tier-eta {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tier-price {
  text-align: right;
}

.price-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-yellow-bright);
}

.price-unit {
  font-size: 11px;
  color: var(--text-muted);
}

/* Payment Methods Grid */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.payment-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.payment-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.payment-btn.selected {
  background: var(--accent-yellow-light);
  border-color: var(--accent-yellow);
}

.payment-icon {
  font-size: 20px;
}

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

.payment-btn.selected .payment-label {
  color: var(--accent-yellow-bright);
  font-weight: 700;
}

/* Action CTA Buttons */
.cta-button {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-emerald), var(--primary-emerald-hover));
  color: #000;
  border: none;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 8px 24px var(--primary-emerald-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--primary-emerald-glow);
  background: linear-gradient(135deg, #34D399, var(--primary-emerald));
}

.cta-button:active {
  transform: translateY(0);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition-fast);
  padding: 0 14px;
  position: relative;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.nav-button::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.98);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-button:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Interactive Map Canvas Container */
.map-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0D1527;
  overflow: hidden;
}

#kigaliMapSvg {
  width: 100%;
  height: 100%;
  cursor: grab;
}

#kigaliMapSvg:active {
  cursor: grabbing;
}

/* SVG overlay used by app.js for local map markers */
.map-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.map-svg-overlay g,
.map-svg-overlay path {
  pointer-events: none;
}

.driver-live-marker {
  background: transparent !important;
  border: none !important;
}

/* Price tags styling */
.price-amount {
  font-weight: 800;
  color: var(--accent-yellow-bright);
}

.price-currency {
  font-weight: 600;
  color: var(--text-muted);
}

/* Map Controls overlay */
.map-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
}

.map-control-btn {
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.map-control-btn:hover {
  background: var(--dark-surface);
  color: var(--primary-emerald);
}

.map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  z-index: 20;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

/* Live Dispatch & Tracking Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active,
#profileModal.active,
#rideHistoryModal.active,
#receiptModal.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-card {
  width: 90%;
  max-width: 460px;
  background: var(--dark-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: scale(0.92);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

/* Dispatch Searching Animation */
.search-animation-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  gap: 16px;
}

.radar-pulse {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  background: var(--primary-emerald-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.radar-pulse::before,
.radar-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-emerald);
  animation: pulseRipple 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.radar-pulse::after {
  animation-delay: -1s;
}

@keyframes pulseRipple {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.status-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.status-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Matched Driver Info Card */
.driver-card {
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.driver-avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-emerald), var(--accent-yellow));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.driver-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.driver-name {
  font-size: 16px;
  font-weight: 700;
}

.plate-badge {
  display: inline-block;
  background: var(--accent-yellow-bright);
  color: #000;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 1px;
  margin-top: 2px;
  width: fit-content;
}

.driver-rating {
  font-size: 12px;
  color: var(--accent-yellow-bright);
  margin-top: 4px;
}

.action-row-buttons {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: var(--danger-light);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-danger:hover {
  background: var(--danger);
  color: #FFF;
}

/* Driver Mode Console Panel */
.driver-mode-panel {
  display: none;
  padding: 24px;
  flex-direction: column;
  gap: 20px;
}

.driver-mode-panel.active {
  display: flex;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-emerald);
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.incoming-request-card {
  background: var(--dark-surface);
  border: 2px solid var(--accent-yellow);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: requestPulse 1.5s infinite;
}

@keyframes requestPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--primary-emerald);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-emerald {
  color: var(--primary-emerald) !important;
}

.text-yellow {
  color: var(--accent-yellow-bright) !important;
}

/* Pulsing green animation for the Confirm Ride Completed button */
@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  }

  50% {
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.9), 0 0 8px rgba(16, 185, 129, 0.4);
  }

  100% {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  }
}

/* ── NEW FEATURE STYLES ─────────────────────────────────────── */

/* Ride Status Bar Steps */
.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.45;
  transition: all 0.4s ease;
  min-width: 42px;
  text-align: center;
}

.status-step div:first-child {
  font-size: 16px;
}

.status-step.active {
  opacity: 1;
  color: var(--primary-emerald);
  transform: scale(1.08);
}

.status-step.done {
  opacity: 1;
  color: var(--primary-emerald);
}

.status-step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: 10px;
  transition: background 0.4s ease;
}

.status-step-line.done {
  background: var(--primary-emerald);
}

/* SOS Button */
.sos-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid #ef4444;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  animation: sosPulse 2s ease-in-out infinite;
}

.sos-btn:hover {
  background: rgba(239, 68, 68, 0.25);
}

@keyframes sosPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* Share Trip Button */
.share-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Star Rating Picker */
.star-btn,
.pstar-btn {
  transition: transform 0.15s ease, color 0.15s ease;
  display: inline-block;
  line-height: 1;
}

.star-btn:hover,
.pstar-btn:hover {
  transform: scale(1.2);
}

.star-btn.selected,
.pstar-btn.selected {
  color: #F59E0B;
}

/* Driver Online/Offline Toggle */
.driver-online-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--primary-emerald);
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary-emerald);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.driver-online-btn.offline {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* How It Works Section */
.how-it-works-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.hiw-header {
  text-align: center;
  margin-bottom: 60px;
}

.hiw-header h2 {
  font-size: 36px;
  color: var(--text-main);
  margin-bottom: 12px;
  font-weight: 800;
}

.hiw-underline {
  width: 60px;
  height: 4px;
  background: var(--primary-blue);
  margin: 0 auto;
  border-radius: 2px;
}

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hiw-card {
  background: var(--dark-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 40px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hiw-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.1);
}

.hiw-icon-container {
  width: 80px;
  height: 80px;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 24px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 32px;
  animation: floatLabel 3s ease-in-out infinite;
}

@keyframes floatLabel {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.hiw-card:nth-child(1) .hiw-icon-container {
  animation-delay: 0s;
}

.hiw-card:nth-child(2) .hiw-icon-container {
  animation-delay: 0.2s;
}

.hiw-card:nth-child(3) .hiw-icon-container {
  animation-delay: 0.4s;
}

.hiw-card:nth-child(4) .hiw-icon-container {
  animation-delay: 0.6s;
}



.hiw-number {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 28px;
  height: 28px;
  background: var(--primary-emerald);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px var(--primary-emerald-glow);
  border: 2px solid var(--dark-surface-elevated);
}

.hiw-card h3 {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 12px;
  font-weight: 700;
}

.hiw-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 900px) {
  .hiw-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hiw-card {
    padding: 30px 20px;
  }
}

/* ── Leaflet Custom Map Pins ── */
.umc-map-pin {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  font-weight: 800;
  cursor: grab;
  transition: transform 0.15s ease;
  user-select: none;
}

.umc-map-pin:hover {
  transform: scale(1.15);
}

.umc-map-pin:active {
  cursor: grabbing;
}

.umc-map-pin.pickup-pin {
  background: #10b981;
  color: #ffffff;
  border: 3px solid #ffffff;
  width: 32px !important;
  height: 32px !important;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.umc-map-pin.dropoff-pin {
  background: #ef4444;
  color: #ffffff;
  border: 3px solid #ffffff;
  width: 32px !important;
  height: 32px !important;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.umc-map-pin.current-pin {
  background: #3b82f6;
  color: #ffffff;
  border: 3px solid #ffffff;
  width: 34px !important;
  height: 34px !important;
  font-size: 18px;
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.3);
  animation: radarPulse 2s infinite;
}

@keyframes radarPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(59, 130, 246, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE NAVIGATION & MOBILE HEADER SYSTEM
   ════════════════════════════════════════════════════════════ */

/* Header Base Classes */
.app-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  height: 72px;
  padding: 0 32px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-name {
  color: #111111;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.header-nav a {
  text-decoration: none;
  color: #111111;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  color: #2563eb;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.desktop-auth {
  display: flex;
  align-items: center;
  gap: 14px;
}

.desktop-auth a.btn-login {
  text-decoration: none;
  color: #111111;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 14px;
}

.desktop-auth a.btn-signup {
  text-decoration: none;
  background: #2563eb;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14.5px;
  transition: background 0.2s;
  white-space: nowrap;
}

.desktop-auth a.btn-signup:hover {
  background: #1d4ed8;
}

/* Mobile Hamburger Toggle Button */
.mobile-menu-btn {
  display: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: #e2e8f0;
}

/* Mobile Dropdown Menu (Strictly scoped & hidden by default) */
.mobile-nav-menu {
  display: none !important;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  padding: 16px 18px 24px;
  z-index: 9999;
  flex-direction: column;
  gap: 8px;
  animation: mobileMenuSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mobileMenuSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-menu.is-active {
  display: flex !important;
}

.mobile-nav-menu a {
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:active {
  background: #eff6ff;
  color: #2563eb;
}

.mobile-nav-menu a.mobile-book-link {
  color: #059669;
  background: #ecfdf5;
  font-weight: 800;
}

.mobile-nav-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 0;
}

.mobile-nav-menu a.mobile-auth-login {
  background: #f1f5f9;
  color: #0f172a;
  justify-content: center;
  font-weight: 700;
}

.mobile-nav-menu a.mobile-auth-signup {
  background: #2563eb;
  color: #ffffff;
  justify-content: center;
  font-weight: 800;
}

/* Ensure mobile menu is ALWAYS hidden on desktop */
@media (min-width: 769px) {
  .mobile-nav-menu {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════
   BREAKPOINT: 769px - 1024px (Tablet Portrait & Small Laptops)
   ════════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
  .app-header {
    padding: 0 20px !important;
  }
  .header-left {
    gap: 16px !important;
  }
  .header-nav {
    gap: 14px !important;
  }
  .header-nav a {
    font-size: 14px !important;
  }
  .desktop-auth {
    gap: 10px !important;
  }
  .desktop-auth a.btn-login {
    padding: 6px 10px !important;
    font-size: 14px !important;
  }
  .desktop-auth a.btn-signup {
    padding: 8px 16px !important;
    font-size: 13.5px !important;
  }
  .hiw-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
}

/* ════════════════════════════════════════════════════════════
   BREAKPOINT: 768px (Mobile Devices & Tablet Portrait)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .app-header {
    height: 64px !important;
    padding: 0 16px !important;
  }

  .header-left {
    gap: 0 !important;
  }

  /* Hide the full inline menu on mobile */
  .header-nav {
    display: none !important;
  }

  /* Hide the desktop login/signup buttons from top row */
  .desktop-auth {
    display: none !important;
  }

  /* Show the hamburger icon */
  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .brand-name {
    font-size: 17px !important;
  }

  .brand-logo-img {
    width: 34px !important;
    height: 34px !important;
  }

  /* Section Reflows for Mobile */
  .landing-hero {
    padding: 40px 16px 80px !important;
    min-height: auto !important;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%) !important;
    margin-bottom: -20px !important;
  }

  .landing-hero h1 {
    font-size: clamp(1.8rem, 6.5vw, 2.6rem) !important;
  }

  .landing-hero p.hero-sub {
    font-size: 0.95rem !important;
    margin-bottom: 32px !important;
  }

  .hero-logo {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 20px !important;
  }

  .hero-btn {
    padding: 14px 32px !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    max-width: 260px !important;
  }

  /* How It Works reflow */
  .how-it-works-section {
    padding: 50px 16px !important;
  }

  .hiw-header h2 {
    font-size: 28px !important;
  }

  .hiw-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .hiw-card {
    padding: 28px 18px !important;
  }

  /* Feature Grid reflow */
  .section-alt {
    padding: 40px 16px !important;
  }

  .section-alt h2 {
    font-size: 1.8rem !important;
  }

  .feature-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Footer reflow */
  .main-footer {
    padding: 40px 16px 30px !important;
  }

  .main-footer > div {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    margin-bottom: 40px !important;
  }
}