/**
 * Okno z iframe (assets/js/iframe-modal.js) – np. kalendarz rezerwacji.
 * Wygląd jak okno z filmem z bloku "Karta wideo" (dps-group-blocks).
 */
.dps-iframe-modal {
	width: min(1100px, calc(100vw - 32px));
	max-width: none;
	padding: 0;
	border: 0;
	overflow: visible;
	background-color: var(--wp--preset--color--white);
}

.dps-iframe-modal::backdrop {
	background-color: rgb(0 2 58 / 0.85);
}

/* Miejsce na przycisk zamknięcia nad oknem (44px + 8px odstępu). */
.dps-iframe-modal__frame {
	height: min(800px, calc(100dvh - 120px));
}

/* Film z YouTube: proporcje 16:9 i czarne tło, jak w karcie wideo. */
.dps-iframe-modal.is-video {
	background-color: var(--wp--preset--color--black);
}

.dps-iframe-modal.is-video .dps-iframe-modal__frame {
	height: auto;
	aspect-ratio: 16 / 9;
}

.dps-iframe-modal__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.dps-iframe-modal__close {
	position: absolute;
	right: 0;
	bottom: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--white);
	cursor: pointer;
}

.dps-iframe-modal__close svg {
	width: 24px;
	height: 24px;
}

/* Strona nie przewija się pod otwartym oknem. */
html:has(.dps-iframe-modal[open]) {
	overflow: hidden;
}
