/* warnings.css — EU-Wetterwarnungen: Legende + Klick-Popover (start.php). */

/* ── Tag-Umschalter (Heute/Morgen) an der Timeslider-Position ── */
#timeslider[hidden]{ display: none !important; }
#warn-daybar,
#aurora-daybar{
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(11,19,28,.82);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 32px rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
#warn-daybar[hidden],
#aurora-daybar[hidden]{ display: none !important; }
#warn-daybar .warn-day-btn,
#aurora-daybar .warn-day-btn{ min-width: 88px; padding: 9px 18px; font-size: 13px; }
html[data-theme="light"] #warn-daybar,
html[data-theme="light"] #aurora-daybar{
  background: rgba(255,255,255,.9); border-color: rgba(20,30,45,.12);
}
@media (max-width: 1024px){
  #warn-daybar .warn-day-btn,
  #aurora-daybar .warn-day-btn{ min-width: 72px; padding: 9px 14px; }
}

/* ── Legende (im Bottom-Right-Stack #liste_modelle, neben der Wert-Legende) ── */
.warn-legend{
  width: 230px;
  border-radius: 14px;
  background: var(--map-control-bg);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 14px 32px rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  overflow: hidden;
}
.warn-legend[hidden]{ display: none !important; }

@media (max-width: 1024px){
  /* Voll-breite Boden-Legende (deckt warn/aurora/spc ab, analog .map-legend).
     position:fixed -> raus aus dem #liste_modelle-Stack. */
  .warn-legend{
    position: fixed;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    border-radius: 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    z-index: 24;
    max-height: 60vh; overflow-y: auto;
  }
}
.warn-legend-head{
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.warn-legend-title{ font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.warn-legend-toggle{
  width: 22px; height: 22px; border: 0; border-radius: 6px;
  background: rgba(255,255,255,.08); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
}
.warn-legend-body{ padding: 10px 12px; display: grid; gap: 7px; }
.warn-legend-days{ display: flex; gap: 6px; margin-bottom: 4px; }
.warn-day-btn{
  flex: 1; border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
  padding: 5px 8px; background: rgba(255,255,255,.05); color: rgba(255,255,255,.8);
  font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.warn-day-btn[hidden]{ display: none; }
.warn-day-btn.is-active{ background: rgba(244,194,13,.9); border-color: rgba(244,194,13,.9); color: #1a1400; }
html[data-theme="light"] .warn-day-btn{ border-color: rgba(20,30,45,.16); background: rgba(20,30,45,.05); color: rgba(20,30,45,.8); }
html[data-theme="light"] .warn-day-btn.is-active{ background: rgba(244,194,13,.95); border-color: rgba(244,194,13,.95); color: #1a1400; }
.warn-legend.is-collapsed .warn-legend-body{ display: none; }
.warn-legend-row{ display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: rgba(255,255,255,.85); }
.warn-legend-sw{ width: 16px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.warn-legend-sw--outline{ background: transparent; border: 1.5px solid rgba(150,168,184,.7); }
.warn-legend-note{ margin-top: 3px; color: rgba(255,255,255,.55); font-size: 10.5px; line-height: 1.4; }

/* Light-Theme */
html[data-theme="light"] .warn-legend{
  background: var(--legend-bg-light); color: rgb(20,30,45); border-color: rgba(20,30,45,.12);
}
html[data-theme="light"] .warn-legend-row{ color: rgba(20,30,45,.85); }
html[data-theme="light"] .warn-legend-note{ color: rgba(20,30,45,.55); }
html[data-theme="light"] .warn-legend-toggle{ background: rgba(20,30,45,.08); color: rgb(20,30,45); }

/* ── Hazard-Icons (DOM-Marker am Regionen-Schwerpunkt) ──
   Badge in Level-Farbe, einfache weiße Linien-Glyphe. */
.warn-icon{
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.95);
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
  pointer-events: none;          /* Klick geht zur Region (Popover) durch */
  user-select: none;
}
.warn-icon svg{ display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
/* Rot kräftiger umranden für Sichtbarkeit */
.warn-icon--red{ box-shadow: 0 2px 7px rgba(211,47,47,.5), 0 2px 6px rgba(0,0,0,.45); }

/* Mehrere Hazards pro Region → Reihe von Badges (+„+n") */
.warn-icons-row{ display: flex; align-items: center; gap: 2px; pointer-events: none; }
.warn-icon--more{
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.95);
  background: rgba(8,39,58,.92);
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
  color: #fff; font-size: 11px; font-weight: 800;
}

/* ── Klick-Popover (MapLibre Popup) ── */
.warn-popup .maplibregl-popup-content{
  padding: 11px 12px 12px; border-radius: 14px;
  background: rgba(8,39,58,.96); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 32px rgba(0,0,0,.34);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #fff;
}
.warn-popup .maplibregl-popup-tip{ display: none; }
.warn-popup .maplibregl-popup-close-button{ color: rgba(255,255,255,.7); font-size: 17px; padding: 2px 6px; }
.warn-pop-head{ display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.warn-pop-head strong{ font-size: 14px; font-weight: 800; }
.warn-pop-head span{ color: rgba(255,255,255,.55); font-size: 11px; font-weight: 700; }
.warn-pop-empty{ color: rgba(255,255,255,.7); font-size: 12px; }
.warn-pop-alert{ padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.warn-pop-alert:first-of-type{ border-top: 0; }
.warn-pop-alert-top{ display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.warn-pop-haz{ font-size: 12.5px; font-weight: 700; }
.warn-pop-badge{ font-size: 10.5px; font-weight: 800; color: #fff; padding: 2px 7px; border-radius: 999px; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.warn-pop-time{ margin-top: 3px; color: rgba(255,255,255,.6); font-size: 10.5px; }
.warn-pop-headline{ margin-top: 3px; color: rgba(255,255,255,.88); font-size: 11.5px; line-height: 1.35; }

html[data-theme="light"] .warn-popup .maplibregl-popup-content{ background: rgba(255,255,255,.94); color: rgb(20,30,45); border-color: rgba(20,30,45,.12); }
html[data-theme="light"] .warn-popup .maplibregl-popup-close-button{ color: rgba(20,30,45,.6); }
html[data-theme="light"] .warn-pop-head span,
html[data-theme="light"] .warn-pop-time{ color: rgba(20,30,45,.55); }
html[data-theme="light"] .warn-pop-empty,
html[data-theme="light"] .warn-pop-headline{ color: rgba(20,30,45,.85); }
html[data-theme="light"] .warn-pop-alert{ border-color: rgba(20,30,45,.1); }

/* ── SIGMET-Klick-Popup (strukturiert, 2026-06-24) ── */
.sigmet-popup .maplibregl-popup-content{
  padding: 0; border-radius: 16px; overflow: hidden;
  background: rgba(255,255,255,.97); color: rgb(20,30,45);
  border: 1px solid rgba(20,30,45,.10); box-shadow: 0 16px 40px rgba(0,0,0,.22);
}
.sigmet-popup .maplibregl-popup-tip{ display: none; }
.sigmet-popup .maplibregl-popup-close-button{ font-size: 20px; padding: 4px 9px; color: rgba(20,30,45,.4); }
.sig-pop{ padding: 14px 16px 8px; font: 400 13px/1.4 var(--font-sans, system-ui); min-width: 212px; }
.sig-head{ display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.sig-ic{ width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; }
.sig-ic svg{ width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sig-code{ font: 800 11px/1 var(--font-sans, system-ui); letter-spacing: .04em; padding: 4px 8px; border-radius: 7px; }
.sig-title{ font-size: 18px; font-weight: 800; line-height: 1.2; }
.sig-qual{ font-weight: 500; color: rgba(20,30,45,.5); }
.sig-sub{ font-size: 12px; font-weight: 600; color: rgba(20,30,45,.5); letter-spacing: .02em; margin-top: 1px; }
.sig-rows{ margin-top: 11px; border-top: 1px solid rgba(20,30,45,.08); }
.sig-row{ display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(20,30,45,.06); }
.sig-row:last-child{ border-bottom: 0; }
.sig-row-ic{ width: 18px; flex: 0 0 18px; color: rgba(20,30,45,.5); display: inline-flex; }
.sig-row-ic svg{ width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sig-row-k{ color: rgba(20,30,45,.55); font-size: 12.5px; }
.sig-row-v{ margin-left: auto; font-weight: 700; font-size: 13px; text-align: right; }

html[data-theme="dark"] .sigmet-popup .maplibregl-popup-content{ background: rgba(18,26,38,.97); color: #e7eef5; border-color: rgba(255,255,255,.10); }
html[data-theme="dark"] .sigmet-popup .maplibregl-popup-close-button{ color: rgba(255,255,255,.5); }
html[data-theme="dark"] .sig-qual,
html[data-theme="dark"] .sig-sub,
html[data-theme="dark"] .sig-row-k,
html[data-theme="dark"] .sig-row-ic{ color: rgba(255,255,255,.55); }
html[data-theme="dark"] .sig-rows{ border-top-color: rgba(255,255,255,.10); }
html[data-theme="dark"] .sig-row{ border-bottom-color: rgba(255,255,255,.07); }
