/* Pogodynka.eu PRO – Tornado map */
.tornado{padding:16px}
.tornado__top{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px}
.tornado__title{font-size:22px;line-height:1.1;margin:0}
.tornado__sub{margin:6px 0 0;color:var(--muted,#9aa3af);max-width:820px}
.tornado__status{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

.statuspill{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12)}
.statuspill--muted{opacity:.85}
.statuspill__dot{width:10px;height:10px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,.15)}
.statuspill.ok .statuspill__dot{background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.15)}
.statuspill.warn .statuspill__dot{background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.15)}
.statuspill__label{font-weight:700}
.statuspill__meta{font-size:12px;color:var(--muted,#9aa3af)}

.tornado__body{display:grid;grid-template-columns:1fr 360px;gap:12px;align-items:stretch}
.tornado__map{height:min(72vh,760px);border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.12);position:relative}
.tornado__panel .panel{height:min(72vh,760px);border-radius:16px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);backdrop-filter:blur(10px);display:flex;flex-direction:column;overflow:auto}
.tornado__panel .panel::-webkit-scrollbar{width:10px}
.tornado__panel .panel::-webkit-scrollbar-track{background:rgba(255,255,255,.04)}
.tornado__panel .panel::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:10px}
.tornado__panel .panel::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.22)}

