/* Plattegronden, kadastrale kaart, brochure en video op de objectpagina's (includes/qm_media.php) */

/* Ruimte voor de vaste balk als je via een link naar een blok springt */
main .flexibele-content section.specificaties .all-specs > .block {
	scroll-margin-top: 90px;
}

/* Aantal video's in de balk onder de foto's, net als bij Foto's */
main .flexibele-content section.slideshow-images.funda .media-bar a.video span {
	color: #ca023e;
	margin-left: -5px;
}

/* Plattegronden: van links vullen in plaats van uitgespreid over de breedte */
main .flexibele-content section.specificaties .all-specs .block#plattegronden .four-blocks.qmk-plattegronden {
	justify-content: flex-start;
	gap: 20px 40px;
}

main .flexibele-content section.specificaties .all-specs .block#plattegronden .four-blocks.qmk-plattegronden img {
	height: 200px;
	padding: 10px;
	box-sizing: border-box;
	border: 1px solid #dcd7d2;
	border-radius: 10px;
	background: #fff;
}

/* Lightbox van de plattegronden: hier is elk plaatje zelf een slide (bij de foto's zit er een
   .slide omheen), dus de slider krijgt een vaste breedte. De Extra CSS in WordPress maakt elke
   slide 80vw breed; de rand eromheen houdt de pijlen naast de witte plattegrond. */
#lightbox #lightbox-content .four-blocks.qmk-plattegronden {
	--qmk-pijlrand: min(40px, 10vw);
	width: calc(80vw + 2 * var(--qmk-pijlrand));
	max-width: none;
	padding: 0 var(--qmk-pijlrand);
	box-sizing: border-box;
}

#lightbox #lightbox-content .qmk-plattegronden img {
	background: #fff;
}

/* Bestanden (pdf): kaartje met voorbeeld dat in een nieuw tabblad opent */
.qmk-bestanden {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.qmk-plattegronden + .qmk-bestanden {
	margin-top: 30px;
}

.qmk-bestanden .qmk-bestand {
	display: flex;
	align-items: center;
	gap: 20px;
	width: calc(50% - 10px);
	box-sizing: border-box;
	padding: 15px;
	border-radius: 10px;
	background: #edebe9;
	color: #500119;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.qmk-bestanden .qmk-bestand:hover {
	background: #dcd7d2;
}

.qmk-bestanden .qmk-bestand .voorbeeld {
	flex: 0 0 72px;
	height: 100px;
	border-radius: 4px;
	background-color: #fff;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

.qmk-bestanden .qmk-bestand .titel {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
}

.qmk-bestanden .qmk-bestand .actie {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #98012e;
	font-size: 14px;
}

.qmk-bestanden .qmk-bestand .actie:before {
	content: "";
	width: 16px;
	height: 16px;
	margin-top: -1px;
	background: url(../images/Q-Makelaars-Plus.svg) no-repeat center;
	background-size: 16px;
	transition: transform 0.2s ease;
}

.qmk-bestanden .qmk-bestand:hover .actie:before {
	transform: rotate(90deg);
}

/* Video */
.qmk-video + .qmk-video {
	margin-top: 20px;
}

.qmk-video {
	position: relative;
}

.qmk-video video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 10px;
	background: #000;
}

/* Afspeelknop: rode cirkel met de Q Makelaars-driehoek; js/aanbod-media.js zet .met-knop */
.qmk-video .qmk-video-play {
	display: none;
}

.qmk-video.met-knop .qmk-video-play {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	width: 96px;
	height: 96px;
	padding: 0;
	transform: translate(-50%, -50%);
	border: 0;
	border-radius: 50%;
	background: #98012e;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: background-color 0.25s ease-in-out;
}

.qmk-video.met-knop .qmk-video-play:hover,
.qmk-video.met-knop .qmk-video-play:focus-visible {
	background: #500119;
}

.qmk-video.met-knop .qmk-video-play:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.qmk-video.met-knop.speelt .qmk-video-play {
	display: none;
}

/* Lichte waas over de hoofdfoto zodat de knop opvalt */
.qmk-video.met-knop:not(.speelt):after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.12);
	pointer-events: none;
}

/* Hoofdfoto vult het vlak (foto's zijn 3:2, het vlak 16:9); tijdens afspelen weer de hele video */
.qmk-video.met-knop:not(.speelt) video {
	cursor: pointer;
	object-fit: cover;
}

.qmk-video .qmk-video-play svg {
	display: block;
	width: 30px;
	height: 36px;
	margin-left: 6px;
	fill: #fff;
}

@media (max-width: 767px) {
	main .flexibele-content section.specificaties .all-specs .block#plattegronden .four-blocks.qmk-plattegronden {
		gap: 20px;
	}

	main .flexibele-content section.specificaties .all-specs .block#plattegronden .four-blocks.qmk-plattegronden img {
		width: calc(50% - 10px);
		height: 140px;
	}

	.qmk-bestanden .qmk-bestand {
		width: 100%;
	}

	.qmk-video.met-knop .qmk-video-play {
		width: 64px;
		height: 64px;
	}

	.qmk-video .qmk-video-play svg {
		width: 20px;
		height: 24px;
		margin-left: 4px;
	}
}
