/* ========== Button Loading Spinner ========== */
.single_add_to_cart_button.eaac-loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: eaac-spin 0.8s linear infinite;
	margin-left: 8px;
	vertical-align: middle;
}
@keyframes eaac-spin {
	to { transform: rotate(360deg); }
}

/* ========== Alignment Variants ========== */
.eaac-align-left .eaac-button-wrapper {
	text-align: left;
}
.eaac-align-center .eaac-button-wrapper {
	text-align: center;
}
.eaac-align-right .eaac-button-wrapper {
	text-align: right;
}
/* For non-justify, make the button container inline-flex so text-align works */
.eaac-align-left .eaac-qty-button-holder,
.eaac-align-center .eaac-qty-button-holder,
.eaac-align-right .eaac-qty-button-holder {
	display: inline-flex;
}
/* For justify, keep block flex */
.eaac-align-justify .eaac-button-wrapper form.cart {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}
.eaac-align-justify .eaac-button-wrapper.eaac-no-quantity .single_add_to_cart_button {
	width: 100%;
	margin-left: 0;
	flex: 1 0 100%;
}
.eaac-align-justify .eaac-button-wrapper:not(.eaac-no-quantity) .single_add_to_cart_button {
	flex: 1;
	margin-left: 10px;
}

/* ========== Custom Quantity Input with Plus/Minus Buttons ========== */
.eaac-custom-quantity {
	display: inline-block;
	margin: 0;
}
.eaac-custom-quantity.eaac-quantity-hidden {
	display: none;
}
.eaac-quantity-buttons {
	display: inline-flex;
	align-items: center;
	background: transparent;
	border: none;
	border-radius: 0;
	overflow: visible;
}
.eaac-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	cursor: pointer;
	font-size: 1rem;
	color: #374151;
	transition: all 0.2s ease;
	line-height: 1;
}
.eaac-qty-btn:hover {
	background: #f3f4f6;
}
.eaac-qty-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
/* Default border-radius for LTR (increase on right, decrease on left) */
.eaac-qty-decrease {
	border-radius: 0.375rem 0 0 0.375rem;
	border-right-width: 0;
}
.eaac-qty-increase {
	border-radius: 0 0.375rem 0.375rem 0;
	border-left-width: 0;
}
.eaac-custom-quantity .qty {
	width: 3.75rem;
	height: 2.5rem;
	padding: 0 0.5rem;
	text-align: center;
	border: 1px solid #e5e7eb;
	border-left-width: 0;
	border-right-width: 0;
	background: #fff;
	font-size: 0.875rem;
	font-weight: normal;
	-moz-appearance: textfield;
	margin: 0;
}
.eaac-custom-quantity .qty::-webkit-inner-spin-button,
.eaac-custom-quantity .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Quantity + Button Wrapper */
.eaac-qty-button-holder {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}
.eaac-quantity-wrap {
	display: inline-flex;
}

/* ========== RTL Support ========== */
body.rtl .eaac-qty-decrease {
	border-radius: 0 0.375rem 0.375rem 0;
	border-right-width: 1px;
	border-left-width: 0;
}
body.rtl .eaac-qty-increase {
	border-radius: 0.375rem 0 0 0.375rem;
	border-left-width: 1px;
	border-right-width: 0;
}
body.rtl .eaac-custom-quantity .qty {
	border-left-width: 0;
	border-right-width: 0;
}

/* ========== View Cart Link ========== */
.eaac-hide-view-cart .added_to_cart {
	display: none !important;
}
.eaac-button-wrapper .added_to_cart {
	display: inline-block;
	margin-top: 0.625rem;
}

/* ========== Ensure SVG icons have proper size ========== */
.eaac-qty-btn svg,
.elementor-button-icon svg,
.eaac-toast-icon svg {
	width: 1em;
	height: 1em;
	display: inline-block;
}

/* ========== Fix for Elementor Inline SVG mode ========== */
.eaac-qty-btn .e-font-icon-svg,
.elementor-button-icon .e-font-icon-svg,
.eaac-toast-icon .e-font-icon-svg {
	width: 1em;
	height: 1em;
	display: inline-block;
	fill: currentColor;
}

/* ========== Toast Container & Positioning ========== */
.eaac-toast-container {
	position: fixed;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 380px;
	width: auto;
	margin: 16px;
	pointer-events: none;
}
.eaac-toast-container .eaac-toast {
	pointer-events: auto;
}

/* Positions */
.eaac-toast-container-top-left {
	top: 0;
	left: 0;
	align-items: flex-start;
}
.eaac-toast-container-top-right {
	top: 0;
	right: 0;
	align-items: flex-end;
}
.eaac-toast-container-top-center {
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	align-items: center;
}
.eaac-toast-container-bottom-left {
	bottom: 0;
	left: 0;
	align-items: flex-start;
}
.eaac-toast-container-bottom-right {
	bottom: 0;
	right: 0;
	align-items: flex-end;
}
.eaac-toast-container-bottom-center {
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	align-items: center;
}

/* ========== Toast Styles ========== */
.eaac-toast {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	animation: eaac-toast-slide-in 0.3s ease;
	max-width: 100%;
	min-width: 200px;
	background-color: #fff;
	color: #333;
	font-size: 14px;
	line-height: 1.4;
}
@keyframes eaac-toast-slide-in {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}
.eaac-toast-icon {
	flex-shrink: 0;
	font-size: 20px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.eaac-toast-content {
	flex: 1;
	margin: 0;
	word-break: break-word;
}
.eaac-toast-content p {
	margin: 0;
}
.eaac-toast-content a.button {
	display: inline-block;
	text-decoration: none;
	padding: 4px 8px;
	margin-left: 8px;
	border-radius: 3px;
	font-size: 0.9em;
}
.eaac-toast-close {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	transition: all 0.2s;
	color: inherit;
	opacity: 0.7;
}
.eaac-toast-close:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.1);
}

/* Success specific base styles */
.eaac-toast-success {
	background-color: #d4edda;
	color: #155724;
	border-left: 4px solid #28a745;
}
.eaac-toast-error {
	background-color: #f8d7da;
	color: #721c24;
	border-left: 4px solid #dc3545;
}
.eaac-toast-info {
	background-color: #d1ecf1;
	color: #0c5460;
	border-left: 4px solid #17a2b8;
}

/* ========== Responsive ========== */
@media (max-width: 576px) {
	.eaac-toast-container {
		max-width: calc(100% - 32px);
		margin: 12px;
	}
	.eaac-toast {
		padding: 10px 12px;
		font-size: 13px;
	}
	.eaac-toast-icon {
		font-size: 18px;
	}
}

/* Hide default WooCommerce notices to prevent duplication */
.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    display: none !important;
}

/* Ensure our toast container is visible */
.eaac-toast-container {
    display: flex !important;
}