/* =========================== START: ALERTS MAP ===================== */

/* All rules scoped to the Alerts fullscreen modal */
.alerts-modal {
  --bg: #0b0f14;
  --panel: #ffffff;
  --muted: #6b7280;
  --chip: #eef2f7;
  --chip-text: #3b4451;
  --accent: #ff5a1f;
  --green: #22c55e;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);

  --tag-bg: #f3f4f6;
  --tag-br: #e5e7eb;
  --tag-tx: #0f172a;

  color: #1f2937;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
}

.alerts-modal * {
  box-sizing: border-box;
}

.alerts-modal {
  background: var(--bg);
}

.alerts-modal .alerts {
  max-width: none;
}

/* App grid inside the modal */
.alerts-modal .app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  height: 100vh;
  gap: 0;
}

/* LEFT: Map */
.alerts-modal .map-wrap {
  position: relative;
  min-width: 0;
  height: 100vh;
}

/* Zoom controls */
.alerts-modal .zoom-ui{position:absolute;right:16px;top:16px;display:flex;gap:8px;pointer-events:auto}
.alerts-modal .btn{background:rgba(255,255,255,.9);border:1px solid #d1d5db;padding:6px 10px;border-radius:10px;cursor:pointer;font-weight:800}
.alerts-modal .btn:hover{background:#fff}

/* Error toast */
.alerts-modal .error{position:absolute;top:16px;right:16px;z-index:50;background:#b91c1c;color:#fff;padding:8px 12px;border-radius:10px;display:none}

/* RIGHT: Sidebar */
.alerts-modal aside.panel{background:var(--panel);display:flex;flex-direction:column;height:100vh}
.alerts-modal .panel-inner{display:flex;flex-direction:column;height:100%}

.alerts-modal .panel-header{position:sticky;top:0;z-index:5;background:var(--panel);}
.alerts-modal .ph-top{display:flex;align-items:center;justify-content:space-between;padding:18px 18px 10px;border-bottom:1px solid #eef0f3}
.alerts-modal .big{font-weight:900;letter-spacing:.5px;color:var(--accent);font-size:72px;line-height:.9}
.alerts-modal .big-sub{font-weight:700;text-transform:uppercase;color:#9aa3af;letter-spacing:2px;margin-top:8px;font-size:8px}
.alerts-modal .close{font-size:20px;color:#111;background:#fff;border:1px solid #e5e7eb;border-radius:50%;width:36px;height:36px;display:grid;place-items:center;cursor:pointer;align-self:flex-start;margin-top:0;padding-bottom:1px;padding-left:1px}

.alerts-modal .tabs{
  display:flex;
  gap:8px;
  padding:12px 18px;
  border-bottom:1px solid #eef0f3;
  position:sticky;
  top:0;
  background:var(--panel);
  justify-content:flex-start;
}
.alerts-modal .tabs .tab{padding:6px 10px;border-radius:8px;border:1px solid #d1d5db;background:#f3f4f6;color:#111;cursor:pointer;font-weight:700}
.alerts-modal .tabs .tab.is-active{background:#111;color:#fff;border-color:#111}

/* Scrollable alerts list */
.alerts-modal .list{flex:1;min-height:0;overflow:auto;padding:14px 12px 18px 18px}
.alerts-modal .section-title-nws-alerts{margin:10px 2px;color:#374151;font-weight:800}

.alerts-modal .list{scroll-behavior:smooth;scroll-padding-top:64px;scroll-padding-bottom:12px}
.alerts-modal .list .card{scroll-margin-top:64px;scroll-margin-bottom:12px}

.alerts-modal .card{background:#f9fafb;border:1px solid #eef0f3;border-radius:12px;padding:12px 12px;margin:10px 6px;box-shadow:0 6px 12px rgba(0,0,0,.04)}
.alerts-modal .card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:3px}
.alerts-modal .chips{display:flex;gap:6px;flex-wrap:wrap}
.alerts-modal .chip{background:var(--chip);color:var(--chip-text);border-radius:8px;padding:3px 6px;font-size:12px;border:1px solid #e5e7eb}
.alerts-modal .pill{background:#fff1eb;color:var(--accent);border:1px solid #ffd8c7;border-radius:999px;padding:4px 8px;font-weight:900;font-size:12px}
.alerts-modal .hl{font-weight:800;color:#334155;margin:6px 0 10px 0;}
.alerts-modal .meta{color:#6b7280;font-size:12px}

/* --- Alert Refresh--- */
.alerts-newbadge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 10px 30px;
  margin-bottom: 0.5rem;
  background: rgba(37, 99, 235, 0.09);
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.alerts-newbadge.d-none {
  display: none !important;
}

/* --- Highlight states --- */
.alerts-modal .card.is-active{outline:3px solid var(--accent);outline-offset:2px}
.alerts-modal .card.is-hover{box-shadow:0 0 0 2px rgba(255,90,31,.3) inset}
.alerts-modal .card{scroll-margin-top:10px}
.alerts-modal .list,
.alerts-modal aside.panel{scroll-padding-top:56px;scroll-padding-bottom:10px}

.alerts-modal .path.is-active {
  filter: none !important;
  fill-opacity: 0.35 !important;
  stroke-width: 2.2px !important;
}
.alerts-modal .path.is-hover {
  filter: none !important;
  fill-opacity: 0.55 !important;
  stroke-width: 2px !important;
}

/* --- NWS details sheet (custom, not Bootstrap) --- */
.alerts-modal .nws-sheet{position:fixed;inset:0;display:none;z-index:1060}
.alerts-modal .nws-sheet.show{display:block}

.alerts-modal .nws-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5)}

.alerts-modal .nws-sheet-panel{
  position:absolute;right:0;top:0;bottom:0;width:min(720px,96vw);
  background:#fff;box-shadow:-16px 0 40px rgba(0,0,0,.35);overflow:auto;
  padding:60px 30px;
}

.alerts-modal .nws-sheet-x{
  position:absolute;right:12px;top:10px;width:36px;height:36px;
  border:1px solid #e5e7eb;border-radius:50%;background:#fff;cursor:pointer;font-size:20px;
}

/* Modal header & tagbar */
.alerts-modal .modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.alerts-modal .modal-title-alerts{margin:0;font-size:22px;line-height:1;font-weight:600;color:#0f172a}
.alerts-modal .modal-sub{color:#6b7280;font-size:13px;font-weight:600}

/* --- Modal footer --- */
.alerts-modal .modal-footer{
  border-top:1px solid #eef0f3;
  margin-top:60px;
  padding-top:10px;
  color:#6b7280;
  font-size:12px;
  line-height:1.5;
  padding-right:0;
  padding-left:0;
}
.alerts-modal .modal-footer .row{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0}
.alerts-modal .modal-footer .mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size:11px;color:#94a3b8;word-break:break-all;
}
.alerts-modal .modal-footer .muted{color:#94a3b8}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 12px;
  flex-wrap: wrap;
}

.modal-title-alerts {
  flex: 1 1 auto;
  min-width: 200px;
  width:100%;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

/* On smaller screens: stack tags under title, left-aligned */
@media (max-width: 768px) {
  .modal-head {
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
  }

  .modal-tags {
    margin-top: 4px;
  }
}

.alerts-modal .tagbar{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 24px 8px}
.alerts-modal .tag{
  display:inline-flex;align-items:center;gap:6px;background:var(--tag-bg);color:var(--tag-tx);
  border:1px solid var(--tag-br);border-radius:999px;padding:6px 10px;font-weight:700;font-size:11px;
}
.alerts-modal .tag .k{color:#475569;font-weight:800;text-transform:uppercase;letter-spacing:.3px}
.alerts-modal .tag .v{color:#0f172a;font-weight:800}

/* Modal blocks */
.alerts-modal .block{background:#f9fafb;border:1px solid #eef0f3;border-radius:12px;padding:20px 14px;margin:12px 0}
.alerts-modal .block h3{margin:0 0 8px;font-size:14px;text-transform:uppercase;letter-spacing:.8px;color:#475569;font-weight:900}
.alerts-modal .block p{margin:0}
.alerts-modal .block pre{white-space:pre-wrap;margin:0}

/* Footer info */
.alerts-modal .footer-info{margin-top:12px;color:#334155;font-size:13px}
.alerts-modal .footer-info .row{display:flex;gap:8px;align-items:baseline;margin:6px 0}
.alerts-modal .footer-info .lbl{color:#64748b;font-weight:800;width:88px}
.alerts-modal .footer-info .val{font-weight:700}

/* Divider below the event title */
.alerts-modal .modal-divider{border-top:1px solid #e5e7eb;margin:10px 0 12px}

/* Plain meta rows */
.alerts-modal .meta-plain{margin:6px 0 8px;color:#334155;font-size:14px}
.alerts-modal .meta-plain .row{display:flex;gap:8px;align-items:baseline;margin:4px 0}
.alerts-modal .meta-plain .lbl{color:#64748b;font-weight:800;width:100px}
.alerts-modal .meta-plain .val{font-weight:600}

/* Touch / interaction hints */
.alerts-modal aside.panel,
.alerts-modal .panel-header,
.alerts-modal .tabs,
.alerts-modal .list,
.alerts-modal .card,
.alerts-modal .btn,
.alerts-modal .modal-sheet,
.alerts-modal .modal-x{
  touch-action:manipulation;
}

/* Docked chooser: same width as sidebar (uses --chooser-width set by JS) */
.alerts-modal .nws-sheet.dock-right .nws-sheet-panel{
  right:0;top:0;bottom:0;
  width:var(--chooser-width,420px);
  max-width:100vw;
  padding:14px 12px 18px 18px;
  border-left:1px solid #eef0f3;
  box-shadow:none;
}

/* Backdrop should not cover the sidebar column */
.alerts-modal .nws-sheet.dock-right .nws-backdrop{
  position:absolute;top:0;bottom:0;left:0;
  right:var(--chooser-width,420px);
  background:rgba(0,0,0,.5);
}

/* Keep the X button inside the docked panel edge */
.alerts-modal .nws-sheet.dock-right .nws-sheet-x{ right:12px; top:10px }

/* flag the sheet as "chooser" so we can alter spacing only there */
.alerts-modal .nws-sheet.chooser .nws-sheet-panel{ padding-left:10px; padding-right:0 }

/* when docked to the right, keep your top/bottom spacing but kill L/R */
.alerts-modal .nws-sheet.dock-right.chooser .nws-sheet-panel{ padding:14px 0 18px 0 }

.alerts-modal .chooser-list .chooser-card{ margin-bottom:.5rem }
.alerts-modal .chooser-list .chooser-card .chooser-actions{ margin-top:.35rem; display:flex; gap:.4rem }
.alerts-modal .nws-sheet.chooser .nws-sheet-x{ display:none!important }
.alerts-modal .nws-sheet.chooser .chooser-list{ padding:0 }
.alerts-modal .nws-sheet.chooser .btn.btn-primary{
  background:#111;border-color:#111;color:#fff!important;
}
.alerts-modal .nws-sheet.chooser .btn.btn-primary:hover{ filter:brightness(0.92) }

/* Keep old desktop behavior */
@media (max-width:1100px){
  .alerts-modal .app{grid-template-columns:1fr}
}

/* Bottom gap/comfort in list */
.alerts-modal #list::after{content:"";display:block;height:var(--list-bottom-gap,28px);pointer-events:none}
.alerts-modal #list .card:last-child{margin-bottom:28px}
.alerts-modal .list{padding-bottom:72px}
.alerts-modal .list .card{margin-bottom:12px}
.alerts-modal .list .card:last-child{margin-bottom:24px}

.alerts-modal .card { position: relative; }

/* bottom-right hail badge on cards/chooser cards */
.alerts-modal .hail-chip{
  position:absolute; right:12px; bottom:10px;
  background:var(--tag-bg); color:var(--tag-tx);
  border:1px solid var(--tag-br);
  border-radius:999px; padding:5px 8px;
  font-weight:800; font-size:11px; line-height:1;
}

/* hail tag styling in the detail header */
.alerts-modal .tag-hail{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}

.modal-head .modal-title-alerts {
  margin-bottom: -10px;
}

.modal-head .modal-meta {
  margin: 0;
  font-size: 13px;
}

.chooser-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-right: 10px;
}

/* Fullscreen white loading canvas over the entire alerts modal */
.alerts-modal .modal-content {
  position: relative;
}

.alerts-modal .modal-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.alerts-modal .modal-loading-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Map containers */
.alerts-modal .maplibre-map {
  position: absolute;
  inset: 0;
}

#ml-map {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Attribution */
.maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 6px;
  font: 10px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #374151;
}

.maplibregl-ctrl-attrib a {
  color: #374151;
  text-decoration: none;
}

.maplibregl-ctrl-attrib a:hover { text-decoration: underline; }
.maplibregl-ctrl-attrib { overflow-x: auto; text-align: center; }

/* ── Top-left control (reuses your existing control aesthetic) ───────────── */
.pred-ctl{
  position:absolute; top:16px; left:16px;
  display:flex; gap:.5rem; align-items:center;
}
.pred-pill{
  display:inline-flex; align-items:center; gap:.35rem;
  padding:.35rem .6rem; border: 1px solid #d1d5db; border-radius:10px;
  background:rgba(255,255,255,.9); color:#e5e7eb;
  font-weight:600;  cursor:default;
}
.pred-count{ font-variant-numeric: tabular-nums; min-width:1.6ch; text-align:center; }
.pred-sep{ opacity:.5; }

.pred-green{ color:#22c55e; }
.pred-yellow{ color:#fbbf24; }
.pred-blue{ color:#38bdf8; }

.pred-toggle{
  display:inline-flex; align-items:center; gap:.4rem;
  background:#565D64; color:#000; border-radius:999px; padding:.28rem .6rem;
  cursor:pointer; user-select:none;
}
.pred-toggle input{ display:none; }
.pred-toggle-ui::before{
  content: "OFF"; opacity:.6; margin-right:.45rem;
}
.pred-toggle input:checked + .pred-toggle-ui::before{
  content: "ON"; opacity:1;
}

/* ── Tracker markers  ─────────────── */
.pred-marker{
  position:relative; width:10px; height:10px; transform:translate(-50%, -50%);
}

/* Make the whole marker feel clickable; children don't steal events */
.pred-marker { cursor: pointer; }
.pred-marker * { pointer-events: none; }

/* (optional) subtle hover feedback
.pred-marker:hover { transform: scale(1.05); }*/

/* solid center that stays after pulsing finishes */
.pred-core{
  position:absolute; inset:0; border-radius:999px;
  background: currentColor;
  box-shadow: 0 0 0 2px #fff;
}

/* four filled circles that scale & fade */
.pred-pulse{
  position:absolute; left:50%; top:50%;
  width:16px; height:16px; border-radius:999px;
  background: currentColor;
  opacity:0; transform: translate(-50%, -50%) scale(.5);
}

/* run the pulses only while .is-live is set */
.pred-marker.is-live .pred-pulse{
  animation: pred-scaleIn var(--dur, 4s) cubic-bezier(.36, .11, .89, .32) var(--delay, 0s) var(--iters, 10) both;
}

/* soft tail after the pulse animation ends */
.pred-marker.is-ending .pred-pulse{
  animation: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(2.1);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

/* after pulses end, we do NOT show any rest halo (only the core remains) */
.pred-green   { color:#22c55e; }
.pred-yellow  { color:#f59e0b; }
.pred-blue    { color:deepskyblue; }

@keyframes pred-scaleIn{
  from { transform: translate(-50%, -50%) scale(.5); opacity:.5; }
  to   { transform: translate(-50%, -50%) scale(2.5); opacity:0; }
}

/* MapLibre popup polish */
.maplibregl-popup { max-width: 400px; z-index: 5; }
.maplibregl-popup-content{
  padding: 12px 14px;
  border-radius: 12px;
  width:100%;
  background: var(--panel, #0f172a);
  color: var(--tag-tx, #e5e7eb);
  border: 1px solid var(--tag-br, #334155);
  box-shadow: var(--shadow, 0 18px 40px rgba(0,0,0,.35));
  line-height: 1.35;
  font: 13px/1.35 system-ui,-apple-system,Segoe UI,Roboto,Inter,sans-serif;
}
.maplibregl-popup-close-button{
  color: inherit;
  width: 24px; height: 24px;
  line-height: 24px;
  right: 6px; top: 6px;
  opacity: .8;
}
.maplibregl-popup-close-button:hover{ opacity: 1; }

/* Make the tip match the panel background for all anchors */
.maplibregl-popup-anchor-top    .maplibregl-popup-tip { border-bottom-color: var(--panel, #0f172a); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color:    var(--panel, #0f172a); }
.maplibregl-popup-anchor-left   .maplibregl-popup-tip { border-right-color:  var(--panel, #0f172a); }
.maplibregl-popup-anchor-right  .maplibregl-popup-tip { border-left-color:   var(--panel, #0f172a); }

/* Content blocks */
.pred-tip { min-width: 220px; }
.pred-tip__status{
  font-weight: 800;
  margin-bottom: 2px;
  letter-spacing: .2px;
  text-transform: none;
}
.pred-tip__place{
  font-weight: 700;
  margin-bottom: 2px;
}
.pred-tip__msg{
  font-size: 12px;
  opacity: .85;
  margin-top: 4px;
}

/* START: PULSING ICONS POPUP */
.maplibregl-popup .maplibregl-popup-content {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  max-width: none;
}

/* Tracker popup card */
.pred-tip {
  width: 350px;
  padding: 20px 24px 18px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #666666;
  z-index: 1055;
}

.pred-tip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pred-tip-title {
  font-size: 18px;
  font-weight: 600;
  color: #777777;
}

/* Status pill in top-right */
.pred-status-pill {
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
}

.pred-status-pill--active {
  background: #8bc34a;
}

.pred-status-pill--idling {
  background: #ffb74d;
}

.pred-status-pill--watching {
  background: #42a5f5;
}

.pred-tip-body {
  margin-bottom: 16px;
}

.pred-tip-line {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.4;
}

.pred-tip-line strong {
  font-weight: 600;
  color: #555555;
}

.pred-tip-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.pred-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 22px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  outline: none;
}

.pred-btn-primary {
  background: #4a7dff;
  color: #ffffff;
}

.pred-btn-primary:hover {
  background: #3b69d6;
}

.pred-btn-secondary {
  background: #ffffff;
  border: 1px solid #dee2e6;
  color: #6c757d;
}

.pred-btn-secondary:hover {
  background: #f8f9fa;
  color: #495057;
}

/* ================= MOBILE / TABLET RESPONSIVE ================= */

@media (max-width:1100px) {
  .alerts-modal .zoom-ui {
    display: none !important;
  }
}

/* Single-column Apple Maps slide-up only for narrow portrait-like mobile */
@media (max-width:1100px) and (orientation:portrait) {
  .alerts-modal{
    --mobilePanelClosedH: 28px;
    --mobilePanelPeekH: 96px;
    --mobilePanelHalfH: 45vh;
    --mobilePanelExpandedH: 80vh;
  }

  .alerts-modal .app{
    grid-template-columns:1fr;
    height:100vh;
  }

  .alerts-modal .map-wrap{
    height:100vh;
  }

  .alerts-modal aside.panel{
    position:fixed;
    left:10px;
    right:10px;
    bottom:0;
    z-index:35;
    height:var(--mobilePanelHalfH);
    min-height:var(--mobilePanelClosedH);
    max-height:var(--mobilePanelExpandedH);
    border-radius:22px 22px 0 0;
    box-shadow:0 -16px 40px rgba(0,0,0,.08);
    background:rgba(255,255,255,.76);
    backdrop-filter:saturate(140%) blur(14px);
    overflow:hidden;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    padding-bottom:env(safe-area-inset-bottom,0);
    transition:height .22s ease, box-shadow .22s ease;
  }

  .alerts-modal aside.panel[data-sheet-state="closed"]{
    height:var(--mobilePanelClosedH);
  }

  .alerts-modal aside.panel[data-sheet-state="peek"]{
    height:var(--mobilePanelPeekH);
  }

  .alerts-modal aside.panel[data-sheet-state="half"]{
    height:var(--mobilePanelHalfH);
  }

  .alerts-modal aside.panel[data-sheet-state="expanded"]{
    height:var(--mobilePanelExpandedH);
  }

  .alerts-modal .panel-inner{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
  }

  .alerts-modal .sheet-grab-zone{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 28px;
    height:28px;
    cursor:grab;
    touch-action:none;
  }

  .alerts-modal .sheet-grab-handle{
    display:block;
    width:42px;
    height:5px;
    border-radius:999px;
    background:rgba(15,23,42,.18);
  }

  .alerts-modal .panel-header{
    position:sticky;
    top:0;
    z-index:6;
    background:transparent;
    backdrop-filter:none;
  }

  .alerts-modal .ph-top{
    display:none;
  }

  .alerts-modal .tabs{
    position:sticky;
    top:0;
    z-index:7;
    justify-content:center;
    align-items:center;
    overflow-x:auto;
    flex-wrap:nowrap;
    padding:10px 16px 12px;
    scrollbar-width:none;
    background:transparent;
  }

  .alerts-modal .tabs::-webkit-scrollbar{
    display:none;
  }

  .alerts-modal .tabs .tab{
    flex:0 0 auto;
  }

  .alerts-modal .list{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    padding:8px 12px 92px;
  }

  .alerts-modal .list .card{
    margin:8px 0;
    border-radius:16px;
    padding:12px 12px 14px;
  }

  .alerts-modal aside.panel[data-sheet-state="closed"] .panel-header,
  .alerts-modal aside.panel[data-sheet-state="closed"] .list,
  .alerts-modal aside.panel[data-sheet-state="closed"] #alertsNewBadge{
    display:none;
  }

  .alerts-modal aside.panel[data-sheet-state="peek"] .list,
  .alerts-modal aside.panel[data-sheet-state="peek"] #alertsNewBadge{
    display:none;
  }

  .alerts-modal aside.panel[data-sheet-state="peek"] .tabs{
    border-bottom:0;
    padding-top:10px;
    padding-bottom:12px;
  }
}

/* Horizontal iPhone / landscape mobile: restore 2-column sidebar layout */
@media (max-width:1100px) and (orientation:landscape) {
  .alerts-modal .app{
    display:grid;
    grid-template-columns:minmax(0,1fr) 320px;
    height:100vh;
  }

  .alerts-modal .map-wrap{
    height:100vh;
  }

  .alerts-modal aside.panel{
    position:relative;
    left:auto;
    right:auto;
    bottom:auto;
    z-index:auto;
    height:100vh;
    min-height:0;
    max-height:none;
    border-radius:0;
    box-shadow:none;
    background:var(--panel);
    backdrop-filter:none;
    overflow:hidden;
    transform:none;
    padding-bottom:0;
  }

  .alerts-modal .panel-inner{
    display:flex;
    flex-direction:column;
    height:100%;
    min-height:0;
  }

  .alerts-modal .sheet-grab-zone{
    display:none;
  }

  .alerts-modal .panel-header{
    position:sticky;
    top:0;
    z-index:5;
    background:var(--panel);
    backdrop-filter:none;
  }

  .alerts-modal .ph-top{
    display:flex;
  }

  .alerts-modal .tabs{
    position:sticky;
    top:0;
    z-index:6;
    justify-content:flex-start;
    align-items:center;
    overflow-x:auto;
    flex-wrap:nowrap;
    padding:12px 18px;
    background:var(--panel);
  }

  .alerts-modal .tabs .tab{
    flex:0 0 auto;
  }

  .alerts-modal .list{
    flex:1;
    min-height:0;
    overflow:auto;
    padding:14px 12px 18px 18px;
  }
}

.map-mobile-logo {
  display: none;
}

.map-mobile-info-panel {
  display: none;
}

@media (max-width:1100px) {
  .alerts-modal .zoom-ui {
    display: none !important;
  }

  .alerts-modal .map-mobile-logo {
    display: flex;
    position: absolute;
    top: 30px;
    left: 20px;
    z-index: 2;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
  }

  .alerts-modal .map-mobile-logo img {
    display: block;
    max-width: 150px;
    width: auto;
    height: auto;
    max-height: 42px;
    pointer-events: auto;
  }

  /* hide original tracker block on mobile */
  .alerts-modal .pred-ctl {
    display: none;
  }

  /* horizontal counts panel */
  .alerts-modal .map-mobile-info-panel {
    display: block;
    position: absolute;
    top: 25px;
    right: 20px;
    z-index: 2;
  }

  .alerts-modal .map-mobile-info-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 6px 16px rgba(0,0,0,.012);
    font-weight: 600;
  }

  .alerts-modal .map-mobile-info-inner .pred-count {
    display: inline-block;
    min-width: 1.6ch;
    text-align: center;
    line-height: 1;
  }

  .alerts-modal .map-mobile-info-inner .pred-sep {
    opacity: .5;
  }
}

/* =========================== END: ALERTS MAP ===================== */