/* Consultation modal — companion to NerdHouse Forms */
.nhsm-modal {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
}
.nhsm-modal[hidden] { display: none !important; }

.nhsm-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 22, 40, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: nhsm-fade .2s ease-out;
}

.nhsm-modal-card {
	position: relative;
	background: #ffffff;
	color: #0f172a;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	border-radius: 18px;
	box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .55), 0 8px 20px -8px rgba(15, 23, 42, .25);
	animation: nhsm-pop .25s cubic-bezier(.22,.61,.36,1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.nhsm-modal-head {
	padding: 28px 32px 8px;
	background: linear-gradient(135deg, rgba(14, 165, 233, .08), rgba(99, 102, 241, .08));
	border-radius: 18px 18px 0 0;
}
.nhsm-modal-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #0284c7;
	margin-bottom: 8px;
}
.nhsm-modal-title {
	margin: 0 0 8px;
	font-size: clamp(1.4rem, 2.5vw, 1.75rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #0f172a;
	line-height: 1.2;
}
.nhsm-modal-sub {
	margin: 0;
	color: #475569;
	font-size: 15px;
	line-height: 1.5;
}

.nhsm-modal-body {
	padding: 22px 32px 32px;
}

.nhsm-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, .06);
	color: #0f172a;
	border: 0;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease;
	z-index: 1;
}
.nhsm-modal-close:hover { background: rgba(15, 23, 42, .14); }
.nhsm-modal-close:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }

body.nhsm-modal-open {
	overflow: hidden;
}

/* Make NHF form fit nicely inside the modal */
.nhsm-modal-card .nhf-form {
	max-width: 100%;
}

@media (max-width: 540px) {
	.nhsm-modal { padding: 0; align-items: stretch; }
	.nhsm-modal-card {
		max-height: 100vh;
		max-height: 100dvh;
		border-radius: 0;
	}
	.nhsm-modal-head { padding: 28px 20px 8px; border-radius: 0; }
	.nhsm-modal-body { padding: 18px 20px 28px; }
}

@keyframes nhsm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nhsm-pop {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-color-scheme: dark) {
	.nhsm-modal-card {
		background: #0b1020;
		color: #f8fafc;
		box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
	}
	.nhsm-modal-title { color: #f8fafc; }
	.nhsm-modal-sub { color: #cbd5e1; }
	.nhsm-modal-close { background: rgba(248, 250, 252, .08); color: #f8fafc; }
	.nhsm-modal-close:hover { background: rgba(248, 250, 252, .16); }
}
