/* ---------- City links ---------- */

.city-links {
	margin-bottom: 1.5rem;
}

.city-links__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.city-links__list li {
	display: inline;
}

.city-links__list a {
	display: inline-block;
	padding: 0.5rem 0.75rem;
	background: var(--accent-wash);
	border-radius: 0.5rem;
	color: var(--accent);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: background-color 200ms ease;
}

.city-links__list a:hover {
	background: var(--accent-wash-strong);
}

/* Visually hidden but still keyboard-focusable/toggleable via its <label>. */
.city-links__toggle-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.city-links__toggle {
	display: none;
}

.city-links__toggle-text--less {
	display: none;
}

@media (max-width: 450px) {
	/* Clip to roughly one row; all links stay in the DOM either way. */
	.city-links__list {
		max-height: 2.75rem;
		overflow: hidden;
	}

	.city-links__toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.35rem;
		width: fit-content;
		margin: 0.6rem auto 0;
		padding: 0.35rem 0.8rem;
		border: 1px solid var(--line);
		border-radius: 999px;
		background: var(--panel-solid);
		color: var(--accent);
		font-size: 0.78rem;
		font-weight: 600;
		cursor: pointer;
	}

	.city-links__toggle-arrow {
		width: 0.85rem;
		height: 0.85rem;
		transition: transform 200ms ease;
	}

	.city-links__toggle-input:checked ~ .city-links__list {
		max-height: 60rem;
	}

	.city-links__toggle-input:checked ~ .city-links__toggle .city-links__toggle-arrow {
		transform: rotate(180deg);
	}

	.city-links__toggle-input:checked ~ .city-links__toggle .city-links__toggle-text--more {
		display: none;
	}

	.city-links__toggle-input:checked ~ .city-links__toggle .city-links__toggle-text--less {
		display: inline;
	}

	.city-links__toggle-input:focus-visible ~ .city-links__toggle {
		outline: 2px solid var(--accent);
		outline-offset: 2px;
	}
}
