.ep {
	--ep-border: #573c19;
	--ep-accent: #f3981f;
	--ep-text: #f6efe6;
	--ep-muted: #b7ac9d;
	--ep-muted-2: #8a8071;

	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 8, 6, 0.82);
	backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.25s ease,
		visibility 0.25s ease;
	font-family:
		"Figtree",
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		sans-serif;
}

.ep.is-open {
	opacity: 1;
	visibility: visible;
}

.ep__overlay {
	position: absolute;
	inset: 0;
}

.ep__dialog {
	position: relative;
	width: 100%;
	max-width: 460px;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 44px 24px 28px;
	border: 1px solid var(--ep-border);
	border-radius: 22px;
	background: linear-gradient(168deg, #1c150d 0%, #16110b 100%);
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
	overflow: hidden;
	transform: translateY(10px) scale(0.98);
	transition: transform 0.25s ease;
}

.ep.is-open .ep__dialog {
	transform: none;
}

/* Warm top-center glow. */
.ep__dialog::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: radial-gradient(
		70% 42% at 50% 0%,
		rgba(255, 138, 30, 0.18) 0%,
		rgba(255, 138, 30, 0) 70%
	);
	pointer-events: none;
}

.ep__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--ep-muted);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.ep__close:hover {
	background: rgba(255, 255, 255, 0.1);
}

.ep__badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 8px 20px;
	border: 1px solid #34291c;
	border-radius: 30px;
	background: #1e1811;
	color: var(--ep-accent);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2.16px;
	text-transform: uppercase;
	white-space: nowrap;
}

.ep__body {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	margin-top: 24px;
}

.ep__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: center;
}

.ep__title {
	margin: 0;
	color: var(--ep-text);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.1;
}

.ep__hl {
	background: linear-gradient(90deg, #ffc271 0%, #ff9242 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.ep__subtitle {
	margin: 0;
	color: var(--ep-muted);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
}

.ep__strong {
	color: #fff;
}

.ep__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.ep__code {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	padding: 18px 16px;
	border: 1px dashed #332712;
	border-radius: 12px;
	background: rgba(32, 26, 19, 0.6);
	text-align: center;
}

.ep__code-label {
	color: var(--ep-muted-2);
	font-size: 12px;
	letter-spacing: 0.88px;
	text-transform: uppercase;
}

.ep__code-value {
	color: #ffb24d;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0.8px;
}

.ep__fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.ep__input {
	width: 100%;
	padding: 16px 17px;
	border: 1px solid #8d5b1a;
	border-radius: 12px;
	background: rgba(32, 26, 19, 0.6);
	color: var(--ep-text);
	font-family: inherit;
	font-size: 14px;
	text-align: center;
}

.ep__input::placeholder {
	color: var(--ep-muted-2);
}

.ep__input:focus {
	outline: none;
	border-color: var(--ep-accent);
}

.ep__cta {
	width: 100%;
	padding: 20px 48px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(180deg, #ffc36a 0%, #ff8a1e 60%, #f37500 100%);
	box-shadow: 0 10px 30px -8px rgba(255, 138, 30, 0.45);
	color: #1a0f02;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.ep__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 34px -8px rgba(255, 138, 30, 0.55);
}

.ep__note {
	margin: 0;
	color: #fff;
	font-size: 11px;
	text-align: center;
}

.ep__input.is-error {
	border-color: #e0533b;
}

.ep__success {
	margin: 0;
	color: #5fd693;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.ep.is-submitted .ep__fields,
.ep.is-submitted .ep__note {
	display: none;
}

.ep.is-submitted .ep__success {
	display: block;
}

.ep__dismiss {
	padding: 0;
	border: 0;
	background: none;
	color: var(--ep-muted);
	font-family: inherit;
	font-size: 13px;
	text-align: center;
	cursor: pointer;
	transition: color 0.2s ease;
}

.ep__dismiss:hover {
	color: var(--ep-text);
}

@media (min-width: 480px) {
	.ep__dialog {
		padding: 44px 36px 36px;
	}

	.ep__title {
		font-size: 34px;
	}

	.ep__subtitle {
		font-size: 16px;
	}
}
