/* Weather page (/fsg/weather). Colours via the dark mode tokens of darkmode.css. */

.fsg-weather {
	max-width: 952px;
	color: var(--dm-txt, #222);
	container: fsgweather / inline-size;
}
.fsg-weather-h {
	margin: 22px 0 8px;
}
.fsg-weather-h:first-of-type {
	margin-top: 4px;
}
.fsg-weather-h i {
	color: var(--dm-txt-2nd, #666);
	margin-right: 4px;
}
.fsg-weather-muted,
.fsg-weather-note,
.fsg-weather-source {
	color: var(--dm-txt-2nd, #666);
	font-size: 0.9em;
}
.fsg-weather-note {
	margin: 4px 0 0;
}
.fsg-weather-source {
	margin-top: 18px;
}
.fsg-weather-stale {
	color: var(--st-warn, #b26a00);
}

/* --- warnings ---------------------------------------------------------- */
.fsg-weather-warning {
	border-left: 6px solid var(--fsg-weather-level, #999);
	padding: 2px 0 2px 12px;
	margin: 0 0 12px;
}
.fsg-weather-warning-head {
	font-weight: bold;
}
.fsg-weather-level {
	display: inline-block;
	padding: 0 6px;
	margin-right: 6px;
	border-radius: 3px;
	font-size: 0.85em;
	font-weight: bold;
	background: var(--fsg-weather-level, #999);
	color: #000;
}
.fsg-weather-warning p {
	margin: 2px 0;
}
.fsg-weather-warning-time {
	color: var(--dm-txt-2nd, #666);
	font-size: 0.9em;
}
.fsg-weather-none i {
	color: var(--fsg_green, #76B82A);
	margin-right: 4px;
}

/* --- radar ------------------------------------------------------------- */
.fsg-weather-radar-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 6px;
}
.fsg-weather-play {
	background: none;
	border: 0;
	padding: 0 4px;
	font-size: 1.2em;
	color: var(--dm-link, #0069B4);
	cursor: pointer;
}
#maincol .fsg-weather-slider {
	flex: 1 1 auto;
	width: auto;
	min-width: 120px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}
.fsg-weather-time {
	min-width: 150px;
	font-variant-numeric: tabular-nums;
}
.fsg-weather-time.is-forecast {
	color: var(--st-warn, #b26a00);
}
.fsg-weather-map {
	height: 460px;
	background: var(--dm-bg-surface, #eee);
}
html[data-theme="dark"] .fsg-weather-map .leaflet-tile-pane {
	filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9);
}
.fsg-weather-map .leaflet-control-attribution {
	font-size: 10px;
}
.fsg-weather-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 0;
	margin: 6px 0 0;
	font-size: 0.8em;
	color: var(--dm-txt-2nd, #666);
}
.fsg-weather-legend span.chip {
	display: inline-block;
	width: 22px;
	height: 10px;
	margin-left: 6px;
	margin-right: 2px;
	vertical-align: middle;
}

/* --- forecast ---------------------------------------------------------- */
.fsg-weather-periods {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 6px 24px;
	margin: 0 0 18px;
}
.fsg-weather-period-title {
	font-weight: bold;
}
.fsg-weather-period-main {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 2px 0;
}
.fsg-weather-period-main i {
	font-size: 1.8em;
	width: 1.3em;
	text-align: center;
	color: var(--dm-txt-2nd, #666);
}
.fsg-weather-period-temp {
	font-size: 1.15em;
	font-weight: bold;
}
.fsg-weather-period-facts {
	font-size: 0.9em;
	color: var(--dm-txt-2nd, #666);
}
.fsg-weather-period-facts span {
	display: block;
}

.fsg-weather-hourly-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	font-size: 0.8em;
	color: var(--dm-txt-2nd, #666);
}
.fsg-weather-hourly i {
	color: var(--dm-txt-2nd, #666);
}
/* one continuous row of hour tiles; the day stands only above the first tile of
   each day, as wide as that tile */
.fsg-weather-hours {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 6px;
}
.fsg-weather-hourcol {
	display: flex;
	flex-direction: column;
	width: 62px;
}
.fsg-weather-day {
	min-height: 1.4em;
	font-weight: bold;
	font-size: 0.8em;
	white-space: nowrap;
	overflow: hidden;
	text-align: center;
}
.fsg-weather-hourcol.is-daystart .fsg-weather-day {
	border-bottom: 2px solid var(--dm-txt, #333);
}
.fsg-weather-hour {
	width: 62px;
	box-sizing: border-box;
}
.fsg-weather-hour {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	padding: 4px 2px;
	border-radius: 4px;
	background: rgba(128, 128, 128, 0.08);
	font-size: 0.8em;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.fsg-weather-hour .fsg-weather-hour-icon {
	font-size: 1.6em;
	margin: 2px 0;
}
.fsg-weather-hour-temp {
	font-size: 1.2em;
	font-weight: bold;
}
.fsg-weather-hour span i {
	font-size: 0.85em;
	margin-right: 3px;
}
.fsg-weather-hourly .is-high,
.fsg-weather-period-facts .is-high {
	color: var(--dm-danger-txt, #c0392b);
	font-weight: bold;
}

/* narrow column (phones, or the column next to the side navigation) */
@container fsgweather (max-width: 560px) {
	.fsg-weather-periods {
		gap: 6px 12px;
	}
	.fsg-weather-period-main {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}
	.fsg-weather-period-main i {
		width: auto;
	}
	.fsg-weather-period-facts {
		font-size: 0.8em;
	}
	.fsg-weather-time {
		min-width: 0;
	}
	/* full width and square on phones */
	.fsg-weather-map {
		height: auto;
		aspect-ratio: 1 / 1;
	}
}

/* --- OT panel: FSG radar alert ------------------------------------------- */
.fsg-weather-ot {
	margin-bottom: 18px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--dm-border, rgba(128, 128, 128, 0.35));
}
.fsg-weather-ec-buttons {
	margin-top: 8px;
}
.fsg-weather-ec-buttons .fsg-btn {
	margin-right: 8px;
}
.fsg-weather-ot-log {
	overflow-x: auto;
	font-size: 0.85em;
}
.fsg-weather-ot-log table {
	border-collapse: collapse;
}
.fsg-weather-ot-log th,
.fsg-weather-ot-log td {
	padding: 2px 10px 2px 0;
	text-align: left;
	border: 0;
	white-space: nowrap;
}
.fsg-weather-ot-log th {
	font-weight: normal;
	color: var(--dm-txt-2nd, #666);
}

/* --- OT: replay of an alert on the radar map --------------------------------- */
.fsg-weather-linkbtn {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: var(--dm-link, #0069B4);
	cursor: pointer;
}
.fsg-weather-linkbtn:hover {
	text-decoration: underline;
}
.fsg-weather-replay {
	margin: 0 0 6px;
	font-weight: bold;
}
.fsg-weather-time.is-acute {
	color: #E40E1B;
	font-weight: bold;
}

/* replay: label of a cell track; fixed colours on the map tiles in both themes */
.fsg-weather-track.leaflet-tooltip {
	background: rgba(0, 0, 0, 0.75);
	border: 0;
	border-radius: 2px;
	box-shadow: none;
	color: #fff;
	font-size: 12px;
	font-weight: bold;
	padding: 1px 5px;
}
.fsg-weather-track.leaflet-tooltip::before {
	display: none;
}
.fsg-weather-track.is-hit.leaflet-tooltip {
	background: #E40E1B;
}
