/* =============================================================
   Trip Cams — Transit App-Inspired Styles
   Mobile-first, light/dark theme, spring animations
   ============================================================= */

:root {
  /* Light mode colors (default) */
  --green: #2DB84B;
  --green-hover: #26a342;
  --green-subtle: rgba(45, 184, 75, 0.1);
  --green-glow: rgba(45, 184, 75, 0.25);
  --navy: #f8fafc;
  --navy-light: #f1f5f9;
  --navy-card: #ffffff;
  --surface: #f8fafc;
  --surface-raised: #ffffff;
  --surface-overlay: rgba(255, 255, 255, 0.88);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: rgba(15, 23, 42, 0.1);
  --border-light: rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --skeleton-base: #e2e8f0;
  --skeleton-highlight: #eef2f7;

  /* Location color */
  --blue: #007AFF;

  /* Traffic colors */
  --traffic-clear: #2DB84B;
  --traffic-mild: #E5A100;
  --traffic-heavy: #DC2626;

  /* Typography */
  --font: -apple-system, 'Inter', 'SF Pro Display', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-height: calc(80px + var(--safe-top));

  /* Animation */
  --spring: cubic-bezier(0.25, 1, 0.5, 1);
  --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.35s;
  --duration-fast: 0.2s;
  --duration-slow: 0.5s;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #0f172a;
    --navy-light: #1e293b;
    --navy-card: #1a2235;
    --surface: #0f172a;
    --surface-raised: #1e293b;
    --surface-overlay: rgba(15, 23, 42, 0.88);
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(148, 163, 184, 0.1);
    --border-light: rgba(148, 163, 184, 0.06);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.4);
    --blue: #0A84FF;
    --traffic-clear: #34D058;
    --traffic-mild: #F5B800;
    --traffic-heavy: #F85149;
    --skeleton-base: #1a2540;
    --skeleton-highlight: #243050;
  }
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
  height: 100%;
  background: var(--navy);
}

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text);
  overflow: hidden;
  height: 100dvh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* =============================================================
   Header
   ============================================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: calc(var(--safe-top) + 10px) 12px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-title {
  display: none;
}

.route-selector {
  display: flex;
  align-items: stretch;
  gap: 8px;
  -webkit-user-select: none;
  user-select: none;
}

.route-input-group {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.route-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color var(--duration-fast),
              background var(--duration-fast),
              transform var(--duration-fast) var(--spring);
  user-select: none;
  -webkit-user-select: none;
}

.route-input:hover,
.route-input:focus-visible {
  border-color: var(--green);
  background: rgba(45, 184, 75, 0.06);
}

.route-input:active {
  transform: scale(0.97);
}

.route-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 2px;
}

.route-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.swap-btn {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--green);
  color: white;
  flex-shrink: 0;
  transition: background var(--duration-fast);
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;
}

.swap-btn:hover {
  background: var(--green-hover);
}

.swap-btn:active {
  transform: scale(0.92);
}

.swap-btn.animating {
  animation: swap-bounce 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes swap-bounce {
  0% {
    transform: scale(1) rotate(0deg);
  }
  /* Wind up: pull back slightly in opposite direction */
  18% {
    transform: scale(0.88) rotate(-22deg);
  }
  /* Main rotation overshoots past 180 */
  58% {
    transform: scale(1.04) rotate(198deg);
  }
  /* Settle back with a tiny bounce */
  78% {
    transform: scale(0.98) rotate(177deg);
  }
  100% {
    transform: scale(1) rotate(180deg);
  }
}

/* =============================================================
   Dropdown
   ============================================================= */

.dropdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease-out);
}

.dropdown-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.dropdown {
  position: fixed;
  top: calc(var(--safe-top) + 60px);
  left: 12px;
  right: 12px;
  max-width: 600px;
  margin: 0 auto;
  z-index: 1200;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transform: translateY(-10px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--duration) var(--spring),
              opacity var(--duration) var(--ease-out);
  box-shadow: var(--shadow-lg);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

.dropdown.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.dropdown-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.dropdown-search {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--navy);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color var(--duration-fast);
}

