/* Storm Outlook banner (js/storm-outlook.js v1.0.0)
   Sits directly under #service-alerts-container. Three levels:
   notice (quiet one-liner), watch (amber), warning (red).
   Dark mode arrives two ways on this site — every dark rule is paired:
   [data-theme="dark"] (main pages) and body.dark-mode (businesses.html). */

.storm-outlook {
    margin: 0 0 1rem;
    border-radius: var(--radius-md, 0.75rem);
    border: 1px solid var(--border-color, #e5e7eb);
    border-left-width: 5px;
    background: var(--surface-color, #fff);
    color: var(--text-primary, #111827);
    overflow: hidden;
}

.storm-outlook[hidden] { display: none; }

.storm-outlook--notice  { border-left-color: #64748b; }
.storm-outlook--watch   { border-left-color: #d97706; background: #fffbeb; border-color: #fcd34d; }
.storm-outlook--warning { border-left-color: #dc2626; background: #fef2f2; border-color: #fca5a5; }

[data-theme="dark"] .storm-outlook,
body.dark-mode .storm-outlook { background: #2d3748; border-color: #4a5568; color: #f7fafc; }
[data-theme="dark"] .storm-outlook--notice,
body.dark-mode .storm-outlook--notice { border-left-color: #94a3b8; }
[data-theme="dark"] .storm-outlook--watch,
body.dark-mode .storm-outlook--watch { background: #3a2f12; border-color: #92400e; border-left-color: #f59e0b; }
[data-theme="dark"] .storm-outlook--warning,
body.dark-mode .storm-outlook--warning { background: #3b1a1a; border-color: #991b1b; border-left-color: #f87171; }

.storm-outlook__toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 1rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.storm-outlook__toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

.storm-outlook__icon { flex-shrink: 0; font-size: 1.4rem; line-height: 1; }

.storm-outlook__summary { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.storm-outlook__title { font-weight: 600; font-size: 1rem; }
.storm-outlook--notice .storm-outlook__title { font-weight: 500; font-size: 0.95rem; }

.storm-outlook__lead { font-size: 0.85rem; opacity: 0.85; }

.storm-outlook__chevron { flex-shrink: 0; opacity: 0.6; transition: transform 0.15s ease; }
.storm-outlook__toggle[aria-expanded="true"] .storm-outlook__chevron { transform: rotate(180deg); }

.storm-outlook__body { padding: 0 1rem 0.9rem 3.1rem; font-size: 0.9rem; line-height: 1.45; }
.storm-outlook__body[hidden] { display: none; }

.storm-outlook__list { margin: 0 0 0.6rem; padding-left: 1.1rem; }
.storm-outlook__list li { margin: 0.2rem 0; }
.storm-outlook__power { font-weight: 600; }

.storm-outlook__eccc { margin: 0.5rem 0; }

/* Readable marine wind (js v1.0.6): meaning line, timeline, exceptions, ECCC wording. */
.storm-outlook__marine { margin: 0.3rem 0 0.6rem; }
.storm-outlook__meaning { margin: 0 0 0.5rem; }
.storm-outlook__marine-head { margin: 0.5rem 0 0.3rem; font-weight: 600; }
.storm-outlook__timeline { list-style: none; margin: 0; padding: 0; }
.storm-outlook__timeline li {
    display: grid;
    grid-template-columns: minmax(7.5rem, 34%) 1fr;
    gap: 0.6rem;
    padding: 0.3rem 0;
    border-top: 1px solid rgba(127, 127, 127, 0.2);
}
.storm-outlook__timeline li:first-child { border-top: 0; }
.storm-outlook__when { font-weight: 600; }
.storm-outlook__except { margin: 0.4rem 0 0; font-size: 0.85rem; opacity: 0.9; }
.storm-outlook__wording { margin: 0.4rem 0 0; }
.storm-outlook__wording summary { cursor: pointer; padding: 12px 0; line-height: 20px; font-size: 0.85rem; }
.storm-outlook__wording .storm-outlook__eccc { margin: 0 0 0.3rem; font-size: 0.85rem; }

@media (max-width: 480px) {
    .storm-outlook__timeline li { grid-template-columns: 1fr; gap: 0; }
}

.storm-outlook__alert { margin: 0.5rem 0; }
/* list-item (the default) keeps the disclosure triangle; flex hid it. */
.storm-outlook__alert summary { cursor: pointer; padding: 12px 0; line-height: 20px; }
.storm-outlook__alert-text { white-space: pre-line; margin: 0.4rem 0; }

.storm-outlook__disclaimer,
.storm-outlook__source { margin: 0.5rem 0 0; font-size: 0.78rem; opacity: 0.8; }

/* Screen-reader-only status line (js v1.0.3): announced once per visible change. */
.storm-outlook__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.storm-outlook { position: relative; }

@media (prefers-reduced-motion: reduce) {
    .storm-outlook__chevron { transition: none; }
}

@media (max-width: 480px) {
    .storm-outlook__body { padding-left: 1rem; }
}
