/* onScreen Elementen Blox — OS Detail
 * Beeld links/rechts/boven van de tekst (prefix-class osb-dt-layout[-tablet|-mobile]-*),
 * beeld schaalt naar verhouding binnen kolombreedte en max-hoogte.
 */

.osb-dt {
	--osb-dt-img: 55%;
	--osb-dt-gap: 64px;
	--osb-dt-thumb: 80px;
	--osb-dt-thumb-active: #1d1d1f;
	--osb-dt-navthumb: 56px;
	--osb-dt-btn-color: inherit;
	--osb-dt-btn-bg: currentColor;
	--osb-dt-btn-color-h: #fff;
	--osb-dt-btn-bg-h: currentColor;
	--osb-dt-btn-bw: 2px;

	display: flex;
	flex-wrap: wrap;
	gap: var(--osb-dt-gap);
	align-items: flex-start;
}
.osb-dt--empty {
	padding: 24px;
	opacity: .6;
	border: 1px dashed currentColor;
}

/* kolommen */
.osb-dt__media {
	flex: 0 0 calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2);
	max-width: calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2);
	min-width: 0;
	box-sizing: border-box;
}
.osb-dt__body {
	flex: 1 1 0;
	min-width: 0;
}
.osb-dt__nav {
	flex: 0 0 100%;
}
.osb-dt-layout-right .osb-dt__media { order: 2; }
.osb-dt-layout-right .osb-dt__body { order: 1; }
.osb-dt-layout-top .osb-dt__media,
.osb-dt-layout-top .osb-dt__body {
	flex: 0 0 100%;
	max-width: 100%;
	order: 0;
}
@media (max-width: 1024px) {
	.osb-dt-layout-tablet-left .osb-dt__media { order: 0; flex: 0 0 calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2); max-width: calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2); }
	.osb-dt-layout-tablet-left .osb-dt__body { order: 0; flex: 1 1 0; max-width: none; }
	.osb-dt-layout-tablet-right .osb-dt__media { order: 2; flex: 0 0 calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2); max-width: calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2); }
	.osb-dt-layout-tablet-right .osb-dt__body { order: 1; flex: 1 1 0; max-width: none; }
	.osb-dt-layout-tablet-top .osb-dt__media,
	.osb-dt-layout-tablet-top .osb-dt__body { flex: 0 0 100%; max-width: 100%; order: 0; }
}
@media (max-width: 767px) {
	.osb-dt-layout-mobile-left .osb-dt__media { order: 0; flex: 0 0 calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2); max-width: calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2); }
	.osb-dt-layout-mobile-left .osb-dt__body { order: 0; flex: 1 1 0; max-width: none; }
	.osb-dt-layout-mobile-right .osb-dt__media { order: 2; flex: 0 0 calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2); max-width: calc(var(--osb-dt-img) - var(--osb-dt-gap) / 2); }
	.osb-dt-layout-mobile-right .osb-dt__body { order: 1; flex: 1 1 0; max-width: none; }
	.osb-dt-layout-mobile-top .osb-dt__media,
	.osb-dt-layout-mobile-top .osb-dt__body { flex: 0 0 100%; max-width: 100%; order: 0; }
}
@media (min-width: 1025px) {
	.osb-dt-sticky-yes .osb-dt__media { position: sticky; top: 24px; }
}

/* hoofdbeeld */
.osb-dt__main {
	display: flex;
	justify-content: center;
	line-height: 0;
}
.osb-dt__link {
	position: relative;
	display: inline-block;
	max-width: 100%;
	line-height: 0;
	text-decoration: none;
	color: inherit;
}
.osb-dt__main img {
	display: block;
	max-width: 100%;
	width: auto;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
	box-sizing: border-box;
	transition: transform .4s ease;
}
.osb-dt-zoom-yes .osb-dt__link:hover img {
	transform: scale(1.02);
}
.osb-dt__placeholder {
	min-height: 240px;
	align-items: center;
	border: 1px dashed currentColor;
	opacity: .5;
	line-height: 1.4;
}

/* video in plaats van het beeld */
.osb-dt__videowrap {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	line-height: 0;
}
.osb-dt__videowrap[hidden] { display: none; }
.osb-dt__main video,
.osb-dt__main .osb-video--embed {
	display: block;
	width: 100%; /* JS (fitVideo) maakt hiervan min(100%, max-hoogte × verhouding) */
	max-width: 100%;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
	background: transparent;
	box-sizing: border-box;
}
.osb-dt__videowrap { display: flex; justify-content: center; }
.osb-dt__videoinner {
	position: relative;
	display: block;
	width: 100%; /* JS: min(100%, max-hoogte × verhouding) */
	max-width: 100%;
	line-height: 0;
}
/* bijsnijden: balken die in het bestand zitten vallen buiten het kader */
.osb-dt__videoinner[data-osb-crop] video {
	aspect-ratio: var(--osb-crop);
	height: auto;
	object-fit: cover;
}
.osb-dt__main .osb-video--embed {
	width: 100%;
	aspect-ratio: 16 / 9;
}
.osb-dt__main .osb-video--embed iframe {
	width: 100%;
	height: 100%;
}
.osb-dt .osb-dt__thumb--video {
	position: relative;
	background: transparent;
}
.osb-dt__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: transparent;
	pointer-events: none;
}
.osb-dt__play svg {
	width: 40%;
	height: 40%;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
}

