/* Admire Email Popup — frontend styles */

:root {
	--aep-primary-color: #000;
	--aep-primary-text: #fff;
	--aep-bg: #fff;
	--aep-modal-bg: #fafafa;
	--aep-text: #111;
	--aep-muted: #6b6b6b;
	--aep-border: #d9d9d9;
	--aep-overlay: rgba(0, 0, 0, 0.5);
	--aep-radius: 4px;
	--aep-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	--aep-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--aep-anim: 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.aep-popup,
.aep-popup * {
	box-sizing: border-box;
}

.aep-popup[hidden] {
	display: none !important;
}

.aep-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	font-family: var(--aep-font);
	color: var(--aep-text);
	animation: aep-fade-in var(--aep-anim) ease both;
}

.aep-overlay {
	position: absolute;
	inset: 0;
	background: var(--aep-overlay);
}

.aep-modal {
	position: relative;
	width: calc(100% - 32px);
	max-width: 440px;
	margin: 0 auto;
	top: 50%;
	transform: translateY(-50%);
	background: var(--aep-modal-bg);
	border-radius: var(--aep-radius);
	box-shadow: var(--aep-shadow);
	padding: 48px 32px 32px;
	text-align: center;
	animation: aep-pop-in var(--aep-anim) ease both;
}

.aep-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--aep-border);
	background: transparent;
	color: var(--aep-text);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--aep-anim), color var(--aep-anim);
}

.aep-close:hover,
.aep-close:focus-visible {
	background: var(--aep-primary-color);
	color: var(--aep-primary-text);
	outline: none;
}

.aep-logo {
	font-size: 14px;
	letter-spacing: 0.3em;
	font-weight: 600;
	margin-bottom: 24px;
	color: var(--aep-text);
}

.aep-state {
	transition: opacity var(--aep-anim), transform var(--aep-anim);
}

.aep-state[hidden] {
	display: none;
}

.aep-state-success {
	animation: aep-slide-in var(--aep-anim) ease both;
}

.aep-heading {
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 0.05em;
	margin: 0 0 12px;
	line-height: 1.2;
}

.aep-description {
	font-size: 14px;
	color: var(--aep-muted);
	margin: 0 0 24px;
	line-height: 1.5;
}

.aep-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.aep-input {
	width: 100%;
	padding: 14px 16px;
	font-size: 14px;
	font-family: inherit;
	border: 1px solid var(--aep-border);
	border-radius: var(--aep-radius);
	background: var(--aep-bg);
	color: var(--aep-text);
	transition: border-color var(--aep-anim);
}

.aep-input:focus {
	outline: none;
	border-color: var(--aep-primary-color);
}

.aep-input.has-error {
	border-color: #c0392b;
}

.aep-error {
	font-size: 12px;
	color: #c0392b;
	margin: 0;
	text-align: left;
}

.aep-submit,
.aep-shop {
	width: 100%;
	padding: 14px 16px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.15em;
	font-family: inherit;
	background: var(--aep-primary-color);
	color: var(--aep-primary-text);
	border: 1px solid var(--aep-primary-color);
	border-radius: var(--aep-radius);
	cursor: pointer;
	transition: opacity var(--aep-anim), transform var(--aep-anim);
}

.aep-submit:hover,
.aep-shop:hover {
	opacity: 0.85;
}

.aep-submit:focus-visible,
.aep-shop:focus-visible {
	outline: 2px solid var(--aep-primary-color);
	outline-offset: 2px;
}

.aep-submit[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.aep-submit-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: aep-spin 0.7s linear infinite;
	margin-left: 8px;
	vertical-align: -2px;
}

.aep-privacy {
	font-size: 11px;
	color: var(--aep-muted);
	margin: 16px 0 0;
}

.aep-privacy a {
	color: inherit;
	text-decoration: underline;
}

.aep-code-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 18px;
	border: 1.5px dashed var(--aep-text);
	border-radius: var(--aep-radius);
	margin: 8px 0 24px;
	background: transparent;
}

.aep-code {
	font-family: "Courier New", Courier, monospace;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.15em;
}

.aep-copy {
	background: none;
	border: none;
	color: var(--aep-text);
	cursor: pointer;
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	transition: background var(--aep-anim);
}

.aep-copy:hover,
.aep-copy:focus-visible {
	background: rgba(0, 0, 0, 0.08);
	outline: none;
}

.aep-copy-feedback {
	font-size: 11px;
	color: var(--aep-muted);
	margin: -16px 0 16px;
}

.aep-screen-reader {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@keyframes aep-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes aep-pop-in {
	from { opacity: 0; transform: translateY(calc(-50% + 16px)); }
	to   { opacity: 1; transform: translateY(-50%); }
}

@keyframes aep-slide-in {
	from { opacity: 0; transform: translateX(16px); }
	to   { opacity: 1; transform: translateX(0); }
}

@keyframes aep-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
	.aep-modal {
		padding: 44px 20px 24px;
		max-width: 100%;
	}

	.aep-heading {
		font-size: 22px;
	}

	.aep-code {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aep-popup,
	.aep-modal,
	.aep-state-success {
		animation: none !important;
	}
}
