/* ==========================================================================
   30b. Weather Alert Live Page
   ========================================================================== */

/* Live badge */
.weather-live-badge {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: var(--space-sm);
  animation: weather-live-pulse 2s ease-in-out infinite;
}
@keyframes weather-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Meta (dates) */
.weather-live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  font-size: 0.8125rem;
  color: var(--color-gray-dark, #555);
  margin-bottom: var(--space-md);
}
.weather-live-meta i {
  margin-right: 4px;
  opacity: 0.6;
}
.weather-live-meta__updated {
  opacity: 0.75;
}

/* Summary bar */
.weather-live-summary {
  background: var(--color-bg-light, #f8f8f8);
  border-radius: var(--radius-md, 4px);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  color: var(--color-gray-dark, #555);
}
.weather-live-summary strong { color: var(--color-text, #1a1a1a); }
.weather-live-summary__updated {
  font-size: 0.75rem;
  color: var(--color-gray-mid, #888);
  margin-top: var(--space-xs);
}

/* Hero map (interactive Leaflet) */
#weather-live-map {
  width: 100%;
  height: 450px;
  border-radius: var(--radius-md, 4px);
  margin-bottom: var(--space-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
}
@media (max-width: 767px) {
  #weather-live-map { height: 300px; }
}

/* Map legend */
.weather-map-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  display: flex;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.weather-map-legend__item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #333;
}
.weather-map-legend__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Mobile: alert detail cards stay above article body; signup form drops below */
@media (max-width: 991px) {
  .content-grid:has(.weather-live-article) > main,
  .content-grid:has(.weather-live-article) > main > .weather-live-article,
  .weather-live-sidebar {
    display: contents;
  }
  .weather-live-badge { order: 1; }
  .content-grid:has(.weather-live-article) .entry-title { order: 2; }
  .weather-live-meta { order: 3; }
  #weather-live-map { order: 4; }
  .weather-live-sidebar > .weather-alert-card { order: 5; }
  .weather-live-content { order: 6; }
  .weather-live-sidebar > .widget--alerts-weather { order: 7; }
  .weather-live-disclaimer { order: 8; }
}

/* Live content area */
.weather-live-content {
  position: relative;
  padding-left: 32px;
}
.weather-live-content::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ddd;
}

/* Entry block — flush, no card background */
.weather-live-entry {
  position: relative;
  margin-bottom: var(--space-lg);
}
.weather-live-entry::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary, #1E5B70);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #ddd;
}
.weather-live-entry--issued::before { background: #dc2626; }
.weather-live-entry--expired::before { background: #22c55e; }
.weather-live-entry--updated::before { background: #f97316; }

/* Entry header — no background */
.weather-live-entry__header {
  padding: var(--space-sm) 0;
}

/* Entry timestamp */
.weather-live-entry__time {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-gray-mid, #888);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Change label */
.weather-live-entry__change {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary, #1E5B70);
  margin-top: 2px;
}
.weather-live-entry__change--issued { color: #dc2626; }
.weather-live-entry__change--expired { color: #22c55e; }
.weather-live-entry__change--updated { color: #f97316; }

/* Badge — inline label for related/photo types */
.weather-live-entry__badge {
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-block;
  margin-left: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.weather-live-entry__badge--related { color: var(--color-primary, #1E5B70); }

/* Card wrapper — groups map + caption + body with rounded corners */
.weather-live-entry__card {
  border-radius: var(--radius-md, 4px);
  overflow: hidden;
  background: #fff;
}

/* White body */
.weather-live-entry__body {
  background: #fff;
  padding: var(--space-md);
  border-radius: var(--radius-md, 4px);
}
.weather-live-entry__card .weather-live-entry__body {
  border-radius: 0;
}

/* Narrative text */
.weather-live-entry__narrative {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text, #333);
}
.weather-live-entry__narrative p {
  margin-bottom: var(--space-sm);
}
.weather-live-entry__narrative p:last-child {
  margin-bottom: 0;
}

/* Map images */
.weather-live-entry__map {
  width: 100%;
  display: block;
}
.weather-live-entry__caption {
  font-size: 0.6875rem;
  color: var(--color-gray-mid, #888);
  padding: var(--space-xs) var(--space-md);
}

/* Expandable NWS source */
.weather-live-entry__nws-source {
  margin-top: var(--space-sm);
}
.weather-live-entry__nws-toggle {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--color-gray-mid, #888);
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  display: block;
}
.weather-live-entry__nws-toggle:hover { color: var(--color-primary, #1E5B70); }
.weather-live-entry__nws-content {
  display: none;
  margin-top: var(--space-xs);
  padding: var(--space-sm);
  background: var(--color-bg-light, #f8f8f8);
  border-radius: var(--radius-sm, 3px);
  font-size: 0.75rem;
  line-height: 1.6;
  color: #666;
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}
.weather-live-entry__nws-content.open { display: block; }

/* Inline signup card in timeline */
.weather-live-entry--signup::before { background: var(--color-primary, #1E5B70); }
.weather-signup-inline {
  background: linear-gradient(160deg, #1a5060 0%, #143d4d 100%);
  border-radius: var(--radius-md, 4px);
  padding: var(--space-md);
  color: #fff;
}
.weather-signup-inline__desc {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
  margin-bottom: var(--space-md);
}
.weather-signup-inline__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.weather-signup-inline__row {
  display: flex;
  gap: var(--space-sm);
}
.weather-signup-inline__input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm, 3px);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: var(--font-family);
  font-size: 0.875rem;
}
.weather-signup-inline__input::placeholder { color: rgba(255,255,255,0.5); }
.weather-signup-inline__input:focus { outline: none; border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.15); }
.weather-signup-inline__input--zip { max-width: 80px; flex: 0 0 80px; }
.weather-signup-inline__submit {
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-cta-newsletter, #C7392A);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm, 3px);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.weather-signup-inline__submit:hover { background: var(--color-cta-newsletter-hover, #A82E1F); }
@media (max-width: 767px) {
  .weather-signup-inline__row { flex-direction: column; }
  .weather-signup-inline__input--zip { max-width: 100%; flex: 1; }
}

/* Disclaimer */
.weather-live-disclaimer {
  font-size: 0.75rem;
  color: #999;
  margin-top: var(--space-xl);
}
.weather-live-disclaimer a { color: #888; }

@media (max-width: 767px) {
  .weather-live-content { padding-left: 24px; }
  .weather-live-content::before { left: 7px; }
  .weather-live-entry::before { left: -20px; top: 10px; width: 8px; height: 8px; }
  .weather-live-entry__narrative { font-size: 0.875rem; }
}

/* Alert detail sidebar cards — compact */

.weather-alert-card {
  background: #fff;
  border-radius: var(--radius-md, 4px);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left: 4px solid var(--color-gray-mid, #888);
}
/* Event-type colors — match the map polygon colors */
.weather-alert-card--tornado { border-left-color: #ff00ff; }
.weather-alert-card--warning { border-left-color: #dc2626; }
.weather-alert-card--watch { border-left-color: #facc15; }
.weather-alert-card--advisory { border-left-color: #f97316; }
.weather-alert-card--clear { border-left-color: #22c55e; }

.weather-alert-card__event {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin-bottom: var(--space-xs);
}

.weather-alert-card__details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px var(--space-sm);
  font-size: 0.75rem;
  margin-bottom: var(--space-xs);
}
.weather-alert-card__details dt {
  font-weight: 600;
  color: var(--color-gray-dark, #555);
}
.weather-alert-card__details dd {
  color: var(--color-text, #333);
  margin: 0;
}

.weather-alert-card__description {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text, #222);
  margin-top: var(--space-xs);
}
.weather-alert-card__description p { margin: 0 0 var(--space-xs); }
.weather-alert-card__description p:last-child { margin-bottom: 0; }

.weather-alert-card__safety {
  font-size: 0.75rem;
  color: var(--color-gray-dark, #555);
  border-top: 1px solid #eee;
  padding-top: var(--space-xs);
  margin-top: var(--space-xs);
}
.weather-alert-card__safety strong {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #dc2626;
  margin-bottom: 2px;
}
.weather-alert-card__safety p {
  margin: 0;
  line-height: 1.4;
}

.weather-live-sidebar__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Related coverage inline cards */
.weather-live-entry--related::before { background: var(--color-primary, #1E5B70); }
.weather-live-entry--related { max-width: 440px; }
a.weather-related__card,
a.weather-related__card:hover {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md, 4px) var(--radius-md, 4px) 0 0;
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}
.weather-related__card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.weather-related__card:hover .weather-related__title {
  color: var(--color-primary, #1E5B70);
}
.weather-related__thumb img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}
.weather-related__body {
  background: #fff;
  padding: var(--space-md);
}
.weather-related__title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  line-height: 1.3;
}
.weather-related__excerpt {
  font-size: 0.8125rem;
  color: var(--color-gray-dark, #555);
  margin: 0;
  line-height: 1.4;
}
@media (max-width: 767px) {
  .weather-live-entry--related { max-width: 100%; }
  .weather-related__thumb img { max-height: 180px; }
}

/* Figure captions for map images */
.weather-live-entry__figure {
  margin: var(--space-sm) 0;
}
.weather-live-entry__figure figcaption {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--color-gray-mid, #888);
  margin-top: 4px;
}

/* Kill all HRs in live content */
.weather-live-content hr { display: none; }


