/* ── Alert filter controls ── */
.filter-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.filter-actions button {
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.filter-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.filter-summary {
  margin: 10px 0 12px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.alert-filter-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.alert-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alert-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}

.alert-filter-label input {
  accent-color: #38bdf8;
}

.alert-filter-name {
  overflow-wrap: anywhere;
}

.alert-filter-count {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1e293b;
  color: #cbd5e1;
  text-align: center;
  font-size: 0.84rem;
}

/* ── Severity swatches ── */
.legend {
  display: grid;
  gap: 8px;
}

.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
}

.extreme { background: #dc2626; }
.severe { background: #f97316; }
.moderate { background: #facc15; }
.minor { background: #38bdf8; }

/* ── Tornado threat badge ── */
.tornado-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(220, 38, 38, 0.55), 0 1px 4px rgba(0, 0, 0, 0.4);
  text-align: center;
  white-space: nowrap;
  animation: badge-pulse 1.5s ease-in-out infinite;
  pointer-events: auto;
  cursor: pointer;
}
.tornado-badge.hidden {
  display: none;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; box-shadow: 0 2px 20px rgba(220, 38, 38, 0.8), 0 1px 4px rgba(0, 0, 0, 0.4); }
}

/* ── Tornado badge dropdown ── */
.tornado-badge-dropdown {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  background: #fff;
  color: #1e293b;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  padding: 12px 16px;
  max-width: 380px;
  width: max-content;
  font-size: 0.85rem;
  line-height: 1.5;
}
.tornado-badge-dropdown.hidden {
  display: none;
}

/* ── Certainty "Observed" blink ── */
.certainty-observed {
  color: #dc2626;
  animation: certainty-blink 1s ease-in-out infinite;
}
@keyframes certainty-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

