/*!
 * Bahgat Newsletter — Frontend Styles
 * Loaded only on pages containing the [be_newsletter] shortcode.
 */

.be-nl {
	--be-navy: #143C74;
	--be-slate: #446186;
	--be-teal: #2D7D7A;
	--be-green: #599B65;
	--be-sage: #94C38C;
	--be-aqua: #9DDBD9;
	--be-radius: 20px;
	--be-radius-sm: 12px;

	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.be-nl *, .be-nl *::before, .be-nl *::after { box-sizing: inherit; }

.be-nl__card {
	position: relative;
	max-width: 640px;
	margin: 0 auto;
	padding: 40px;
	border-radius: var(--be-radius);
	background: linear-gradient(135deg, var(--be-navy) 0%, var(--be-teal) 100%);
	box-shadow: 0 20px 50px rgba(20, 60, 116, 0.25);
	overflow: hidden;
}
.be-nl__card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	pointer-events: none;
}
.be-nl__card > * { position: relative; z-index: 1; }

.be-nl__title {
	color: #fff;
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 8px;
	letter-spacing: -0.01em;
}
.be-nl__desc {
	color: rgba(255, 255, 255, 0.85);
	font-size: 15px;
	margin: 0 0 28px;
	line-height: 1.5;
}

.be-nl__alert {
	margin-bottom: 18px;
	padding: 12px 16px;
	border-radius: var(--be-radius-sm);
	font-size: 14px;
	font-weight: 500;
}
.be-nl__alert[data-type="success"] { background: rgba(89, 155, 101, 0.25); color: #eafff0; border: 1px solid rgba(89,155,101,.5); }
.be-nl__alert[data-type="error"] { background: rgba(220, 90, 90, 0.2); color: #ffecec; border: 1px solid rgba(220,90,90,.5); }

.be-nl__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 18px;
}
@media (max-width: 520px) {
	.be-nl__row { grid-template-columns: 1fr; }
}

.be-nl__label {
	display: block;
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}

.be-nl__input {
	width: 100%;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.95);
	color: #1a2332;
	font-size: 15px;
	transition: box-shadow .2s ease, transform .15s ease;
}
.be-nl__input:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(157, 219, 217, 0.6);
}
.be-nl__input::placeholder { color: #8a94a3; }

.be-nl__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.be-nl__interests { border: 0; margin: 0 0 20px; padding: 0; }
.be-nl__interests legend { padding: 0; margin-bottom: 12px; }

.be-nl__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
}

.be-nl__card-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.1);
	border: 1.5px solid rgba(255, 255, 255, 0.22);
	cursor: pointer;
	transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.be-nl__card-option:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.16); }
.be-nl__card-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.be-nl__card-check {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border-radius: 6px;
	border: 2px solid rgba(255, 255, 255, 0.55);
	background: rgba(255, 255, 255, 0.9);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, border-color .15s ease;
}
.be-nl__card-option input:checked ~ .be-nl__card-check {
	background: var(--be-accent, var(--be-green));
	border-color: var(--be-accent, var(--be-green));
}
.be-nl__card-option input:checked ~ .be-nl__card-check::after {
	content: "";
	width: 10px;
	height: 6px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg) translateY(-1px);
}
.be-nl__card-option input:focus-visible ~ .be-nl__card-check {
	box-shadow: 0 0 0 3px rgba(157, 219, 217, 0.7);
}
.be-nl__card-option:has(input:checked) {
	background: rgba(255, 255, 255, 0.22);
	border-color: var(--be-accent, var(--be-green));
}

.be-nl__card-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	background-color: rgba(255, 255, 255, 0.9);
	-webkit-mask: var(--be-icon-mask, none) center / contain no-repeat;
	mask: var(--be-icon-mask, none) center / contain no-repeat;
}

.be-nl__card-text { display: flex; flex-direction: column; min-width: 0; }
.be-nl__card-name { color: #fff; font-size: 14px; font-weight: 600; }
.be-nl__card-desc { color: rgba(255, 255, 255, 0.7); font-size: 12px; margin-top: 2px; }

.be-nl__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 20px;
	line-height: 1.5;
}
.be-nl__consent input { margin-top: 3px; }
.be-nl__consent a { color: var(--be-aqua); }

.be-nl__submit {
	width: 100%;
	padding: 16px 24px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--be-green), var(--be-sage));
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
	box-shadow: 0 10px 24px rgba(89, 155, 101, 0.35);
}
.be-nl__submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(89, 155, 101, 0.45); }
.be-nl__submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Compact variant — [be_newsletter_mini]: email input + button only */
.be-nl__card--mini {
	padding: 0;
	max-width: 480px;
	border-radius: 0;
	display: flex;
	align-items: center;
	background: none;
	box-shadow: none;
}
.be-nl__card--mini::before {
	content: none;
}
.be-nl__form--mini { width: 100%; }
.be-nl__mini-row {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}
.be-nl__mini-row .be-nl__input {
	width: 100%;
	border-radius: 999px;
	padding: 12px 18px;
}
.be-nl__submit--mini {
	width: auto;
	white-space: nowrap;
	padding: 12px 24px;
	margin-top: 10px;
}
.be-nl--mini .be-nl__alert {
	margin: 0 0 10px 0;
}
.be-nl--mini .be-nl__alert[data-type="success"] { color: #2f5a37; }
.be-nl--mini .be-nl__alert[data-type="error"] { color: #7a2a2a; }
@media (max-width: 420px) {
	.be-nl__mini-row { flex-direction: column; align-items: stretch; }
	.be-nl__submit--mini { width: 100%; }
}

/* RTL mirroring */
.be-nl[dir="rtl"] .be-nl__card-check::after { transform: rotate(45deg) translateY(-1px); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.be-nl *, .be-nl *::before, .be-nl *::after { transition: none !important; animation: none !important; }
}

/* Confirm/unsubscribe landing message (rendered outside the form) */
.be-nl-status {
	max-width: 480px;
	margin: 80px auto;
	padding: 32px;
	border-radius: 20px;
	text-align: center;
	font-size: 16px;
	font-weight: 600;
}
.be-nl-status--success { background: rgba(89, 155, 101, 0.12); color: #2f5a37; }
.be-nl-status--error { background: rgba(220, 90, 90, 0.12); color: #7a2a2a; }
