/* Sportpark De Warren: 3D-plattegrond (blok acf/sportpark) */

.sportpark {
	--sp-red: var(--red, #ce1b21);
	--sp-ink: var(--ink, #120809);
	--sp-deep: var(--deep, #3d0306);
	--sp-rule: var(--rule, #ecdcd8);
	--sp-muted: var(--muted, #6e605e);
	--sp-radius: var(--radius, 22px);
	--sp-green: #1d7a36; /* velden */

	margin-block: 1.8em;
}

.sportpark__stage {
	aspect-ratio: 16 / 10;
	container: sportpark / inline-size;
	background: #dfe9ef;
	border-radius: var(--sp-radius);
	isolation: isolate;
	max-height: 82vh;
	overflow: hidden;
	position: relative;
	transition: background .8s;
	width: 100%;
}

.sportpark.is-night .sportpark__stage { background: #0b1424; }

.sportpark__photo,
.sportpark__canvas {
	display: block;
	height: 100%;
	inset: 0;
	object-fit: cover;
	position: absolute;
	width: 100%;
}

.prose .sportpark__photo { border-radius: 0; height: 100%; }

.sportpark__canvas {
	cursor: grab;
	opacity: 0;
	outline: none;
	transition: opacity .9s;
}

.sportpark__canvas:active { cursor: grabbing; }

.sportpark.is-ready .sportpark__canvas { opacity: 1; }

.sportpark.is-ready .sportpark__photo { opacity: 0; transition: opacity .9s .3s; }

/* Zonder WebGL blijft de luchtfoto staan en verbergen we de bediening */
.sportpark:not(.is-ready) :is(.sportpark__corner, .sportpark__bar, .sportpark__dpad, .sportpark__compass, .sportpark__hint) { display: none; }

/* Kleur per soort: velden groen, gebouwen en parkeren rood */
.sportpark__pin,
.sportpark__spot,
.sportpark__card { --mark: var(--sp-red); }

.sportpark__pin--velden,
.sportpark__spot--velden,
.sportpark__card[data-kind='velden'] { --mark: var(--sp-green); }

/* ---------- Markeringen in de scène ---------- */
.sportpark__pins { inset: 0; pointer-events: none; position: absolute; z-index: 2; }

.sportpark__pin {
	align-items: center;
	background: none;
	border: 0;
	color: var(--sp-ink);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font: inherit;
	gap: 5px;
	left: 0;
	padding: 0;
	pointer-events: auto;
	position: absolute;
	top: 0;
	transition: opacity .3s;
	will-change: transform;
}

.sportpark__pin[data-hidden] { opacity: 0; pointer-events: none; }

/* Standaard alleen het puntje; de naam verschijnt bij hover, focus of de gekozen plek,
   of voor alle plekken met de knop Namen */
.sportpark:not(.show-labels) .sportpark__pin:not(:hover, :focus-visible, [aria-pressed='true']) .sportpark__pin-label {
	opacity: 0;
	transform: translateY(4px) scale(.9);
	visibility: hidden;
}

.sportpark__pin-label { transition: background .2s, color .2s, opacity .2s, transform .25s var(--ease-spring, ease), visibility .2s; }

.sportpark__pin-dot { position: relative; }

/* Grotere klikvlakken voor alleen het puntje */
.sportpark__pin-dot::before { border-radius: 50%; content: ''; inset: -12px; position: absolute; }

/* Clubgebouw staat altijd vooraan; een gekozen plek of hover komt daar nog boven */
.sportpark__pin[data-spot='clubgebouw'] { z-index: 2; }

.sportpark__pin:hover,
.sportpark__pin:focus-visible,
.sportpark__pin[aria-pressed='true'] { z-index: 3; }

.sportpark__pin-label {
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 8px 20px -10px rgb(0 0 0 / 55%);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	padding: 7px 11px 7px 7px;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 7px;
	transition: background .2s, color .2s, transform .25s var(--ease-spring, ease);
}

.sportpark__pin-num {
	background: var(--mark);
	border-radius: 50%;
	color: #fff;
	display: grid;
	font-size: 11px;
	height: 20px;
	place-items: center;
	width: 20px;
}

.sportpark__pin-dot {
	background: var(--mark);
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--mark) 30%, transparent);
	height: 14px;
	width: 14px;
}

.sportpark__pin:hover .sportpark__pin-label,
.sportpark__pin:focus-visible .sportpark__pin-label,
.sportpark__pin[aria-pressed='true'] .sportpark__pin-label { background: var(--mark); color: #fff; transform: translateY(-2px); }

.sportpark__pin:hover .sportpark__pin-num,
.sportpark__pin:focus-visible .sportpark__pin-num,
.sportpark__pin[aria-pressed='true'] .sportpark__pin-num { background: #fff; color: var(--mark); }

.sportpark__pin-name { display: grid; gap: 2px; text-align: left; }

.sportpark__pin-sub { font-size: 11px; font-weight: 600; opacity: .7; }

.sportpark__pin:focus-visible { outline: none; }

.sportpark__pin:focus-visible .sportpark__pin-label { outline: 3px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
	.sportpark__pin-dot { animation: sportpark-ping 2.2s infinite; }
}

@keyframes sportpark-ping { 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--mark) 0%, transparent); } }

/* ---------- Bediening ---------- */
.sportpark__corner { align-items: center; display: flex; gap: 8px; position: absolute; right: 14px; top: 14px; z-index: 6; }

.sportpark__fullscreen { color: var(--sp-ink); width: 44px; }

.sportpark__fs-close { display: none; }

.sportpark.is-fullscreen .sportpark__fs-open { display: none; }

.sportpark.is-fullscreen .sportpark__fs-close { display: block; }

.sportpark__tool,
.sportpark__toggle {
	align-items: center;
	backdrop-filter: blur(10px);
	background: rgb(255 255 255 / 85%);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 8px 22px -12px rgb(0 0 0 / 50%);
	color: var(--sp-ink);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	min-height: 44px;
	transition: background .2s;
}

.sportpark__tool { font-size: 20px; line-height: 1; width: 44px; }

.sportpark__tool:hover,
.sportpark__toggle:hover { background: #fff; }

.sportpark__tool:focus-visible,
.sportpark__toggle:focus-visible,
.sportpark__spot:focus-visible,
.sportpark__card-close:focus-visible { outline: 3px solid var(--sp-red); outline-offset: 2px; }

.sportpark__toggle { font-size: 14px; gap: 10px; padding: 5px 5px 5px 16px; }

.sportpark__switch {
	background: #f6c35b;
	border-radius: 999px;
	height: 32px;
	position: relative;
	transition: background .5s;
	width: 56px;
}

.sportpark__switch::after {
	align-items: center;
	background: #fff;
	border-radius: 50%;
	content: '☀';
	display: flex;
	font-size: 14px;
	height: 26px;
	justify-content: center;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: transform .5s var(--ease-spring, ease);
	width: 26px;
}

.sportpark.is-night .sportpark__switch { background: #213a5e; }

.sportpark.is-night .sportpark__switch::after { content: '☾'; transform: translateX(24px); }

.sportpark__compass {
	align-items: center;
	backdrop-filter: blur(10px);
	background: rgb(255 255 255 / 85%);
	border-radius: 50%;
	box-shadow: 0 8px 22px -12px rgb(0 0 0 / 50%);
	display: flex;
	height: 44px;
	justify-content: center;
	left: 14px;
	position: absolute;
	top: 14px;
	width: 44px;
	z-index: 3;
}

/* Naald: rode punt wijst naar het noorden, grijze staart naar het zuiden */
.sportpark__compass-rose {
	display: block;
	height: 40px;
	position: relative;
	width: 40px;
	will-change: transform;
}

.sportpark__compass-rose b {
	color: var(--sp-ink);
	font-size: 10px;
	font-weight: 700;
	left: 50%;
	line-height: 1;
	position: absolute;
	top: 2px;
	transform: translateX(-50%);
}

.sportpark__compass-rose i::before,
.sportpark__compass-rose i::after {
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	content: '';
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
}

.sportpark__compass-rose i::before { border-bottom: 12px solid var(--sp-red); top: 13px; }

.sportpark__compass-rose i::after { border-top: 12px solid #a9a3a1; top: 25px; }

.sportpark__hint {
	backdrop-filter: blur(10px);
	background: rgb(18 8 9 / 70%);
	border-radius: 999px;
	bottom: 72px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	left: 50%;
	margin: 0;
	padding: 7px 14px;
	pointer-events: none;
	position: absolute;
	transform: translateX(-50%);
	transition: opacity .5s;
	white-space: nowrap;
	z-index: 3;
}

.sportpark__hint.is-hidden { opacity: 0; }

.sportpark__hint--touch { display: none; }

@media (pointer: coarse) {
	.sportpark__hint--mouse { display: none; }
	.sportpark__hint--touch { display: inline; }
}

/* ---------- Infokaart ---------- */
.sportpark__card {
	background: #fff;
	border-radius: 18px;
	bottom: 72px;
	box-shadow: 0 18px 40px -18px rgb(0 0 0 / 55%);
	left: 14px;
	max-width: min(340px, calc(100% - 190px));
	padding: 18px 44px 18px 20px;
	position: absolute;
	z-index: 4;
}

.sportpark__card[hidden] { display: none; }

.sportpark .sportpark__card p { margin: 0; }

.sportpark .sportpark__card-title { align-items: center; display: flex; font-size: 20px; font-weight: 700; gap: 10px; line-height: 1.2; text-transform: uppercase; }

.sportpark__card-num {
	background: var(--mark);
	border-radius: 50%;
	color: #fff;
	display: grid;
	flex: none;
	font-size: 14px;
	height: 28px;
	place-items: center;
	width: 28px;
}

.sportpark .sportpark__card-subtitle { color: var(--mark); font-size: 15px; font-weight: 700; margin-top: 2px; padding-left: 38px; }

.sportpark__card-subtitle[hidden] { display: none; }

.sportpark .sportpark__card-text { color: var(--sp-muted); font-size: 15px; line-height: 1.5; margin-top: 6px; }

.sportpark .sportpark__card-link { color: var(--sp-red); font-size: 15px; margin-top: 10px; }

.sportpark__card-close {
	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--sp-muted);
	cursor: pointer;
	font-size: 24px;
	height: 40px;
	line-height: 1;
	position: absolute;
	right: 4px;
	top: 4px;
	width: 40px;
}

/* ---------- Lijst met plekken ---------- */
.sportpark__legend { display: grid; gap: 18px; margin-top: 16px; }

.sportpark .sportpark__group-title {
	color: var(--sp-muted);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.prose .sportpark__list,
.sportpark__list {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.prose .sportpark__list li { margin: 0; }

.sportpark__spot {
	align-items: flex-start;
	background: #fff;
	border: 1px solid var(--sp-rule);
	border-radius: 16px;
	color: var(--sp-ink);
	cursor: pointer;
	display: flex;
	font: inherit;
	gap: 12px;
	height: 100%;
	padding: 12px 14px;
	text-align: left;
	transition: border-color .2s, transform .2s;
	width: 100%;
}

.sportpark__spot:hover { border-color: var(--mark); }

.sportpark__spot[aria-pressed='true'] { border-color: var(--mark); box-shadow: inset 0 0 0 1px var(--mark); }

.sportpark__spot-num {
	background: var(--mark);
	border-radius: 50%;
	color: #fff;
	display: grid;
	flex: none;
	font-size: 13px;
	font-weight: 700;
	height: 26px;
	place-items: center;
	width: 26px;
}

.sportpark__spot-body { display: grid; gap: 2px; }

.sportpark__spot-title { font-size: 16px; font-weight: 700; line-height: 1.3; }

.sportpark__spot-subtitle { color: var(--mark); font-size: 14px; font-weight: 700; line-height: 1.3; }

.sportpark__spot-text { color: var(--sp-muted); font-size: 14px; line-height: 1.45; }

/* Zonder 3D is de lijst gewoon informatie, geen bediening */
.sportpark:not(.is-ready) .sportpark__spot { cursor: default; }

.sportpark:not(.is-ready) .sportpark__spot:hover { border-color: var(--sp-rule); }

/* ---------- Editor ---------- */
.sportpark--editor .sportpark__photo { opacity: 1; }

.sportpark__editor-note {
	background: rgb(18 8 9 / 75%);
	border-radius: 12px;
	bottom: 14px;
	color: #fff;
	font-size: 14px;
	left: 14px;
	margin: 0;
	padding: 8px 12px;
	position: absolute;
}

@media (max-width: 700px) {
	/* Op een telefoon ruim 80% van de schermhoogte (svh: zonder de adresbalk mee te tellen) */
	.sportpark__stage { aspect-ratio: auto; border-radius: 16px; height: 82vh; height: 82svh; max-height: none; }
	.sportpark__pin-label { font-size: 0; gap: 0; padding: 4px; }
	.sportpark__pin-num { font-size: 11px; }
	.sportpark__pin-name { display: none; }
	.sportpark__toggle-label { display: none; }
	.sportpark__toggle { padding: 5px; }
	.sportpark__card { bottom: 66px; left: 10px; max-width: calc(100% - 20px); right: 10px; }
	.sportpark__hint { font-size: 12px; }
}

.sportpark__stage:has(.sportpark__card:not([hidden])) .sportpark__hint { opacity: 0; }

.sportpark__card-link[hidden] { display: none; }

/* ---------- Balk linksonder: labels (en op een smalle kaart de bediening) ---------- */
.sportpark__bar {
	align-items: center;
	backdrop-filter: blur(12px);
	background: rgb(255 255 255 / 88%);
	border-radius: 999px;
	bottom: 14px;
	box-shadow: 0 10px 26px -14px rgb(0 0 0 / 55%);
	display: flex;
	gap: 4px;
	left: 14px;
	padding: 5px;
	position: absolute;
	z-index: 5;
}

.sportpark__chip {
	align-items: center;
	background: none;
	border: 0;
	border-radius: 999px;
	color: var(--sp-ink);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	gap: 7px;
	min-height: 40px;
	padding: 0 14px 0 10px;
	transition: background .2s, color .2s;
	white-space: nowrap;
}

.sportpark__chip:hover { background: rgb(0 0 0 / 6%); }

.sportpark__chip[aria-pressed='true'],
.sportpark__chip[aria-expanded='true'] { background: var(--sp-ink); color: #fff; }

.sportpark__chip:focus-visible,
.sportpark__pad:focus-visible { outline: 3px solid var(--sp-red); outline-offset: 2px; }

.sportpark__chip-icon { display: grid; font-size: 12px; height: 20px; min-width: 20px; place-items: center; }

.sportpark__chip--more { display: none; }

/* ---------- D-pad rechtsonder: verschuiven, zoomen, terug en rondvlucht ---------- */
.sportpark__dpad {
	backdrop-filter: blur(12px);
	background: rgb(255 255 255 / 88%);
	border-radius: 28px;
	bottom: 14px;
	box-shadow: 0 10px 26px -14px rgb(0 0 0 / 55%);
	display: grid;
	gap: 2px;
	grid-template-areas:
		'reset up    .'
		'left  tour  right'
		'out   down  in';
	grid-template-columns: repeat(3, 40px);
	grid-template-rows: repeat(3, 40px);
	padding: 6px;
	position: absolute;
	right: 14px;
	z-index: 5;
}

.sportpark__pad {
	align-items: center;
	background: none;
	border: 0;
	border-radius: 12px;
	color: var(--sp-ink);
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	justify-content: center;
	padding: 0;
	transition: background .2s, color .2s, transform .15s;
}

.sportpark__pad:hover { background: rgb(0 0 0 / 7%); }

.sportpark__pad:active { transform: scale(.92); }

.sportpark__pad--up { grid-area: up; }

.sportpark__pad--down { grid-area: down; }

.sportpark__pad--left { grid-area: left; }

.sportpark__pad--right { grid-area: right; }

.sportpark__pad--reset { font-size: 17px; grid-area: reset; }

.sportpark__pad--out,
.sportpark__pad--in { font-size: 22px; font-weight: 600; }

.sportpark__pad--out { grid-area: out; }

.sportpark__pad--in { grid-area: in; }

/* Rondvlucht: de grote knop in het midden */
.sportpark__pad--tour {
	background: var(--sp-red);
	border-radius: 50%;
	box-shadow: 0 6px 14px -6px var(--sp-red);
	color: #fff;
	font-size: 13px;
	grid-area: tour;
	letter-spacing: -.1em;
}

.sportpark__pad--tour:hover { background: var(--sp-ink); }

.sportpark__pad--tour[aria-pressed='true'] { background: var(--sp-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sp-red) 35%, transparent); }

/* Kaartje en tip schuiven boven de bediening */
.sportpark__hint { bottom: 18px; max-width: calc(100% - 360px); overflow: hidden; text-overflow: ellipsis; }

/* Smalle kaart: d-pad achter de knop Bediening, kaartje erboven */
@container sportpark (max-width: 560px) {
	.sportpark__chip--more { display: inline-flex; }
	.sportpark__dpad { display: none; }
	.sportpark.is-nav-open .sportpark__dpad { display: grid; }
	.sportpark.is-nav-open .sportpark__card { bottom: 172px; }
	.sportpark__hint { bottom: 70px; max-width: calc(100% - 28px); }
	.sportpark.is-nav-open .sportpark__hint { opacity: 0; }
}

@container sportpark (max-width: 380px) {
	.sportpark__chip { padding: 0 12px; }
	.sportpark__chip-text { clip: rect(0 0 0 0); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
}

/* ---------- Volledig scherm ----------
   Echt volledig scherm via de Fullscreen API; waar dat niet kan (iPhone)
   legt de kaart zich als laag over de pagina. */
.sportpark__stage:fullscreen,
.sportpark.is-fullscreen .sportpark__stage {
	aspect-ratio: auto;
	border-radius: 0;
	height: 100%;
	max-height: none;
	width: 100%;
}

.sportpark.is-fullscreen-fallback .sportpark__stage {
	height: 100vh;
	height: 100dvh;
	inset: 0;
	position: fixed;
	z-index: 10000;
}

.sportpark.is-fullscreen .sportpark__corner { top: max(14px, env(safe-area-inset-top)); }

.sportpark.is-fullscreen .sportpark__bar,
.sportpark.is-fullscreen .sportpark__dpad { bottom: max(14px, env(safe-area-inset-bottom)); }
