/* Exquisite Knives newsletter signup.
   Self-contained and deliberately neutral so it sits inside Avada without
   fighting the theme. */

.ek-signup {
	--ek-ink: #1c1c1c;
	--ek-muted: #6b6b6b;
	--ek-line: #d8d4cd;
	--ek-accent: #8a6a3b;
	--ek-accent-dark: #6d5330;
	font-family: inherit;
	box-sizing: border-box;
}

.ek-signup *,
.ek-signup *::before,
.ek-signup *::after {
	box-sizing: inherit;
}

.ek-signup__heading {
	margin: 0 0 8px;
	font-size: 1.35em;
	line-height: 1.25;
	color: var(--ek-ink);
}

.ek-signup__text {
	margin: 0 0 16px;
	color: var(--ek-muted);
	font-size: 0.95em;
	line-height: 1.5;
}

.ek-signup__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Double class on purpose: Avada styles `input[type="email"]` (specificity
   0,1,1), which outranks a single class and would zero the padding and force
   its own --form_input_height. */
.ek-signup .ek-signup__input {
	flex: 1 1 200px;
	min-width: 0;
	width: auto;
	height: auto;
	padding: 12px 14px;
	border: 1px solid var(--ek-line);
	border-radius: 3px;
	font-size: 16px; /* 16px stops iOS zooming the page on focus */
	line-height: 1.2;
	background: #fff;
	color: var(--ek-ink);
}

.ek-signup__input:focus {
	outline: 2px solid var(--ek-accent);
	outline-offset: 1px;
	border-color: var(--ek-accent);
}

.ek-signup__button {
	flex: 0 0 auto;
	padding: 12px 22px;
	border: 0;
	border-radius: 3px;
	background: var(--ek-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ek-signup__button:hover,
.ek-signup__button:focus {
	background: var(--ek-accent-dark);
}

.ek-signup__button[disabled] {
	opacity: 0.6;
	cursor: default;
}

.ek-signup__fine {
	margin: 10px 0 0;
	font-size: 0.8em;
	color: var(--ek-muted);
}

.ek-signup__message {
	margin: 10px 0 0;
	font-size: 0.9em;
	min-height: 1.2em;
}

.ek-signup__message--ok { color: #1a7f37; }
.ek-signup__message--error { color: #b32d2e; }

/* The honeypot must be reachable by bots parsing the DOM but invisible and
   unfocusable for people, so it is moved off screen rather than display:none. */
.ek-signup__hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ---- Inline variant (footer, end of article, landing page) ---- */

.ek-signup--inline {
	margin: 32px 0;
	padding: 24px;
	border: 1px solid var(--ek-line);
	border-radius: 4px;
	background: #faf8f5;
}

/* ---- Hero variant (top of the /youtube landing page) ---- */

.ek-signup--hero {
	margin: 0;
	padding: 0;
}

.ek-signup--hero .ek-signup__heading { font-size: 1.6em; }

/* ---- Popup ---- */

.ek-popup[hidden] { display: none; }

.ek-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ek-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 18, 15, 0.6);
	animation: ek-fade 0.2s ease;
}

.ek-popup__box {
	position: relative;
	width: 100%;
	max-width: 440px;
	padding: 32px 28px 26px;
	background: #fff;
	border-radius: 5px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
	animation: ek-rise 0.22s ease;
}

.ek-popup__close {
	position: absolute;
	top: 6px;
	right: 10px;
	width: 40px;
	height: 40px;
	border: 0;
	background: none;
	font-size: 28px;
	line-height: 1;
	color: #999;
	cursor: pointer;
}

.ek-popup__close:hover { color: #333; }

.ek-popup .ek-signup--popup { margin: 0; }

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

@keyframes ek-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ek-popup__backdrop,
	.ek-popup__box {
		animation: none;
	}
}

@media (max-width: 480px) {
	.ek-signup__fields { flex-direction: column; }

	/* Stacking flips the flex axis, so a flex-basis meant as a WIDTH starts
	   acting as a HEIGHT. Left alone, the 200px basis makes a 200px tall input. */
	.ek-signup .ek-signup__input {
		flex: 0 0 auto;
		width: 100%;
	}

	.ek-signup .ek-signup__button { width: 100%; }
	.ek-popup__box { padding: 30px 20px 22px; }
}
