/* The Weather lab's forecast tabs (Components/Pages/Weather/Forecast*.razor). Series colours are the data-viz palette's first
   three slots (blue, orange, aqua), validated all-pairs for colour-blind readers in both themes; each series also differs by
   mark (area, solid, dashed), and every chart has a legend, the hover readout and, on the 24-hour tab, a table. */

.fc {
    --fc-c1: #2a78d6;
    --fc-c2: #eb6834;
    --fc-c3: #1baf7a;
    --fc-cloudfill: rgb(120 128 140 / 0.22);
    --fc-night: rgb(40 55 90 / 0.07);
    --fc-gridline: color-mix(in srgb, var(--rl-border) 85%, transparent);
    --fc-midline: color-mix(in srgb, var(--rl-text-muted) 45%, transparent);
    --fc-sun: #f6b21b;
    --fc-ray: #ee8f0b;
    --fc-moon: #8da3c4;
    --fc-cloud: #e6eaf0;
    --fc-cloud-edge: #8e99aa;
    --fc-cloud-back: #cfd6e0;
    --fc-rain: #2a78d6;
    --fc-snow: #5b8fd0;
    --fc-bolt: #f2b705;
    --fc-moon-lit: #f3efe2;
    --fc-moon-dark: #4a5260;
    --fc-moon-rim: #9aa3b2;
    display: grid;
    gap: 1rem;
    min-width: 0;
}

@media (prefers-color-scheme: dark) {
    :root:where(:not([data-theme="light"])) .fc {
        --fc-c1: #3987e5;
        --fc-c2: #d95926;
        --fc-c3: #199e70;
        --fc-cloudfill: rgb(170 178 192 / 0.2);
        --fc-night: rgb(0 0 0 / 0.22);
        --fc-moon: #c3d0e2;
        --fc-cloud: #d3d9e2;
        --fc-cloud-edge: #7d8796;
        --fc-cloud-back: #9ea8b6;
        --fc-rain: #5598e7;
        --fc-snow: #9cc3f0;
        --fc-moon-dark: #2d323b;
    }
}

:root[data-theme="dark"] .fc {
    --fc-c1: #3987e5;
    --fc-c2: #d95926;
    --fc-c3: #199e70;
    --fc-cloudfill: rgb(170 178 192 / 0.2);
    --fc-night: rgb(0 0 0 / 0.22);
    --fc-moon: #c3d0e2;
    --fc-cloud: #d3d9e2;
    --fc-cloud-edge: #7d8796;
    --fc-cloud-back: #9ea8b6;
    --fc-rain: #5598e7;
    --fc-snow: #9cc3f0;
    --fc-moon-dark: #2d323b;
}

.tool__wide { display: block; min-width: 0; }
.weather__tabs { margin: 0; }

