/* === FuelScout Design System === */

/* Color Palette Variables for Theme Switching */
:root {
  --color-surface: #F4F4F7;
  --color-surface-card: #FFFFFF;
  --color-surface-container: #EBECEF;
  --color-surface-container-high: #E2E3E8;
  --color-surface-container-low: #FBFBFC;
  --color-surface-bright: #D4D5DA;
  --color-on-surface: #1E1E22;
  --color-on-surface-variant: #4A564A;
  --color-outline: #748374;
  --color-outline-variant: #C2CDC2;
  --color-border-card: #E2E3E8;
  
  /* Primary, Secondary, Tertiary for Light Theme */
  --color-primary: #0d8a43;
  --color-primary-container: #10a34f;
  --color-secondary: #0a4fba;
  --color-secondary-container: #0b61e2;
  --color-tertiary: #c97103;
}

html.dark {
  --color-surface: #131315;
  --color-surface-card: #1E1E21;
  --color-surface-container: #201f21;
  --color-surface-container-high: #2a2a2c;
  --color-surface-container-low: #1b1b1d;
  --color-surface-bright: #39393b;
  --color-on-surface: #e5e1e4;
  --color-on-surface-variant: #bccbb9;
  --color-outline: #869585;
  --color-outline-variant: #3d4a3d;
  --color-border-card: #2A2A2E;
  
  /* Primary, Secondary, Tertiary for Dark Theme */
  --color-primary: #4be277;
  --color-primary-container: #22c55e;
  --color-secondary: #adc6ff;
  --color-secondary-container: #0566d9;
  --color-tertiary: #ffba61;
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Bento Card - Modern borderless design with depth */
.bento-card {
  background-color: var(--color-surface-card);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent; /* Keep layout stable */
}
html.dark .bento-card {
  box-shadow: 0 4px 24px -3px rgba(0, 0, 0, 0.35), 0 2px 8px -2px rgba(0, 0, 0, 0.2);
}
.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 16px 32px -4px rgba(59, 130, 246, 0.08), 0 4px 12px -2px rgba(59, 130, 246, 0.04);
}

/* Green glow for cheapest */
.glow-green {
  box-shadow: 0 0 15px -3px rgba(34, 197, 94, 0.3);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--color-surface);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--color-surface-container-high);
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--color-outline);
}

/* No scrollbar for horizontal filters */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Station card hover */
.station-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.station-card:hover {
  border-color: #3B82F6;
  transform: translateY(-1px);
}
.station-card:first-child {
  border-color: rgba(75, 226, 119, 0.3);
  box-shadow: 0 0 20px -5px rgba(34, 197, 94, 0.15);
}
.station-card:first-child:hover {
  border-color: #4BE277;
  box-shadow: 0 0 25px -5px rgba(34, 197, 94, 0.25);
}

/* Fuel pill */
.fuel-pill {
  transition: all 0.2s ease;
}
.fuel-pill:hover {
  transform: translateY(-1px);
}

/* Mobile nav active state */
.mobile-nav-item.active {
  color: #4BE277;
  background: rgba(75, 226, 119, 0.08);
}

/* Map marker styles */
.price-marker {
  background: #0566d9;
  color: white;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  white-space: nowrap;
}
.price-marker.cheapest {
  background: #22c55e;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* Smooth page transitions */
* {
  scroll-behavior: smooth;
}

/* Chart container */
#trendChart {
  width: 100% !important;
  height: 100% !important;
}

/* Leaflet overrides for dark mode */
.leaflet-control-zoom a {
  background: var(--color-surface-card) !important;
  color: var(--color-on-surface) !important;
  border-color: var(--color-border-card) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--color-surface-container) !important;
}
.leaflet-control-attribution {
  background: rgba(19, 19, 21, 0.8) !important;
  color: #869585 !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a {
  color: #adc6ff !important;
}
.leaflet-popup-content-wrapper {
  background: var(--color-surface-card) !important;
  color: var(--color-on-surface) !important;
  border: 1px solid var(--color-border-card);
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important;
}
.leaflet-popup-tip {
  background: var(--color-surface-card) !important;
}

/* Loading skeleton */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--color-surface-card) 25%, var(--color-surface-container-high) 50%, var(--color-surface-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Dynamic Bento Card Glow Helpers */
.card-glow-primary {
  background: linear-gradient(135deg, rgba(75, 226, 119, 0.08) 0%, var(--color-surface-card) 100%);
}
.card-glow-secondary {
  background: linear-gradient(135deg, rgba(5, 102, 217, 0.08) 0%, var(--color-surface-card) 100%);
}
