/* UVHere Ski Conditions. Inherits the theme's fonts. */
.uvsc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	grid-auto-rows: 1fr; /* every card in the list is the same height */
	gap: 16px;
	margin: 1em 0 0.75em;
}

/* State colours: Vermont green, New Hampshire granite. The whole card is tinted. */
.uvsc-state-vt {
	--uvsc-state: #2a7a43;
	--uvsc-state-bg: #dcefdc;
	--uvsc-state-line: #a9cfae;
}

.uvsc-state-nh {
	--uvsc-state: #5c6672;
	--uvsc-state-bg: #e3e6eb;
	--uvsc-state-line: #b9c0c9;
}

.uvsc-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 1em 0 0;
	font-size: 0.9em;
	color: #3f464d;
}

a.uvsc-legend-item {
	color: inherit;
	text-decoration: underline;
}

.uvsc-card[id] {
	scroll-margin-top: 80px; /* keep a sticky site header from covering the card */
}

.uvsc-key {
	display: inline-block;
	width: 0.85em;
	height: 0.85em;
	margin-right: 0.45em;
	border-radius: 2px;
	border: 1px solid var(--uvsc-state, #5c6672);
	background: var(--uvsc-state-bg, #e3e6eb);
	vertical-align: -0.05em;
}

.uvsc-group {
	margin: 1.5em 0 0;
}

.uvsc-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--uvsc-state-line, rgba(0, 0, 0, 0.14));
	border-top: 6px solid var(--uvsc-state, #5c6672);
	border-radius: 6px;
	padding: 14px 16px;
	background: var(--uvsc-state-bg, #fff);
	color: #1d2327;
}

.uvsc-card .uvsc-name {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	font-size: 1.1em;
	line-height: 1.25;
}

.uvsc-chip {
	flex: none;
	padding: 1px 7px;
	border-radius: 3px;
	background: var(--uvsc-state, #5c6672);
	color: #fff;
	font-size: 0.7em;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.uvsc-card .uvsc-town {
	margin: 2px 0 10px;
	font-size: 0.85em;
	color: #3f464d;
}

.uvsc-card .uvsc-town a {
	color: inherit;
	text-decoration: underline;
}

.uvsc-card .uvsc-headline {
	margin: 0 0 10px;
	font-size: 1.05em;
	font-weight: 600;
}

.uvsc-card.uvsc-stale .uvsc-headline {
	font-weight: 400;
	color: #3f464d;
}

.uvsc-details {
	margin: 0 0 10px;
	font-size: 0.9em;
}

.uvsc-details div {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 6px;
	padding: 3px 0;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.uvsc-details dt {
	margin: 0;
	font-weight: 400;
	color: #3f464d;
}
.uvsc-details dt::after {
	content: ":";
}

.uvsc-details dd {
	margin: 0;
	font-weight: 700;
	color: #1d2327;
}

.uvsc-card .uvsc-crowd {
	margin: 0 0 4px;
	font-size: 0.9em;
}

.uvsc-crowd-label {
	color: #3f464d;
}

.uvsc-card .uvsc-crowd-why {
	margin: 0 0 4px;
	font-size: 0.8em;
	color: #3f464d;
}

.uvsc-crowd strong {
	display: inline-block;
	padding: 0 8px;
	border-radius: 10px;
	background: #e3eefb;
	color: #12406e;
}

.uvsc-crowd-moderate strong {
	background: #fdf3d0;
	color: #6b4a00;
}

.uvsc-crowd-busy strong {
	background: #fde2e1;
	color: #8a1c13;
}

.uvsc-card .uvsc-crowd-why + .uvsc-forecast,
.uvsc-card .uvsc-crowd + .uvsc-forecast {
	margin-top: 10px;
}

.uvsc-card .uvsc-forecast {
	margin: 0 0 10px;
	font-size: 0.9em;
}

.uvsc-card .uvsc-ticket {
	margin: 0 0 10px;
	font-size: 0.9em;
}

.uvsc-ticket-label {
	color: #3f464d;
}

.uvsc-ticket .uvsc-deal,
.uvsc-ticket .uvsc-ticket-asof {
	display: block;
}

.uvsc-ticket .uvsc-ticket-asof {
	font-size: 0.85em;
	color: #3f464d;
}

.uvsc-card .uvsc-event {
	margin: 0 0 10px;
	font-size: 0.9em;
}

.uvsc-event-label,
.uvsc-event-when {
	color: #3f464d;
}

.uvsc-event-when {
	display: block;
	font-size: 0.9em;
}

/* The footer sits at the bottom of every card, so links line up across a row. */
.uvsc-card .uvsc-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	margin: auto 0 0;
	padding-top: 4px;
	font-size: 0.8em;
	color: #3f464d;
}

.uvsc-card .uvsc-foot a {
	white-space: nowrap;
}

.uvsc-credit {
	font-size: 0.8em;
	color: #3f464d;
}

/* Sort buttons */
.uvsc-sort {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	font-size: 0.95em;
}
.uvsc-sort-btn {
	appearance: none;
	border: 1px solid #c3c8ce;
	background: #fff;
	color: #1d2327;
	border-radius: 999px;
	padding: 4px 12px;
	font: inherit;
	font-size: 0.95em;
	cursor: pointer;
	line-height: 1.4;
}
.uvsc-sort-btn[aria-pressed="true"] {
	background: #1d2327;
	border-color: #1d2327;
	color: #fff;
}

/* Closed: a thin "do not enter" red line under the state band, and the sign by the status. */
.uvsc-card.uvsc-closed {
	box-shadow: inset 0 3px 0 #c8102e;
}
.uvsc-dne {
	display: inline-block;
	position: relative;
	width: 0.95em;
	height: 0.95em;
	margin-right: 0.4em;
	vertical-align: -0.12em;
	border-radius: 50%;
	background: #c8102e;
}
.uvsc-dne::after {
	content: "";
	position: absolute;
	left: 18%;
	right: 18%;
	top: 50%;
	height: 18%;
	margin-top: -9%;
	background: #fff;
	border-radius: 1px;
}

/* "Conditions updated ..." line at the top */
.uvsc-updated {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 8px;
	font-weight: 600;
	color: #1d2327;
}
.uvsc-updated-dot {
	flex: 0 0 9px;
	margin-top: 0.45em; /* lines up with the first line of text */
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #2a7a43;
	box-shadow: 0 0 0 3px rgba(42, 122, 67, 0.2);
}

/* "Open only" checkbox: hides cards with nothing open today. */
.uvsc-open-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 6px;
	cursor: pointer;
	white-space: nowrap;
}
.uvsc-open-filter input {
	width: 1.1em;
	height: 1.1em;
	margin: 0;
	accent-color: #1d2327;
}
.uvsc-open-only .uvsc-card:not([data-open]) {
	display: none;
}
.uvsc-open-only .uvsc-legend {
	display: none;
}

/* Short labels: shown only on phones. */
.uvsc-short {
	display: none;
}
@media (max-width: 480px) {
	.uvsc-sort {
		flex-wrap: nowrap;
		gap: 6px;
	}
	.uvsc-sort-label {
		display: none;
	}
	.uvsc-sort-btn {
		padding: 4px 10px;
		white-space: nowrap;
	}
	.uvsc-long {
		display: none;
	}
	.uvsc-short {
		display: inline;
	}
	.uvsc-open-filter {
		margin-left: 2px;
	}
}
