/* WD Pop-up. Selectors start at dialog.wdp-popup so theme and Elementor button styles don't leak in. */
html.wdp-open {
	overflow: hidden;
}

dialog.wdp-popup {
	padding: 0;
	margin: auto;
	border: 0;
	background: transparent;
	max-width: none;
	max-height: none;
	overflow: visible;
	color: inherit;
}

dialog.wdp-popup::backdrop {
	background: rgba(17, 24, 39, 0.6);
}

dialog.wdp-popup .wdp-popup__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(92vw, var(--wdp-width, 560px));
	max-height: 90vh;
	overflow: hidden;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

dialog.wdp-popup .wdp-popup__link {
	display: block;
	line-height: 0;
}

dialog.wdp-popup .wdp-popup__img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(90vh - 4.5rem);
	object-fit: contain;
	margin: 0;
	border: 0;
	border-radius: 0;
}

dialog.wdp-popup .wdp-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(17, 24, 39, 0.72);
	color: #fff;
	box-shadow: none;
	line-height: 1;
	cursor: pointer;
}

dialog.wdp-popup .wdp-popup__close:hover,
dialog.wdp-popup .wdp-popup__close:focus-visible {
	background: rgba(17, 24, 39, 0.92);
}

dialog.wdp-popup .wdp-popup__close:focus-visible,
dialog.wdp-popup .wdp-popup__button:focus-visible,
dialog.wdp-popup .wdp-popup__link:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -6px;
}

dialog.wdp-popup .wdp-popup__button {
	display: block;
	margin: 14px 16px 16px;
	padding: 12px 18px;
	border-radius: 8px;
	background: var(--wdp-accent, #1f2937);
	color: #fff;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
}

dialog.wdp-popup .wdp-popup__button:hover {
	filter: brightness(1.1);
	color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
	dialog.wdp-popup[open] .wdp-popup__inner {
		animation: wdp-in 0.25s ease-out;
	}
	dialog.wdp-popup[open]::backdrop {
		animation: wdp-fade 0.25s ease-out;
	}
}

@keyframes wdp-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes wdp-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
