/**
 * Frontend styles for coupon modals.
 */

.awcm-popup[hidden] {
	display: none !important;
}

.awcm-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.awcm-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
}

.awcm-popup__dialog {
	position: relative;
	z-index: 1;
	width: min(920px, 100%);
	max-height: min(90vh, 900px);
	overflow: auto;
	background: #ede4d6;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	outline: none;
}

.awcm-popup__content {
	min-height: 200px;
}

.awcm-popup__content .elementor-section {
	margin: 0 !important;
}

.awcm-popup__content .elementor-container {
	max-width: none !important;
}

.awcm-popup__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #111;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.awcm-popup__close:hover,
.awcm-popup__close:focus-visible {
	background: rgba(0, 0, 0, 0.08);
}

/* Email form */
.awcm-email-form__row {
	display: flex;
	align-items: stretch;
	gap: 0;
	background: #111;
	border-radius: 999px;
	overflow: hidden;
	padding: 0.25rem 0.25rem 0.25rem 1rem;
}

.awcm-email-form__input {
	flex: 1;
	border: 0;
	background: transparent;
	color: #fff;
	padding: 0.75rem 0.5rem;
	min-width: 0;
	outline: none;
}

.awcm-email-form__submit {
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 999px;
	background: #888;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.awcm-email-form__submit-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.awcm-email-form__privacy {
	margin-top: 0.75rem;
	font-size: 0.8rem;
	color: #666;
	text-align: center;
}

.awcm-email-form__privacy a {
	text-decoration: underline;
	color: inherit;
}

.awcm-email-form__feedback,
.awcm-claim-button__feedback {
	margin-top: 0.75rem;
	font-size: 0.9rem;
	text-align: center;
}

.awcm-email-form__feedback.is-error,
.awcm-claim-button__feedback.is-error {
	color: #b00020;
}

.awcm-email-form__feedback.is-success,
.awcm-claim-button__feedback.is-success {
	color: #1b7a3d;
}

.awcm-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

/* Coupon code */
.awcm-coupon-code {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-radius: 8px;
	border: 1px dashed #bbb;
}

.awcm-coupon-code__value {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.awcm-coupon-code__copy {
	border: 0;
	background: #111;
	color: #fff;
	border-radius: 6px;
	padding: 0.45rem 0.85rem;
	cursor: pointer;
}

/* Countdown */
.awcm-countdown {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.awcm-countdown__unit {
	min-width: 4.25rem;
	padding: 0.65rem 0.5rem;
	border-radius: 8px;
	text-align: center;
}

.awcm-countdown__digit {
	display: block;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.awcm-countdown__label {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.7;
}

.awcm-countdown__expired {
	width: 100%;
	text-align: center;
	font-weight: 600;
	margin: 0.5rem 0 0;
}

.awcm-claim-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	padding: 0.85rem 1.5rem;
	cursor: pointer;
	font-weight: 600;
}

.awcm-popup.is-open .awcm-popup__dialog {
	animation: awcm-pop-in 0.28s ease-out;
}

@keyframes awcm-pop-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (max-width: 767px) {
	.awcm-popup__dialog {
		width: 100%;
		max-height: 92vh;
	}

	.awcm-countdown__unit {
		min-width: 3.5rem;
	}
}

body.awcm-modal-open {
	overflow: hidden;
}
