/* CF - Variation Swatches 1.0.0: stili front-end. Nessuna dipendenza esterna. */
.cf-vs-field > select,
.cf-vs-field > .woo-variation-raw-select {
	display: none !important;
}

.cf-vs {
	--cf-vs-size: var(--cf-vs-single-size, 85px);
	--cf-vs-gap: 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--cf-vs-gap);
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.cf-vs--archive {
	--cf-vs-size: var(--cf-vs-archive-size, 50px);
	justify-content: var(--cf-vs-archive-align, center);
	margin: 8px 0 12px;
}

.cf-vs__item {
	position: relative;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--cf-vs-size);
	height: var(--cf-vs-size);
	margin: 0;
	padding: 0;
	border-radius: 2px;
	background: var(--cf-vs-bg, #fff);
	box-shadow: 0 0 0 1px var(--cf-vs-border, #ddd);
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	transition: box-shadow .15s;
}

.cf-vs--rounded .cf-vs__item {
	border-radius: 50%;
}

.cf-vs .cf-vs__item--image {
	overflow: hidden;
}

.cf-vs__item--text {
	width: auto;
	min-width: var(--cf-vs-size);
	padding: 0 .75em;
	font-size: 14px;
	line-height: 1.2;
	text-align: center;
	color: inherit;
}

.cf-vs--rounded .cf-vs__item--text {
	border-radius: calc(var(--cf-vs-size) / 2);
}

.cf-vs--archive .cf-vs__item--text {
	font-size: 12px;
	padding: 0 .5em;
}

/* Selettori con specificità superiore a ".elementor img" (border-radius 0, height auto). */
.cf-vs .cf-vs__item .cf-vs__img {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	max-width: 100%;
	padding: 2px;
	margin: 0;
	border-radius: inherit;
	object-fit: cover;
}

.cf-vs__item:hover,
.cf-vs__item:focus-visible {
	box-shadow: 0 0 0 1px var(--cf-vs-hover, #000);
}

.cf-vs__item:focus-visible {
	outline: 2px solid var(--cf-vs-selected, #000);
	outline-offset: 2px;
}

.cf-vs__item.is-selected {
	box-shadow: 0 0 0 1px var(--cf-vs-selected, #000);
}

/* Spunta sopra l'immagine selezionata (come nel sito originale). */
.cf-vs__item--image.is-selected::before {
	content: "";
	position: absolute;
	inset: 2px;
	z-index: 1;
	border-radius: inherit;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='4' d='M4 16L11 23 27 7'/></svg>") center / 60% no-repeat;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8));
	pointer-events: none;
}

.cf-vs__item.is-disabled {
	cursor: not-allowed;
}

.cf-vs--disabled-blur .cf-vs__item.is-disabled {
	opacity: .35;
}

.cf-vs--disabled-blur .cf-vs__item.is-disabled .cf-vs__img {
	filter: grayscale(.6);
}

.cf-vs--disabled-hide .cf-vs__item.is-disabled,
.cf-vs__item--hidden {
	display: none;
}

/* Etichetta: testo visibile per gli swatch di testo, tooltip (o solo screen reader) per le immagini. */
.cf-vs__item--image .cf-vs__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	white-space: nowrap;
}

.cf-vs--tooltip .cf-vs__item--image .cf-vs__label {
	width: auto;
	height: auto;
	margin: 0;
	padding: 4px 9px;
	clip: auto;
	overflow: visible;
	bottom: calc(100% + 9px);
	left: 50%;
	z-index: 20;
	font-size: 12px;
	line-height: 1.3;
	color: var(--cf-vs-tooltip-text, #fff);
	background: var(--cf-vs-tooltip-bg, #333);
	border-radius: 3px;
	transform: translateX(-50%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s, visibility .15s;
}

.cf-vs--tooltip .cf-vs__item--image .cf-vs__label::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	border: 5px solid transparent;
	border-top-color: var(--cf-vs-tooltip-bg, #333);
	transform: translateX(-50%);
}

.cf-vs--tooltip .cf-vs__item--image:hover .cf-vs__label,
.cf-vs--tooltip .cf-vs__item--image:focus-visible .cf-vs__label {
	opacity: 1;
	visibility: visible;
}

.cf-vs__more {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cf-vs__more a,
.cf-vs__more-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--cf-vs-size);
	height: var(--cf-vs-size);
	padding: 0 .75em;
	border: 0;
	border-radius: calc(var(--cf-vs-size) / 2);
	background: var(--cf-vs-bg, #fff);
	box-shadow: 0 0 0 1px var(--cf-vs-border, #ddd);
	color: inherit;
	font: inherit;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
}

.cf-vs-archive {
	width: 100%;
}

@media (hover: none) {
	.cf-vs--tooltip .cf-vs__item--image:hover .cf-vs__label {
		opacity: 0;
		visibility: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cf-vs__item,
	.cf-vs__label {
		transition: none;
	}
}