.fc abbr[title] { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
.fc .card { margin: 0; }

/* ---- place ---- */

.fc-place { display: grid; grid-template-columns: 1fr auto; gap: .6rem 1rem; align-items: center; padding: .8rem 1rem; }
.fc-place__find { display: flex; flex-wrap: wrap; gap: .5rem; }
.fc-place__find input { flex: 1 1 14rem; min-width: 0; }
.fc-place__results, .fc-place__now, .fc-place > p { grid-column: 1 / -1; }
.fc-place__results { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.fc-place__results button {
    display: flex; flex-direction: column; align-items: flex-start; gap: .05rem;
    padding: .35rem .65rem; border: 1px solid var(--rl-border); border-radius: 8px;
    background: var(--rl-surface-sunken); color: inherit; text-align: left; cursor: pointer;
}
.fc-place__results button:hover { border-color: var(--rl-accent); }
.fc-place__now { margin: 0; display: flex; flex-wrap: wrap; gap: .2rem .75rem; align-items: baseline; }
.fc-place__now strong { font-size: 1.05rem; }
@media (max-width: 640px) { .fc-place { grid-template-columns: 1fr; } }

/* ---- weather pictures ---- */

.fc-icon { display: inline-block; flex: none; overflow: visible; vertical-align: middle; }
.fc-icon__sun { fill: var(--fc-sun); }
.fc-icon__rays { fill: none; stroke: var(--fc-ray); stroke-width: 2.4; stroke-linecap: round; }
.fc-icon__moon { fill: var(--fc-moon); }
.fc-icon__cloud { fill: var(--fc-cloud); stroke: var(--fc-cloud-edge); stroke-width: 1.6; stroke-linejoin: round; }
.fc-icon__back .fc-icon__cloud { fill: var(--fc-cloud-back); }
.fc-icon__rain { fill: none; stroke: var(--fc-rain); stroke-width: 2.6; stroke-linecap: round; }
.fc-icon__rain--dots { stroke-width: 3.4; }
.fc-icon__ice { fill: none; stroke: var(--fc-snow); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 3 3; }
.fc-icon__snow { fill: none; stroke: var(--fc-snow); stroke-width: 1.8; stroke-linecap: round; }
.fc-icon__bolt { fill: var(--fc-bolt); stroke: #b57f00; stroke-width: .8; stroke-linejoin: round; }
.fc-icon__fog, .fc-icon__wind { fill: none; stroke: var(--rl-text-muted); stroke-width: 2.4; stroke-linecap: round; }
.fc-icon--set .fc-icon__sun { fill: #f08a4b; }
.fc-icon--set .fc-icon__rays, .fc-icon--rise .fc-icon__rays { opacity: .55; }

.fc-moon { display: inline-block; flex: none; vertical-align: middle; }
.fc-moon__dark { fill: var(--fc-moon-dark); }
.fc-moon__lit { fill: var(--fc-moon-lit); }
.fc-moon__rim { fill: none; stroke: var(--fc-moon-rim); stroke-width: .8; }

/* ---- ten days ---- */

.fc-ten { padding: .5rem .5rem .25rem; }
.fc-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.fc-plot { position: relative; min-width: 920px; border-radius: 8px; }
.fc-plot:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: 2px; }

.fc-days { display: grid; grid-template-columns: repeat(var(--fc-days, 10), 1fr); list-style: none; margin: 0 0 .4rem; padding: 0; }
.fc-days li + li .fc-day { border-left: 1px solid var(--fc-gridline); }
.fc-day {
    width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: .2rem;
    padding: .45rem .2rem .5rem; border: 0; border-radius: 0; background: none; color: inherit; text-align: center; cursor: pointer;
}
.fc-day:hover { background: var(--rl-surface-sunken); }
.fc-day:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: -2px; }
.fc-day--today { background: color-mix(in srgb, var(--rl-accent) 9%, transparent); }
.fc-day__name { font-weight: 700; font-size: .85rem; }
.fc-day__temps { font-size: .85rem; color: var(--rl-text-muted); font-variant-numeric: tabular-nums; }
.fc-day__temps strong { color: var(--rl-text); }
.fc-day__words { font-size: .78rem; line-height: 1.2; min-height: 2.4em; }
.fc-day__rain { font-size: .78rem; display: inline-flex; align-items: center; gap: .2rem; font-variant-numeric: tabular-nums; }
.fc-day__rain svg { width: 11px; height: 11px; fill: var(--fc-c1); }
.fc-day__chance { font-size: .72rem; color: var(--rl-text-muted); }

.fc-plot__area { position: relative; }
.fc-chart { position: relative; }
.fc-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.fc-chart line, .fc-chart path, .fc-chart rect { vector-effect: non-scaling-stroke; }
.fc-tick {
    position: absolute; left: 3px; transform: translateY(-100%);
    font-size: .68rem; line-height: 1; padding: 1px 2px; color: var(--rl-text-muted);
    font-variant-numeric: tabular-nums; pointer-events: none;
}
.fc-nowLabel { position: absolute; top: 0; transform: translateX(4px); font-size: .68rem; font-weight: 700; pointer-events: none; }

.fc-night { fill: var(--fc-night); }
.fc-grid { stroke: var(--fc-gridline); stroke-width: 1; }
.fc-midnight { stroke: var(--fc-midline); stroke-width: 1; }
.fc-now { stroke: var(--rl-text); stroke-width: 1.5; }
.fc-freeze { stroke: var(--fc-c1); stroke-width: 1; stroke-dasharray: 6 4; opacity: .75; }

.fc-s { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fc-s--temp { stroke: var(--fc-c2); }
.fc-s--feels { stroke: var(--fc-c2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.fc-s--dew { stroke: var(--fc-c3); }
.fc-s--hum { stroke: var(--fc-c2); stroke-width: 1.5; }
.fc-s--total { stroke: var(--rl-text); stroke-width: 1.5; }
.fc-s--wind { stroke: var(--fc-c1); }
.fc-s--gust { stroke: var(--fc-c2); stroke-width: 1.25; stroke-dasharray: 4 3; }
.fc-s--pres { stroke: var(--fc-c1); }
.fc-a--cloud { fill: var(--fc-cloudfill); }
.fc-a--rain { fill: color-mix(in srgb, var(--fc-c1) 55%, transparent); }
.fc-a--snow { fill: color-mix(in srgb, var(--fc-c3) 65%, transparent); }
.fc-bar { fill: var(--fc-c1); }

.fc-arrow {
    position: absolute; width: 0; height: 0; pointer-events: none;
    border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 10px solid var(--rl-text-muted);
}

.fc-legend { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; list-style: none; margin: .3rem 0 1rem; padding: 0 .3rem; font-size: .78rem; color: var(--rl-text-muted); }
.fc-legend li { display: inline-flex; align-items: center; }
.fc-legend__title { font-weight: 600; color: var(--rl-text); }

.fc-swatch { display: inline-block; flex: none; width: 16px; height: 3px; border-radius: 2px; margin-right: .4rem; background: var(--rl-text-muted); }
.fc-swatch--temp { background: var(--fc-c2); }
.fc-swatch--feels { background: repeating-linear-gradient(90deg, var(--fc-c2) 0 5px, transparent 5px 8px); }
.fc-swatch--dew { background: var(--fc-c3); }
.fc-swatch--freeze { background: repeating-linear-gradient(90deg, var(--fc-c1) 0 5px, transparent 5px 8px); height: 2px; }
.fc-swatch--rain { height: 10px; width: 12px; background: color-mix(in srgb, var(--fc-c1) 55%, transparent); }
.fc-swatch--snow { height: 10px; width: 12px; background: color-mix(in srgb, var(--fc-c3) 65%, transparent); }
.fc-swatch--hum { background: var(--fc-c2); height: 2px; }
.fc-swatch--cloud { height: 10px; width: 12px; background: var(--fc-cloudfill); outline: 1px solid var(--fc-gridline); }
.fc-swatch--prec { height: 10px; width: 6px; background: var(--fc-c1); }
.fc-swatch--total { background: var(--rl-text); height: 2px; }
.fc-swatch--wind { background: var(--fc-c1); }
.fc-swatch--gust { background: repeating-linear-gradient(90deg, var(--fc-c2) 0 4px, transparent 4px 7px); height: 2px; }
.fc-swatch--pres { background: var(--fc-c1); }
.fc-swatch--arrow { width: 0; height: 0; background: none; border-radius: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 9px solid var(--rl-text-muted); }

.fc-plot__cross { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--rl-text); opacity: .55; pointer-events: none; }
.fc-plot__tip {
    position: absolute; top: 6px; z-index: 5; min-width: 220px; transform: translateX(14px);
    padding: .5rem .7rem; border: 1px solid var(--rl-border); border-radius: 10px;
    background: var(--rl-surface); box-shadow: 0 10px 28px rgb(0 0 0 / 0.22);
    font-size: .78rem; pointer-events: none;
}
.fc-plot__tip--left { transform: translateX(calc(-100% - 14px)); }
.fc-plot__tip strong { display: block; font-size: .82rem; }
.fc-plot__words { display: block; color: var(--rl-text-muted); }
.fc-plot__tip dl { display: grid; grid-template-columns: auto auto; gap: .12rem .9rem; margin: .4rem 0 0; }
.fc-plot__tip dt { display: inline-flex; align-items: center; color: var(--rl-text-muted); font-weight: 400; }
.fc-plot__tip dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ---- 24 hours ---- */

.fc-hours { display: grid; gap: .9rem; min-width: 0; }
.fc-daynav { display: flex; align-items: center; justify-content: center; gap: .75rem; }
.fc-daynav__title { font-size: 1.05rem; margin: 0; min-width: 17rem; text-align: center; }
.fc-daynav .btn { min-width: 2.25rem; font-size: 1.2rem; line-height: 1; }

.fc-periods { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: .75rem; }
.fc-period { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: start; padding: .9rem 1rem; }
.fc-period__head { display: flex; flex-direction: column; gap: .05rem; }
.fc-period__head h3 { margin: 0; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.fc-period__temp { font-size: 1rem; }
.fc-period__rain { grid-column: 1 / -1; margin: .35rem 0 0; font-size: .85rem; color: var(--rl-text-muted); }
.fc-period__text { grid-column: 1 / -1; margin: 0; font-size: .92rem; line-height: 1.45; }

.fc-sunline { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.5rem; margin: 0; padding: 0; font-size: .88rem; color: var(--rl-text-muted); }
.fc-sunline li { display: inline-flex; align-items: center; gap: .35rem; }
.fc-sunline strong { color: var(--rl-text); }

.fc-strip { padding: .5rem .5rem .25rem; }
.fc-strip__scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.fc-strip__row { display: grid; grid-template-columns: repeat(var(--fc-cols), 66px); list-style: none; margin: 0; padding: 0; width: max-content; }
.fc-col {
    width: 66px; display: flex; flex-direction: column; align-items: center; gap: .1rem;
    padding: .4rem 0 .3rem; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer;
}
.fc-col:hover { background: var(--rl-surface-sunken); }
.fc-col:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: -2px; }
.fc-col--on, .fc-col--on:hover { background: color-mix(in srgb, var(--rl-accent) 15%, transparent); }
.fc-col--event { cursor: default; }
.fc-col--event:hover { background: none; }
.fc-col__time { font-size: .8rem; font-weight: 600; white-space: nowrap; }
.fc-col__chance { font-size: .7rem; min-height: 1em; color: var(--rl-text-muted); }
.fc-col__temp { font-size: .95rem; font-variant-numeric: tabular-nums; }
.fc-col--event .fc-col__temp { font-size: .78rem; font-weight: 600; }
.fc-strip__line { display: block; }
.fc-strip__line .fc-s { stroke-width: 2; }
.fc-strip__dot { fill: var(--rl-surface); stroke: var(--fc-c2); stroke-width: 2; }

.fc-table { padding: 0; overflow-x: auto; }
.fc-table table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.fc-table th, .fc-table td { padding: .42rem .65rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--rl-border); font-variant-numeric: tabular-nums; }
.fc-table thead th { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--rl-text-muted); background: var(--rl-surface-sunken); }
.fc-table tbody tr { cursor: pointer; }
.fc-table tbody tr:hover { background: var(--rl-surface-sunken); }
.fc-table tbody tr.fc-row--on { background: color-mix(in srgb, var(--rl-accent) 13%, transparent); }
.fc-table tbody th { font-weight: 700; }
.fc-table__cond .fc-icon { margin-right: .3rem; }

/* ---- panels ---- */

.fc-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: .75rem; align-items: start; }
.fc-panel { padding: .9rem 1rem; }
.fc-panel__title {
    margin: 0 0 .65rem; padding-bottom: .45rem; border-bottom: 1px solid var(--rl-border);
    font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--rl-text-muted);
}
.fc-nowhead { display: flex; align-items: center; gap: .75rem; margin-bottom: .7rem; }
.fc-nowhead__temp { display: block; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fc-facts { display: grid; grid-template-columns: 1fr auto; gap: .32rem 1rem; margin: 0; font-size: .9rem; }
.fc-facts dt { font-weight: 400; }
.fc-facts dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.fc-facts--sky { margin-top: .4rem; padding-top: .5rem; border-top: 1px solid var(--rl-border); }

.fc-almanac__title { font-size: 1rem; font-weight: 600; margin: 1rem 0 .3rem; }
.fc-almanac__title:first-of-type { margin-top: 0; }
.fc-almanac { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.fc-almanac th, .fc-almanac td { padding: .18rem .3rem; text-align: left; font-weight: 400; }
.fc-almanac thead th { font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--rl-text-muted); border-bottom: 1px solid var(--rl-border); }
.fc-almanac td { font-weight: 600; }
.fc-almanac td .card__meta { font-weight: 400; font-size: .75rem; }
.fc-almanac__group th { padding-top: .55rem; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--rl-text-muted); }
.fc-note { margin: .8rem 0 0; font-size: .76rem; line-height: 1.4; }
.fc-spin { width: .9rem; height: .9rem; display: inline-block; vertical-align: -2px; margin-right: .3rem; }

