/* ==========================================================================
   NexRide - Modern Ride Booking Template Stylesheet
   ========================================================================== */

:root {
  --primary: #000000;
  --primary-hover: #1f1f1f;
  --accent: #276EF1; /* Modern high-visibility electric blue (Uber/Waymo style) */
  --accent-hover: #1c54c4;
  --accent-green: #05A357; /* Eco & Confirmed Green */
  --accent-amber: #FFC043;
  --accent-red: #E11900;
  --bg-main: #FFFFFF;
  --bg-card: #F6F6F6;
  --border-color: #E2E8F0;
  --text-main: #141414;
  --text-muted: #6B7280;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Header & Glassmorphism */
.glass-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Glowing Pulsing Beacon for Map Car and Live Pickup Points */
@keyframes pulse-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  80%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.pulse-beacon {
  position: relative;
}
.pulse-beacon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(39, 110, 241, 0.4);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* Custom Leaflet Map Pins */
.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease-in-out;
}

.custom-map-pin.pickup {
  background: #000000;
  border: 3px solid #FFFFFF;
}

.custom-map-pin.destination {
  background: #276EF1;
  border: 3px solid #FFFFFF;
}

.custom-car-marker {
  transition: all 0.5s ease;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

/* Interactive Vehicle Card Selection */
.vehicle-card {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid transparent;
  cursor: pointer;
}

.vehicle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.vehicle-card.active {
  border-color: #000000;
  background-color: #F8FAFC;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.12);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #1e293b;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.875rem;
  font-weight: 500;
}

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

/* Range input styling for fare & driver income sliders */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #E2E8F0;
  border-radius: 9999px;
}

input[type=range]::-webkit-slider-thumb {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #000000;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Leaflet container fixes */
.leaflet-container {
  font-family: inherit !important;
  z-index: 10;
}
.leaflet-pane {
  z-index: 400 !important;
}
.leaflet-top, .leaflet-bottom {
  z-index: 500 !important;
}

/* Modal Transitions */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}
