/**
 * css/modules/satellite.css
 * Weerfocus-hub - Professionele Satelliet UI met Dag / Nacht Tags
 */

:root {
  --sat-panel-bg: rgba(13, 17, 23, 0.88);
  --sat-border: rgba(255, 255, 255, 0.12);
  --sat-accent: var(--accent-orange);
  --sat-accent-glow: var(--accent-glow);
  --sat-text: var(--text-main);
  --sat-text-muted: var(--text-muted);
}

#sat-workspace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--gray-975);
  overflow: hidden;
  cursor: grab;
}

#sat-workspace:active {
  cursor: grabbing;
}

/* Glassmorphism Basis */
.sat-glass-panel {
  position: absolute;
  z-index: 20;
  background: var(--sat-panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--sat-border);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-xl);
  color: var(--sat-text);
  user-select: none;
}

.sat-panel-title {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--sat-text-muted);
  letter-spacing: 0.08em;
  padding: 6px 10px 4px 10px;
}

.sat-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sat-scroll-list {
  max-height: min(520px, calc(100vh - 160px));
  overflow-y: auto;
  padding-right: 4px;
}

.sat-scroll-list::-webkit-scrollbar {
  width: 4px;
}

.sat-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xs);
}

.sat-menu-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 1px solid transparent;
  color: var(--sat-text);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.sat-menu-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sat-menu-btn.active {
  color: #fff;
  background: var(--sat-accent);
  box-shadow: 0 0 12px var(--sat-accent-glow);
}

/* ==============================================================================
   DAG / NACHT / DAG-NACHT TAGS
   ============================================================================== */
.sat-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
  margin-left: 8px;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Tag: Dag (Zonne-Amber) */
.sat-tag-dag {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Tag: Nacht (Nacht-Indigo) */
.sat-tag-nacht {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.35);
}

/* Tag: Dag/Nacht (24/7 Cyaan) */
.sat-tag-dag-nacht {
  background: rgba(56, 189, 248, 0.14);
  color: var(--status-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Als de knop actief is: tags strak contrasteren */
.sat-menu-btn.active .sat-tag {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* LINKS: Regio Menu */
.sat-regions-sidebar {
  top: 20px;
  left: 20px;
  width: 200px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* RECHTS: Kaarttypes Menu */
.sat-product-sidebar {
  top: 20px;
  right: 20px;
  width: 275px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Responsive switches */
.sat-desktop-only { display: flex; }
.sat-mobile-only { display: none; }

.sat-dropdown-mobile {
  width: 100%;
  background: var(--gray-950);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  outline: none;
}

/* BENEDEN: Player Dock */
.sat-bottom-dock {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 32px));
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sat-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sat-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sat-text-muted);
}

.sat-badge-live.active { color: var(--status-red); }
.sat-badge-live.terug { color: var(--accent-orange); }

.sat-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
}

.sat-badge-live.active .sat-pulse-dot {
  animation: sat-pulse 1.8s infinite;
}

@keyframes sat-pulse {
  0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.sat-time-display {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  gap: 8px;
}

.sat-time-display .local-time { color: var(--sat-text-muted); }

/* Timeline Slider */
.sat-timeline-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sat-btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--sat-text);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.sat-btn-icon:hover { background: rgba(255, 255, 255, 0.16); }
.sat-btn-icon svg { width: 17px; height: 17px; }

.sat-slider {
  flex: 1;
  min-width: 0; /* standaard ~130px in Chrome: duwde de snelheidsknoppen op mobiel uit de dock */
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.14);
  height: 5px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.sat-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--sat-accent);
  border: 2px solid var(--gray-975);
  box-shadow: 0 0 10px var(--sat-accent-glow);
  cursor: grab;
}

.sat-speed-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.sat-speed-btn {
  background: transparent;
  border: none;
  color: var(--sat-text-muted);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.sat-speed-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Legenda IR */
.sat-legend-wrapper { margin-top: 2px; }
.sat-legend-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sat-text-muted);
}
.sat-ir-gradient {
  flex: 1;
  height: 7px;
  border-radius: var(--radius-xs);
  background: linear-gradient(
    to right,
    #ffffff 0%, #e11d48 20%, #c026d3 35%, #2563eb 50%, #059669 65%, #d97706 80%, var(--slate-800) 100%
  );
}

