/*
 * Popup look, matched to the Kadence Pro modal (assets/js/modal.js does the behavior).
 * The panel's color, padding and corners come from its block settings.
 */

/* Hidden in the page (and before the script runs). */
.b33-modal {
	display: none;
}
body.block-editor-page .b33-modal,
.editor-styles-wrapper .b33-modal {
	display: block;
}

.b33-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	background: rgba(33, 33, 33, 0.62);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.b33-modal-overlay[hidden] {
	display: none;
}
.b33-modal-overlay.is-open {
	opacity: 1;
}
.b33-modal-overlay .b33-modal {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: calc(100% - 40px);
	max-width: 560px;
	margin: 20px;
	transform: translateY(40px);
	transition: transform 0.3s ease;
}
.b33-modal-overlay.is-open .b33-modal {
	transform: none;
}
.b33-modal-overlay .b33-modal:focus {
	outline: none;
}
html.b33-modal-is-open {
	overflow: hidden;
}

.b33-modal-close {
	position: absolute;
	top: 4px;
	right: 4px;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
}
.b33-modal-close svg {
	width: 24px;
	height: 24px;
}
.b33-modal-close:hover {
	color: var(--wp--preset--color--primary-alt);
}
.b33-modal-close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
/* The close button comes first (for keyboard order) but is placed absolutely,
   so the first content block keeps its top spacing. */
.b33-modal > .b33-modal-close + * {
	margin-block-start: 0;
}

@media (prefers-reduced-motion: reduce) {
	.b33-modal-overlay,
	.b33-modal-overlay .b33-modal {
		transition: none;
	}
}
