/* Template preview modal */

.maildoctor-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 2000;
}

.maildoctor-modal.is-open {
	display: flex;
}

.wpmd-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(2px);
}

.wpmd-modal__dialog {
	position: relative;
	max-width: 960px;
	width: 90vw;
	max-height: 90vh;
	background: var(--md-color-surface);
	border-radius: 16px;
	border: 1px solid var(--md-color-border);
	box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.modal-header,
.modal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	gap: 16px;
	background: var(--md-color-neutral-soft);
	border-bottom: 1px solid var(--md-color-border);
}

.modal-footer {
	border-top: 1px solid var(--md-color-border);
	border-bottom: 0;
}

.maildoctor-modal .modal-content {
	padding: 24px !important;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.modal-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--md-color-text);
}

.modal-close {
	margin-left: auto;
}

.wpmd-modal__body {
	padding: 0;
	background: var(--md-color-surface);
}

.preview-frame {
	width: 100%;
	height: 70vh;
	border: none;
	background: #fff;
}

.maildoctor-sticky-bar {
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--md-color-surface);
	border-top: 1px solid var(--md-color-border);
	box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	z-index: 100;
}

.maildoctor-sticky-bar .sticky-left,
.maildoctor-sticky-bar .sticky-right {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}