/* DELIVERED. - Virginia Beach Town Center Hyper-Local Delivery Network */
/* Ultra-Clean Dark Theme, High Contrast Typography & Crisp Borders */

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

:root {
  --bg-pitch: #09090b;
  --bg-card: #121215;
  --bg-surface: #18181b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.35);
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-pitch);
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Crisp Dark Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #09090b;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Subtle Grid Background Pattern */
.bg-grid-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* Glassmorphism & Panel Styling */
.glass-panel {
  background: rgba(18, 18, 21, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
}

.glass-panel-hover {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-panel-hover:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8), 0 0 15px -3px rgba(255, 255, 255, 0.03);
}

/* High Contrast Buttons */
.btn-primary {
  background-color: #ffffff;
  color: #000000;
  font-weight: 600;
  border: 1px solid #ffffff;
  transition: all 0.15s ease;
}
.btn-primary:hover {
  background-color: #e4e4e7;
  border-color: #e4e4e7;
  transform: scale(0.99);
}

.btn-outline {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.15s ease;
}
.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Pulsing Badge & Radar Animation */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.pulse-badge {
  animation: pulse-glow 2.5s infinite ease-in-out;
}

@keyframes scan-radar {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-sweep {
  animation: scan-radar 8s linear infinite;
  transform-origin: center center;
}

/* Animated Route Line on Leaflet */
@keyframes dash-flow {
  to {
    stroke-dashoffset: -32;
  }
}

.animated-route-line {
  animation: dash-flow 1.2s linear infinite;
}

/* Leaflet Custom Overrides for Pure Dark UI */
.leaflet-container {
  background-color: #09090b !important;
  font-family: inherit;
}

.tc-dark-popup .leaflet-popup-content-wrapper {
  background: #09090b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9) !important;
  padding: 0 !important;
}

.tc-dark-popup .leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.tc-dark-popup .leaflet-popup-tip {
  background: #09090b !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.tc-map-tooltip {
  background: #09090b !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.8) !important;
  border-radius: 6px !important;
}

.leaflet-bar {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-bar a {
  background-color: #121215 !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.leaflet-bar a:hover {
  background-color: #27272a !important;
  color: #ffffff !important;
}

/* Smooth Tab Transitions */
.tab-active {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

/* Drawer / Modal Easing */
.slide-in-drawer {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-in-drawer.open {
  transform: translateX(0);
}

.fade-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.fade-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Tip selection pill */
.tip-pill {
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.15s ease;
}
.tip-pill.selected {
  background-color: #ffffff;
  color: #000000;
  border-color: #ffffff;
  font-weight: 700;
}
