.newsletter-popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.newsletter-popup.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.newsletter-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.38);
	backdrop-filter: blur(5px);
}

.newsletter-popup__dialog {
	position: relative;
	width: min(100%, 720px);
	max-height: min(90vh, 960px);
	overflow: auto;
	border-radius: 20px;
	background: #111827;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
	color: #f9fafb;
}

.newsletter-popup__content {
	padding: 16px 48px 48px;
}

.newsletter-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(249, 250, 251, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #f9fafb;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.newsletter-popup__close:hover,
.newsletter-popup__close:focus {
	background: rgba(255, 255, 255, 0.16);
}

.newsletter-popup__eyebrow {
	margin: 0 0 10px;
	color: #22c55e;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.newsletter-popup__title {
	margin: 0 0 20px;
	color: #f9fafb;
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.02;
}

.newsletter-popup__intro,
.newsletter-popup__content p {
	margin: 0 0 16px;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.45;
	color: #f9fafb;
}

.newsletter-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 28px;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
	width: 100%;
	border: 1px solid rgba(249, 250, 251, 0.14);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.06);
	color: #f9fafb;
	padding: 14px 16px;
	font-size: 16px;
}

.newsletter-form input[type="text"]::placeholder,
.newsletter-form input[type="email"]::placeholder {
	color: rgba(249, 250, 251, 0.62);
}

.newsletter-form input[type="email"] {
	grid-column: 1 / -1;
}

.newsletter-form input:focus {
	outline: 2px solid #22c55e;
	outline-offset: 2px;
}

.newsletter-honeypot {
	display: none;
}

.newsletter-checkbox {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 12px;
	align-items: start;
	font-size: 14px;
	line-height: 1.5;
}

.newsletter-checkbox input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	margin: 2px 0 0;
	width: 22px;
	height: 22px;
	border: 2px solid #f9fafb;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.06);
	cursor: pointer;
	position: relative;
}

.newsletter-checkbox input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 6px;
	width: 5px;
	height: 10px;
	border: solid #22c55e;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.newsletter-checkbox label {
	margin: 0;
	font-weight: 400;
	color: rgba(249, 250, 251, 0.88);
}

.newsletter-checkbox a {
	color: #22c55e;
	text-decoration: underline;
}

.newsletter-form input[type="submit"] {
	grid-column: 1 / -1;
	justify-self: start;
	border: 0;
	border-radius: 12px;
	padding: 0.9rem 2rem;
	background: #22c55e;
	color: #111827;
	font-size: 1.125rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(0, 70, 26, 0.5);
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.newsletter-form input[type="submit"]:hover {
	background: #16a34a;
	transform: scale(1.05);
}

body.newsletter-popup-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.newsletter-popup {
		padding: 16px;
	}

	.newsletter-popup__content {
		padding: 16px 20px 24px;
	}

	.newsletter-form {
		grid-template-columns: 1fr;
	}

	.newsletter-popup__title {
		padding-right: 32px;
	}
}

@media (max-width: 380px), (max-height: 700px) {
	.newsletter-popup {
		padding: 0;
	}

	.newsletter-popup__dialog {
		width: 100%;
		max-width: none;
		max-height: 100vh;
		height: 100vh;
		border-radius: 0;
	}

	.newsletter-popup__content {
		padding: 20px 16px 24px;
	}

	.newsletter-popup__compact-hide {
		display: none;
	}

	.newsletter-form input[type="submit"] {
		width: 100%;
		justify-self: stretch;
		text-align: center;
	}
}
