/* Regatta Duisburg – interactive venue map ("Lageplan").
 * Colours follow the official venue plan and the theme variables (--color-*, --font-*).
 * Override e.g. .rvm { --rvm-hl: #6eebfc; }
 */
.rvm {
	--rvm-navy: var(--color-dark, #14206c);
	--rvm-ground: #121d63;
	--rvm-water: var(--color-primary, #2e6cf1);
	--rvm-place: #ff6a00;
	--rvm-place-side: #b84400;
	--rvm-red: var(--color-accent, #ff5929);
	--rvm-lime: var(--color-secondary, #d9ff03);
	--rvm-hl: var(--color-secondary, #d9ff03);
	--rvm-text: #fff;
	--rvm-muted: rgba(255, 255, 255, 0.68);
	--rvm-font-heading: var(--font-heading, "made_outer_sans_alt", "DM Sans", sans-serif);
	--rvm-font-body: var(--font-body, "DM Sans", sans-serif);
	--rvm-radius: 24px;

	container-type: inline-size;
	position: relative;
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
	padding: clamp(20px, 4cqi, 48px);
	border-radius: var(--rvm-radius);
	background:
		radial-gradient(120% 80% at 80% 0%, rgba(46, 108, 241, 0.25), transparent 60%),
		var(--rvm-ground);
	color: var(--rvm-text);
	font-family: var(--rvm-font-body);
	line-height: 1.4;
}

.rvm *,
.rvm *::before,
.rvm *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------ Header */
.rvm__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: clamp(12px, 2.5cqi, 28px);
}

.rvm .rvm__title {
	margin: 0;
	color: var(--rvm-lime);
	font-family: var(--rvm-font-heading);
	font-size: clamp(28px, 6cqi, 72px);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.rvm__address {
	color: var(--rvm-lime);
	font-size: 14px;
	font-style: normal;
}

.rvm__route {
	display: inline-block;
	margin-left: 10px;
	color: var(--rvm-text);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rvm__route:hover,
.rvm__route:focus-visible {
	color: var(--rvm-lime);
}

/* ------------------------------------------------------------ Layout */
.rvm__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@container (min-width: 860px) {
	.rvm__body {
		grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
		align-items: start;
	}
}

.rvm__map {
	position: relative;
}

.rvm__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: hidden;
	/* One finger scrolls the page; two-finger pinch / pan is handled by venue-map.js. Never "none": on a
	   phone the map fills most of the screen and the page could not be scrolled any more. */
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.rvm.is-zoomed .rvm__svg {
	cursor: grab;
}

.rvm.is-panning .rvm__svg {
	cursor: grabbing;
}

/* ------------------------------------------------------------ Base map */
.rvm-road { fill: #6f6767; fill-rule: evenodd; }
.rvm-building { fill: #e8e8e8; }
.rvm-dock { fill: var(--rvm-place); }

/* Animated water: wave pattern drifting slowly. */
.rvm-waves {
	opacity: 0.1;
	animation: rvm-waves 9s linear infinite;
}

@keyframes rvm-waves {
	from { transform: translate(0, 0); }
	to { transform: translate(-64px, -26px); }
}

/* ------------------------------------------------------------ Race course on the map */
.rvm-lanes { cursor: pointer; }
.rvm-lanes__hit { fill: transparent; transition: fill 0.2s ease; }

.rvm-lanes__line {
	stroke: rgba(255, 255, 255, 0.55);
	stroke-width: 1.6;
	stroke-dasharray: 1 7;
	stroke-linecap: round;
	transition: stroke 0.2s ease;
}

.rvm-lanes__finish {
	stroke: #fff;
	stroke-width: 5;
}

.rvm-lanes__finish--check {
	stroke: var(--rvm-navy);
	stroke-dasharray: 5 5;
}

.rvm-lanes__label { text-anchor: middle; }

.rvm-lanes__label,
.rvm-lanes__start {
	fill: #fff;
	font-family: var(--rvm-font-body);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	pointer-events: none;
}

.rvm-lanes__arrow {
	fill: none;
	stroke: #fff;
	stroke-width: 2.5;
	stroke-dasharray: 4 5;
	stroke-linecap: round;
}

.rvm-lanes.is-active .rvm-lanes__hit { fill: rgba(217, 255, 3, 0.16); }
.rvm-lanes.is-active .rvm-lanes__line { stroke: var(--rvm-hl); }
.rvm-lanes.is-active .rvm-lanes__label,
.rvm-lanes.is-active .rvm-lanes__start { fill: var(--rvm-hl); }

/* ------------------------------------------------------------ Zones */
.rvm-zone__fill {
	fill: transparent;
	transition: fill 0.2s ease;
}

.rvm-zone__ring {
	fill: none;
	stroke-width: 6.5;
	stroke-linejoin: round;
}

.rvm-zone--accreditation .rvm-zone__ring { stroke: var(--rvm-lime); }
.rvm-zone--spectators .rvm-zone__ring { stroke: var(--rvm-red); }

.rvm-zone--accreditation.is-active .rvm-zone__fill { fill: rgba(217, 255, 3, 0.18); }
.rvm-zone--spectators.is-active .rvm-zone__fill { fill: rgba(255, 89, 41, 0.22); }

.rvm-zone { cursor: pointer; }

/* ------------------------------------------------------------ Places (raised blocks) */
.rvm-place__top path {
	fill: var(--rvm-place);
	transition: fill 0.2s ease;
}

.rvm-place__side path {
	fill: var(--rvm-place-side);
	transition: fill 0.2s ease;
}

.rvm-place__side {
	filter: drop-shadow(0 5px 4px rgba(4, 8, 40, 0.45));
}

.rvm-place__top {
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rvm-place--area .rvm-place__top path {
	fill: rgba(255, 255, 255, 0);
	stroke: transparent;
	stroke-width: 2;
	stroke-dasharray: 6 5;
}

.rvm-place,
.rvm-poi,
.rvm-entry {
	cursor: pointer;
	outline: none;
}

.rvm-label {
	fill: var(--rvm-lime);
	font-family: var(--rvm-font-heading);
	font-size: 30px;
	font-weight: 400;
	text-anchor: middle;
	dominant-baseline: central;
	pointer-events: none;
	transition: fill 0.2s ease, opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Toilets, first aid */
.rvm-wc rect { fill: #fff; stroke: var(--rvm-navy); stroke-width: 1; }
.rvm-wc text {
	fill: var(--rvm-navy);
	font-family: var(--rvm-font-body);
	font-size: 11px;
	font-weight: 700;
	text-anchor: middle;
}
.rvm-aid rect { fill: #3fa34d; }
.rvm-aid path { fill: #fff; }

/* Entrances (with a soft pulse) */
.rvm-entry circle { fill: var(--rvm-lime); }
.rvm-entry--spectators circle { fill: var(--rvm-red); }
.rvm-entry path {
	fill: none;
	stroke: var(--rvm-navy);
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.rvm-entry--spectators path { stroke: #fff; }

.rvm-entry__pulse {
	opacity: 0.5;
	transform-box: fill-box;
	transform-origin: center;
	animation: rvm-pulse 2.4s ease-out infinite;
}

@keyframes rvm-pulse {
	from { transform: scale(1); opacity: 0.5; }
	to { transform: scale(1.7); opacity: 0; }
}

.rvm-poi > g,
.rvm-entry > g {
	transition: opacity 0.2s ease;
}

/* ------------------------------------------------------------ Highlight state */
/* While something is highlighted, the whole background and everything else interactive is dimmed
 * (solid darker colour for shapes, so outlines below do not shine through). */
.rvm-base,
.rvm-zone,
.rvm-lanes {
	transition: opacity 0.2s ease;
}

.rvm.has-active .rvm-base,
.rvm.has-active .rvm-zone:not(.is-active),
.rvm.has-active .rvm-lanes:not(.is-active) {
	opacity: 0.4;
}

.rvm.has-active .rvm-place:not(.is-active):not(.rvm-place--area) .rvm-place__top path {
	fill: color-mix(in srgb, var(--rvm-place) 32%, var(--rvm-ground));
}

.rvm.has-active .rvm-place:not(.is-active) .rvm-place__side path {
	fill: color-mix(in srgb, var(--rvm-place-side) 32%, var(--rvm-ground));
}

.rvm.has-active .rvm-poi:not(.is-active) > g,
.rvm.has-active .rvm-entry:not(.is-active) > g {
	opacity: 0.32;
}

.rvm.has-active .rvm-label { opacity: 0.4; }
.rvm.has-active .rvm-label.is-active { opacity: 1; }

/* The highlighted block lifts up. */
.rvm-place.is-active .rvm-place__top {
	transform: translateY(-5px);
}

.rvm-place.is-active .rvm-place__top path {
	fill: var(--rvm-hl);
}

.rvm-place.is-active .rvm-place__side path {
	fill: #8fa800;
}

.rvm-place.is-active .rvm-place__side {
	filter: drop-shadow(0 0 10px rgba(217, 255, 3, 0.6));
}

.rvm-label.is-active:not(.is-area) {
	transform: translateY(-5px);
}

.rvm-place--area.is-active .rvm-place__top {
	transform: none;
}

.rvm-place--area.is-active .rvm-place__top path {
	fill: rgba(217, 255, 3, 0.2);
	stroke: var(--rvm-hl);
}

.rvm-label.is-active { fill: var(--rvm-navy); }
.rvm-label.is-active.is-area { fill: var(--rvm-lime); }

.rvm-poi.is-active > g,
.rvm-entry.is-active > g {
	filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.85));
}

/* Facilities inside a highlighted zone */
.rvm.has-active .rvm-place.is-in-zone:not(.rvm-place--area) .rvm-place__top path { fill: var(--rvm-place); }
.rvm.has-active .rvm-place.is-in-zone .rvm-place__side path { fill: var(--rvm-place-side); }

/* ------------------------------------------------------------ Zoom controls */
.rvm__zoom {
	position: absolute;
	z-index: 2;
	top: 10px;
	right: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rvm__zoom button {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: rgba(18, 29, 99, 0.85);
	color: var(--rvm-lime);
	font: 700 22px/1 var(--rvm-font-body);
	cursor: pointer;
	box-shadow: 0 0 0 1px rgba(217, 255, 3, 0.35);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.rvm__zoom button:hover,
.rvm__zoom button:focus-visible {
	background: var(--rvm-lime);
	color: var(--rvm-navy);
	outline: none;
}

.rvm__zoom button[hidden] { display: none; }

.rvm__zoom svg {
	width: 18px;
	height: 18px;
}

.rvm__below {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin-top: 8px;
}

.rvm__zoom-hint {
	margin: 0;
	color: var(--rvm-muted);
	font-size: 12px;
}

.rvm__zoom-hint-touch { display: none; }

@media (hover: none) and (pointer: coarse) {
	.rvm__zoom-hint-mouse { display: none; }
	.rvm__zoom-hint-touch { display: inline; }
}

/* Short hint after a one-finger drag on a zoomed map (touch). */
.rvm__gesture {
	position: absolute;
	z-index: 5;
	left: 50%;
	top: 50%;
	padding: 10px 16px;
	border-radius: 999px;
	background: rgba(4, 8, 40, 0.82);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, -50%);
	transition: opacity 0.2s ease;
}

.rvm__gesture.is-visible { opacity: 1; }

/* ------------------------------------------------------------ Tooltip */
.rvm__tip {
	position: absolute;
	z-index: 3;
	left: 0;
	top: 0;
	max-width: 240px;
	padding: 7px 12px;
	border-radius: 10px;
	background: var(--rvm-lime);
	color: var(--rvm-navy);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	white-space: nowrap;
	pointer-events: none;
	transform: translate(-50%, calc(-100% - 12px));
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.rvm__tip::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 12px;
	height: 12px;
	background: inherit;
	transform: translateX(-50%) rotate(45deg);
}

.rvm__tip[hidden] { display: none; }

/* ------------------------------------------------------------ Legend */
.rvm__hint {
	margin: 0 0 14px;
	color: var(--rvm-muted);
	font-size: 13px;
}

.rvm .rvm__legend-title {
	margin: 18px 0 6px;
	color: var(--rvm-muted);
	font-family: var(--rvm-font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.rvm .rvm__legend-title:first-of-type { margin-top: 0; }

.rvm .rvm-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 0 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rvm .rvm-list > li {
	margin: 0;
	padding: 0;
}

.rvm-item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 6px 8px;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 0;
	background: transparent;
	color: var(--rvm-lime);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.rvm-item:hover,
.rvm-item:focus-visible,
.rvm-item.is-active {
	background: var(--rvm-lime);
	color: var(--rvm-navy);
	border-radius: 8px;
	outline: none;
}

.rvm-item__num {
	flex: 0 0 26px;
	font-variant-numeric: tabular-nums;
}

.rvm-item__icon {
	display: block;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	overflow: hidden;
}

.rvm-item:hover .rvm-item__icon .rvm-icon-ring,
.rvm-item:focus-visible .rvm-item__icon .rvm-icon-ring,
.rvm-item.is-active .rvm-item__icon .rvm-icon-ring {
	stroke: var(--rvm-navy);
}

/* ------------------------------------------------------------ Info cards */
.rvm__cards {
	position: absolute;
	z-index: 4;
	left: 12px;
	bottom: 52px;
	width: min(320px, calc(100% - 24px));
	pointer-events: none;
}

.rvm-card {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	color: var(--rvm-navy);
	box-shadow: 0 16px 40px rgba(4, 8, 40, 0.45);
	pointer-events: auto;
	animation: rvm-card-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rvm-card[hidden] {
	display: none;
}

@keyframes rvm-card-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.rvm-card__img {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
}

.rvm-card__body {
	padding: 14px 16px 16px;
}

.rvm .rvm-card__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 28px 6px 0;
	color: var(--rvm-navy);
	font-family: var(--rvm-font-body);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
}

.rvm-card__num {
	display: inline-grid;
	flex: 0 0 auto;
	place-items: center;
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	border-radius: 8px;
	background: var(--rvm-place);
	color: #fff;
	font-size: 14px;
}

.rvm-card__hours {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
}

.rvm-card__hours svg {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}

.rvm-card__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
}

.rvm-card__close {
	position: absolute;
	z-index: 1;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(20, 32, 108, 0.75);
	color: #fff;
	font: 400 22px/32px var(--rvm-font-body);
	text-align: center;
	cursor: pointer;
}

.rvm-card__close:hover,
.rvm-card__close:focus-visible {
	background: var(--rvm-navy);
	outline: 2px solid var(--rvm-lime);
}

/* Narrow: the card goes below the map instead of covering it. */
@container (max-width: 560px) {
	.rvm__cards {
		position: static;
		width: auto;
		margin-top: 12px;
	}
}

.rvm-item__info {
	display: inline-grid;
	flex: 0 0 auto;
	place-items: center;
	width: 18px;
	height: 18px;
	margin-left: auto;
	border-radius: 50%;
	background: var(--rvm-lime);
	color: var(--rvm-ground);
	font-size: 11px;
	font-style: italic;
	line-height: 1;
}

.rvm-item:hover .rvm-item__info,
.rvm-item:focus-visible .rvm-item__info,
.rvm-item.is-active .rvm-item__info {
	background: var(--rvm-navy);
	color: var(--rvm-lime);
}

.rvm .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	white-space: nowrap;
}

/* Without legend the map uses the full width. */
.rvm--no-legend .rvm__body { grid-template-columns: minmax(0, 1fr); }

@media (prefers-reduced-motion: reduce) {
	.rvm *,
	.rvm *::before,
	.rvm *::after {
		transition: none !important;
	}

	.rvm .rvm-waves,
	.rvm .rvm-entry__pulse {
		animation: none;
	}
}