.panel__head{padding:12px 12px 0}
.panel__title{margin:0 0 8px;font-size:15px}
.panel__toggles{display:flex;flex-direction:column;gap:8px}
.toggle{display:flex;gap:10px;align-items:center;font-size:14px;color:#e5e7eb}
.toggle input{width:16px;height:16px}

.panel__filters{padding:12px;border-top:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08);display:grid;gap:10px}
.field label{display:block;font-size:12px;color:var(--muted,#9aa3af);margin-bottom:6px}
.field select,.field input{width:100%;padding:10px 10px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.18);color:#e5e7eb;outline:none}
.field input::placeholder{color:rgba(229,231,235,.5)}

.panel__actions{display:flex;gap:8px}
.btn{flex:1;padding:10px 10px;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(59,130,246,.22);color:#e5e7eb;font-weight:700;cursor:pointer}
.btn--ghost{background:rgba(255,255,255,.06)}
.btn:hover{filter:brightness(1.05)}

.hint{font-size:12px;color:var(--muted,#9aa3af);line-height:1.35}
.panel__listwrap{flex:1;display:flex;flex-direction:column;min-height:0}
.panel__listhead{display:flex;align-items:center;justify-content:space-between;padding:10px 12px}
.panel__listtitle{font-weight:800}
.panel__count{font-size:12px;color:var(--muted,#9aa3af)}

.list{flex:1;overflow:auto;padding:0 6px 10px}
.item{display:flex;gap:10px;align-items:flex-start;padding:10px;border-radius:14px;border:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.18);margin:0 6px 8px;cursor:pointer}
.item:hover{border-color:rgba(255,255,255,.16)}
.badge{min-width:58px;text-align:center;font-size:12px;font-weight:900;padding:6px 8px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10)}
.badge.warn{background:rgba(239,68,68,.18);border-color:rgba(239,68,68,.25)}
.badge.watch{background:rgba(245,158,11,.18);border-color:rgba(245,158,11,.25)}
.badge.report{background:rgba(34,197,94,.16);border-color:rgba(34,197,94,.22)}
.item__title{font-weight:800;margin:0 0 2px}
.item__meta{font-size:12px;color:var(--muted,#9aa3af);line-height:1.3}
.panel__foot{padding:10px 12px;border-top:1px solid rgba(255,255,255,.08)}
.footrow{display:flex;gap:10px;align-items:center;font-size:12px;color:#e5e7eb;flex-wrap:wrap;margin-bottom:6px}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%}
.dot--warn{background:#ef4444}
.dot--watch{background:#f59e0b}
.dot--report{background:#22c55e}
.small{font-size:11px;color:var(--muted,#9aa3af);line-height:1.3}

@media (max-width: 980px){
  .tornado__body{grid-template-columns:1fr;gap:10px}
  .tornado__map{height:56vh}
  .tornado__panel .panel{height:auto;max-height:none}
  .panel__listwrap{max-height:44vh}
}


.panel__hr{border:0;border-top:1px solid rgba(255,255,255,.10);margin:4px 0 2px}
.subfield{display:grid;gap:6px;margin:0 0 6px}
.subfield label{display:block;font-size:12px;color:var(--muted,#9aa3af)}
.subfield select{width:100%;padding:9px 10px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.18);color:#e5e7eb;outline:none}


.badge.outlook{background:rgba(148,163,184,.16);border-color:rgba(148,163,184,.25)}
.badge.hurrw{background:rgba(168,85,247,.16);border-color:rgba(168,85,247,.25)}
.badge.hurrwa{background:rgba(59,130,246,.16);border-color:rgba(59,130,246,.25)}
.badge.tropw{background:rgba(6,182,212,.14);border-color:rgba(6,182,212,.22)}
.badge.tropwa{background:rgba(14,165,233,.14);border-color:rgba(14,165,233,.22)}
.badge.surgew{background:rgba(234,179,8,.14);border-color:rgba(234,179,8,.22)}
.badge.surgewa{background:rgba(251,191,36,.14);border-color:rgba(251,191,36,.22)}


/* -----------------------
   Legend (PRO)
------------------------ */
.tornado-legend{
  position:relative;
  left:auto;
  bottom:auto;
  width:100%;
  max-width:100%;
  z-index:2;
  border-radius:18px;
  padding:0;
  color:rgba(255,255,255,.92);
  background:transparent;
  border:none;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}


.tornado-legend:before{content:none;}

.tornado-legend *{position:relative}

.tornado-legend .legend-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.tornado-legend .legend-titlebar{display:flex;flex-direction:column;gap:2px}
.tornado-legend .legend-title{font-weight:700;font-size:13px;letter-spacing:.2px}
.tornado-legend .legend-sub{font-size:11px;opacity:.72}

.tornado-legend .legend-actions{display:flex;align-items:center;gap:8px}

.legend-btn{
  appearance:none;border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:#fff;
  height:28px;width:28px;
  border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;
}
.legend-btn:hover{background:rgba(255,255,255,.10)}
.legend-btn:active{transform:translateY(1px)}
.legend-btn--info{font-weight:800;font-size:13px;line-height:1;position:relative}

.legend-tooltip{
  display:none;
  position:absolute;
  right:0; top:34px;
  width:250px;
  background:rgba(10,16,30,.94);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 18px 45px rgba(0,0,0,.55);
  border-radius:12px;
  padding:10px 12px;
  font-size:12px;
  line-height:1.35;
  color:rgba(255,255,255,.92);
}
.legend-btn--info:hover .legend-tooltip,
.legend-btn--info:focus-within .legend-tooltip{display:block}

.legend-btn--toggle .chev{display:inline-block;transition:transform .18s ease}

.tornado-legend.is-collapsed .legend-body{display:none}
.tornado-legend.is-collapsed .legend-btn--toggle .chev{transform:rotate(-90deg)}

.tornado-legend .legend-section{margin-top:10px}
.tornado-legend .legend-section-title{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.35px;
  opacity:.72;
  margin-bottom:6px;
}

.tornado-legend .legend-item{
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px 0;
  font-size:12px;
  line-height:1.2;
}
.tornado-legend .legend-item .desc{opacity:.82}

.tornado-legend .box{
  width:12px;height:12px;border-radius:4px;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 0 0 1px rgba(0,0,0,.18) inset;
  flex:0 0 auto;
}
.tornado-legend .count{
  margin-left:auto;
  min-width:28px;
  text-align:right;
  font-variant-numeric: tabular-nums;
  color:rgba(255,255,255,.86);
  opacity:.9;
}

/* SPC Outlook colors (must match OUTLOOK_COLORS in JS) */
.tornado-legend .tstm{background:#bdffbd}
.tornado-legend .mrgl{background:#73b273}
.tornado-legend .slgt{background:#f7f78f}
.tornado-legend .enh{background:#e69800}
.tornado-legend .mdt{background:#ff0000}
.tornado-legend .high{background:#ff00c5}

/* NOAA alert colors */
.tornado-legend .warning{background:#ef4444}
.tornado-legend .watch{background:#f59e0b}
.tornado-legend .hurricane{background:#7c3aed}
.tornado-legend .hurricane-watch{background:#a78bfa}
.tornado-legend .tropical{background:#0ea5e9}
.tornado-legend .tropical-watch{background:#7dd3fc}
.tornado-legend .surge{background:#14b8a6}
.tornado-legend .surge-watch{background:#5eead4}

/* Pulse indicator when active */
@keyframes proPulse {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55), 0 0 0 1px rgba(0,0,0,.18) inset; }
  70%{ box-shadow: 0 0 0 10px rgba(239,68,68,0), 0 0 0 1px rgba(0,0,0,.18) inset; }
  100%{ box-shadow: 0 0 0 0 rgba(239,68,68,0), 0 0 0 1px rgba(0,0,0,.18) inset; }
}
.tornado-legend .box.pulse{animation:proPulse 1.4s ease-out infinite}

/* Footer */
.tornado-legend .legend-foot{
  margin-top:10px;
  font-size:11px;
  opacity:.78;
  display:flex;
  align-items:center;
  gap:8px;
}
.tornado-legend .dot{
  width:8px;height:8px;border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 6px rgba(34,197,94,.12);
}

/* Mobile */
@media (max-width: 820px){
  .tornado-legend{left:10px;bottom:10px;width:min(320px, calc(100% - 20px));}
}

/* === PRO Premium Popup === */
.leaflet-popup.tp-popup .leaflet-popup-content-wrapper {
  border-radius: 18px;
  padding: 0;
  background: transparent;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}

.tp-card{
  min-width: 260px;
  max-width: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 25, 45, .92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
}

.tp-head{
  display:flex;
  gap:12px;
  padding: 14px 14px 12px 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tp-accent) 35%, transparent), rgba(255,255,255,.04));
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
}

.tp-head::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width: 4px;
  background: var(--tp-accent);
}

.tp-ico{
  width:40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  font-size: 22px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.tp-title{ font-weight: 900; font-size: 16px; line-height:1.15; }
.tp-sub{ margin-top: 3px; font-size: 12px; opacity:.82; }

.tp-risk{ margin: 12px 14px 6px 14px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.10); overflow:hidden; }
.tp-risk__bar{ height:100%; border-radius:999px; background: var(--tp-accent); box-shadow: 0 0 18px color-mix(in srgb, var(--tp-accent) 55%, transparent); }
.tp-risk__meta{ margin: 0 14px 8px 14px; font-size: 12px; opacity:.9; }

.tp-desc{
  margin: 0 14px 12px 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255,255,255,.92);
}

.tp-grid{ padding: 0 14px 12px 14px; }
.tp-row{ display:flex; justify-content:space-between; gap:10px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.10); }
.tp-row:last-child{ border-bottom: none; }
.tp-k{ font-size:12px; opacity:.78; }
.tp-v{ font-size:12px; font-weight: 600; text-align:right; opacity:.95; }

.tp-foot{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding: 10px 14px 12px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  color: rgba(255,255,255,.65);
}

.tp-pulse::after{
  content:"";
  position:absolute;
  right: 14px;
  top: 14px;
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--tp-accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--tp-accent) 50%, transparent);
  animation: tpPulse 1.4s infinite;
}
@keyframes tpPulse{
  0%{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--tp-accent) 55%, transparent); opacity: 1; }
  70%{ box-shadow: 0 0 0 14px rgba(0,0,0,0); opacity: .8; }
  100%{ box-shadow: 0 0 0 0 rgba(0,0,0,0); opacity: 1; }
}


/* Legend in right panel (PRO) */
.legend-acc{
  margin:12px 0 6px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(18,28,52,.72), rgba(10,16,30,.66));
  box-shadow:0 12px 34px rgba(0,0,0,.28);
}
.legend-acc__sum{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px;
  cursor:pointer;
}
.legend-acc__sum::-webkit-details-marker{display:none;}
.legend-acc__left{display:flex;flex-direction:column;gap:2px;min-width:0;}
.legend-acc__title{font-weight:800;letter-spacing:.2px;}
.legend-acc__sub{font-size:12px;color:rgba(255,255,255,.7);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

.legend-mini{
  width:34px;height:34px;border-radius:12px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.9);
  display:grid;place-items:center;
}
details[open] .legend-mini{transform:rotate(180deg);}

.legend-card{padding:12px 12px 14px;max-height:420px;overflow:auto;}

/* subtle scrollbar */
.legend-card::-webkit-scrollbar{width:10px;}
.legend-card::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:999px;border:3px solid rgba(0,0,0,0);background-clip:padding-box;}
.legend-card::-webkit-scrollbar-track{background:rgba(255,255,255,.05);border-radius:999px;}
.legend-section + .legend-section{margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.10);}
.legend-h{font-weight:800;margin-bottom:6px;}
.legend-p{font-size:13px;color:rgba(255,255,255,.78);line-height:1.35;margin-bottom:10px;}
.legend-list{display:flex;flex-direction:column;gap:8px;}
.legend-row{display:flex;align-items:center;gap:10px;font-size:13px;}
.legend-row b{font-weight:800;}
.legend-note{margin-top:10px;font-size:12px;color:rgba(255,255,255,.68);}

.sw{width:12px;height:12px;border-radius:4px;display:inline-block;box-shadow:0 0 0 1px rgba(255,255,255,.14) inset;}
.sw--tstm{background:#8bc34a;}
.sw--mrgl{background:#4caf50;}
.sw--slgt{background:#ffeb3b;}
.sw--enh{background:#ff9800;}
.sw--mdt{background:#f44336;}
.sw--high{background:#e91e63;}

.sw--warn{background:#e53935;}
.sw--watch{background:#ff9800;}
.sw--hurr-warn{background:#6a1b9a;}
.sw--hurr-watch{background:#8e24aa;}
.sw--ts-warn{background:#039be5;}
.sw--ts-watch{background:#29b6f6;}
.sw--ss-warn{background:#00acc1;}
.sw--ss-watch{background:#26c6da;}

.cnt{
  margin-left:auto;
  font-variant-numeric: tabular-nums;
  font-weight:800;
  color:rgba(255,255,255,.9);
}
.legend-foot{margin-top:10px;font-size:12px;color:rgba(255,255,255,.7);display:flex;align-items:center;gap:8px;}
.dot.live{width:8px;height:8px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.18);display:inline-block;}

/* Map loading overlay */
.map-loading{
  position:absolute;
  inset:12px;
  z-index:900;
  border-radius:18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:linear-gradient(180deg, rgba(10,16,30,.72), rgba(10,16,30,.55));
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color:rgba(255,255,255,.92);
}
.map-loading.is-hidden{display:none;}
.ml-spinner{
  width:34px;height:34px;border-radius:999px;
  border:3px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,255,255,.85);
  animation:spin 0.9s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.ml-title{font-weight:900;letter-spacing:.2px;}
.ml-sub{font-size:13px;color:rgba(255,255,255,.75);text-align:center;max-width:360px;line-height:1.35;}

/* Animated tornado report icon */
.tw-report{
  width:26px;height:26px;border-radius:999px;
  display:grid;place-items:center;
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 10px 25px rgba(0,0,0,.35);
  font-size:18px;
  animation: twSpin 1.8s linear infinite;
}
@keyframes twSpin{to{transform:rotate(360deg)}}
/* Report age colors */
.tw-age-new .tw-report{
  background:rgba(239,68,68,.35);
  border-color:rgba(239,68,68,.75);
  box-shadow:0 0 0 3px rgba(239,68,68,.18), 0 12px 28px rgba(0,0,0,.45);
}
.tw-age-new .tw-svg{filter: drop-shadow(0 0 10px rgba(239,68,68,.65));}
.tw-age-old .tw-report{
  background:rgba(0,0,0,.55);
  border-color:rgba(0,0,0,.85);
  box-shadow:0 0 0 2px rgba(0,0,0,.35), 0 10px 24px rgba(0,0,0,.45);
}
.tw-age-old .tw-svg{opacity:.95}



/* === PRO layout hardening (override possible global styles) === */
.tornado .tornado__body{display:grid !important;grid-template-columns:1fr 360px !important;gap:12px !important;align-items:stretch !important;}
.tornado #map.tornado__map{height:min(72vh,760px) !important;min-height:420px !important;}
@media (max-width: 980px){
  .tornado .tornado__body{grid-template-columns:1fr !important;}
  .tornado #map.tornado__map{min-height:360px !important;}
}

/* === Sytuacja teraz (kolorowy panel) === */
.tstat{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(18,28,52,.72), rgba(10,16,30,.66));
  box-shadow:0 12px 34px rgba(0,0,0,.28);
  padding:12px;
  margin-bottom:12px;
}
.tstat__title{font-weight:900;letter-spacing:.2px;}
.tstat__sub{margin-top:2px;font-size:12px;color:rgba(255,255,255,.7)}
.tstat__grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
@media (max-width: 980px){
  .tstat__grid{grid-template-columns:1fr}
}
.pill{
  min-width:0;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 12px;border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
}
.pill__k{font-weight:800;font-size:13px;white-space:normal;line-height:1.15;min-width:0;max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.pill__v{font-weight:900;font-size:16px;min-width:28px;text-align:right}
.pill--warn{background:linear-gradient(90deg, rgba(255,55,55,.32), rgba(255,255,255,.06));}
.pill--watch{background:linear-gradient(90deg, rgba(255,157,0,.30), rgba(255,255,255,.06));}
.pill--report{background:linear-gradient(90deg, rgba(165,55,255,.30), rgba(255,255,255,.06));}
.pill--other{background:linear-gradient(90deg, rgba(70,160,255,.30), rgba(255,255,255,.06));}


/* Popup badges (NOWE / ARCHIWUM) */
.tw-badge{
  display:inline-flex;align-items:center;
  padding:3px 8px;border-radius:999px;
  font-size:11px;font-weight:900;letter-spacing:.02em;
  border:1px solid rgba(255,255,255,.14);
}
.tw-badge--new{background:rgba(239,68,68,.18);color:#fecaca;border-color:rgba(239,68,68,.35)}
.tw-badge--old{background:rgba(0,0,0,.22);color:#e5e7eb;border-color:rgba(0,0,0,.35)}
.muted{opacity:.75}


/* Reports age legend */
.panel__note{
  margin:-2px 0 10px 0;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  font-size:12px;
  line-height:1.25;
  color:rgba(255,255,255,.86);
}
.panel__note .sep{opacity:.6;margin:0 6px}
.dot{display:inline-block;width:10px;height:10px;border-radius:999px;vertical-align:middle;margin-right:6px}
.dot--new{background:rgba(239,68,68,.85);box-shadow:0 0 0 4px rgba(239,68,68,.18)}
.dot--old{background:rgba(0,0,0,.55);box-shadow:0 0 0 4px rgba(0,0,0,.18)}