/* ==========================================================================
   Sawatech Woo - Marketing Popup
   ========================================================================== */

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

.st-popup {
	--st-popup-overlay: color-mix(in srgb, var(--st-popup-black) 58%, transparent);
	--st-popup-surface: var(--color-bg, #ffffff);
	--st-popup-surface-muted: var(--color-bg-secondary, #f9fafb);
	--st-popup-heading: var(--color-heading, #111827);
	--st-popup-text: var(--color-text, #1f2937);
	--st-popup-text-muted: var(--color-text-muted, #6b7280);
	--st-popup-border: var(--color-border, #e5e7eb);
	--st-popup-primary: var(--color-btn-bg, var(--color-primary, #2563eb));
	--st-popup-primary-text: var(--color-btn-text, #ffffff);
	--st-popup-primary-hover: var(--color-btn-hover-bg, var(--color-primary-hover, #1d4ed8));
	--st-popup-primary-hover-text: var(--color-btn-hover-text, #ffffff);
	--st-popup-accent: var(--color-accent, #f59e0b);
	--st-popup-black: var(--color-black, #000000);
	--st-popup-radius-card: var(--radius-card, 12px);
	--st-popup-radius-input: var(--radius-input, 8px);
	--st-popup-radius-button: var(--radius-button, 8px);
	--st-popup-transition-fast: var(--transition-fast, 150ms ease);
	--st-popup-shadow: var(--shadow-xl, 0 20px 25px rgba(0, 0, 0, 0.10), 0 10px 10px rgba(0, 0, 0, 0.04));
	position: fixed;
	inset-block: 0;
	inset-inline: 0;
	z-index: var(--z-overlay, 1000);
	background: var(--st-popup-overlay);
	display: grid;
	place-items: center;
	padding: clamp( 14px, 3vw, 28px );
	backdrop-filter: blur( 3px );
	font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
	line-height: var(--font-line-height-body, 1.6);
	color: var(--st-popup-text);
}

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

.st-popup__dialog {
	inline-size: min( 920px, 100% );
	min-block-size: min( 560px, calc( 100vh - 60px ) );
	background: var(--st-popup-surface);
	border-radius: var(--st-popup-radius-card);
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr 0.9fr;
	box-shadow: var(--st-popup-shadow);
	animation: st-popup-enter 280ms ease;
}

.st-popup__media {
	position: relative;
	background:
		linear-gradient( 145deg,
			color-mix(in srgb, var(--st-popup-primary) 16%, var(--st-popup-surface)) 0%,
			color-mix(in srgb, var(--st-popup-primary) 10%, var(--st-popup-surface-muted)) 50%,
			var(--st-popup-surface-muted) 100% );
	overflow: hidden;
}

.st-popup__media img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.st-popup__content {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 16px;
	padding: clamp( 22px, 3.2vw, 44px );
	background: var(--st-popup-surface);
}

.st-popup__content--full {
	grid-column: 1 / -1;
	/* max-inline-size: 620px; */
	/* margin-inline: auto; */
}

.st-popup__close {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	inline-size: 36px;
	block-size: 36px;
	border: 1px solid color-mix(in srgb, var(--st-popup-border) 70%, transparent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--st-popup-text) 8%, transparent);
	color: var(--st-popup-text);
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
	display: grid;
	place-items: center;
	transition: background var(--st-popup-transition-fast), transform var(--st-popup-transition-fast), border-color var(--st-popup-transition-fast), color var(--st-popup-transition-fast);
}

.st-popup__close:hover {
	background: color-mix(in srgb, var(--st-popup-text) 14%, transparent);
	border-color: color-mix(in srgb, var(--st-popup-border) 100%, var(--st-popup-primary));
	transform: rotate( 90deg );
}

.st-popup__title {
	font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
	font-size: clamp( 1.7rem, 3.4vw, 2.8rem );
	line-height: var(--font-line-height-heading, 1.1);
	margin: 0;
	color: var(--st-popup-heading);
}

.st-popup__description {
	font-size: clamp( 0.95rem, 1.4vw, 1.1rem );
	line-height: var(--font-line-height-body, 1.6);
	margin: 0;
	color: var(--st-popup-text-muted);
}

.st-popup__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-block-start: 6px;
}

.st-popup__input {
	inline-size: 100%;
	block-size: 50px;
	padding-block: 0;
	padding-inline: 16px;
	border: 1.5px solid var(--st-popup-border);
	border-radius: var(--st-popup-radius-input);
	font-size: 1rem;
	font-family: inherit;
	color: var(--st-popup-text);
	background: var(--st-popup-surface);
	transition: border-color var(--st-popup-transition-fast), box-shadow var(--st-popup-transition-fast), background-color var(--st-popup-transition-fast);
}

.st-popup__input:focus {
	outline: none;
	border-color: var(--st-popup-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-popup-primary) 28%, transparent);
}

.st-popup__submit {
	inline-size: 100%;
	min-block-size: 52px;
	border: none;
	border-radius: var(--st-popup-radius-button);
	background: var(--st-popup-primary);
	color: var(--st-popup-primary-text);
	font-size: 1.06rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: transform var(--st-popup-transition-fast), box-shadow var(--st-popup-transition-fast), background var(--st-popup-transition-fast), color var(--st-popup-transition-fast);
}

.st-popup__submit:hover {
	transform: translateY( -1px );
	background: var(--st-popup-primary-hover);
	color: var(--st-popup-primary-hover-text);
	box-shadow: 0 10px 18px color-mix(in srgb, var(--st-popup-primary) 36%, transparent);
}

.st-popup__submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

.st-popup__status {
	font-size: 0.92rem;
	line-height: 1.5;
	margin: 0;
	padding: 8px 12px;
	border-radius: var(--st-popup-radius-input);
}

.st-popup__status.is-success {
	background: color-mix(in srgb, var(--st-popup-primary) 14%, var(--st-popup-surface));
	color: color-mix(in srgb, var(--st-popup-primary) 78%, var(--st-popup-text));
	border: 1px solid color-mix(in srgb, var(--st-popup-primary) 42%, var(--st-popup-border));
}

.st-popup__status.is-error {
	background: color-mix(in srgb, var(--st-popup-accent) 10%, var(--st-popup-surface));
	color: color-mix(in srgb, var(--st-popup-accent) 80%, var(--st-popup-text));
	border: 1px solid color-mix(in srgb, var(--st-popup-accent) 40%, var(--st-popup-border));
}

.st-popup__honeypot {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
	padding: 0;
}

@media ( max-width: 980px ) {
	.st-popup__dialog {
		grid-template-columns: 1fr;
		min-block-size: auto;
	}

	.st-popup__media {
		max-block-size: 320px;
	}
}

@media ( max-width: 560px ) {
	.st-popup {
		padding: 10px;
	}

	.st-popup__dialog {
		min-block-size: auto;
		max-block-size: calc( 100vh - 20px );
		overflow-block: auto;
	}

	.st-popup__content {
		padding-block: 18px 20px;
		padding-inline: 16px;
	}

	.st-popup__close {
		inline-size: 34px;
		block-size: 34px;
	}
}

@keyframes st-popup-enter {
	from {
		opacity: 0;
		transform: translateY( 10px ) scale( 0.97 );
	}
	to {
		opacity: 1;
		transform: translateY( 0 ) scale( 1 );
	}
}
