/* ================================
   SOURCE SANS 3 – METRIC MATCH FALLBACK
   ================================ */

@font-face {
  font-family: "Source Sans 3 Fallback";
  src: local("Arial");
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 104%;
}

/* ================================
   SOURCE SANS 3 — SELF HOSTED
   ================================ */

@font-face {
  font-family: "Source Sans 3";
  src: url("./fonts/SourceSans3-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("./fonts/SourceSans3-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("./fonts/SourceSans3-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("./fonts/SourceSans3-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("./fonts/SourceSans3-Italic-VariableFont_wght.woff2") format("woff2");
  font-style: italic;
  font-display: block;
}

/* ✅ SAFE FONT FORCE – WEATHER ALERT SYSTEM ONLY */
.weather-alerts,
.weather-alerts-ticker,
#weather-alert-modal-1 {
  font-family:
  "Source Sans 3",
  system-ui,
  -apple-system,
  BlinkMacSystemFont,
  "Segoe UI",
  Arial,
  sans-serif !important;
  letter-spacing: 0 !important;
}

/* Inherit font inside components without attacking layout */
.weather-alerts *,
.weather-alerts-ticker *,
#weather-alert-modal-1 * {
  font-family: inherit !important;
}

/* ================================
   WEATHER ALERTS – MAIN CONTAINER
   ================================ */

.weather-alerts {
  font-size: 16px;
  line-height: 1.4;
  color: #111;
}

.weather-alerts .weather-alerts-last-updated {
  font-size: 14px;
  color: #555;
}

/* ================================
   TABLE LAYOUT
   ================================ */

.weather-alerts-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px 10px;
}

.weather-alerts-table td {
  vertical-align: top;
  padding: 6px 8px;
}

.weather-alerts-table td.county {
  font-weight: 700;
  white-space: nowrap;
  color: #222;
  padding-right: 10px;
}

.weather-alerts-table td.alerts {
  padding-left: 6px;
}

.weather-alerts-table td.alerts em {
  color: #666;
}

/* ================================
   ALERT SUMMARY BLOCKS
   ================================ */

.alert-summary {
  display: block;
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: box-shadow .2s ease, transform .06s ease;
  color: #111;
}

.alert-summary:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.alert-summary:active {
  transform: translateY(1px);
}

.alert-summary.active {
  box-shadow: 0 2px 10px rgba(0,0,0,.16);
}

/* Details */
.alert-details {
  display: none;
  margin-top: 8px;
  background: rgba(255,255,255,.6);
  border-radius: 5px;
  padding: 8px 10px;
}

/* ================================
   CONDENSED ALERT TICKER BAR
   ================================ */

.weather-alerts-ticker {
  display: flex !important;
  align-items: center !important;
  background: #b30000 !important;
  color: #ffffff !important;
  font-size: 23px !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  padding: 12px 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.weather-alerts-ticker .ticker-label {
  display: flex !important;
  align-items: center !important;
  background: #8f0000 !important;
  color: #fff !important;
  padding: 8px 14px !important;
  margin-right: 16px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.weather-alerts-ticker .ticker-slider {
  flex: 1 !important;
  position: relative !important;
  overflow: hidden !important;
  height: 28px !important;
}

.weather-alerts-ticker .ticker-slide {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  opacity: 0 !important;
  transition: opacity 0.4s ease !important;
  color: #fff !important;
  font-size: 23px !important;
  font-weight: 800 !important;
}

.weather-alerts-ticker .ticker-slide.active {
  opacity: 1 !important;
}

.weather-alerts-ticker .ticker-arrows {
  display: flex !important;
  align-items: center !important;
  margin-left: 16px !important;
  font-size: 29px !important;
  font-weight: 900 !important;
}

/* ================================
   MODAL FIXES
   ================================ */

#weather-alert-modal-1 {
  font-size: 18px !important;
  line-height: 1.6 !important;
}

#weather-alert-modal-1 > div > div {
  overflow: visible !important;
  max-height: none !important;
  margin-top: 0 !important;
}

#weather-alert-modal-1 strong {
  font-weight: 800 !important;
}

/* ================================
   🔒 HARD SCOPE LOCK — THIS FIXES EVERYTHING
   ================================ */

.weather-alerts,
.weather-alerts *,
.weather-alerts-ticker,
.weather-alerts-ticker *,
#weather-alert-modal-1,
#weather-alert-modal-1 * {
  text-align: unset !important;
}

.weather-alerts-wrapper,
.wa-announcement-context {
  margin-bottom: 0;
}

.weather-alerts-wrapper { z-index: 9999; }
.wa-announcement-context { z-index: 9998; }

.wa-alert-bar {
  line-height: 1.25;
  padding-top: 8px;
  padding-bottom: 8px;
}