/**
 * xo-weather shared frontend styles.
 *
 * Compact, clear, professional — inherits the active theme's font and
 * color system as much as possible. No animations, no decorative elements.
 */

.xo-weather-block {
	font-family: inherit;
	color: inherit;
	line-height: 1.5;
}

.xo-weather-block a.xo-weather-link {
	color: inherit;
	text-decoration: underline;
}

/* Compact block: single wrapping line, footer-safe. */
.xo-weather-block--compact {
	margin: 0;
	font-size: 0.9em;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35em;
}

.xo-weather-sep {
	opacity: 0.6;
}

/* Condition icon, rendered through xo-icons (see includes/icons.php). Sized
   and colored by the component that includes it, never inline in markup. */
.xo-weather-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: currentColor;
}

.xo-weather-icon svg {
	display: block;
	width: 1em;
	height: 1em;
}

/* Titles and meta text. */
.xo-weather-title {
	margin: 0 0 0.5em;
	font-size: 1.3em;
}

.xo-weather-kicker {
	margin: 0 0 0.25em;
	font-weight: 600;
}

.xo-weather-meta {
	font-size: 0.9em;
	opacity: 0.85;
}

.xo-weather-source {
	margin-top: 1.5em;
	font-size: 0.8em;
}

/* Flight category: text label plus a border accent — never color alone. */
.xo-weather-flight-category {
	display: inline-block;
	margin: 0 0 0.75em;
	padding: 0.15em 0.6em;
	font-weight: 700;
	letter-spacing: 0.03em;
	border: 1px solid currentColor;
	border-left-width: 0.35em;
	border-radius: 0.2em;
}

.xo-weather-flight-category--vfr {
	border-left-color: #1a7f37;
}

.xo-weather-flight-category--mvfr {
	border-left-color: #0969da;
}

.xo-weather-flight-category--ifr {
	border-left-color: #cf222e;
}

.xo-weather-flight-category--lifr {
	border-left-color: #8250df;
}

/* Labeled field grid: dl containing .xo-weather-row wrapper divs. */
.xo-weather-grid {
	display: grid;
	grid-template-columns: minmax(8rem, 1fr) minmax(0, 2fr);
	row-gap: 0.4em;
	column-gap: 1em;
	margin: 0 0 1em;
}

.xo-weather-row {
	display: contents;
}

.xo-weather-label {
	font-weight: 600;
	opacity: 0.75;
}

.xo-weather-value {
	margin: 0;
}

@media (max-width: 480px) {
	.xo-weather-grid {
		grid-template-columns: 1fr;
		row-gap: 0.15em;
	}

	.xo-weather-row {
		display: block;
		margin-bottom: 0.5em;
	}

	.xo-weather-label {
		display: block;
	}
}

/* Sections: METAR / TAF / PIREPs, with clear spacing between them. */
.xo-weather-section {
	margin: 1.5em 0;
	padding-top: 1.5em;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.xo-weather-section:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.xo-weather-section-title {
	margin: 0 0 0.75em;
	font-size: 1.1em;
}

/* Raw report text: wrapped, monospace, readable. */
.xo-weather-raw {
	margin: 0.5em 0 0;
	padding: 0.75em 1em;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 0.25em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.85em;
	white-space: pre-wrap;
	word-break: break-word;
	overflow-wrap: anywhere;
}

/* PIREP / TAF-period report lists. */
.xo-weather-report-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1em;
}

.xo-weather-report {
	padding: 0.85em 1em;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 0.3em;
}

.xo-weather-report .xo-weather-grid {
	margin-bottom: 0;
}

.xo-weather-empty {
	margin: 0 0 0.5em;
	opacity: 0.8;
}

.xo-weather-empty--hint {
	font-size: 0.85em;
	font-style: italic;
	opacity: 0.65;
}

@media (prefers-color-scheme: dark) {
	.xo-weather-section {
		border-top-color: rgba(255, 255, 255, 0.15);
	}

	.xo-weather-raw,
	.xo-weather-report {
		background: rgba(255, 255, 255, 0.06);
	}
}