.fc-sky { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 0 0 .4rem; font-variant-numeric: tabular-nums; }
.fc-sky th, .fc-sky td { padding: .2rem .3rem; text-align: left; font-weight: 400; }
.fc-sky thead th { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--rl-text-muted); border-bottom: 1px solid var(--rl-border); }
.fc-sky thead th .fc-icon { margin-right: .2rem; }
.fc-sky td { font-weight: 600; }
.fc-sky + .fc-sky { margin-top: .6rem; }
.fc-skychange { margin: .45rem 0 .8rem; font-size: .88rem; }
.fc-moonnow { display: flex; align-items: center; gap: .75rem; margin: .6rem 0 .2rem; }
.fc-moonnow strong { display: block; }
.fc-phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; list-style: none; margin: .7rem 0 0; padding: .7rem 0 0; border-top: 1px solid var(--rl-border); }
.fc-phases li { display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center; font-size: .82rem; }

.fc-credit { margin: 0; font-size: .76rem; }

.fc-station { margin: -.2rem 0 .6rem; font-size: .78rem; }
.fc-period__by { grid-column: 1 / -1; margin: .2rem 0 0; font-size: .74rem; }
.fc-swatch--uv { background: none; width: 0; margin-right: 0; }

/* The ensemble's likely range: the temperature's own hue, faint, behind every line. */
.fc-a--band { fill: color-mix(in srgb, var(--fc-c2) 20%, transparent); }
.fc-swatch--band { height: 10px; width: 14px; background: color-mix(in srgb, var(--fc-c2) 28%, transparent); }
.fc-credit a { color: var(--rl-text); text-decoration: underline; text-underline-offset: 2px; }
