/* Front-end signup form styling for the [imf_newsletter_form] shortcode.
   Deliberately minimal and inherits the theme's colors via CSS variables
   where they exist, so it doesn't fight whatever theme it's dropped into. */

.imf-nl-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
	margin: 0;
}

.imf-nl-form.imf-nl-stacked {
	flex-direction: column;
	align-items: stretch;
	max-width: 380px;
}

.imf-nl-form input[type="email"],
.imf-nl-form input[type="text"] {
	flex: 1 1 220px;
	min-width: 0;
	padding: 13px 18px;
	border: 1px solid var(--imf-border, rgba(0, 0, 0, 0.18));
	border-radius: 3px;
	background: #fff;
	color: var(--imf-text, #1c1414);
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.95rem;
	line-height: 1.4;
}

.imf-nl-form input::placeholder {
	color: var(--imf-muted, #8c6e74);
	opacity: 0.8;
}

.imf-nl-form input:focus {
	outline: 2px solid var(--imf-accent, #c08d6c);
	outline-offset: 1px;
}

.imf-nl-form button {
	flex: 0 0 auto;
	padding: 13px 26px;
	border: 1px solid var(--imf-accent, #c08d6c);
	border-radius: 3px;
	background: var(--imf-accent, #c08d6c);
	color: var(--imf-primary-dark, #7a2038);
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.imf-nl-form button:hover:not(:disabled) {
	background: transparent;
	color: var(--imf-accent, #c08d6c);
}

.imf-nl-form button:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Full-width message line below the inputs. */
.imf-nl-form .imf-nl-message {
	flex: 1 0 100%;
	margin: 4px 0 0;
	min-height: 1.3em;
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.85rem;
	line-height: 1.5;
	text-align: center;
}

.imf-nl-form .imf-nl-message:empty {
	min-height: 0;
	margin: 0;
}

/* =========================================================================
 * Success popup — appears the moment someone subscribes, holding the
 * download. This is the delivery mechanism, so it is deliberately hard to
 * miss and the download is the only prominent action inside it.
 * ==================================================================== */
.imf-nl-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.imf-nl-modal.is-open { opacity: 1; }

.imf-nl-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(28, 20, 20, 0.55);
}

.imf-nl-modal-box {
	position: relative;
	background: #fff;
	border-radius: 12px;
	padding: 38px 34px 30px;
	max-width: 420px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(28, 20, 20, 0.28);
	transform: translateY(12px) scale(0.98);
	transition: transform 0.22s ease;
	max-height: 90vh;
	overflow-y: auto;
}
.imf-nl-modal.is-open .imf-nl-modal-box { transform: translateY(0) scale(1); }

.imf-nl-modal-x {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 1.7rem;
	line-height: 1;
	color: var(--imf-muted, #8c6e74);
	cursor: pointer;
	padding: 4px 6px;
}
.imf-nl-modal-x:hover { color: var(--imf-primary, #9e2b4e); }

.imf-nl-modal-check {
	width: 52px;
	height: 52px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--imf-primary, #9e2b4e);
	color: #fff;
	font-size: 1.6rem;
	line-height: 52px;
}

.imf-nl-modal-box h2 {
	margin: 0 0 6px;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 1.6rem;
	color: var(--imf-primary, #9e2b4e);
}

.imf-nl-modal-kit {
	margin: 0 0 12px;
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.86rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--imf-text, #2a2320);
}

.imf-nl-modal-body {
	margin: 0 0 22px;
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.92rem;
	line-height: 1.7;
	color: var(--imf-muted, #8c6e74);
}

.imf-nl-modal-btn {
	display: block;
	padding: 15px 22px;
	border-radius: 6px;
	background: var(--imf-primary, #9e2b4e);
	color: #fff;
	text-decoration: none;
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.98rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.imf-nl-modal-btn:hover,
.imf-nl-modal-btn:focus {
	background: var(--imf-primary-dark, #7a1f3b);
	color: #fff;
}

.imf-nl-modal-note {
	margin: 14px 0 0;
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.75rem;
	line-height: 1.6;
	color: var(--imf-muted, #8c6e74);
}

@media (max-width: 480px) {
	.imf-nl-modal-box { padding: 30px 22px 24px; }
	.imf-nl-modal-box h2 { font-size: 1.35rem; }
}
