/* MyFormScaler embed and modal chrome. Deliberately minimal: the form itself
   is styled by the source site's Fluent Forms CSS plus this site's theme. */

.mfs-embed {
	position: relative;
}

.mfs-unavailable {
	padding: 1rem 1.25rem;
	border: 1px solid currentColor;
	border-radius: 2px;
	opacity: .75;
	font-size: .95em;
}

.mfs-embed-detail {
	margin-top: .5rem;
	padding: .75rem 1rem;
	border-left: 3px solid #b32d2e;
	background: rgba(179, 45, 46, .06);
	font-size: .85em;
}

/* --- modal --- */

.mfs-modal-open {
	display: inline-block;
	cursor: pointer;
}

.mfs-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 5vh 1rem;
	overflow-y: auto;

	/* Hidden but still laid out. A display:none form measures zero width, and
	   any width-dependent field -- date pickers, the signature pad, choices.js
	   dropdowns -- computes against that and renders wrong once revealed. */
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease;
}

.mfs-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.mfs-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(12, 19, 22, .62);
}

.mfs-modal-panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 640px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	color: #1d2327;
	border-radius: 4px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, .28);
}

.mfs-modal-title {
	margin: 0;
	padding: 1.35rem 3.25rem 0.9rem 1.75rem;
	font-size: 1.3rem;
	line-height: 1.3;
	font-weight: 600;
	/* Inherits the host theme's heading face; only the frame is ours. */
	border-bottom: 1px solid rgba(125, 145, 156, .28);
}

.mfs-modal-body {
	padding: 2rem 1.75rem 1.75rem;
}

/* With a heading above it, the body no longer has to clear the close button. */
.mfs-modal-body.has-title {
	padding-top: 1.5rem;
}

.mfs-modal-close {
	position: absolute;
	top: .35rem;
	right: .5rem;
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	background: none;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: #50575e;
	border-radius: 2px;
}

.mfs-modal-close:hover,
.mfs-modal-close:focus-visible {
	color: #1d2327;
	background: rgba(0, 0, 0, .06);
}

body.mfs-modal-lock {
	overflow: hidden;
}

@media (prefers-color-scheme: dark) {
	.mfs-modal-panel {
		background: #16232a;
		color: #e3eaee;
	}
	.mfs-modal-close {
		color: #9aafb9;
	}
	.mfs-modal-close:hover,
	.mfs-modal-close:focus-visible {
		color: #e3eaee;
		background: rgba(255, 255, 255, .08);
	}
}

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