/*
 * ASMS for WooCommerce — cart recovery phone prompt.
 *
 * Deliberately self-contained: explicit px font sizes and full-width stacked
 * controls so aggressive theme styles (large base fonts, button padding,
 * input widths) cannot distort the layout.
 */

.asms-wc-cart-prompt {
	bottom: 24px;
	max-width: 380px;
	position: fixed;
	right: 24px;
	width: calc( 100vw - 48px );
	z-index: 99999;
}

.asms-wc-cart-prompt__box {
	animation: asms-wc-prompt-in 0.25s ease-out;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.24 );
	box-sizing: border-box;
	color: #1e1e1e;
	font-size: 15px;
	line-height: 1.5;
	padding: 22px 24px;
	position: relative;
}

.asms-wc-cart-prompt__box *,
.asms-wc-cart-prompt__box *::before,
.asms-wc-cart-prompt__box *::after {
	box-sizing: border-box;
}

.asms-wc-cart-prompt__box h3 {
	color: #1e1e1e;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.3;
	margin: 0 32px 6px 0;
	padding: 0;
	text-transform: none;
}

.asms-wc-cart-prompt__box p {
	color: #50575e;
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 14px;
	padding: 0;
}

.asms-wc-cart-prompt__close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #787c82;
	cursor: pointer;
	display: flex;
	font-size: 18px;
	height: 30px;
	justify-content: center;
	line-height: 1;
	margin: 0;
	padding: 0;
	position: absolute;
	right: 12px;
	top: 12px;
	width: 30px;
}

.asms-wc-cart-prompt__close:hover {
	background: #f0f0f1;
	color: #1e1e1e;
}

.asms-wc-cart-prompt__row {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 4px;
}

.asms-wc-cart-prompt__row input[type="tel"] {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	color: #1e1e1e;
	font-size: 16px; /* ≥16px prevents iOS zoom-on-focus. */
	height: auto;
	line-height: 1.4;
	margin: 0;
	max-width: none;
	min-width: 0;
	padding: 11px 14px;
	width: 100%;
}

.asms-wc-cart-prompt__row input[type="tel"]:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba( 34, 113, 177, 0.18 );
	outline: none;
}

.asms-wc-cart-prompt__row .button,
.asms-wc-cart-prompt__row button {
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
	padding: 12px 16px;
	text-align: center;
	width: 100%;
}

.asms-wc-cart-prompt__consent {
	color: #8c8f94 !important;
	font-size: 12px !important;
	line-height: 1.5 !important;
	margin: 10px 0 0 !important;
}

.asms-wc-cart-prompt__result {
	color: #00a32a;
	font-size: 13px !important;
	margin: 8px 0 0 !important;
	min-height: 1em;
}

.asms-wc-cart-prompt__result.is-error {
	color: #b32d2e;
}

.asms-wc-cart-prompt__result:empty {
	display: none;
}

@keyframes asms-wc-prompt-in {
	from {
		opacity: 0;
		transform: translateY( 14px );
	}
	to {
		opacity: 1;
		transform: translateY( 0 );
	}
}

@media ( max-width: 480px ) {
	.asms-wc-cart-prompt {
		bottom: 12px;
		left: 12px;
		max-width: none;
		right: 12px;
		width: auto;
	}

	.asms-wc-cart-prompt__box {
		padding: 18px 18px 16px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.asms-wc-cart-prompt__box {
		animation: none;
	}
}
