/* DayVoy - Global Styles
   Design System: The Editorial Explorer
   ════════════════════════════════════ */

/* ── Select arrow fix: suppress ALL native arrows so only our custom icon shows ── */
select.custom-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
}
select.custom-select::-ms-expand { display: none; }

/* ── Glassmorphism & Shadows ── */
.glass-effect {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.glass-dark {
  background: rgba(0, 23, 54, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.editorial-shadow {
  box-shadow: 0 20px 40px -15px rgba(0, 23, 54, 0.04);
}
.editorial-shadow-lg {
  box-shadow: 0 30px 60px -20px rgba(0, 23, 54, 0.08);
}

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

/* ── Curator Card Stack ── */
.card-stack {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3/4;
  max-height: 50dvh;
  perspective: 1200px;
}
@media (min-width: 640px) {
  .card-stack {
    max-width: 380px;
    max-height: none;
  }
}
.card-stack .curator-card {
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.5s ease;
  will-change: transform, opacity;
}
.card-stack .curator-card.active { z-index: 30; transform: scale(1) translateY(0); opacity: 1; }
.card-stack .curator-card.next { z-index: 20; transform: scale(0.95) translateY(16px); opacity: 0.7; }
.card-stack .curator-card.behind { z-index: 10; transform: scale(0.90) translateY(32px); opacity: 0.5; }
.card-stack .curator-card.hidden-card { z-index: 0; transform: scale(0.85) translateY(48px); opacity: 0; pointer-events: none; }

/* Swipe animations */
.card-stack .curator-card.swipe-right {
  animation: swipeRight 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
}
.card-stack .curator-card.swipe-left {
  animation: swipeLeft 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes swipeRight {
  to { transform: translateX(150%) rotate(15deg); opacity: 0; }
}
@keyframes swipeLeft {
  to { transform: translateX(-150%) rotate(-15deg); opacity: 0; }
}

/* ── Progress Ring ── */
.progress-ring-bg { stroke: rgba(255, 255, 255, 0.15); }
.progress-ring-fill { transition: stroke-dashoffset 0.6s ease; }

/* ── Timeline ── */
.timeline-line {
  position: absolute;
  left: 20px;
  top: 44px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #001736 0%, #c4c6d0 100%);
}

/* ── Vehicle Selector ── */
.vehicle-card {
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}
.vehicle-card.selected {
  border-color: #ff5c39;
  background: rgba(255, 92, 57, 0.05);
}
.vehicle-card:hover {
  border-color: rgba(0, 23, 54, 0.2);
}

/* ── Map Pins ── */
.map-pin {
  width: 32px; height: 32px;
  background: #001736;
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,23,54,0.3);
  border: 3px solid white;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.map-pin.active { background: #ff5c39; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4c6d0; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #747780; }

/* ── Page Transitions ── */
.page-enter {
  animation: fadeSlideUp 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Leaflet overrides ── */
.leaflet-control-zoom { border-radius: 12px !important; overflow: hidden; border: none !important; box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important; }
.leaflet-control-zoom a { background: white !important; color: #001736 !important; width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 16px !important; }
.leaflet-popup-content-wrapper { border-radius: 12px !important; padding: 0 !important; box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important; }
.leaflet-popup-tip { display: none; }

/* ── Filter Sidebar ── */
.filter-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: #001736;
  border-radius: 4px;
}

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, #e0e3e5 25%, #eceef0 50%, #e0e3e5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Range Slider ── */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #e0e3e5;
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #001736;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,23,54,0.2);
}

/* ── Bottom Nav (mobile) ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: white;
  border-top: 1px solid #e0e3e5;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}
@media (min-width: 768px) {
  .bottom-nav { display: none; }
}

/* ── Duration adjust buttons ── */
.duration-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #c4c6d0;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}
.duration-btn:hover { background: #eceef0; }

/* ── Tooltip ── */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: #001736;
  color: white;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.tooltip:hover::after { opacity: 1; }

/* ── Pulse dot for live status ── */
.pulse-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  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); }
}
