/**
 * Newsletter signup styles.
 * Designed to sit on the dark theme background (sidebar widget, Newsletter
 * page and the confirm/unsubscribe pages).
 *
 * @package buystuff
 */

.astb-newsletter--signup,
.astb-newsletter--message {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	padding: 28px;
	color: #fff;
}

.astb-newsletter--message {
	margin: 24px 0;
	text-align: center;
}

.astb-newsletter__title {
	margin: 0 0 12px;
	text-align: center;
	font-weight: 700;
}

.astb-newsletter__intro {
	margin: 0 0 18px;
	line-height: 1.5;
}

/* Form layout */
.astb-newsletter-form {
	margin: 0;
}

.astb-newsletter--signup .astb-newsletter-form {
	margin-top: 6px;
}

.astb-nl-field {
	margin-bottom: 10px;
}

.astb-nl-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
}

.astb-nl-required {
	color: #e2554f;
}

.astb-newsletter-form input[type="email"] {
	display: block;
	width: 100%;
	margin: 0;
	padding: 13px 16px;
	font-size: 16px;
	line-height: 1.3;
	color: #1a1a1a;
	background: #fff;
	border: 1px solid #fff;
	border-radius: 6px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.astb-newsletter-form input[type="email"]:focus {
	outline: none;
	border-color: #1e85e6;
	box-shadow: 0 0 0 3px rgba(30, 133, 230, 0.35);
}

.astb-nl-button {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 14px 18px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	color: #fff;
	background: #1e85e6;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.15s ease-in-out;
	-webkit-appearance: none;
	appearance: none;
}

.astb-nl-button:hover,
.astb-nl-button:focus {
	background: #176bc0;
	color: #fff;
	text-decoration: none;
}

.astb-nl-button[disabled] {
	opacity: 0.65;
	cursor: default;
}

.astb-nl-button--inline {
	display: inline-block;
	width: auto;
	margin-top: 0;
}

/* Honeypot – hidden from humans, visible to bots. */
.astb-nl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Status messages */
.astb-nl-status {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.5;
}

.astb-nl-status.is-error {
	color: #ff9b96;
}

.astb-nl-status.is-success {
	color: #7ee08f;
}

.astb-newsletter-form.is-done .astb-nl-field,
.astb-newsletter-form.is-done .astb-nl-button {
	display: none;
}

/* Standalone confirm / unsubscribe page */
.astb-nl-page {
	margin-top: 40px;
	margin-bottom: 60px;
}

.astb-nl-page .astb-newsletter__title {
	font-size: 28px;
}

.astb-nl-email-line {
	font-weight: 700;
	word-break: break-all;
}

/* Re-engagement popup */
.astb-nl-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

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

.astb-nl-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.astb-nl-popup__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 34px 32px 32px;
	color: #fff;
	background: #1f1f1f;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
	animation: astb-nl-pop 0.25s ease-out;
}

.astb-nl-popup__close {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	font-size: 28px;
	line-height: 1;
	color: #b8b8b8;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.astb-nl-popup__close:hover,
.astb-nl-popup__close:focus {
	color: #fff;
}

.astb-newsletter--popup .astb-newsletter__title {
	margin-top: 0;
}

.astb-newsletter--popup .astb-newsletter__intro {
	text-align: center;
}

.astb-nl-popup__decline-wrap {
	margin: 14px 0 0;
	text-align: center;
}

.astb-nl-popup__decline {
	padding: 4px;
	font-size: 13px;
	color: #9a9a9a;
	background: none;
	border: 0;
	cursor: pointer;
	text-decoration: underline;
}

.astb-nl-popup__decline:hover,
.astb-nl-popup__decline:focus {
	color: #cfcfcf;
}

.astb-newsletter-form.is-done ~ .astb-nl-popup__decline-wrap {
	display: none;
}

body.astb-nl-popup-open {
	overflow: hidden;
}

@keyframes astb-nl-pop {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 480px) {
	.astb-nl-popup__dialog {
		padding: 28px 20px 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.astb-nl-popup__dialog {
		animation: none;
	}
}
