@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Brand-Aligned Palette inspired by the Official Routemate Logo */
  --brand-primary: #0052CC;
  --brand-deep: #003B99;
  --brand-electric: #0A84FF;
  --brand-cyan: #00C7BE;
  --brand-gradient: linear-gradient(135deg, #0052CC 0%, #0A84FF 100%);
  --brand-gradient-hover: linear-gradient(135deg, #0045AD 0%, #0070E0 100%);
  --surface-bg: #F8FAFC;
  --surface-card: #FFFFFF;
  --surface-elevated: #FFFFFF;
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --border-subtle: #E2E8F0;
  --success-emerald: #10B981;
  --warning-amber: #F59E0B;
  --danger-rose: #EF4444;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--surface-bg);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 16px 36px -4px rgba(0, 82, 204, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.glass-modal {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Brand Card Styling */
.routemate-card {
  background: var(--surface-card);
  border-radius: 24px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 25px -5px rgba(0, 82, 204, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.routemate-card-interactive {
  cursor: pointer;
}
.routemate-card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -6px rgba(0, 82, 204, 0.12), 0 6px 12px -4px rgba(0, 0, 0, 0.04);
  border-color: #BFDBFE;
}

/* Pill Buttons */
.btn-pill-primary {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-radius: 9999px;
  font-weight: 700;
  border: none;
  box-shadow: 0 8px 20px -4px rgba(0, 82, 204, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-pill-primary:hover {
  background: var(--brand-gradient-hover);
  box-shadow: 0 12px 24px -4px rgba(0, 82, 204, 0.45);
  transform: translateY(-1px);
}
.btn-pill-primary:active {
  transform: scale(0.98);
}

.btn-pill-secondary {
  background: #F1F5F9;
  color: #334155;
  border-radius: 9999px;
  font-weight: 600;
  border: 1px solid #E2E8F0;
  transition: all 0.2s ease;
}
.btn-pill-secondary:hover {
  background: #E2E8F0;
  color: #0F172A;
}
.btn-pill-secondary:active {
  transform: scale(0.98);
}

.btn-pill-danger {
  background: #FEE2E2;
  color: #DC2626;
  border-radius: 9999px;
  font-weight: 600;
  border: 1px solid #FECACA;
  transition: all 0.2s ease;
}
.btn-pill-danger:hover {
  background: #FCA5A5;
  color: #B91C1C;
}

/* Radar & Pulse Animations */
@keyframes radar-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.radar-ring {
  animation: radar-pulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.radar-ring-delayed {
  animation: radar-pulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.8s infinite;
}

@keyframes live-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.9);
  }
}

.live-dot {
  animation: live-glow 1.8s ease-in-out infinite;
}

/* Mode Switcher Pill */
.mode-toggle-container {
  background: #E2E8F0;
  border-radius: 9999px;
  padding: 4px;
  display: flex;
  position: relative;
}

.mode-pill-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: #FFFFFF;
  border-radius: 9999px;
  box-shadow: 0 4px 10px rgba(0, 82, 204, 0.15);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Vehicle Selector Pills */
.vehicle-pill {
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  background: #FFFFFF;
  transition: all 0.2s ease;
  cursor: pointer;
}
.vehicle-pill.active {
  border-color: #0052CC;
  background: #EFF6FF;
  box-shadow: 0 6px 16px -2px rgba(0, 82, 204, 0.15);
}

/* Toast Notifications */
.routemate-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
  pointer-events: none;
  max-width: 90vw;
}
.routemate-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Location Autocomplete Dropdown Styles */
.suggestion-dropdown {
  animation: dropdown-slide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdown-slide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-item {
  transition: all 0.15s ease;
}

.suggestion-item:hover, .suggestion-item.active {
  background-color: #EFF6FF;
}

.suggestion-item:active {
  background-color: #DBEAFE;
}

/* Interactive Map Container Styles */
#riderInteractiveMap,
#driverInteractiveMap {
  width: 100% !important;
  min-height: 180px !important;
  height: 180px !important;
  position: relative;
  z-index: 1;
  border-radius: 1rem;
  overflow: hidden;
}

.leaflet-container {
  font-family: inherit;
  width: 100% !important;
  height: 100% !important;
}

/* Notification Center Styles */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.notification-card {
  transition: all 0.15s ease-out;
}
.notification-card:hover {
  transform: translateY(-1px);
}
.notification-card.unread {
  border-left: 3px solid #2563EB;
}
