.dashicons-modale-box {
    width: 24px;
    height: 24px;
    background: url(icon.svg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* ---------- trigger ----------
   Look comes from the theme's .btn.btn-primary on the wrapper div; the
   inner <button> is reset so it just inherits it. */
.modale-box-cta {
	cursor: pointer;
}

.modale-box-trigger {
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	background: none;
	font: inherit;
	color: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

/* ---------- dialog ---------- */
.modale-box-dialog {
	position: fixed;
	inset: 0;
	margin: auto;
	width: calc(100% - 32px);
	max-width: 760px;
	height: fit-content;
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow: auto;
	padding: 34px 36px;
	border: 0;
	border-radius: 22px;
	background: #fff;
	color: var(--wp--preset--color--contrast, #1a1a1a);
	box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .45);
	overscroll-behavior: contain;
}

.modale-box-dialog.modale-box-sm { max-width: 560px; }
.modale-box-dialog.modale-box-md { max-width: 760px; }
.modale-box-dialog.modale-box-lg { max-width: 1040px; }

.modale-box-dialog::backdrop {
	background: rgba(26, 26, 26, .45);
}

.modale-box-dialog[open] {
	animation: modale-box-in .22s ease-out;
}

@keyframes modale-box-in {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

/* No page scroll behind an open modal. */
html:has(.modale-box-dialog[open]) {
	overflow: hidden;
}

.modale-box-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
	z-index: 1;
}

.modale-box-close:hover {
	background: var(--wp--preset--color--base, #F4F4F1);
	transform: rotate(90deg);
}

.modale-box-body > :first-child { margin-top: 0; }
.modale-box-body > :last-child { margin-bottom: 0; }

@media (max-width: 760px) {
	.modale-box-dialog {
		padding: 28px 22px;
		border-radius: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.modale-box-dialog[open] { animation: none; }
}

/* ---------- editor preview ---------- */
.modale-box-editor-panel {
	margin-top: 12px;
	padding: 16px;
	border: 1.5px dashed #c9c4ba;
	border-radius: 12px;
	background: #fff;
}

.modale-box-editor-label {
	display: block;
	margin-bottom: 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #8a8a8a;
}
