/**
 * Pro Add To Cart Elementor Widget Styles
 *
 * @package Pro_Add_To_Cart_Elementor
 */

.pro-add-to-cart-wrapper {
	display: block;
	width: 100%;
}

.pro-add-to-cart-form {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.pro-add-to-cart-price {
	margin-bottom: 15px;
	font-size: 24px;
	font-weight: 600;
	color: #333;
}

.pro-add-to-cart-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 4px;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.5;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff;
}

.pro-add-to-cart-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.pro-add-to-cart-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.pro-add-to-cart-btn:disabled,
.pro-add-to-cart-btn.disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	pointer-events: none;
}

.pro-add-to-cart-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.pro-add-to-cart-btn-icon svg {
	width: 1em;
	height: 1em;
}

.pro-add-to-cart-btn-text {
	font-weight: 600;
}

.pro-add-to-cart-btn-loader {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	animation: spin 1s linear infinite;
}

.pro-add-to-cart-btn-loader svg {
	width: 1em;
	height: 1em;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.pro-add-to-cart-form .quantity {
	margin-right: 0;
}

.pro-add-to-cart-form .quantity input[type="number"] {
	padding: 10px;
	border: 2px solid #e0e0e0;
	border-radius: 4px;
	font-size: 16px;
	width: 80px;
	text-align: center;
	transition: border-color 0.3s ease;
}

.pro-add-to-cart-form .quantity input[type="number"]:focus {
	border-color: #667eea;
	outline: none;
}

/* Success animation */
.pro-add-to-cart-btn.pro-add-to-cart-success {
	animation: successPulse 0.6s ease;
}

@keyframes successPulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
	}
}

/* See Colors Button */
.pro-see-colors-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	margin: 10px 10px;
	font-size: 10px;
	font-weight: 600;
	color: black;
	background: transparent;
	border: none;
	border-bottom: 2px solid black;
	border-radius: 0;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.pro-see-colors-btn:hover {
	background: transparent;
	color: black;
}
.pro-see-colors-btn:focus {
	background-color: transparent;
	color: black;
}

.pro-see-colors-btn-active {
	background: transparent;
	color: black;
}

.pro-see-colors-btn-icon {
	font-size: 10px;
	transition: transform 0.3s ease;
}

.pro-see-colors-btn-active .pro-see-colors-btn-icon {
	transform: rotate(180deg);
}

/* Colors Grid Container */
.pro-colors-grid-container {
	margin: 15px 0;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e0e0e0;
}

/* Colors Grid */
.pro-colors-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 20px;
	margin-top: 10px;
}

.pro-colors-grid-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 15px;
	background: #ffffff;
	border: 2px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	position: relative;
}

.pro-colors-grid-item:hover:not(.pro-colors-grid-item-selected) {
	border-color: #667eea;
	transform: translateY(-5px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.pro-colors-grid-item.pro-colors-grid-item-selected:hover {
	border-color: green;
	transform: translateY(-5px);
	box-shadow: 0 6px 20px rgba(0, 128, 0, 0.3);
}

.pro-colors-grid-item img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	margin-bottom: 10px;
	max-width: 42px;
}

.pro-colors-grid-item-name {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	line-height: 1.4;
	word-wrap: break-word;
}

.pro-colors-grid-item:hover:not(.pro-colors-grid-item-selected) .pro-colors-grid-item-name {
	color: #667eea;
}

.pro-colors-grid-item.pro-colors-grid-item-selected .pro-colors-grid-item-name {
	color: #2d5016;
}

/* Selected state with checkmark */
.pro-colors-grid-item:before {
	content: "✓";
	color: #ffffff;
	display: block;
	width: 28px;
	height: 28px;
	line-height: 28px;
	background-color: #eeeeee;
	text-align: center;
	font-size: 16px;
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 9;
	border-radius: 50%;
	border-width: 2px;
	border-style: solid;
	border-color: #ffffff;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.3s ease, background-color 0.3s ease;
}

.pro-colors-grid-item.pro-colors-grid-item-selected {
	border: 2px solid green;
	border-radius: 8px;
}

.pro-colors-grid-item.pro-colors-grid-item-selected:before {
	opacity: 1;
	color: #ffffff;
	background-color: green;
}

/* Component specific styling */
.wooco_component {
	position: relative;
}

.wooco_component_name {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
	.pro-add-to-cart-form {
		flex-direction: column;
		align-items: stretch;
	}

	.pro-add-to-cart-form .quantity {
		width: 100%;
	}

	.pro-add-to-cart-form .quantity input[type="number"] {
		width: 100%;
	}

	.pro-add-to-cart-btn {
		width: 100%;
	}

	.pro-colors-grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 15px;
	}

	.pro-colors-grid-item {
		padding: 10px;
	}

	.pro-see-colors-btn {
		font-size: 12px;
		padding: 6px 12px;
	}
}

@media (max-width: 480px) {
	.pro-colors-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
		gap: 10px;
	}
}

/* Hide quantity inputs for variable products in bundles */
.bundled_item_cart_content[data-type="variable"] .quantity:not(.quantity_hidden),
.bundled_item_cart_content[data-type="variable"] .quantity input.qty,
.bundled_item_cart_content[data-type="variable"] .quantity input.bundled_qty,
.bundled_item[data-type="variable"] .quantity:not(.quantity_hidden),
.bundled_item[data-type="variable"] .quantity input.qty,
.bundled_item[data-type="variable"] .quantity input.bundled_qty,
.bundled_item_col.bundled_item_qty_col[data-type="variable"] {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	height: 0 !important;
	width: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Hide quantity inputs when variations are present */
.bundled_item_cart_content:has(.variations) .quantity:not(.quantity_hidden),
.bundled_item_cart_content:has(.variations) .quantity input.qty,
.bundled_item_cart_content:has(.variations) .quantity input.bundled_qty,
.bundled_item:has(.variations) .quantity:not(.quantity_hidden),
.bundled_item:has(.variations) .quantity input.qty,
.bundled_item:has(.variations) .quantity input.bundled_qty {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	height: 0 !important;
	width: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Alternative selector for browsers that don't support :has() */
.bundled_item_cart_content .variations ~ .quantity,
.bundled_item_cart_content .variations + .quantity,
.bundled_item .variations ~ .quantity,
.bundled_item .variations + .quantity {
	display: none !important;
}

/* Hide quantity inputs for variable products in WPC Product Bundles (woosb) */
.woosb-item:has(.variations) .quantity,
.woosb-item:has(.variations) input.qty,
.woosb-item:has(.variations) input[type="number"],
.woosb-bundled-item:has(.variations) .quantity,
.woosb-bundled-item:has(.variations) input.qty,
.woosb-bundled-item:has(.variations) input[type="number"],
[class*="woosb"]:has(.variations) .quantity,
[class*="woosb"]:has(.variations) input.qty,
[class*="woosb"]:has(.variations) input[type="number"] {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	height: 0 !important;
	width: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Alternative selector for WPC Product Bundles */
.woosb-item .variations ~ .quantity,
.woosb-item .variations + .quantity,
.woosb-bundled-item .variations ~ .quantity,
.woosb-bundled-item .variations + .quantity {
	display: none !important;
}

