/*
 * Flood warning area pages — shared by the English page (flood-area.php) and the Scottish
 * one (includes/sepa-area-view.php). Extracted from flood-area.php's inline <style> on
 * 2026-09-15 so the two nations cannot drift apart visually; the rules are unchanged.
 */
.area-page { max-width: 1000px; margin: 0 auto; padding: 0 1rem 2rem; }
.back-link { display: inline-block; margin: 1rem 0; color: #667eea; text-decoration: none; font-weight: 500; }
.back-link:hover { text-decoration: underline; }

.area-hero { color: white; padding: 2rem; border-radius: 12px; margin-bottom: 1.5rem; }
.area-hero.level-none { background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); }
.area-hero.level-alert { background: linear-gradient(135deg, #f39c12 0%, #d68910 100%); }
.area-hero.level-warning { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.area-hero.level-severe { background: linear-gradient(135deg, #8b0000 0%, #5c0000 100%); }
.area-hero h1 { margin: 0 0 0.5rem 0; font-size: 1.6rem; }
.area-hero .meta { opacity: 0.9; font-size: 0.95rem; line-height: 1.6; }
.area-hero .meta span { margin-right: 1rem; }

.warning-banner { padding: 1.25rem 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; border-left: 5px solid; }
.warning-banner.severe { background: #fff0f0; border-left-color: #8b0000; }
.warning-banner.warning { background: #fff5f5; border-left-color: #e74c3c; }
.warning-banner.alert { background: #fffbf0; border-left-color: #f39c12; }
.warning-banner h3 { margin: 0 0 0.5rem 0; display: flex; align-items: center; gap: 0.5rem; }
.warning-banner .badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: bold; color: white; }
.warning-banner .badge.severe { background: #8b0000; }
.warning-banner .badge.warning { background: #e74c3c; }
.warning-banner .badge.alert { background: #f39c12; }
.warning-banner .warn-meta { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; }
.warning-banner .warn-message { color: #333; line-height: 1.6; font-size: 0.95rem; }

.section-panel { background: white; padding: 1.5rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 1.5rem; }
.section-panel h2 { margin: 0 0 1rem 0; font-size: 1.2rem; color: #2c3e50; }

.station-list { display: grid; gap: 0.75rem; }
.station-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; background: #f8f9fa; border-radius: 8px; text-decoration: none; color: inherit; transition: background 0.2s; }
.station-item:hover { background: #eef0f5; }
.station-info { flex: 1; }
.station-info .name { font-weight: 600; color: #2c3e50; }
.station-info .detail { font-size: 0.85rem; color: #666; margin-top: 0.15rem; }
.station-level { text-align: right; flex-shrink: 0; }
.station-level .value { font-size: 1.1rem; font-weight: 700; }
.station-level .value.danger { color: #e74c3c; }
.station-level .value.warning { color: #f39c12; }
.station-level .value.normal { color: #27ae60; }
.station-level .value.low { color: #95a5a6; }
.station-level .ago { font-size: 0.75rem; color: #999; }

.events-timeline { display: grid; gap: 0.75rem; }
.event-item { padding: 0.75rem 1rem; background: #f8f9fa; border-radius: 8px; border-left: 3px solid; }
.event-item.severe { border-left-color: #8b0000; }
.event-item.warning { border-left-color: #e74c3c; }
.event-item.alert { border-left-color: #f39c12; }
.event-item.info { border-left-color: #95a5a6; }
.event-item .event-date { font-size: 0.85rem; color: #666; }
.event-item .event-severity { font-size: 0.8rem; font-weight: 600; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.related-card { display: block; padding: 0.75rem 1rem; background: #f8f9fa; border-radius: 8px; text-decoration: none; color: inherit; border-left: 3px solid #ddd; transition: background 0.2s; }
.related-card:hover { background: #eef0f5; }
.related-card.has-warning { border-left-color: #e74c3c; }
.related-card .rel-name { font-weight: 600; color: #2c3e50; font-size: 0.9rem; }
.related-card .rel-meta { font-size: 0.8rem; color: #666; margin-top: 0.15rem; }

/* Gauge containment, 2026-09-15. Same three states and the same wording as the Scottish and Welsh
   pages (includes/sepa-area-view.php): a gauge within the ring test's 10 m uncertainty band reads
   "on the boundary" and is never presented as being in the area. A gauge we cannot place at all
   gets no badge — absence of a badge is not a claim that it is outside. */
.fae-badge { display:inline-block; padding:0.15rem 0.5rem; border-radius:4px; font-size:0.72rem; font-weight:700; letter-spacing:0.02em; vertical-align:middle; }
.fae-badge.inside { background:#d5f0dd; color:#1d6b38; }
.fae-badge.uncertain { background:#fdf0d5; color:#8a6114; }