.dropdown-search::placeholder {
  color: var(--text-muted);
}

.dropdown-search:focus {
  border-color: var(--green);
}

.dropdown-list {
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 8px;
}

.dropdown-list li {
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--duration-fast),
              transform var(--duration-fast) var(--spring);
}

.dropdown-list li:hover {
  background: rgba(45, 184, 75, 0.08);
}

.dropdown-list li:active {
  transform: scale(0.97);
  background: rgba(45, 184, 75, 0.14);
}

.dropdown-list li .city-name {
  font-size: 15px;
  font-weight: 500;
  flex: 1;
}

.dropdown-list li .city-region {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Canadian provinces */
.city-region.AB { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.city-region.BC { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.city-region.SK { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.city-region.MB { background: rgba(168, 85, 247, 0.15); color: #9333ea; }
.city-region.ON { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.city-region.QC { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.city-region.NB, .city-region.NS, .city-region.PE, .city-region.NL { background: rgba(14, 165, 233, 0.15); color: #0284c7; }
.city-region.YT { background: rgba(168, 85, 247, 0.15); color: #9333ea; }
/* US states */
.city-region.WA { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.city-region.CA { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.city-region.OR, .city-region.ID, .city-region.MT, .city-region.WY { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.city-region.NV, .city-region.UT, .city-region.AZ, .city-region.CO { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.city-region.NY, .city-region.CT, .city-region.NJ, .city-region.PA, .city-region.MA { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.city-region.OH, .city-region.MI, .city-region.IN, .city-region.IL, .city-region.WI { background: rgba(14, 165, 233, 0.15); color: #0284c7; }
.city-region.GA, .city-region.FL, .city-region.NC, .city-region.VA, .city-region.SC { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.city-region.TX, .city-region.LA, .city-region.OK, .city-region.AR { background: rgba(168, 85, 247, 0.15); color: #9333ea; }
.city-region.MD, .city-region.DE, .city-region.DC { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.city-region.KY, .city-region.TN, .city-region.WV { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.city-region.ND, .city-region.SD, .city-region.NE, .city-region.KS, .city-region.IA, .city-region.MN, .city-region.MO { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.city-region.AK { background: rgba(14, 165, 233, 0.15); color: #0284c7; }

.location-option {
  background: var(--green-subtle);
}

.location-option .location-icon {
  color: var(--green);
  flex-shrink: 0;
}

.location-option .city-region {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  background: none;
  padding: 0;
}

.dropdown-section-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 14px 4px;
  cursor: default;
  list-style: none;
}

.dropdown-section-header:hover {
  background: none;
}

.dropdown-list li.kb-focus {
  background: rgba(45, 184, 75, 0.12);
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.dropdown-list li.geocode-result .city-name::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
  vertical-align: middle;
}

.dropdown-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 4px;
  cursor: default;
}

.dropdown-loading:hover {
  background: none !important;
}

.loading-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: loading-bounce 1.2s infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.coverage-notice {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

/* =============================================================
   Map
   ============================================================= */

.map-container {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: -60px;
  z-index: 1;
  transition: height var(--duration-slow) var(--spring);
}

.map-container.collapsed {
  height: 0;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--navy);
}

/* Custom Leaflet styles */
.leaflet-container {
  background: var(--navy) !important;
  font-family: var(--font) !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.leaflet-control-zoom a {
  background: var(--surface-raised) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  width: 40px !important;
  height: 40px !important;
  line-height: 1 !important;
  font-size: 18px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.leaflet-control-zoom a:first-child {
  border-radius: 12px 12px 4px 4px !important;
  margin-bottom: 1px !important;
}

.leaflet-control-zoom a:last-child {
  border-radius: 4px 4px 12px 12px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--navy-card) !important;
}

.leaflet-control-zoom {
  transition: opacity var(--duration-fast), visibility var(--duration-fast);
}

.leaflet-top .leaflet-control {
  margin-top: 12px !important;
}

.leaflet-right .leaflet-control {
  margin-right: 12px !important;
}

.sheet-expanded .leaflet-control-zoom {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}

.leaflet-popup-content-wrapper {
  background: var(--surface-raised) !important;
  color: var(--text) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border) !important;
}

.leaflet-popup-tip {
  background: var(--surface-raised) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.leaflet-popup-content {
  margin: 10px 12px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 20px !important;
  top: 6px !important;
  right: 8px !important;
}

/* ---- Camera markers & clusters: transit-style nodes on the route ----
   Sizes are proportional to the route stroke width (5px visual weight).
   Default  = 30% bigger  →  10px  (stroke + 30% padding)
   In-view  = 50% bigger  →  12px  (.active)
   Hovered  = 75% bigger  →  14px  (.map-hovered)
   Uses width/height (not transform) because Leaflet uses transform for positioning.
*/
.camera-marker,
.marker-cluster {
  --sz: 10px;
  background: var(--green);
  border: 2px solid white;
  border-radius: 50%;
  width: var(--sz) !important;
  height: var(--sz) !important;
  margin-left: calc(var(--sz) / -2) !important;
  margin-top: calc(var(--sz) / -2) !important;
  box-shadow: 0 0 0 1px var(--green-glow), 0 1px 2px rgba(0, 0, 0, 0.2);
  opacity: 0.85;
  transition: width var(--duration) var(--spring-bounce),
              height var(--duration) var(--spring-bounce),
              margin var(--duration) var(--spring-bounce),
              opacity var(--duration-fast) var(--spring-bounce),
              box-shadow var(--duration) var(--spring-bounce);
}

/* In-view — camera visible in the list */
.camera-marker.active,
.marker-cluster.active {
  --sz: 12px;
  opacity: 1;
  z-index: 10000 !important;
}

/* Hovered from the list card */
.camera-marker.map-hovered,
.marker-cluster.map-hovered {
  --sz: 14px;
  opacity: 1;
  z-index: 10002 !important;
  box-shadow: 0 0 0 3px var(--green-glow), 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* Mouse hover directly on map node */
.camera-marker:hover,
.marker-cluster:hover {
  --sz: 14px;
  opacity: 1;
}

.popup-content {
  text-align: center;
}

.popup-content img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--navy);
}

.popup-content .popup-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}

.popup-content .popup-highway {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Hide Leaflet attribution — keep in DOM for legal compliance, just visually minimal */
.leaflet-control-attribution {
  font-size: 0;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.map-container:hover .leaflet-control-attribution,
.map-container:active .leaflet-control-attribution {
  font-size: 9px;
  opacity: 0.5;
  pointer-events: auto;
}

.leaflet-control-attribution a {
  color: inherit !important;
}

.map-center-btn {
  position: absolute;
  top: -96px;
  right: 12px;
  z-index: 500;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--spring),
              background var(--duration-fast);
}

.map-center-btn:active {
  transform: scale(0.9);
}

.map-toggle {
  position: absolute;
  top: -52px;
  right: 12px;
  z-index: 500;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--spring),
              background var(--duration-fast);
}


.map-toggle:active {
  transform: scale(0.9);
}

.map-toggle.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

/* ---- User location: Apple Maps style blue dot with pulsing aura ---- */
.user-location-marker {
  width: 12px !important;
  height: 12px !important;
  background: var(--blue);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 0.2);
  animation: locationPulse 3s ease-in-out infinite;
}

@keyframes locationPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(0, 122, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2); }
}

/* =============================================================
   Bottom Sheet
   ============================================================= */

.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 100dvh;
  z-index: 100;
  background: var(--navy);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transition: top var(--duration-slow) var(--spring);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
  overflow: visible;
}

.sheet.peeking {
  top: calc(100dvh - 180px);
}

.sheet.revealed {
  top: calc(var(--header-height) + 20vh);
}

.map-container.collapsed ~ .sheet {
  top: var(--header-height);
}

.sheet-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  cursor: grab;
  border-radius: 20px 20px 0 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease-out);
}

.sheet.peeking .sheet-handle,
.sheet.revealed .sheet-handle {
  opacity: 1;
  pointer-events: auto;
}

.sheet-handle-bar {
  width: 48px;
  height: 4px;
  background: rgba(160, 160, 160, 0.6);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 3px rgba(0, 0, 0, 0.3);
}

/* =============================================================
   Camera List
   ============================================================= */

.camera-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 28px 12px 0;
  padding-bottom: calc(var(--safe-bottom) + 20px);
  scrollbar-width: none;
}

.camera-list::-webkit-scrollbar {
  display: none;
}

/* Pull-to-refresh */
.ptr {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  overflow: hidden;
  transition: height 0.3s var(--ease-out), opacity 0.2s;
  opacity: 0;
  flex-shrink: 0;
}

.ptr.pulling {
  transition: none;
}

.ptr.refreshing {
  height: 48px;
  opacity: 1;
}

/* Floating spinner shown after pull-to-refresh snap-back (no layout shift) */
.ptr.loading {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  height: 60px !important;
  overflow: visible;
  opacity: 1 !important;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
}
.ptr.loading .ios-tick {
  animation: ios-tick-fade 0.8s linear infinite;
}
.ptr.loading .ios-tick:nth-child(1) { animation-delay: 0s; }
.ptr.loading .ios-tick:nth-child(2) { animation-delay: 0.1s; }
.ptr.loading .ios-tick:nth-child(3) { animation-delay: 0.2s; }
.ptr.loading .ios-tick:nth-child(4) { animation-delay: 0.3s; }
.ptr.loading .ios-tick:nth-child(5) { animation-delay: 0.4s; }
.ptr.loading .ios-tick:nth-child(6) { animation-delay: 0.5s; }
.ptr.loading .ios-tick:nth-child(7) { animation-delay: 0.6s; }
.ptr.loading .ios-tick:nth-child(8) { animation-delay: 0.7s; }

/* Centre pull spinner between handle and first card when sheet is collapsed */
.sheet.peeking .ptr.pulling {
  margin-top: 20px;
}

.ptr-spinner {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* iOS-style activity indicator */
.ios-spinner {
  position: relative;
  width: 22px;
  height: 22px;
}

.ios-tick {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2.5px;
  height: 6px;
  margin-left: -1.25px;
  border-radius: 1.25px;
  background: currentColor;
  opacity: 0.25;
  transform-origin: center 11px;
}

.ios-tick:nth-child(1) { transform: rotate(0deg); }
.ios-tick:nth-child(2) { transform: rotate(45deg); }
.ios-tick:nth-child(3) { transform: rotate(90deg); }
.ios-tick:nth-child(4) { transform: rotate(135deg); }
.ios-tick:nth-child(5) { transform: rotate(180deg); }
.ios-tick:nth-child(6) { transform: rotate(225deg); }
.ios-tick:nth-child(7) { transform: rotate(270deg); }
.ios-tick:nth-child(8) { transform: rotate(315deg); }

/* Spinning state: staggered fade on each tick */
.ptr.spinning .ios-tick {
  animation: ios-tick-fade 0.8s linear infinite;
}
.ptr.spinning .ios-tick:nth-child(1) { animation-delay: 0s; }
.ptr.spinning .ios-tick:nth-child(2) { animation-delay: 0.1s; }
.ptr.spinning .ios-tick:nth-child(3) { animation-delay: 0.2s; }
.ptr.spinning .ios-tick:nth-child(4) { animation-delay: 0.3s; }
.ptr.spinning .ios-tick:nth-child(5) { animation-delay: 0.4s; }
.ptr.spinning .ios-tick:nth-child(6) { animation-delay: 0.5s; }
.ptr.spinning .ios-tick:nth-child(7) { animation-delay: 0.6s; }
.ptr.spinning .ios-tick:nth-child(8) { animation-delay: 0.7s; }

@keyframes ios-tick-fade {
  0%, 39% { opacity: 1; }
  40%, 100% { opacity: 0.25; }
}

.camera-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin-bottom: 10px;
  background: var(--navy-card);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--duration-fast) var(--spring),
              background var(--duration-fast),
              border-color var(--duration-fast);
  will-change: transform;
}

.camera-card:hover {
  background: var(--surface-raised);
  border-color: var(--border);
}

.camera-card:active {
  transform: scale(0.97);
}

.camera-card.highlighted {
  border-color: var(--border);
  background: var(--surface-raised);
}

.camera-card.focused {
  border-color: var(--border-light);
}

.camera-thumb {
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--navy);
  position: relative;
}

.camera-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity var(--duration) var(--ease-out);
}

/* Placeholder state: hide image, show background shimmer */
.camera-thumb img[data-src],
.camera-thumb img:not([src]) {
  opacity: 0;
}

/* Shimmer animation on the thumb container while image is loading */
.camera-thumb:has(img[data-src]) {
  background: linear-gradient(
    110deg,
    var(--surface) 30%,
    var(--border) 50%,
    var(--surface) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.thumb-overlay .thumb-region {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0.8;
}

.thumb-region.AB { background: rgba(245, 158, 11, 0.75); color: #1a1a2e; }
.thumb-region.BC { background: rgba(59, 130, 246, 0.75); color: white; }
.thumb-region.WA { background: rgba(139, 92, 246, 0.75); color: white; }

.thumb-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.thumb-temp {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  margin-left: auto;
}

.thumb-updated {
  flex-shrink: 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  margin-left: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.thumb-temp ~ .thumb-updated {
  margin-left: 0;
}

.thumb-overlay .camera-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.camera-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.camera-highway {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.camera-highway svg {
  flex-shrink: 0;
}

.camera-direction {
  font-size: 11px;
  color: var(--text-muted);
}

.camera-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.camera-status .status-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
}

/* Compact disabled card for offline / no-feed cameras */
.camera-card-disabled {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  padding: 8px 12px !important;
  opacity: 0.55;
  overflow: visible !important;
}

.camera-card-disabled .thumb-region {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.camera-card-disabled .camera-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  -webkit-line-clamp: unset;
}

.camera-card-disabled .camera-highway-inline {
  display: none;
}

.camera-card-disabled .camera-status {
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .camera-card-disabled .camera-highway-inline {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }
}

/* Skeleton loading */
.skeleton-list {
  padding: 0;
}

.camera-list:has(.skeleton-list:not(.hidden)) .ptr {
  display: none;
}

.ptr.loading ~ .skeleton-list {
  display: none;
}

.skeleton-card {
  position: relative;
  margin-bottom: 10px;
  background: var(--navy-card);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.skeleton-img-full {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(110deg, var(--skeleton-base) 30%, var(--skeleton-highlight) 50%, var(--skeleton-base) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

.skeleton-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skeleton-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: rgba(255,255,255,0.15);
}

.skeleton-line.w70 { width: 70%; }
.skeleton-line.w40 { width: 40%; }

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.skeleton-list.hidden {
  display: none;
}

/* =============================================================
   Modal
   ============================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease-out);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 800px;
  background: var(--navy);
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration) var(--ease-out),
              transform var(--duration) var(--spring);
  max-height: 95vh;
}

.modal-overlay.active .modal {
  opacity: 1;
  transform: translateY(0);
}

/* FLIP transition clone — floats from card position to modal position */
.modal-transition-clone {
  position: fixed;
  z-index: 2001;
  overflow: hidden;
  will-change: width, height, top, left, border-radius;
  transition: width var(--duration-slow) var(--spring),
              height var(--duration-slow) var(--spring),
              top var(--duration-slow) var(--spring),
              left var(--duration-slow) var(--spring),
              border-radius var(--duration-slow) var(--spring);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

.modal-transition-clone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 28px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
  pointer-events: none;
  transition: opacity var(--duration) var(--ease-out);
}

/* Hide header overlay during FLIP animation, fade in after */
.modal.flip-animating .modal-header {
  opacity: 0;
}

.modal-header > * {
  pointer-events: auto;
}

.modal-header h2 {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--spring),
              background var(--duration-fast);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-close:active {
  transform: scale(0.85);
}

.modal-image-container {
  position: relative;
  width: 100%;
  background: var(--navy);
  overflow: hidden;
  flex-shrink: 0;
}

.modal-image-container > img {
  width: 100%;
  display: block;
  background: var(--navy);
}

/* Modal carousel (reuses cluster-card patterns) */
.modal-image-container .cluster-track {
  display: flex;
  width: 100%;
  transition: transform 0.3s var(--spring);
  will-change: transform;
}

.modal-image-container .cluster-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  position: relative;
}

.modal-image-container .cluster-slide img {
  width: 100%;
  display: block;
  background: var(--navy);
}

.modal-image-container .cluster-dots {
  bottom: 12px;
}

.modal-image-container .cluster-arrow {
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}

.modal-image-container:hover .cluster-arrow {
  opacity: 1;
}

@media (hover: none) {
  .modal-image-container .cluster-arrow {
    opacity: 0.8;
  }
}

.modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast);
}

.modal-loading.active {
  opacity: 1;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}


/* =============================================================
   Offline Banner
   ============================================================= */

.offline-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3000;
  padding: 10px 16px;
  padding-bottom: calc(10px + var(--safe-bottom));
  background: #dc2626;
  color: white;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateY(100%);
  transition: transform var(--duration) var(--spring);
}

.offline-banner.visible {
  transform: translateY(0);
}

/* =============================================================
   Update Banner
   ============================================================= */

.update-banner {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transform: translateY(-100%);
  transition: transform var(--duration) var(--spring);
}

.update-banner.visible {
  transform: translateY(0);
}

.update-banner-text {
  white-space: nowrap;
}

.update-banner-btn {
  padding: 5px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--duration-fast);
  white-space: nowrap;
}

.update-banner-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.update-banner-btn:active {
  background: rgba(255, 255, 255, 0.45);
}

/* =============================================================
   Empty State
   ============================================================= */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  text-align: center;
}

.empty-state svg {
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =============================================================
   Desktop Layout (>768px)
   ============================================================= */

@media (min-width: 769px) {
  :root {
    --header-height: calc(80px + var(--safe-top));
  }

  .header {
    padding: calc(var(--safe-top) + 12px) 24px 12px;
  }

  .route-selector {
    max-width: 600px;
    margin: 0 auto;
  }

  .map-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 50%;
    height: calc(100dvh - var(--header-height));
    bottom: 0;
  }

  .map-container.collapsed {
    height: calc(100dvh - var(--header-height));
    width: 50%;
  }

  .map-center-btn {
    position: fixed;
    top: auto;
    right: auto;
    left: calc(50% - 52px);
    bottom: 60px;
  }
  .map-toggle {
    position: fixed;
    top: auto;
    right: auto;
    left: calc(50% - 52px);
    bottom: 16px;
  }

  .sheet,
  .sheet.revealed {
    position: fixed;
    top: var(--header-height);
    left: 50%;
    right: 0;
    bottom: 0;
    border-radius: 0;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  }

  .map-container.collapsed ~ .sheet {
    top: var(--header-height);
    left: 50%;
  }

  .sheet-handle {
    display: none;
  }

  .camera-list {
    padding: 12px 12px 0;
    padding-bottom: calc(var(--safe-bottom) + 20px);
  }

  .modal {
    max-width: 800px;
    border-radius: 16px;
    margin: auto;
    max-height: 90vh;
  }

  .modal-transition-clone.to-modal {
    border-radius: 16px;
  }
}

/* Large desktop */
@media (min-width: 1200px) {
  .camera-list {
    padding: 16px 16px 0;
    padding-bottom: calc(var(--safe-bottom) + 20px);
  }
}

/* =============================================================
   Animations
   ============================================================= */

.fade-in {
  animation: fadeIn var(--duration) var(--ease-out) both;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.camera-card {
  animation: cardIn var(--duration) var(--spring) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
}

/* Stagger animation for cards */
.camera-card:nth-child(1) { animation-delay: 0ms; }
.camera-card:nth-child(2) { animation-delay: 30ms; }
.camera-card:nth-child(3) { animation-delay: 60ms; }
.camera-card:nth-child(4) { animation-delay: 90ms; }
.camera-card:nth-child(5) { animation-delay: 120ms; }
.camera-card:nth-child(6) { animation-delay: 150ms; }
.camera-card:nth-child(7) { animation-delay: 180ms; }
.camera-card:nth-child(8) { animation-delay: 210ms; }
.camera-card:nth-child(9) { animation-delay: 240ms; }
.camera-card:nth-child(10) { animation-delay: 270ms; }

/* =============================================================
   Cluster Card Pagination
   ============================================================= */

.cluster-thumb {
  position: relative;
  overflow: hidden;
}

.cluster-track {
  display: flex;
  width: 100%;
  transition: transform 0.3s var(--spring);
  will-change: transform;
}

.cluster-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  position: relative;
}

.cluster-slide img {
  width: 100%;
  display: block;
}

/* Direction label inside cluster slides */
.cluster-direction {
  font-weight: 400;
  font-size: 11px;
  opacity: 0.8;
}

/* Arrow buttons */
.cluster-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cluster-card:hover .cluster-arrow {
  opacity: 1;
}

.cluster-arrow[style*="display:none"] {
  opacity: 0 !important;
  pointer-events: none;
}

.cluster-arrow-prev { left: 6px; }
.cluster-arrow-next { right: 6px; }

.cluster-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.cluster-arrow:active {
  transform: translateY(-50%) scale(0.9);
}

/* Dot indicators (hidden in list cards, visible in modal) */
.cluster-card .cluster-dots {
  display: none;
}

.cluster-dots {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 3;
}

.cluster-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: background var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.cluster-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.cluster-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Cluster count badge */
.cluster-count {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}


/* Touch devices: always show arrows on clusters */
@media (hover: none) {
  .cluster-card .cluster-arrow {
    opacity: 0.8;
  }
}

/* =============================================================
   Notifications Panel
   ============================================================= */

.notif-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  overscroll-behavior: contain;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease-out);
}

.notif-panel-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.notif-panel {
  width: 92%;
  max-width: 420px;
  max-height: 80vh;
  background: var(--surface-raised);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  touch-action: manipulation;
  transform: translateY(20px);
  transition: transform var(--duration) var(--spring);
}

.notif-panel-overlay.active .notif-panel {
  transform: translateY(0);
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.notif-panel-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.notif-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--navy-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.notif-panel-close:hover {
  background: var(--border);
}

/* Toggle row */
.notif-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

.notif-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  color: var(--text);
}

.notif-denied {
  font-size: 12px;
  color: var(--text-muted);
}

/* iOS-style toggle switch */
.notif-switch {
  position: relative;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}

.notif-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.notif-switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 31px;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.notif-switch-slider::before {
  content: '';
  position: absolute;
  width: 27px;
  height: 27px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform var(--duration-fast) var(--spring);
}

.notif-switch input:checked + .notif-switch-slider {
  background: var(--green);
}

.notif-switch input:checked + .notif-switch-slider::before {
  transform: translateX(20px);
}

.notif-switch input:disabled + .notif-switch-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Notification list */
.notif-list {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  transition: background var(--duration-fast);
}

.notif-item:hover {
  background: var(--navy-light);
}

.notif-item + .notif-item {
  border-top: 1px solid var(--border-light);
}

.notif-item-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.notif-item-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