/* Super HD VIS (HRV Cloud RGB): kleurklassen, zie HRV_CLOUD_KLASSEN in satellite.js */
.sat-legend-klassen { flex-wrap: wrap; gap: 4px 14px; }
.sat-klasse { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sat-klasse-kleur {
  width: 14px;
  height: 8px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Sandwich IR+VIS: -20 °C (links) t/m ≤ -76 °C (rechts).
   Kleurstops synchroon houden met SANDWICH_STOPS in weerfocus-satelliet/worker.py */
.sat-sandwich-bar { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sat-sandwich-gradient {
  height: 7px;
  border-radius: var(--radius-xs);
  background: linear-gradient(
    to right,
    rgb(225, 225, 245) 0%, rgb(175, 170, 235) 17.9%, rgb(120, 150, 240) 35.7%,
    rgb(90, 195, 240) 44.6%, rgb(70, 220, 200) 53.6%, rgb(130, 230, 110) 62.5%,
    rgb(235, 230, 70) 71.4%, rgb(250, 160, 60) 80.4%, rgb(235, 70, 70) 89.3%,
    rgb(175, 40, 120) 96.4%, rgb(230, 90, 230) 100%
  );
}
.sat-sandwich-ticks { position: relative; height: 10px; font-size: 0.62rem; }
.sat-sandwich-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.sat-sandwich-ticks span:first-child { transform: none; }
.sat-sandwich-ticks span:last-child { transform: translateX(-100%); }

/* PNG-export & "Bespreek in MeteoConnect" (rechts in de metarij van de player-dock) */
#sat-workspace .sat-share-actions {
  display: flex;
  gap: 6px;
}

#sat-workspace .sat-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 107, 53, 0.35);
  background: rgba(255, 107, 53, 0.12);
  color: var(--accent-orange);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#sat-workspace .sat-share-btn:hover {
  background: var(--accent-orange);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.35);
}

#sat-workspace .sat-share-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

#sat-workspace .sat-share-btn:disabled:hover {
  background: rgba(255, 107, 53, 0.12);
  color: var(--accent-orange);
  box-shadow: none;
}

#sat-workspace .sat-btn-bespreek .mc-label-kort { display: none; }

/* MOBIELE BREAKPOINT */
@media (max-width: 900px) {
  #sat-workspace .sat-btn-bespreek .mc-label-lang { display: none; }
  #sat-workspace .sat-btn-bespreek .mc-label-kort { display: inline; }
  /* Te smal voor live-badge + tijd + knoppen op één rij: knoppen op een eigen rij */
  #sat-workspace .sat-meta-row { flex-wrap: wrap; row-gap: 8px; }
  #sat-workspace .sat-share-actions { order: 3; width: 100%; }
  #sat-workspace .sat-share-btn { flex: 1; justify-content: center; padding: 6px 8px; }
  /* Tijdlijn op telefoonbreedte: alles binnen de dock houden */
  #sat-workspace .sat-timeline-container { gap: 6px; }
  #sat-workspace .sat-btn-icon { width: 30px; height: 30px; flex-shrink: 0; }
  #sat-workspace .sat-speed-selector { flex-shrink: 0; }
  #sat-workspace .sat-speed-btn { padding: 3px 5px; font-size: 0.66rem; }

  .sat-regions-sidebar {
    top: 10px;
    left: 10px;
    width: 44%;
    max-width: 170px;
    padding: 6px;
  }
  .sat-product-sidebar {
    top: 10px;
    right: 10px;
    width: 50%;
    max-width: 190px;
    padding: 6px;
  }
  .sat-panel-title {
    font-size: 0.65rem;
    padding: 2px 4px;
  }
  .sat-desktop-only { display: none; }
  .sat-mobile-only { display: block; }
  .sat-bottom-dock {
    bottom: 12px;
    padding: 10px 14px;
  }
  .sat-legend-scale .legend-label { display: none; }
}

