/**
 * WhatsApp Checkout Pro - Premium "ORDER NOW" button styles.
 *
 * Presentation only. Every class name here that frontend.js depends on
 * (.wacp-buy-whatsapp-btn, .wacp-icon, .wacp-btn-label, .wacp-spinner,
 * .is-loading, .wacp-error-message, .wacp-context-cart/.wacp-context-checkout)
 * is unchanged - this file only restyles around them. The two new
 * elements added (.wacp-btn-glow, .wacp-btn-shine) are purely decorative
 * and need no JS at all.
 */

.wacp-button-wrap {
	margin: 14px 0;
	width: 100%;
}

.wacp-buy-whatsapp-btn {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 100%;
	padding: 18px 28px;
	background: linear-gradient(135deg, #15a854 0%, #25d366 55%, #2fe07a 100%);
	color: #ffffff;
	border: none;
	border-radius: 14px;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	line-height: 1.4;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
	box-shadow:
		0 10px 24px rgba(21, 168, 84, 0.32),
		0 2px 6px rgba(21, 168, 84, 0.18),
		0 0 0 0 rgba(37, 211, 102, 0.45);
	-webkit-tap-highlight-color: transparent;
}

.wacp-buy-whatsapp-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.04);
	box-shadow:
		0 16px 32px rgba(21, 168, 84, 0.4),
		0 4px 10px rgba(21, 168, 84, 0.22),
		0 0 24px 4px rgba(37, 211, 102, 0.45);
}

.wacp-buy-whatsapp-btn:active {
	transform: translateY(0);
	filter: brightness(0.98);
}

.wacp-buy-whatsapp-btn:focus-visible {
	outline: 3px solid rgba(37, 211, 102, 0.45);
	outline-offset: 3px;
}

.wacp-buy-whatsapp-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* Soft ambient glow sitting just behind the button, always faintly on,
   intensifying on hover via the box-shadow change above. */
