/**
 * Compact CPT weather frontend.
 */
.mh-cpt-weather {
	--mh-weather-accent: #17324d;
	--mh-weather-accent-soft: rgba(23, 50, 77, 0.08);
	--mh-weather-text: #213547;
	--mh-weather-muted: #718194;
	--mh-weather-surface: #ffffff;
	--mh-weather-surface-alt: rgba(255, 255, 255, 0.88);
	--mh-weather-border: rgba(23, 50, 77, 0.10);
	--mh-weather-shadow: 0 10px 24px rgba(14, 33, 49, 0.08);
	box-sizing: border-box;
	container-type: inline-size;
	min-width: 0;
	width: 100%;
	max-width: 100%;
	color: var(--mh-weather-text);
	font-family: 'Barlow', Arial, sans-serif;
}

.mh-cpt-weather *,
.mh-cpt-weather *::before,
.mh-cpt-weather *::after {
	box-sizing: border-box;
}

.mh-cpt-weather__card {
	overflow: hidden;
	background: var(--mh-weather-surface-alt);
	border: 1px solid var(--mh-weather-border);
	border-top: 4px solid var(--mh-weather-accent);
	border-radius: 16px;
	box-shadow: var(--mh-weather-shadow);
	backdrop-filter: blur(4px);
}

.mh-cpt-weather__current {
	padding: 14px 16px 12px;
}

.mh-cpt-weather__place {
	overflow: hidden;
	font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.08em;
	color: var(--mh-weather-accent);
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.mh-cpt-weather__now {
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr);
	gap: 9px;
	align-items: center;
	margin-top: 6px;
}

.mh-cpt-weather__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	font-size: 26px;
	line-height: 1;
	text-align: center;
	background: var(--mh-weather-accent-soft);
	border-radius: 999px;
}

.mh-cpt-weather__temperature {
	font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	font-size: 36px;
	font-weight: 900;
	line-height: 1;
	color: var(--mh-weather-accent);
}

.mh-cpt-weather__condition {
	overflow: hidden;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.25;
	text-overflow: ellipsis;
}

.mh-cpt-weather__days {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	background: var(--mh-weather-surface);
	border-top: 1px solid var(--mh-weather-border);
}

.mh-cpt-weather__day {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-areas:
		'day temperature'
		'icon condition';
	gap: 4px 7px;
	align-items: center;
	min-width: 0;
	padding: 9px 10px 10px;
}

.mh-cpt-weather__day + .mh-cpt-weather__day {
	border-left: 1px solid var(--mh-weather-border);
}

.mh-cpt-weather__day:nth-child(3n + 1) {
	border-left: 0;
}

.mh-cpt-weather__day:nth-child(n + 4) {
	border-top: 1px solid var(--mh-weather-border);
}

.mh-cpt-weather__day-name {
	grid-area: day;
	font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.04em;
	line-height: 1.15;
	color: var(--mh-weather-accent);
	text-transform: uppercase;
}

.mh-cpt-weather__day-icon {
	display: inline-flex;
	grid-area: icon;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--mh-weather-accent);
	background: transparent;
}

.mh-cpt-weather__day-icon--rain,
.mh-cpt-weather__day-icon--sleet {
	color: #1d638d;
}

.mh-cpt-weather__day-icon--snow {
	color: #356681;
}

.mh-cpt-weather__day-icon--thunder {
	color: #654585;
}

.mh-cpt-weather__day-icon--fog,
.mh-cpt-weather__day-icon--wind {
	color: #566a7c;
}

.mh-cpt-weather__day-icon--clear {
	color: #a85f00;
}

.mh-cpt-weather__day-icon-svg {
	display: block;
	width: 22px;
	height: 22px;
}

.mh-cpt-weather__day-condition {
	grid-area: condition;
	overflow: hidden;
	min-width: 0;
	font-size: 9px;
	line-height: 1.15;
	color: #1d638d;
	text-align: right;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mh-cpt-weather__day-temperature {
	display: flex;
	grid-area: temperature;
	gap: 5px;
	align-items: baseline;
	justify-content: flex-end;
	font-size: 11px;
	line-height: 1;
	white-space: nowrap;
}

.mh-cpt-weather__day-temperature strong {
	font-size: 15px;
	font-weight: 800;
	color: var(--mh-weather-accent);
}

.mh-cpt-weather__day-temperature span,
.mh-cpt-weather__updated,
.mh-cpt-weather__credit {
	color: var(--mh-weather-muted);
}

.mh-cpt-weather__meta {
	display: flex;
	gap: 6px 10px;
	align-items: baseline;
	justify-content: space-between;
	min-width: 0;
	padding: 5px 10px 6px;
	background: var(--mh-weather-surface);
	border-top: 1px solid var(--mh-weather-border);
	font-size: 9px;
	line-height: 1.2;
	white-space: nowrap;
}

.mh-cpt-weather__updated,
.mh-cpt-weather__credit {
	min-width: 0;
	font-size: inherit;
	line-height: inherit;
	white-space: nowrap;
}

.mh-cpt-weather__updated {
	flex: 0 0 auto;
}

.mh-cpt-weather__credit {
	overflow: hidden;
	flex: 0 1 auto;
	color: var(--mh-weather-muted);
	text-align: right;
	text-overflow: ellipsis;
}

.mh-cpt-weather__credit a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

@container (max-width: 520px) {
	.mh-cpt-weather__current {
		padding: 12px 14px 10px;
	}

	.mh-cpt-weather__now {
		grid-template-columns: auto auto 1fr;
		gap: 8px;
	}

	.mh-cpt-weather__temperature {
		font-size: 31px;
	}

	.mh-cpt-weather__condition {
		font-size: 12px;
	}

	.mh-cpt-weather__days {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mh-cpt-weather__day {
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas:
			'day temperature'
			'icon condition';
		gap: 3px 5px;
		justify-items: stretch;
		padding: 7px 5px 8px;
		text-align: left;
	}

	.mh-cpt-weather__day-temperature {
		justify-content: flex-end;
	}

	.mh-cpt-weather__day-condition {
		max-width: 100%;
		text-align: right;
	}
}

@media (max-width: 767px) {
	.e-con.mh-cpt-weather-host {
		--padding-bottom: 10px !important;
		--row-gap: 12px !important;
	}
}

@container (max-width: 330px) {
	.mh-cpt-weather__day {
		padding-right: 4px;
		padding-left: 4px;
	}

	.mh-cpt-weather__meta {
		gap: 5px;
		padding-right: 7px;
		padding-left: 7px;
	}
}

@container (max-width: 260px) {
	.mh-cpt-weather__now {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.mh-cpt-weather__condition {
		grid-column: 1 / -1;
	}

	.mh-cpt-weather__days {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mh-cpt-weather__day:nth-child(odd) {
		border-left: 0;
	}

	.mh-cpt-weather__day:nth-child(n + 3) {
		border-top: 1px solid var(--mh-weather-border);
	}
}
