/* Ocean outlook section on the bar page (templates/partials/_ocean_outlook.html).
   One column per day; the row of days scrolls sideways inside .oo-scroll, never the page. */

.oo-sub {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.oo-buoy {
    margin: var(--space-2) 0 0;
    font-size: max(var(--text-sm), var(--text-floor));
    color: var(--text-secondary);
}

.oo-buoy b { color: var(--text-primary); font-weight: 700; }
.oo-buoy a { color: var(--ocean-glow); white-space: nowrap; }

.oo-buoy-label {
    margin-right: var(--space-1);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.oo-note {
    margin: var(--space-3) 0 0;
    font-size: max(var(--text-sm), var(--text-floor));
    color: var(--text-primary);
}

.oo-note-trend,
.oo-note-stale {
    padding-left: var(--space-3);
    border-left: 3px solid var(--status-restricted);
}

.oo-note-stale { font-weight: 700; }

.oo-scroll {
    margin-top: var(--space-4);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.oo-scroll:focus-visible {
    outline: 2px solid var(--ocean-glow);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

.oo-days {
    --oo-gap: var(--space-2);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(114px, 1fr);
    gap: var(--oo-gap);
    margin: 0;
    padding: 0 0 var(--space-2);
    list-style: none;
}

.oo-day {
    position: relative;  /* contains its .sr-only text, or that text widens the page */
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
    padding: var(--space-3) var(--space-2);
    background: var(--bg-raised);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    text-align: center;
}

.oo-day-trend { border-style: dashed; }

.oo-day-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.oo-day-date {
    display: block;
    font-family: inherit;
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--text-secondary);
}

/* Always present so the rows of every column line up */
.oo-tag {
    margin: calc(var(--space-2) * -1) 0 0;
    min-height: 1.2em;
    font-size: max(var(--text-xs), var(--text-floor));
    line-height: 1.2;
    color: var(--status-restricted);
}

.oo-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.oo-weather { color: var(--text-secondary); }
.oo-icon { display: block; }

.oo-temp {
    font-size: max(var(--text-sm), var(--text-floor));
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.oo-temp-low { font-weight: 400; color: var(--text-secondary); }

.oo-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.oo-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.oo-unit { font-size: var(--text-sm); font-weight: 400; color: var(--text-secondary); }

.oo-line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px var(--space-1);
    font-size: max(var(--text-xs), var(--text-floor));
    color: var(--text-secondary);
}

.oo-seas-line {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 var(--space-1);
    font-size: max(var(--text-sm), var(--text-floor));
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.oo-seas-part { white-space: nowrap; }

/* "typical 11 ft" over "peak 14 ft", the same at every width */
.oo-seas-line { flex-direction: column; }
.oo-seas-part b { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }

.oo-swell { font-size: max(var(--text-sm), var(--text-floor)); color: var(--text-primary); }

.oo-arrow {
    display: inline-flex;
    color: var(--ocean-glow);
    transform: rotate(var(--oo-dir, 0deg));
}

.oo-from { font-weight: 700; color: var(--text-primary); }
.oo-gust { white-space: nowrap; }
.oo-none { color: var(--text-muted); }

/* Wind and seas hold up to three lines, the chip up to two: fixed heights keep
   the rows of every column level. Rows sit from the top down (no auto margin),
   so a column made taller by an open Details does not move its neighbours' rows */
.oo-wind, .oo-seas { min-height: 4rem; }
.oo-wind { min-height: 4.5rem; }  /* room for "NW gusts 25" to wrap in a narrow column */
.oo-precip { min-height: 2.6rem; justify-content: center; }
/* With NBM percentiles a day can also carry its "likely" range and a confidence chip */
/* typical, peak, likely, the trend and the chip; the last two take two lines each in a narrow column */
.oo-has-range .oo-seas { min-height: 8.75rem; }
@media (max-width: 1400px) { .oo-has-range .oo-seas { min-height: 10.75rem; } }
/* "some disagreement" takes two lines in a narrow column */
.oo-chip-confidence { padding: 2px 6px; letter-spacing: -0.01em; border-radius: var(--radius-md); text-wrap: balance; }

.oo-chip {
    position: relative;  /* contains its .sr-only text */
    display: inline-block;
    padding: 2px var(--space-2);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-full);
    font-size: max(var(--text-xs), var(--text-floor));
    line-height: 1.3;
    color: var(--text-secondary);
}

.oo-chip-wet { border-color: var(--ocean-glow); color: var(--text-primary); }
.oo-chip-confidence { margin-top: 2px; }

.oo-more {
    border-top: 1px solid var(--card-border);
    padding-top: var(--space-2);
    font-size: max(var(--text-xs), var(--text-floor));
    text-align: left;
}

.oo-more > summary {
    cursor: pointer;
    color: var(--ocean-glow);
    text-align: center;
    padding: var(--space-1) 0;
}

.oo-more > summary:focus-visible {
    outline: 2px solid var(--ocean-glow);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.oo-more-list { margin: var(--space-2) 0 0; }
.oo-more-list dt { color: var(--text-muted); }
.oo-more-list dd { margin: 0 0 var(--space-2); color: var(--text-primary); }
.oo-more-list dd:last-child { margin-bottom: 0; }

.oo-legend {
    margin: var(--space-3) 0 0;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.oo-legend a { color: var(--text-secondary); }

/* Phones: three days in view, with the edge of the fourth to show there is more */
@media (max-width: 640px) {
    .oo-days { grid-auto-columns: calc((100% - 3 * var(--oo-gap)) / 3.2); }
    .oo-day { padding: var(--space-3) var(--space-1); }
    /* The fold row is the visible title; the heading stays for screen readers */
    .m-fold-outlook .summary-card-title {
        position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
    }
    .m-fold-outlook .oo-sub { margin-top: 0; }
}

/* ---- Hour by hour (static/js/modules/ocean-outlook.js) ---- */

.oo-hours-btn { align-self: center; }
.oo-hours-btn[hidden] { display: none; }
.oo-day-selected { border-color: var(--ocean-glow); border-style: solid; }
.oo-day-selected .oo-hours-btn { color: var(--text-primary); background: var(--bg-raised); }

.oo-hourly {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-raised);
    border: 1px solid var(--ocean-glow);
    border-radius: var(--radius-md);
}

.oo-hourly-head {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.oo-hourly-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
}

.oo-hourly-title:focus-visible { outline: 2px solid var(--ocean-glow); outline-offset: 2px; border-radius: var(--radius-sm); }

.oo-hourly-body {
    margin-top: var(--space-3);
    overflow-x: auto;
    min-height: 3rem;
}

.oo-hourly-body:focus-visible { outline: 2px solid var(--ocean-glow); outline-offset: 2px; border-radius: var(--radius-sm); }

.oo-hourly-table {
    width: 100%;
    border-collapse: collapse;
    font-size: max(var(--text-sm), var(--text-floor));
    font-variant-numeric: tabular-nums;
    position: relative;  /* contains its .sr-only caption and cells */
}

.oo-hourly-table th,
.oo-hourly-table td {
    position: relative;
    padding: var(--space-1) var(--space-2);
    text-align: right;
    white-space: nowrap;
    color: var(--text-primary);
    border-bottom: 1px solid var(--card-border);
}

.oo-hourly-table thead th {
    font-size: var(--text-xs);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    vertical-align: bottom;
}

.oo-hourly-table th:first-child {
    /* The time stays in view while a narrow screen scrolls the readings sideways */
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg-raised);
    text-align: left;
}
.oo-hourly-table tbody th { font-weight: 700; color: var(--text-secondary); }
.oo-hourly-table tbody tr:last-child > * { border-bottom: 0; }

.oo-hourly-unit { display: block; text-transform: none; letter-spacing: 0; }
.oo-hourly-range { display: block; font-size: var(--text-xs); color: var(--text-secondary); }
/* An hour filled in between two forecast times (the NBM join): softer, and said so in the legend */
.oo-hourly-interp td { color: var(--text-secondary); font-style: italic; }

@media (max-width: 640px) {
    .oo-hourly { padding: var(--space-2); }
    .oo-hourly-table th,
    .oo-hourly-table td { padding: var(--space-1) 3px; }
    .oo-hourly-table thead th { letter-spacing: 0; }
}
