/* Fast Variations Lite
 * Variation layer styling adapted to real Kadence Woo Extras wrappers.
 */

/* ============================= */
/* === LOOP WRAPPERS ========== */
/* ============================= */

body.fvl-loop-active .kadence_catalog_variations_form {
	margin-top: 8px;
}

body.fvl-loop-active .kadence_catalog_variations_form .variations {
	margin: 0;
	border: 0;
}

body.fvl-loop-active .kadence_catalog_variations_form .variations tbody,
body.fvl-loop-active .kadence_catalog_variations_form .variations tr,
body.fvl-loop-active .kadence_catalog_variations_form .variations td,
body.fvl-loop-active .kadence_catalog_variations_form .variations th {
	display: block;
	width: auto;
	border: 0;
	padding: 0;
}

body.fvl-loop-active .kadence_catalog_variations_form .variations th.label {
	margin: 0 0 6px;
}

body.fvl-loop-active .kadence_catalog_variations_form .variations td.value {
	margin: 0;
}

/* ============================= */
/* === SHARED SWATCHES ======== */
/* ============================= */

body.fvl-active .kt-radio-variation-container {
	display: flex;
	gap: 8px;
	margin: 8px 0 12px;
	flex-wrap: nowrap;
	align-items: center;
}

body.fvl-active .kt-radio-variation-container .kad_radio_variations {
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
	align-items: center;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

body.fvl-active .kt-radio-variation-container .kad_radio_variations > input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

body.fvl-active .kt-radio-variation-container .kad_radio_variations > label.fvl-swatch-hidden,
body.fvl-active .kt-radio-variation-container label[data-color].fvl-swatch-hidden {
	display: none;
}

body.fvl-active .kt-radio-variation-container label[data-color] {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	position: relative;
	cursor: pointer;
	overflow: visible;
	border: 0;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.fvl-active .kt-radio-variation-container label[data-color] > * {
	width: 100% !important;
	height: 100% !important;
	display: block;
	border-radius: 50%;
}

body.fvl-active .kt-radio-variation-container label[data-color]::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: linear-gradient(
		145deg,
		rgba(255, 255, 255, 0.5),
		rgba(255, 255, 255, 0.1) 40%,
		transparent 60%
	);
	pointer-events: none;
}

body.fvl-active .kt-radio-variation-container label[data-color]:hover {
	transform: translateY(-2px) scale(1.05);
}

body.fvl-active .kt-radio-variation-container input[type="radio"]:checked + label[data-color] {
	transform: scale(1.08);
	box-shadow:
		0 0 0 2px var(--global-palette1),
		inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

body.fvl-active .kt-radio-variation-container.fvl-pill-mode .kad_radio_variations > label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	background: #fff;
	color: #2a2a2a;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

body.fvl-active .kt-radio-variation-container.fvl-pill-mode .kad_radio_variations > label:hover {
	transform: translateY(-1px);
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.1),
		0 8px 18px rgba(17, 24, 39, 0.08);
}

body.fvl-active .kt-radio-variation-container.fvl-pill-mode .kad_radio_variations > input[type="radio"]:checked + label {
	background: rgba(255, 255, 255, 0.96);
	color: #1f2937;
	box-shadow:
		0 0 0 1px var(--global-palette1),
		inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

body.fvl-active .kt-radio-variation-container.fvl-pill-mode .kad_radio_variations > input[type="radio"]:disabled + label,
body.fvl-active .kt-radio-variation-container.fvl-pill-mode .kad_radio_variations > label.kt_disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* ============================= */
/* === LOOP HOVER REVEAL ====== */
/* ============================= */

body.fvl-loop-active.fvl-loop-hover-reveal .kadence_catalog_variations_form .kt-radio-variation-container {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
}

body.fvl-loop-active.fvl-loop-hover-reveal .product:hover .kadence_catalog_variations_form .kt-radio-variation-container,
body.fvl-loop-active.fvl-loop-hover-reveal .product:focus-within .kadence_catalog_variations_form .kt-radio-variation-container {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

body.fvl-loop-active.fvl-loop-always-visible .kadence_catalog_variations_form .kt-radio-variation-container {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

/* ============================= */
/* === SINGLE PRODUCT ========= */
/* ============================= */

body.fvl-single-active .variations_form .kt-radio-variation-container {
	opacity: 1;
	transform: none;
	pointer-events: auto;
	margin-top: 10px;
}

/* ============================= */
/* === +X OVERFLOW =========== */
/* ============================= */

body.fvl-active .kt-radio-variation-container .swatch-more {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
	background: #fff;
	color: #333;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	position: relative;
	flex: 0 0 auto;
}

body.fvl-active .kt-radio-variation-container.fvl-pill-mode .swatch-more {
	width: auto;
	min-width: 38px;
	padding: 0 10px;
	border-radius: 999px;
}

body.fvl-active .kt-radio-variation-container .swatch-more:hover {
	transform: translateY(-2px) scale(1.05);
	box-shadow:
		0 0 0 2px var(--global-palette1),
		inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

body.fvl-active .kt-radio-variation-container .swatch-more::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 120%;
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	background: #222;
	color: #fff;
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: 0.2s ease;
}

body.fvl-active .kt-radio-variation-container .swatch-more:hover::after {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ============================= */
/* === MOBILE ================= */
/* ============================= */

@media (max-width: 768px) {
	body.fvl-active .kt-radio-variation-container label[data-color],
	body.fvl-active .kt-radio-variation-container .swatch-more {
		width: 32px;
		height: 32px;
	}

	body.fvl-active .kt-radio-variation-container.fvl-pill-mode .kad_radio_variations > label {
		min-height: 32px;
		font-size: 12px;
	}

	body.fvl-active .kt-radio-variation-container.fvl-pill-mode .swatch-more {
		width: auto;
		min-width: 42px;
	}

	body.fvl-loop-active.fvl-mobile-always-visible .kadence_catalog_variations_form .kt-radio-variation-container {
		opacity: 1 !important;
		transform: none !important;
		pointer-events: auto !important;
	}
}
