/**
 * Bogkortet · overlay til Trailer, 3D og Prøvelæs.
 *
 * Selvstændig: afhænger IKKE af product-gallery.css, som kun indlæses på
 * produktsider. Udtrykket er det samme som galleriets lightbox — mørk
 * baggrund, rundt luk-kryds øverst til højre.
 */

.bco-kort-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba( 27, 32, 33, 0.94 );
}

.bco-kort-overlay[hidden] {
	display: none;
}

body.bco-lightbox-open {
	overflow: hidden;
}

.bco-kort-overlay__luk {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.14 );
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.bco-kort-overlay__luk:hover {
	background: rgba( 255, 255, 255, 0.28 );
}

.bco-kort-overlay__luk:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.bco-kort-overlay__ramme iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Video: så stor som muligt i 16:9 inden for skærmen. */
.bco-kort-overlay__ramme--video {
	width: min( 1200px, calc( 100vw - 8rem ), calc( ( 100vh - 6rem ) * 16 / 9 ) );
	aspect-ratio: 16 / 9;
	background: #000;
}

/* Prøvelæsning: vieweren skal have højden. Luft foroven til krydset. */
.bco-kort-overlay__ramme--laes {
	width: min( 1400px, calc( 100vw - 8rem ) );
	height: calc( 100vh - 2rem );
	background: #fff;
}

@media ( max-width: 700px ) {
	.bco-kort-overlay {
		padding: 3.75rem 0 0;
		align-items: flex-start;
	}
	.bco-kort-overlay__ramme--video {
		width: 100vw;
		margin-top: calc( ( 100vh - 3.75rem - 100vw * 9 / 16 ) / 2 - 1.875rem );
	}
	.bco-kort-overlay__ramme--laes {
		width: 100vw;
		height: calc( 100vh - 3.75rem );
	}
	.bco-kort-overlay__luk {
		top: 0.5rem;
		right: 0.5rem;
	}
}

/* Fold bogen ud: materialet (PDF) med hoved og «Hent»-knap. 05-10-2026. */
.bco-kort-overlay__ramme--fold {
	display: flex;
	flex-direction: column;
	width: min( 1000px, calc( 100vw - 8rem ) );
	height: calc( 100vh - 2rem );
	background: #fff;
}

.bco-kort-overlay__ramme--fold iframe {
	flex: 1 1 auto;
	height: auto;
	min-height: 0;
}

.bco-kort-fold-hoved {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1rem 1.25rem;
	background: #f8f6f0;
	border-bottom: 1px solid #e7e5df;
	color: #1b2021;
	font-family: var( --bach-font-broedtekst, sans-serif );
}

.bco-kort-fold-hoved p {
	margin: 0;
}

.bco-kort-fold-hoved__kicker {
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #509680;
}

.bco-kort-fold-hoved__titel {
	margin-top: 0.15rem !important;
	font-family: var( --bach-font-overskrift, serif );
	font-size: 1.25rem;
	line-height: 1.25;
}

.bco-kort-fold-hoved__beskrivelse {
	margin-top: 0.25rem !important;
	font-size: 0.875rem;
	font-weight: 300;
	line-height: 1.45;
	color: #464655;
}

.bco-kort-fold-hoved__hent {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 1.25rem;
	border-radius: clamp( 1px, 0.3vw, 4px );
	background: #1b2021;
	color: #f8f6f0 !important;
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.bco-kort-fold-hoved__hent:hover {
	background: #272c2d;
}

.bco-kort-fold-hoved__hent:focus-visible {
	outline: 2px solid #509680;
	outline-offset: 2px;
}

/* Telefon: mobilbrowsere viser ikke PDF i en iframe — kun hovedet og knappen. */
@media ( max-width: 700px ) {
	.bco-kort-overlay__ramme--fold {
		width: 100vw;
		height: auto;
	}
	.bco-kort-overlay__ramme--fold iframe {
		display: none;
	}
	.bco-kort-fold-hoved {
		flex-direction: column;
		align-items: stretch;
		gap: 1.25rem;
		padding: 1.5rem 1.25rem 1.75rem;
	}
}