/**
 * "Where you'll travel" split list/map — assets/css/route-split-map.css
 *
 * Uses only the theme's real CSS custom properties (--forest, --gold,
 * --gold-deep, --paper, --paper-2, --line, --radius, --shadow-sm), same
 * discipline as the rest of the theme's CSS: no invented brand tokens.
 *
 * @since 1.37.0
 */

.routemap {
	display: grid;
	grid-template-columns: minmax(260px, 380px) 1fr;
	gap: 24px;
	align-items: start;
	margin: 18px 0 8px;
}

/* ---- List ---------------------------------------------------------- */

.routemap__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 560px;
	overflow-y: auto;
	padding-right: 4px;
}

.routemap__stop {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--card);
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.routemap__stop:hover,
.routemap__stop:focus-visible,
.routemap__stop.is-active {
	background: var(--paper-2);
	border-color: var(--gold-deep);
	transform: translateX(2px);
}

.routemap__stop:focus-visible {
	outline: 2px solid var(--gold-deep);
	outline-offset: 2px;
}

.routemap__badge {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--forest);
	color: var(--gold);
	font-family: var(--font-body);
	font-weight: 700;
	font-size: .85rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.routemap__stop.is-active .routemap__badge {
	background: var(--gold-deep);
	color: var(--white);
}

.routemap__stop-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.routemap__stop-name {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--ink);
	line-height: 1.25;
}

.routemap__stop-day {
	font-size: .8rem;
	color: var(--ink-soft);
}

.routemap__stop-link {
	margin-top: 4px;
	font-size: .78rem;
	color: var(--gold-deep);
	text-decoration: none;
	width: fit-content;
}

.routemap__stop-link:hover {
	text-decoration: underline;
}

/* ---- Map ------------------------------------------------------------ */

.routemap__mapwrap {
	position: sticky;
	top: 96px;
	aspect-ratio: 1 / 1;
	background:
		repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(42, 22, 8, .05) 40px),
		repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(42, 22, 8, .05) 40px),
		var(--paper-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}

.routemap__svg {
	display: block;
	width: 100%;
	height: 100%;
}

.routemap__bg {
	fill: transparent;
}

.routemap__route {
	fill: none;
	stroke: var(--gold-deep);
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 3 9;
}

.routemap__pin {
	cursor: pointer;
}

.routemap__pin-halo {
	fill: var(--gold-deep);
	opacity: 0;
	transform: scale(1);
	transition: opacity .15s ease, transform .15s ease;
}

.routemap__pin-dot {
	fill: var(--forest);
	stroke: var(--paper);
	stroke-width: 3;
	transition: fill .15s ease, transform .15s ease;
	transform-origin: center;
}

.routemap__pin-num {
	fill: var(--gold);
	font-family: var(--font-body);
	font-size: 10px;
	font-weight: 700;
	pointer-events: none;
}

.routemap__pin-label {
	fill: var(--ink);
	font-family: var(--font-body);
	font-size: 11px;
	font-weight: 600;
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s ease;
	paint-order: stroke;
	stroke: var(--paper);
	stroke-width: 3px;
}

.routemap__pin:hover .routemap__pin-label,
.routemap__pin.is-active .routemap__pin-label {
	opacity: 1;
}

.routemap__pin:hover .routemap__pin-halo,
.routemap__pin.is-active .routemap__pin-halo {
	opacity: .18;
	transform: scale(1.6);
}

.routemap__pin:hover .routemap__pin-dot,
.routemap__pin.is-active .routemap__pin-dot {
	fill: var(--gold-deep);
	transform: scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
	.routemap__stop,
	.routemap__pin-dot,
	.routemap__pin-halo,
	.routemap__pin-label {
		transition: none;
	}
}

/* ---- Responsive ------------------------------------------------------ */

@media (max-width: 860px) {
	.routemap {
		grid-template-columns: 1fr;
	}

	.routemap__mapwrap {
		position: static;
		aspect-ratio: 16 / 11;
		order: -1;
	}

	.routemap__list {
		max-height: none;
	}
}