/* BETA BADGE IN SIDEBAR */
.nav-badge-beta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-orange);
  background: rgba(255, 107, 53, 0.16);
  border: 1px solid rgba(255, 107, 53, 0.35);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.nav-item.active .nav-badge-beta {
  background: #ffffff;
  color: var(--accent-orange);
  border-color: #ffffff;
}

/* ==========================================================================
   HIGH-END POLISH: micro-interacties, slider-verfijning & glas-highlights
   ========================================================================== */

/* Uniforme premium easing + druk-feedback op alle klikbare elementen */
#sat-workspace .sat-menu-btn,
#sat-workspace .sat-btn-icon,
#sat-workspace .sat-speed-btn {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#sat-workspace .sat-menu-btn:hover {
  transform: translateX(1px);
}
#sat-workspace .sat-menu-btn:active,
#sat-workspace .sat-btn-icon:active,
#sat-workspace .sat-speed-btn:active {
  transform: scale(0.95);
}

/* Glas-highlight op de zwevende panelen, alsof er licht op het glas valt */
#sat-workspace .sat-glass-panel {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Slider-thumb: zachte hover-groei + Firefox-ondersteuning (was enkel WebKit) */
#sat-workspace .sat-slider::-webkit-slider-thumb {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
}
#sat-workspace .sat-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px var(--sat-accent-glow);
}
#sat-workspace .sat-slider::-moz-range-track {
  background: rgba(255, 255, 255, 0.14);
  height: 5px;
  border-radius: 3px;
}
#sat-workspace .sat-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--sat-accent);
  border: 2px solid var(--gray-975);
  box-shadow: 0 0 10px var(--sat-accent-glow);
  cursor: grab;
}

/* Scrollbar afwerken: hover-state + Firefox-variant (was enkel een kale WebKit-duim) */
#sat-workspace .sat-scroll-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 53, 0.35) transparent;
}
#sat-workspace .sat-scroll-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 53, 0.5);
}
#sat-workspace .sat-scroll-list::-webkit-scrollbar-track {
  background: transparent;
}

/* Nette focus-states voor toetsenbordgebruik i.p.v. de default blauwe outline */
#sat-workspace .sat-menu-btn:focus-visible,
#sat-workspace .sat-btn-icon:focus-visible,
#sat-workspace .sat-speed-btn:focus-visible,
#sat-workspace .sat-slider:focus-visible {
  outline: 2px solid var(--sat-accent);
  outline-offset: 2px;
}

/* ==========================================================================
   VOYAGER (LICHT THEMA) OVERRIDES
   ========================================================================== */
body.theme-voyager #sat-workspace {
  --sat-panel-bg: rgba(255, 255, 255, 0.92) !important;
  --sat-border: rgba(0, 0, 0, 0.1) !important;
  /* Custom properties erven niet "live" mee met var()-verwijzingen van :root
     (zie hub.css), dus --sat-text/--sat-text-muted moeten hier expliciet
     herhaald worden om de Voyager-override door te laten werken. */
  --sat-text: var(--text-main) !important;
  --sat-text-muted: var(--text-muted) !important;
}

body.theme-voyager #sat-workspace .sat-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}

body.theme-voyager #sat-workspace .sat-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2) !important;
}

body.theme-voyager #sat-workspace .sat-btn-icon {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

body.theme-voyager #sat-workspace .sat-btn-icon:hover {
  background: rgba(0, 0, 0, 0.1) !important;
}

body.theme-voyager #sat-workspace .sat-slider {
  background: rgba(0, 0, 0, 0.12) !important;
}

body.theme-voyager #sat-workspace .sat-slider::-moz-range-track {
  background: rgba(0, 0, 0, 0.12) !important;
}

body.theme-voyager #sat-workspace .sat-dropdown-mobile {
  background: #ffffff !important;
  color: var(--text-main) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
body.theme-voyager #sat-workspace .sat-speed-selector {
  background: rgba(0, 0, 0, 0.05) !important;
}

body.theme-voyager #sat-workspace .sat-speed-btn.active {
  background: #ffffff !important;
  color: var(--text-main) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

body.theme-voyager #sat-workspace .sat-glass-panel {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12) !important;
}
