/* CHECKOUT STYLES */
/* Custom spinning loader for addToCartLoader */
.addToCartLoader {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 9999;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 10px;
	padding: 30px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	text-align: center;
	font-family: Arial, sans-serif;
	display: none;
	transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.addToCartLoader.show {
	display: block;
}

/* Custom spinning icon */
.addToCartLoader::before {
	content: '';
	display: block;
	width: 40px;
	height: 40px;
	margin: 0 auto 15px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #007cba;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

/* Alternative cart icon spinner */
.addToCartLoader.cart-icon::before {
	content: '🛒';
	font-size: 30px;
	display: block;
	margin: 0 auto 15px;
	animation: bounce 1.5s ease-in-out infinite;
	border: none;
	width: auto;
	height: auto;
}

/* Flying animation from center to top right corner */
.addToCartLoader.fly-to-cart {
	top: 20px;
	left: calc(100% - 80px); /* Position 20px from right edge (60px width + 20px margin) */
	transform: translate(0, 0) scale(0.3);
	opacity: 0.8;
	background: #007cba;
	color: white;
	border-radius: 50%;
	padding: 15px;
	width: 60px;
	height: 60px;
	box-sizing: border-box;
	/* Now it will smoothly fly from center (50%, 50%) to top-right corner */
}

/* Success state after flying */
.addToCartLoader.success {
	background: #28a745;
	transform: translate(0, 0) scale(0.4);
	animation: successPulse 0.6s ease-in-out;
}

/* Cart icon when flying */
.addToCartLoader.fly-to-cart::before {
	content: '🛒';
	font-size: 20px;
	display: block;
	margin: 0;
	animation: none;
	border: none;
	width: auto;
	height: auto;
	line-height: 30px;
}

/* Success checkmark */
.addToCartLoader.success::before {
	content: '✓';
	font-size: 24px;
	color: white;
	animation: none;
	border: none;
	line-height: 30px;
}

/* Hide text when flying */
.addToCartLoader.fly-to-cart .loading-text,
.addToCartLoader.fly-to-cart .loading-subtext,
.addToCartLoader.success .loading-text,
.addToCartLoader.success .loading-subtext {
	display: none;
}

/* Spinning animation */
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Bouncing animation for cart icon */
@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-10px);
	}
	60% {
		transform: translateY(-5px);
	}
}

/* Pulse animation for the whole loader */
.addToCartLoader.pulse {
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0% {
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		transform: translate(-50%, -50%) scale(1.05);
	}
	100% {
		transform: translate(-50%, -50%) scale(1);
	}
}

/* Success pulse animation */
@keyframes successPulse {
	0% { transform: translate(0, 0) scale(0.3); }
	50% { transform: translate(0, 0) scale(0.5); }
	100% { transform: translate(0, 0) scale(0.4); }
}

/* Loading text styling */
.addToCartLoader .loading-text {
	color: #333;
	font-size: 16px;
	font-weight: bold;
	margin: 0;
}

.addToCartLoader .loading-subtext {
	color: #666;
	font-size: 12px;
	margin: 5px 0 0 0;
}

/* Overlay background */
.addToCartLoader-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	display: none;
	transition: opacity 0.3s ease;
}

.addToCartLoader-overlay.show {
	display: block;
}

.addToCartLoader-overlay.fade-out {
	opacity: 0;
}

/* General loader */
.loader-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	display: none;
	transition: opacity 0.3s ease;
}

.loader-overlay.show {
	display: block;
}

.loader {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 9999;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 10px;
	padding: 30px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	text-align: center;
	font-family: Arial, sans-serif;
	display: none;
	transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loader.show {
	display: block;
}

.loader::before {
	content: '';
	display: block;
	width: 40px;
	height: 40px;
	margin: 0 auto 15px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #007cba;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.loader .loading-text {
	color: #333;
	font-size: 16px;
	font-weight: bold;
	margin: 0;
}