/*
 * WP Weather Forecast
 * ------------------------------------------------------------------
 * The widget is injected at runtime into a host element. We don't know
 * for certain which element wraps it, so styles aim to look reasonable
 * in any flex container (GeneratePress's .inside-header, a Header
 * Element, a custom child theme, etc.).
 */

:root {
	--wpwf-color: #ffffff;
}

.wpwf-header-slot {
	display: inline-flex;
	align-items: center;
	flex: 0 1 auto;
	padding: 0 16px;
	min-width: 0;
	box-sizing: border-box;
}

/* When the host is GeneratePress's .inside-header (a flex row), expand
 * to fill the gap between the logo and the right-side header widget. */
.inside-header .wpwf-header-slot {
	flex: 1 1 auto;
	justify-content: center;
}

/* Orphan = nothing matched; show a high-contrast band at the top of
 * the page so the admin can see that the widget is loading. */
.wpwf-header-slot.wpwf-orphan {
	display: flex;
	justify-content: center;
	width: 100%;
	background: #1d3a4f;
	padding: 8px 16px;
}

.wpwf-widget {
	display: flex;
	align-items: center;
	gap: 16px;
	color: var(--wpwf-color, #fff);
	font-family: inherit;
	line-height: 1.2;
	flex-wrap: nowrap;
	white-space: nowrap;
}

.wpwf-current {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.wpwf-current .wpwf-icon {
	font-size: 1.6em;
	line-height: 1;
}

.wpwf-current .wpwf-temp {
	font-size: 1.4em;
	font-weight: 600;
}

.wpwf-current .wpwf-location {
	font-size: 0.95em;
	opacity: 0.85;
}

.wpwf-forecast {
	list-style: none;
	margin: 0;
	padding: 0 0 0 12px;
	display: inline-flex;
	gap: 10px;
	align-items: center;
	border-left: 1px solid currentColor;
	border-left-color: rgba(255, 255, 255, 0.25);
}

.wpwf-forecast .wpwf-day {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.85em;
	opacity: 0.9;
}

.wpwf-forecast .wpwf-day-name {
	font-weight: 600;
}

.wpwf-forecast .wpwf-day-icon {
	font-size: 1.1em;
}

.wpwf-forecast .wpwf-day-min {
	opacity: 0.7;
	margin-left: 2px;
}

@media (max-width: 1100px) {
	.wpwf-forecast {
		display: none;
	}
}

@media (max-width: 768px) {
	.wpwf-header-slot:not(.wpwf-orphan) {
		display: none;
	}
}

/* Shortcode rendering – use inherited colour outside the header. */
.wpwf-shortcode .wpwf-widget {
	color: inherit;
}

.wpwf-shortcode .wpwf-forecast {
	border-left-color: rgba(0, 0, 0, 0.15);
}
