/* In-page dialog for speaker/workshop pages. */

html.ntl-modal-open { overflow: hidden; }

.ntl-modal {
	width: min(820px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #fff;
	color: #1a2744;
	box-shadow: 0 24px 80px rgba(26, 39, 68, 0.35);
	overflow: hidden;
}
.ntl-modal[open] { display: flex; animation: ntl-modal-in 0.22s ease-out; }
.ntl-modal::backdrop { background: rgba(26, 39, 68, 0.55); backdrop-filter: blur(3px); }

@keyframes ntl-modal-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ntl-modal[open] { animation: none; }
}

.ntl-modal-box { display: flex; flex-direction: column; width: 100%; min-height: 0; }

.ntl-modal-head {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px 24px 16px;
	border-bottom: 1px solid rgba(26, 39, 68, 0.1);
}
.ntl-modal-heading { flex: 1; min-width: 0; }
.ntl-modal-by {
	margin: 6px 0 0 !important;
	color: #6c7a8d;
	font-size: 0.95rem;
}
.ntl-modal-by strong { color: #1a2744; font-weight: 600; }
.ntl-modal-by-link {
	padding: 0;
	border: 0;
	background: none;
	color: #3a7d44;
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.ntl-modal-by-link:hover { color: #2f6838; }
.ntl-modal-by-link:focus-visible { outline: 3px solid #00bcd4; outline-offset: 2px; border-radius: 4px; }
.ntl-modal-body [tabindex="-1"]:focus { outline: none; }
.ntl-modal-by[hidden] { display: none; }
.ntl-modal-title {
	margin: 0 !important;
	font-family: var(--wp--preset--font-family--heading, 'Cormorant Garamond', Georgia, serif);
	font-size: clamp(1.4rem, 3vw, 1.9rem) !important;
	font-weight: 600;
	line-height: 1.15;
	color: #1a2744;
}
.ntl-modal-close {
	flex: none;
	width: 44px;
	height: 44px;
	margin: -6px -10px 0 0;
	border: 0;
	border-radius: 50%;
	background: #f0f4f0;
	color: #1a2744;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.ntl-modal-close:hover { background: #e2eae3; }
.ntl-modal-close:focus-visible { outline: 3px solid #00bcd4; outline-offset: 2px; }

.ntl-modal-body {
	position: relative;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 8px 24px 24px;
	font-size: 1rem;
	line-height: 1.65;
}
.ntl-modal-body > *:first-child { margin-top: 0; }
.ntl-modal-body img { max-width: 100%; height: auto; border-radius: 12px; }
.ntl-modal-body .wp-block-separator { margin: 1.5rem 0 !important; }
.ntl-modal-loading { padding: 48px 0; color: #6c7a8d; text-align: center; }

/* Block layouts that may not be loaded on the host page. */
.ntl-modal-body .wp-block-media-text {
	display: grid;
	grid-template-columns: 40% minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}
.ntl-modal-body .wp-block-media-text__media img { width: 100%; }
.ntl-modal-body .wp-block-media-text__content { padding: 0 !important; }
.ntl-modal-body .wp-block-columns { display: flex; flex-wrap: wrap; gap: 24px; }
.ntl-modal-body .wp-block-column { flex: 1 1 240px; min-width: 0; }

.ntl-modal-foot {
	padding: 12px 24px;
	border-top: 1px solid rgba(26, 39, 68, 0.1);
	font-size: 0.85rem;
	text-align: right;
}
.ntl-modal-full { color: #3a7d44; }

@media (max-width: 640px) {
	/* Full-height sheet on phones. */
	.ntl-modal {
		width: 100vw;
		max-height: 100vh;
		max-height: 100dvh;
		height: 100dvh;
		margin: 0;
		border-radius: 0;
	}
	.ntl-modal-head { padding: 16px; }
	.ntl-modal-body { padding: 8px 16px 20px; }
	.ntl-modal-body .wp-block-media-text { grid-template-columns: minmax(0, 1fr); }
	.ntl-modal-body .wp-block-media-text__media { max-width: 260px; }
}
