/**
 * Elementor Variable Add to Cart Widget - Sticky Bottom Bar Layout Styles
 */

.evac-sticky-layout {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	background-color: #fff;
	border-top: 1px solid #ddd;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	z-index: 99999;
	transform: translateY(100%);
	transition: transform 0.3s ease-in-out;
	padding: 15px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	visibility: visible;
	opacity: 1;
	box-sizing: border-box;
	/* Ensure it starts hidden below viewport */
	top: auto !important;
	margin-top: 0 !important;
	/* Only take the height it needs */
	height: auto !important;
	min-height: auto !important;
	max-height: none !important;
}

.evac-sticky-layout.evac-sticky-visible {
	transform: translateY(0) !important;
}

/* Apply sticky styles to original elementor-element wrapper (stays in place) */
/* Target elementor-element that contains sticky widget */
.elementor-element .evac-sticky-layout.evac-sticky-initialized,
.evac-sticky-layout.evac-sticky-initialized {
	position: fixed !important;
	bottom: 0 !important;
	top: auto !important;
	left: 0 !important;
	right: 0 !important;
	width: 100vw !important;
	max-width: 100vw !important;
	z-index: 99999 !important;
	margin: 0 !important;
	margin-top: 0 !important;
	box-sizing: border-box !important;
	/* Override any Elementor container styles */
	clear: both !important;
	float: none !important;
	/* Ensure it's not constrained by parent */
	transform-origin: bottom center !important;
	/* Start hidden below viewport */
	transform: translateY(100%) !important;
	/* Only take the height it needs */
	height: auto !important;
	min-height: auto !important;
	max-height: none !important;
	/* Remove any height constraints */
	overflow: visible !important;
	background: #F3F2E7;
}

/* Apply same styles to parent elementor-element when it has sticky widget */
.elementor-element.evac-sticky-initialized,
.elementor-element:has(.evac-sticky-layout.evac-sticky-initialized) {
	position: fixed !important;
	bottom: 0 !important;
	top: auto !important;
	left: 0 !important;
	right: 0 !important;
	width: 100vw !important;
	max-width: 100vw !important;
	z-index: 99999 !important;
	margin: 0 !important;
	margin-top: 0 !important;
	box-sizing: border-box !important;
	clear: both !important;
	float: none !important;
	transform-origin: bottom center !important;
	transform: translateY(100%) !important;
	height: auto !important;
	min-height: auto !important;
	max-height: none !important;
	overflow: visible !important;
}

/* Override transform when visible - higher specificity */
.elementor-element.evac-sticky-initialized.evac-sticky-visible,
.elementor-element.evac-sticky-visible:has(.evac-sticky-layout.evac-sticky-initialized),
.evac-sticky-layout.evac-sticky-initialized.evac-sticky-visible {
	transform: translateY(0) !important;
	bottom: 0 !important;
	top: auto !important;
}

/* Ensure widget container inside elementor-element is full width */
.elementor-element.evac-sticky-initialized .elementor-widget-container,
.elementor-element:has(.evac-sticky-layout.evac-sticky-initialized) .elementor-widget-container,
.evac-sticky-layout.evac-sticky-initialized .evac-sticky-content {
	max-width: 1200px !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 20px;
	padding-right: 20px;
	box-sizing: border-box;
}

/* Sticky Content */
.evac-sticky-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	max-width: 1200px;
	margin: 0 auto;
	flex-wrap: wrap;
	width: 100%;
	box-sizing: border-box;
}

/* Ensure full width for sticky content */
.evac-sticky-layout.evac-sticky-initialized .evac-sticky-content {
	width: 100% !important;
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 20px;
	padding-right: 20px;
	box-sizing: border-box;
}

/* Sticky Info */
.evac-sticky-info {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1;
	min-width: 200px;
}

.evac-sticky-category {
	margin: 0;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 1px;
	color: #666;
	line-height: 1.2;
	text-transform: uppercase;
}

.evac-sticky-title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 2px;
	color: #333;
	line-height: 1.2;
	text-transform: uppercase;
}

.evac-sticky-price {
	font-size: 18px;
	font-weight: 500;
	color: #4a6741;
	margin: 0;
	line-height: 1.2;
}

