/* ---------- "Book a call" popup ---------- */
.ep-book {
	margin: auto !important;
	inset: 0;
	width: min(94vw, 760px);
	max-width: none !important;
	max-height: 94vh;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ep-white);
	overflow: visible;
}
.ep-book::backdrop { background: rgba(9, 8, 12, .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ep-book-open { overflow: hidden; }

.ep-book__panel {
	position: relative;
	max-height: 94vh;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: clamp(1.5rem, 4vw, 2.75rem);
	border-radius: 16px;
	background:
		radial-gradient(70% 50% at 100% 0%, rgba(101, 63, 166, .22), transparent 70%),
		#17141d;
	box-shadow: 0 0 0 1px var(--ep-rule), 0 40px 120px rgba(0, 0, 0, .55);
}

.ep-book__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(236, 234, 240, .08);
	color: var(--ep-white);
	cursor: pointer;
	transition: transform var(--ep-gallop) var(--ep-ease-gallop), background-color var(--ep-gallop) var(--ep-ease-gallop);
}
.ep-book__close svg { width: 1.125rem; height: 1.125rem; }
.ep-book__close:hover { transform: rotate(90deg); background: rgba(236, 234, 240, .16); }

/* step tracker */
.ep-book__steps {
	display: flex;
	gap: 0.5rem;
	margin: 0 3rem 1.75rem 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--ep-dapple);
}
.ep-book__steps li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	white-space: nowrap;
	transition: color 320ms var(--ep-ease-gallop);
}
.ep-book__steps li + li::before {
	content: "";
	width: clamp(1rem, 4vw, 2.5rem);
	height: 1px;
	margin-right: 0.25rem;
	background: currentColor;
	opacity: .5;
}
.ep-book__steps li.is-current { color: var(--ep-white); }
.ep-book__steps li.is-done { color: var(--ep-sheen); }

.ep-book__title {
	margin: 0.5rem 0 0.75rem;
	font-size: clamp(1.625rem, 3.6vw, 2.25rem);
	line-height: 1.1;
}
.ep-book__intro { margin: 0 0 1.75rem; max-width: 38rem; color: var(--ep-flea); }
.ep-book__intro strong { color: var(--ep-white); font-weight: 600; }

/* calendar */
.ep-book__calendly {
	position: relative;
	height: min(680px, calc(94vh - 16rem));
	min-height: 440px;
	border-radius: 12px;
	overflow: hidden;
	background: #17141d;
}
.ep-book__calendly .calendly-inline-widget,
.ep-book__calendly iframe { width: 100%; height: 100% !important; }
.ep-book__loading {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--ep-flea);
	font-size: 0.9375rem;
}
.ep-book__calendly .calendly-spinner { display: none; }
.ep-book__fallback { margin: 0.875rem 0 0; font-size: 0.875rem; color: var(--ep-dapple); }
.ep-book__fallback a { color: var(--ep-sheen); }

/* done */
.ep-book__done { text-align: center; padding: 1rem 0 0.5rem; }
.ep-book__done .ep-book__intro { margin-left: auto; margin-right: auto; }
.ep-book__seal { display: inline-block; width: 4.5rem; color: var(--ep-sheen); }
.ep-book__seal svg { width: 100%; height: auto; }
.ep-book__finish { border: 0; cursor: pointer; font: inherit; }

/* contact mode: form only, no step tracker; copy variants per mode */
.ep-book:not([data-mode="contact"]) [data-mode-only="contact"],
.ep-book[data-mode="contact"] [data-mode-only="book"] { display: none; }
.ep-book[data-mode="contact"] .ep-book__steps { display: none; }

/* message received */
.ep-book__sent { text-align: center; padding: 1rem 0 0.5rem; }
.ep-book__sent .ep-book__intro { margin-left: auto; margin-right: auto; }
.ep-book__next {
	margin: 2rem auto 0;
	padding-top: 1.75rem;
	border-top: 1px solid var(--ep-rule);
	max-width: 32rem;
}
.ep-book__next-label { margin: 0 0 1rem; color: var(--ep-flea); font-size: 0.9375rem; }
.ep-book__to-calendar {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	border: 0;
	cursor: pointer;
	font: inherit;
	text-align: left;
}

/* ---------- Fluent Forms, restyled to the brand ---------- */
.ep-book .fluentform .ff-el-group { margin-bottom: 1.125rem; }
.ep-book .fluentform .ff-t-container { gap: 1rem; }
.ep-book .fluentform .ff-el-input--label label {
	color: var(--ep-white);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}
.ep-book .fluentform .ff-el-is-required.asterisk-right label::after { color: var(--ep-sheen); }
.ep-book .fluentform .ff-el-form-control {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 0;
	border-radius: 10px;
	background: rgba(236, 234, 240, .06);
	box-shadow: inset 0 0 0 1px rgba(236, 234, 240, .14);
	color: var(--ep-white);
	font: inherit;
	font-size: 1rem;
	transition: box-shadow var(--ep-gallop) var(--ep-ease-gallop), background-color var(--ep-gallop) var(--ep-ease-gallop);
}
.ep-book .fluentform .ff-el-form-control::placeholder { color: var(--ep-dapple); }
.ep-book .fluentform .ff-el-form-control:hover { box-shadow: inset 0 0 0 1px rgba(236, 234, 240, .28); }
.ep-book .fluentform .ff-el-form-control:focus {
	outline: none;
	background: rgba(166, 133, 224, .08);
	box-shadow: inset 0 0 0 1px var(--ep-sheen), 0 0 0 4px rgba(166, 133, 224, .18);
}
.ep-book .fluentform textarea.ff-el-form-control { min-height: 7.5rem; resize: vertical; }
.ep-book .fluentform .ff-el-is-error .ff-el-form-control { box-shadow: inset 0 0 0 1px #e58b9a; }
.ep-book .fluentform .error.text-danger { margin-top: 0.375rem; color: #f0a4b0; font-size: 0.8125rem; }
.ep-book .fluentform .ff_submit_btn_wrapper { margin-top: 0.5rem; }
.ep-book .fluentform .ff-btn-submit,
.ep-book .fluentform button.ff-btn-submit:not(.ff_btn_no_style) {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	padding: 1rem 1.75rem;
	border: 0;
	border-radius: 999px;
	background: var(--ep-silk) !important;
	color: var(--ep-white) !important;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	font-stretch: 115%;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--ep-gallop) var(--ep-ease-gallop), transform var(--ep-gallop) var(--ep-ease-gallop);
}
.ep-book .fluentform .ff-btn-submit::after { content: "→"; letter-spacing: 0; }
.ep-book .fluentform .ff-btn-submit:hover { background: var(--ep-sheen) !important; color: var(--ep-cap) !important; }
.ep-book .fluentform .ff-btn-submit:active { transform: scale(.97); }
.ep-book .fluentform .ff-btn-submit.disabled,
.ep-book .fluentform .ff-working .ff-btn-submit { opacity: .6; }
/* the popup moves on to the calendar, so the plugin's own success note isn't needed */
.ep-book .ff-message-success { display: none; }
.ep-book .ff-errors-in-stack { color: #f0a4b0; }

@media (max-width: 560px) {
	.ep-book { width: 100vw; max-height: 100dvh; }
	.ep-book__panel { max-height: 100dvh; min-height: 100dvh; border-radius: 0; }
	.ep-book__steps { font-size: 0.75rem; }
	.ep-book__calendly { height: calc(100dvh - 13rem); }
}