.wacp-btn-glow {
	position: absolute;
	inset: -8px;
	z-index: -1;
	background: radial-gradient(closest-side, rgba(37, 211, 102, 0.35), transparent 80%);
	opacity: 0.6;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.wacp-buy-whatsapp-btn:hover .wacp-btn-glow {
	opacity: 1;
}

/* Diagonal shine sweep on hover. */
.wacp-btn-shine {
	position: absolute;
	top: 0;
	left: -60%;
	width: 35%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: skewX(-20deg);
	pointer-events: none;
	transition: left 0.6s ease;
}

.wacp-buy-whatsapp-btn:hover .wacp-btn-shine {
	left: 130%;
}

.wacp-buy-whatsapp-btn .wacp-icon {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.wacp-buy-whatsapp-btn:hover .wacp-icon {
	transform: translateY(-1px) rotate(-4deg);
}

.wacp-buy-whatsapp-btn .wacp-btn-label {
	position: relative;
}

.wacp-buy-whatsapp-btn .wacp-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	flex-shrink: 0;
}

.wacp-buy-whatsapp-btn.is-loading .wacp-spinner {
	display: inline-block;
	animation: wacp-spin 0.7s linear infinite;
}

.wacp-buy-whatsapp-btn.is-loading .wacp-btn-label,
.wacp-buy-whatsapp-btn.is-loading .wacp-icon {
	opacity: 0.6;
}

@keyframes wacp-spin {
	to {
		transform: rotate(360deg);
	}
}

.wacp-error-message {
	margin: 10px 0 0;
	padding: 10px 14px;
	background: #fde8e8;
	color: #9b1c1c;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
}

.wacp-context-cart .wacp-buy-whatsapp-btn,
.wacp-context-checkout .wacp-buy-whatsapp-btn {
	margin-bottom: 12px;
}

@media (max-width: 480px) {
	.wacp-buy-whatsapp-btn {
		padding: 16px 20px;
		font-size: 15px;
		border-radius: 12px;
	}

	.wacp-icon {
		width: 19px;
		height: 19px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wacp-buy-whatsapp-btn,
	.wacp-btn-glow,
	.wacp-btn-shine,
	.wacp-icon {
		transition: none !important;
	}
}


/* ====================================================================
   Checkout Mode = "page" or "cartflows": checkout-redirect.js renames
   each Order Now button's class from .wacp-buy-whatsapp-btn to
   .wacp-checkout-redirect-btn (structurally preventing the protected
   frontend.js's own delegated click listener from ever matching it
   again - not a timing race, a permanent change made before any
   click can occur). Every rule below is an exact duplicate of the
   rules above, aliased to the new class, so the button's appearance
   is completely unchanged in these modes.
   ==================================================================== */
/**
 * WhatsApp Checkout Pro - Premium "ORDER NOW" button styles.
 *
 * Presentation only. Every class name here that frontend.js depends on
 * (.wacp-checkout-redirect-btn, .wacp-icon, .wacp-btn-label, .wacp-spinner,
 * .is-loading, .wacp-error-message, .wacp-context-cart/.wacp-context-checkout)
 * is unchanged - this file only restyles around them. The two new
 * elements added (.wacp-btn-glow, .wacp-btn-shine) are purely decorative
 * and need no JS at all.
 */

.wacp-button-wrap {
	margin: 14px 0;
	width: 100%;
}

.wacp-checkout-redirect-btn {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 100%;
	padding: 18px 28px;
	background: linear-gradient(135deg, #15a854 0%, #25d366 55%, #2fe07a 100%);
	color: #ffffff;
	border: none;
	border-radius: 14px;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	line-height: 1.4;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
	box-shadow:
		0 10px 24px rgba(21, 168, 84, 0.32),
		0 2px 6px rgba(21, 168, 84, 0.18),
		0 0 0 0 rgba(37, 211, 102, 0.45);
	-webkit-tap-highlight-color: transparent;
}

.wacp-checkout-redirect-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.04);
	box-shadow:
		0 16px 32px rgba(21, 168, 84, 0.4),
		0 4px 10px rgba(21, 168, 84, 0.22),
		0 0 24px 4px rgba(37, 211, 102, 0.45);
}

.wacp-checkout-redirect-btn:active {
	transform: translateY(0);
	filter: brightness(0.98);
}

.wacp-checkout-redirect-btn:focus-visible {
	outline: 3px solid rgba(37, 211, 102, 0.45);
	outline-offset: 3px;
}

.wacp-checkout-redirect-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* Soft ambient glow sitting just behind the button, always faintly on,
   intensifying on hover via the box-shadow change above. */
.wacp-btn-glow {
	position: absolute;
	inset: -8px;
	z-index: -1;
	background: radial-gradient(closest-side, rgba(37, 211, 102, 0.35), transparent 80%);
	opacity: 0.6;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.wacp-checkout-redirect-btn:hover .wacp-btn-glow {
	opacity: 1;
}

/* Diagonal shine sweep on hover. */
.wacp-btn-shine {
	position: absolute;
	top: 0;
	left: -60%;
	width: 35%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: skewX(-20deg);
	pointer-events: none;
	transition: left 0.6s ease;
}

.wacp-checkout-redirect-btn:hover .wacp-btn-shine {
	left: 130%;
}

.wacp-checkout-redirect-btn .wacp-icon {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.wacp-checkout-redirect-btn:hover .wacp-icon {
	transform: translateY(-1px) rotate(-4deg);
}

.wacp-checkout-redirect-btn .wacp-btn-label {
	position: relative;
}

.wacp-checkout-redirect-btn .wacp-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	flex-shrink: 0;
}

.wacp-checkout-redirect-btn.is-loading .wacp-spinner {
	display: inline-block;
	animation: wacp-spin 0.7s linear infinite;
}

.wacp-checkout-redirect-btn.is-loading .wacp-btn-label,
.wacp-checkout-redirect-btn.is-loading .wacp-icon {
	opacity: 0.6;
}

@keyframes wacp-spin {
	to {
		transform: rotate(360deg);
	}
}

.wacp-error-message {
	margin: 10px 0 0;
	padding: 10px 14px;
	background: #fde8e8;
	color: #9b1c1c;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
}

.wacp-context-cart .wacp-checkout-redirect-btn,
.wacp-context-checkout .wacp-checkout-redirect-btn {
	margin-bottom: 12px;
}

@media (max-width: 480px) {
	.wacp-checkout-redirect-btn {
		padding: 16px 20px;
		font-size: 15px;
		border-radius: 12px;
	}

	.wacp-icon {
		width: 19px;
		height: 19px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wacp-checkout-redirect-btn,
	.wacp-btn-glow,
	.wacp-btn-shine,
	.wacp-icon {
		transition: none !important;
	}
}