.evac-sticky-price del {
	color: #999;
	font-weight: 400;
	font-size: 14px;
}

.evac-sticky-price ins {
	text-decoration: none;
	color: #4a6741;
}

/* Sticky Variations */
.evac-sticky-variations {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.evac-sticky-variation-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

.evac-sticky-variation-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.evac-sticky-variation-button {
	padding: 5px 10px;
	border: 1px solid #333;
	background-color: #fff;
	color: #333;
	cursor: pointer;
	transition: all 0.25s ease;
	font-size: 13px;
	border-radius: 5px;
	min-width: auto;
	text-align: center;
	font-weight: 400;
	letter-spacing: 0.3px;
}

.evac-sticky-variation-button:hover {
	border-color: #4a6741;
	color: #4a6741;
}

.evac-sticky-variation-button.selected {
	border-color: #4a6741;
	background-color: #4a6741;
	color: #fff;
}

.evac-sticky-variation-select {
	padding: 5px 10px;
	border: 1px solid #333;
	background-color: #fff;
	color: #333;
	cursor: pointer;
	transition: all 0.25s ease;
	font-size: 13px;
	border-radius: 5px;
	min-width: 150px;
	text-align: left;
	font-weight: 400;
	letter-spacing: 0.3px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 35px;
}

.evac-sticky-variation-select:hover {
	border-color: #4a6741;
	color: #4a6741;
}

/* Sticky Actions */
.evac-sticky-actions {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

/* Enhanced Quantity Box for Sticky Layout */
.evac-sticky-quantity {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	border: 1px solid #333;
	border-radius: 5px;
	overflow: hidden;
	width: auto;
	background-color: #fff;
	margin: 0;
}

.evac-sticky-quantity .evac-qty-btn {
	/* width: 40px; */
	/* height: 40px; */
	border: none;
	background-color: #fff;
	color: #333;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 18px;
	font-weight: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 10px;
	line-height: 1;
	flex-shrink: 0;
}

/* Hover styles commented out per design */
/* .evac-sticky-quantity .evac-qty-btn:hover {
	background-color: #f5f5f5;
} */

/* Focus styles commented out per design */
/* .elementor-variation-button:focus,
.evac-qty-btn:focus,
.elementor-variable-add-to-cart-button:focus {
	outline: 2px solid #4a6741;
	outline-offset: 2px;
} */

.evac-sticky-quantity .evac-qty-display {
	min-width: 30px;
	width: auto;
	/* height: 40px; */
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 500;
	color: #333;
	background-color: #fff;
	/* padding: 0 10px; */
	box-sizing: border-box;
}

/* Sticky Button */
.evac-sticky-button {
	width: auto;
	padding: 10px 20px;
	border: none;
	border-radius: 5px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 1px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	background-color: #4a6741;
	color: #fff;
	min-width: 180px;
}

.evac-sticky-button:hover:not(.disabled):not(:disabled) {
	background-color: #3d5636;
}

.evac-sticky-button.disabled,
.evac-sticky-button:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}

.evac-sticky-button.loading {
	position: relative;
	color: transparent !important;
}

.evac-sticky-button.loading::after {
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	top: 50%;
	left: 50%;
	margin-left: -10px;
	margin-top: -10px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: elementor-spin 0.6s linear infinite;
}

/* Hide on Mobile */
@media (max-width: 768px) {
	.evac-sticky-layout.evac-hide-on-mobile,
	.elementor-element.evac-sticky-initialized.evac-hide-on-mobile,
	.elementor-element:has(.evac-sticky-layout.evac-hide-on-mobile) {
		display: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
	}
}

/* Responsive Design */
@media (max-width: 768px) {
	.evac-sticky-layout:not(.evac-hide-on-mobile) {
		padding: 15px;
	}

	.evac-sticky-content {
		flex-direction: column;
		align-items: stretch;
		gap: 15px;
	}

	.evac-sticky-info {
		min-width: 100%;
		text-align: center;
	}

	.evac-sticky-actions {
		flex-direction: column;
		width: 100%;
	}

	.evac-sticky-button {
		width: 100%;
		min-width: 100%;
	}

	.evac-sticky-quantity {
		width: 100%;
		justify-content: space-between;
	}

	.evac-sticky-variations {
		justify-content: center;
		width: 100%;
	}
}