/* badge + zoom */
.osb-dt__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 6px 12px;
	line-height: 1.2;
	border-radius: 4px;
	background: #b3261e;
	color: #fff;
	pointer-events: none;
}
.osb-dt-badge-tr .osb-dt__badge { left: auto; right: 14px; }
.osb-dt-badge-bl .osb-dt__badge { top: auto; bottom: 14px; }
.osb-dt-badge-br .osb-dt__badge { top: auto; bottom: 14px; left: auto; right: 14px; }
.osb-dt__zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .9);
	color: #1d1d1f;
	opacity: .85;
	transition: opacity .2s;
	pointer-events: none;
}
.osb-dt__zoom svg { width: 20px; height: 20px; }
.osb-dt__link:hover .osb-dt__zoom { opacity: 1; }

/* thumbnails */
.osb-dt__thumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 10px;
}
.osb-dt .osb-dt__thumb,
.osb-dt .osb-dt__thumb:hover,
.osb-dt .osb-dt__thumb:focus {
	-webkit-appearance: none;
	appearance: none;
	width: var(--osb-dt-thumb);
	height: var(--osb-dt-thumb);
	min-width: 0;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	line-height: 0;
	overflow: hidden;
	opacity: .7;
	transition: opacity .2s, border-color .2s;
}
.osb-dt .osb-dt__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.osb-dt .osb-dt__thumb:hover,
.osb-dt .osb-dt__thumb.is-active {
	opacity: 1;
}
.osb-dt .osb-dt__thumb.is-active {
	border-color: var(--osb-dt-thumb-active);
}
.osb-dt__video {
	margin-top: 20px;
}
.osb-dt__video iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
}

/* tekst */
.osb-dt__kicker { margin-bottom: 10px; }
.osb-dt__title { margin: 0 0 14px; font-weight: 700; line-height: 1.2; }
.osb-dt__line + .osb-dt__line { margin-top: 2px; }
.osb-dt__desc { margin-top: 20px; }
.osb-dt__desc p:last-child { margin-bottom: 0; }

/* knoppen */
.osb-dt__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}
.osb-dt__btn {
	display: inline-block;
	text-decoration: none;
	line-height: 1.2;
	border: var(--osb-dt-btn-bw) solid transparent;
	border-radius: 30px;
	transition: background-color .2s, color .2s, border-color .2s;
}
.osb-dt__btn--fill {
	background: var(--osb-dt-btn-bg);
	color: var(--osb-dt-btn-color-h);
	border-color: var(--osb-dt-btn-bg);
}
.osb-dt__btn--outline {
	background: transparent;
	color: var(--osb-dt-btn-color);
	border-color: var(--osb-dt-btn-bg);
}
.osb-dt__btn--text {
	background: transparent;
	color: var(--osb-dt-btn-color);
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.osb-dt__btn:hover,
.osb-dt__btn:focus-visible {
	background: var(--osb-dt-btn-bg-h);
	color: var(--osb-dt-btn-color-h);
	border-color: var(--osb-dt-btn-bg-h);
}
.osb-dt__btn--text:hover,
.osb-dt__btn--text:focus-visible {
	background: transparent;
	color: var(--osb-dt-btn-bg-h);
	border-color: transparent;
}

/* vorige / volgende */
.osb-dt__nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	margin-top: 48px;
	padding-top: 20px;
	border-top: 1px solid rgba(0, 0, 0, .12);
}
.osb-dt__nav-item--next { text-align: right; }
.osb-dt__nav a {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
	transition: color .2s;
}
.osb-dt__nav-text { display: flex; flex-direction: column; gap: 2px; }
.osb-dt__nav-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.osb-dt__nav-thumb {
	width: var(--osb-dt-navthumb);
	height: var(--osb-dt-navthumb);
	object-fit: cover;
	display: block;
}
@media (max-width: 767px) {
	.osb-dt__nav { grid-template-columns: 1fr 1fr; }
	.osb-dt__nav-item--back { grid-column: 1 / -1; text-align: center; order: 3; }
	.osb-dt__nav-thumb { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.osb-dt__main img, .osb-dt__thumb, .osb-dt__btn, .osb-dt__zoom { transition: none; }
}

/* inlichtingenknop (module Kiosk) is een <button>: themaknop-opmaak neutraliseren */
.osb-dt button.osb-dt__btn,
.osb-dt button.osb-dt__btn:hover,
.osb-dt button.osb-dt__btn:focus,
.osb-dt button.osb-dt__btn:active {
	-webkit-appearance: none;
	appearance: none;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
	box-shadow: none;
	filter: none;
	margin: 0;
	min-height: 0;
	width: auto;
}
.osb-dt button.osb-dt__btn--fill,
.osb-dt button.osb-dt__btn--fill:active {
	background: var(--osb-dt-btn-bg);
	color: var(--osb-dt-btn-color-h);
	border-color: var(--osb-dt-btn-bg);
}
.osb-dt button.osb-dt__btn--outline,
.osb-dt button.osb-dt__btn--outline:active {
	background: transparent;
	color: var(--osb-dt-btn-color);
	border-color: var(--osb-dt-btn-bg);
}
.osb-dt button.osb-dt__btn--text,
.osb-dt button.osb-dt__btn--text:active {
	background: transparent;
	color: var(--osb-dt-btn-color);
	border-color: transparent;
}
.osb-dt button.osb-dt__btn:hover,
.osb-dt button.osb-dt__btn:focus-visible {
	background: var(--osb-dt-btn-bg-h);
	color: var(--osb-dt-btn-color-h);
	border-color: var(--osb-dt-btn-bg-h);
}
.osb-dt button.osb-dt__btn--text:hover,
.osb-dt button.osb-dt__btn--text:focus-visible {
	background: transparent;
	color: var(--osb-dt-btn-bg-h);
	border-color: transparent;
}
