.rejdilky-popup {
	--rejdilky-max-width: 900px;
	--rejdilky-height: 70vh;
	--rejdilky-radius: 8px;
	--rejdilky-accent: #6e7a4f;
	--rejdilky-ring: rgba(110, 122, 79, .45);
	--rejdilky-close-bg: #fff;
	--rejdilky-close-color: #2f2f2c;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	transition: opacity .18s ease;
}

.rejdilky-popup[hidden] {
	display: none;
}

.rejdilky-popup.is-open {
	opacity: 1;
}

.rejdilky-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .65);
}

.rejdilky-popup__dialog {
	position: relative;
	width: 100%;
	max-width: var(--rejdilky-max-width);
	background: #fff;
	border-radius: var(--rejdilky-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
	transform: translateY(12px);
	transition: transform .18s ease;
}

.rejdilky-popup.is-open .rejdilky-popup__dialog {
	transform: translateY(0);
}

/*
 * Vysoká specificita + !important, aby styly tlačítek z tématu
 * (Hello / Elementor / Crocoblock) tenhle prvek nepřebily.
 */
#rejdilky-popup .rejdilky-popup__close {
	position: absolute;
	top: -16px;
	right: -16px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 0;
	line-height: 1;
	text-decoration: none;
	color: var(--rejdilky-close-color) !important;
	background: var(--rejdilky-close-bg) !important;
	border: 1px solid rgba(0, 0, 0, .10) !important;
	border-radius: 50% !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .28) !important;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, transform .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

#rejdilky-popup .rejdilky-popup__close svg {
	display: block;
	width: 16px;
	height: 16px;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	fill: none;
}

#rejdilky-popup .rejdilky-popup__close:hover,
#rejdilky-popup .rejdilky-popup__close:focus {
	color: #fff !important;
	background: var(--rejdilky-accent) !important;
	border-color: var(--rejdilky-accent) !important;
	transform: scale(1.06);
}

#rejdilky-popup .rejdilky-popup__close:focus {
	outline: none !important;
}

#rejdilky-popup .rejdilky-popup__close:focus-visible {
	box-shadow: 0 4px 14px rgba(0, 0, 0, .28), 0 0 0 3px var(--rejdilky-ring) !important;
}

.rejdilky-popup__frame {
	display: block;
	width: 100%;
	height: var(--rejdilky-height);
	border: 0;
	border-radius: var(--rejdilky-radius);
	-webkit-overflow-scrolling: touch;
}

.rejdilky-embed {
	-webkit-overflow-scrolling: touch;
}

body.rejdilky-popup-open {
	overflow: hidden;
}

@media (max-width: 782px) {
	.rejdilky-popup {
		padding: 0;
	}

	.rejdilky-popup__dialog {
		max-width: none;
		height: 100%;
		border-radius: 0;
	}

	/* Na mobilu je dialog přes celou plochu, křížek musí dovnitř. */
	#rejdilky-popup .rejdilky-popup__close {
		top: 10px;
		right: 10px;
	}

	.rejdilky-popup__frame {
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rejdilky-popup,
	.rejdilky-popup__dialog {
		transition: none;
	}
}
