/*
 * Amostras de Variação para WooCommerce — recursos avançados.
 * Autor desta edição: Luís Silva.
 */

.ls-wvs-extended .variable-items-wrapper .variable-item {
	border-width: var(--ls-wvs-border-width, 1px);
	border-color: var(--ls-wvs-border-color, #d8d8d8);
	background: var(--ls-wvs-background, #fff);
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.ls-wvs-extended .variable-items-wrapper .variable-item.selected {
	border-color: var(--ls-wvs-selected-border-color, #111);
	transform: scale(var(--ls-wvs-selected-scale, 1.15));
	z-index: 2;
}

.ls-wvs-extended .variable-items-wrapper.ls-wvs-large-attribute .variable-item {
	width: calc(var(--wvs-single-product-item-width, 30px) * 1.2);
	height: calc(var(--wvs-single-product-item-height, 30px) * 1.2);
}

.ls-wvs-extended [data-wvstooltip]::before,
.ls-wvs-extended .wvs-has-image-tooltip::before {
	font-size: var(--ls-wvs-tooltip-font-size, 14px);
}

.ls-wvs-archive-variation-wrapper {
	display: block;
	width: 100%;
	margin: .65rem 0;
	position: relative;
}

.ls-wvs-archive-variation-wrapper:not(.ls-wvs-loaded) {
	opacity: .55;
}

.ls-wvs-archive-form {
	display: flex;
	flex-direction: column;
	gap: .4rem;
	width: 100%;
}

.ls-wvs-archive-attribute {
	display: flex;
	flex-direction: column;
	gap: .2rem;
}

.ls-wvs-archive-label {
	font-size: .78em;
	font-weight: 600;
	line-height: 1.2;
}

.ls-wvs-archive-items.variable-items-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	justify-content: var(--ls-wvs-archive-align, flex-start);
}

.ls-wvs-archive-align-flex-start .ls-wvs-archive-items {
	--ls-wvs-archive-align: flex-start;
}

.ls-wvs-archive-align-center .ls-wvs-archive-items {
	--ls-wvs-archive-align: center;
}

.ls-wvs-archive-align-flex-end .ls-wvs-archive-items {
	--ls-wvs-archive-align: flex-end;
}

.ls-wvs-archive-align-center .ls-wvs-archive-label,
.ls-wvs-archive-align-center .ls-wvs-clear,
.ls-wvs-archive-align-center .ls-wvs-archive-availability {
	text-align: center;
	align-self: center;
}

.ls-wvs-archive-align-flex-end .ls-wvs-archive-label,
.ls-wvs-archive-align-flex-end .ls-wvs-clear,
.ls-wvs-archive-align-flex-end .ls-wvs-archive-availability {
	text-align: right;
	align-self: flex-end;
}

.ls-wvs-archive-items .variable-item {
	width: var(--ls-wvs-archive-width, 30px);
	height: var(--ls-wvs-archive-height, 30px);
	min-width: var(--ls-wvs-archive-width, 30px);
	font-size: var(--ls-wvs-archive-font-size, 14px);
	margin: 0;
}

.ls-wvs-archive-items.radio-variable-items-wrapper .radio-variable-item {
	width: auto;
	height: auto;
	min-width: 0;
}

.ls-wvs-clear {
	align-self: flex-start;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: .78em;
	text-decoration: underline;
	cursor: pointer;
}

.ls-wvs-hide-single-clear .variations_form .reset_variations {
	display: none !important;
}

.ls-wvs-archive-availability {
	font-size: .8em;
	min-height: 1em;
}

.ls-wvs-group-label {
	flex-basis: 100%;
	width: 100%;
	list-style: none;
	margin: .45rem 0 .15rem;
	font-size: .78em;
	font-weight: 700;
	line-height: 1.25;
	text-align: left;
}

.ls-wvs-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	padding: 0 7px;
	border: 1px dashed var(--ls-wvs-border-color, #d8d8d8);
	border-radius: 4px;
	background: #fff;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	list-style: none;
}

.enabled-display-limit-mode > li.variable-item:nth-of-type(n+1),
.enabled-archive-display-limit-mode > li.variable-item:nth-of-type(n+1) {
	/* A regra efetiva com o limite configurado é adicionada pelo núcleo. */
}

.variable-item.ls-wvs-unavailable,
.variable-item.ls-wvs-out-of-stock {
	position: relative;
}

.wvs-behavior-blur .variable-item.ls-wvs-unavailable,
.wvs-behavior-blur .variable-item.ls-wvs-out-of-stock,
.wvs-behavior-blur-no-cross .variable-item.ls-wvs-unavailable,
.wvs-behavior-blur-no-cross .variable-item.ls-wvs-out-of-stock {
	opacity: .42;
	filter: grayscale(.65);
}

.wvs-behavior-blur .variable-item.ls-wvs-unavailable::after,
.wvs-behavior-blur .variable-item.ls-wvs-out-of-stock::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--wvs-cross) center/100% 100% no-repeat;
	pointer-events: none;
}

.wvs-behavior-hide .variable-item.ls-wvs-unavailable,
.wvs-behavior-hide .variable-item.ls-wvs-out-of-stock {
	display: none !important;
}

.variable-item.ls-wvs-unavailable.disabled,
.variable-item.ls-wvs-out-of-stock.disabled {
	cursor: not-allowed;
}

.ls-wvs-clickable-out-of-stock .variable-item.ls-wvs-out-of-stock {
	cursor: pointer;
	pointer-events: auto;
}

.ls-wvs-archive-tooltips-disabled .ls-wvs-archive-variation-wrapper [data-wvstooltip]::before,
.ls-wvs-archive-tooltips-disabled .ls-wvs-archive-variation-wrapper [data-wvstooltip]::after,
.ls-wvs-archive-tooltips-disabled .ls-wvs-archive-variation-wrapper .wvs-has-image-tooltip::before,
.ls-wvs-archive-tooltips-disabled .ls-wvs-archive-variation-wrapper .wvs-has-image-tooltip::after {
	display: none !important;
}

@media (max-width: 480px) {
	.ls-wvs-archive-items.variable-items-wrapper {
		gap: 5px;
	}

	.ls-wvs-group-label {
		margin-top: .3rem;
	}
}
