/*
 * Mind Kit — amostras de atributo.
 *
 * Estrutura e estados. Os valores visuais são variáveis `--mc-sw-*` com padrão
 * próprio; o modelo (tema) pode redefini-las com os tokens da loja, sem tocar
 * neste arquivo. Ex.: .mc-sw { --mc-sw-border: var(--color-border-strong); }
 */
.mc-sw,
.mc-sw-form {
	--mc-sw-border: #333;
	--mc-sw-bg: #fff;
	--mc-sw-text: #333;
	--mc-sw-hover-bg: #eee;
	--mc-sw-selected-bg: #111;
	--mc-sw-selected-text: #fff;
	--mc-sw-ring: #2491ff;
	--mc-sw-swatch-border: #ccc;
	--mc-sw-swatch-border-hover: #353c4e;
	--mc-sw-radius: 2px;
	--mc-sw-size: 42px;
	--mc-sw-tip-bg: #000;
	--mc-sw-tip-text: #fff;
	--mc-sw-error-bg: #e2401c;
	--mc-sw-skeleton-a: #ececec;
	--mc-sw-skeleton-b: #f5f5f5;
}

/* ------------------------------------------------------------------ Estrutura */
.mc-sw__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.mc-sw__set {
	padding: 0;
	margin: 0;
	border: 0;
	box-shadow: none;
	background-color: transparent;
}

.mc-sw__set legend {
	font-size: 0;
	padding: 0;
}

/* Especificidade alta de propósito: o tema tem regras genéricas de `ul` (margem lateral). */
.mc-sw .mc-sw__set .mc-sw__list,
.woocommerce .mc-sw .mc-sw__set .mc-sw__list {
	padding: 0;
	margin: 0;
	list-style: none;
}

.mc-sw__item {
	list-style: none;
	display: inline-block;
	padding: 0;
	margin: 0 5px 5px 0;
	vertical-align: top;
	line-height: 0;
}

.mc-sw__btn {
	vertical-align: top;
	display: block;
	position: relative;
	width: 100%;
	text-decoration: none;
	font-weight: 400;
	cursor: pointer;
}

.mc-sw__btn:focus-visible {
	outline: 0.2rem solid var(--mc-sw-ring);
	outline-offset: 0;
}

.mc-sw__cross {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	background: linear-gradient(to top left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - 0.4px), rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0) calc(50% + 0.4px), rgba(0, 0, 0, 0) 100%);
}

.mc-sw__btn.is-disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.mc-sw__btn.is-disabled:active {
	pointer-events: none;
}

.mc-sw__btn.is-disabled .mc-sw__cross {
	display: block;
}

.mc-sw__btn.is-oos {
	opacity: 0.1;
}

.mc-sw__title {
	font-weight: bold;
	font-size: 14px;
	display: block;
	margin: 10px 0;
}

.mc-sw__chosen {
	font-weight: normal;
	font-size: 14px;
	letter-spacing: 0;
	text-transform: none;
	padding-left: 3px;
}

.mc-sw__chosen.is-empty {
	opacity: 0.5;
}

.mc-sw__chosen span {
	display: none;
}

/* Rótulo do atributo na ficha técnica não mostra o texto de escolha. */
.woocommerce-tabs table.woocommerce-product-attributes .is-empty,
.woocommerce-tabs table.woocommerce-product-attributes .mc-sw__colon {
	display: none;
}

/* ------------------------------------------------------------- Tipo: botão */
.mc-sw__item--button .mc-sw__btn {
	border: 1px solid var(--mc-sw-border);
	display: inline-block;
	padding: 0 9px;
	border-radius: var(--mc-sw-radius);
	background: var(--mc-sw-bg);
	font-size: 13px;
	color: var(--mc-sw-text);
	white-space: nowrap;
	min-width: 47px;
	min-height: 43px;
	line-height: 43px;
	text-align: center;
	transition: background 0.2s;
	box-sizing: border-box;
}

.mc-sw__item--button .mc-sw__btn:focus-visible {
	border-color: var(--mc-sw-ring);
}

.mc-sw__item--button .mc-sw__btn:not(.is-disabled):not(.is-selected):hover {
	background-color: var(--mc-sw-hover-bg);
}

.mc-sw__item--button .mc-sw__btn.is-selected {
	background: var(--mc-sw-selected-bg);
	border-color: var(--mc-sw-selected-bg);
	color: var(--mc-sw-selected-text);
}

.mc-sw__item--button .mc-sw__cross {
	width: 100%;
	height: 100%;
}

/* ------------------------------------------------------------- Tipo: cor */
.mc-sw__item--color .mc-sw__btn {
	width: 30px;
	height: 30px;
	margin: 0 auto;
	padding: 2px;
	background: unset;
	border: none;
	box-sizing: border-box;
}

.mc-sw__item--color .mc-sw__btn:focus-visible {
	border-radius: 50%;
}

.mc-sw__item--color .mc-sw__btn::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid var(--mc-sw-swatch-border);
	margin: 0;
	border-radius: 50%;
}

.mc-sw__item--color .mc-sw__btn:hover::before {
	border-color: var(--mc-sw-swatch-border-hover);
}

.mc-sw__item--color .mc-sw__btn.is-disabled:hover::before {
	border-color: var(--mc-sw-swatch-border);
}

.mc-sw__item--color .mc-sw__btn.is-selected::before {
	border: 1px solid var(--mc-sw-swatch-border-hover);
}

.mc-sw__item--color .mc-sw__btn:focus-visible::before {
	border-color: transparent;
}

.mc-sw__item--color .mc-sw__color {
	display: block;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	white-space: nowrap;
	margin: 0;
	padding: 0;
	text-indent: 100px;
	overflow: hidden;
}

.mc-sw__item--color .mc-sw__btn.is-disabled .mc-sw__cross {
	display: block;
	width: 22px;
	height: 22px;
	top: 4px;
	left: 4px;
	z-index: 1;
	background: linear-gradient(to top left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - 0.4px), rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) calc(50% + 0.4px), rgba(0, 0, 0, 0) 100%);
}

/* ----------------------------------------------------------- Tipo: imagem */
.mc-sw__item--image .mc-sw__btn {
	width: 44px;
	height: 44px;
	position: relative;
	overflow: hidden;
	border-radius: 0;
	border: 1px solid transparent;
	transition: border 0.2s;
	box-sizing: border-box;
	background: unset;
	padding: 0;
}

.mc-sw__item--image .mc-sw__btn::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid var(--mc-sw-swatch-border);
	margin: 0;
	z-index: 1;
}

.mc-sw__item--image .mc-sw__btn:not(.is-disabled):hover::before,
.mc-sw__item--image .mc-sw__btn.is-selected::before {
	border-color: var(--mc-sw-swatch-border-hover);
}

.mc-sw__item--image img {
	white-space: nowrap;
	display: block;
	margin: 0;
	padding: 0;
}

.mc-sw__item--image .mc-sw__cross {
	width: 60px;
	height: 60px;
	z-index: 2;
}

/* "+N" (uma linha) */
.mc-sw__item--more {
	margin: 0;
	line-height: inherit;
}

.mc-sw__item--more > a {
	width: 35px;
	height: 30px;
	margin: 0 auto;
	padding: 0 0 0 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--mc-sw-text);
	text-decoration: underline;
	font-size: 12px;
	text-underline-offset: 2px;
}

/* ------------------------------------------------- Página do produto (PDP) */
.summary .mc-sw__item {
	margin: 0 8px 8px 0;
}

.summary .mc-sw__item--color .mc-sw__btn {
	width: 40px;
	height: 40px;
	padding: 4px;
}

.summary .mc-sw__item--color .mc-sw__btn.is-selected::before {
	border-width: 2px;
}

.summary .mc-sw__item--color .mc-sw__color {
	width: 32px;
	height: 32px;
}

.summary .mc-sw__item--image .mc-sw__btn {
	width: 60px;
	height: 60px;
}

/* No formulário da PDP o título curto não aparece (o rótulo já existe) */
.mc-sw:not(.mc-sw--plp) .mc-sw__title {
	display: none;
}

/* ------------------------------------------------- Tooltip (cor e imagem) */
[data-mc-tooltip] {
	display: inline-block;
	position: relative;
	cursor: pointer;
	padding: 4px;
}

[data-mc-tooltip]::before {
	content: attr(data-mc-tooltip);
	display: none;
	position: absolute;
	background: var(--mc-sw-tip-bg, #000);
	color: var(--mc-sw-tip-text, #fff);
	padding: 5px 10px;
	font-size: 13px;
	line-height: 1.1;
	min-width: max-content;
	text-align: center;
	border-radius: 4px;
	left: 50%;
	transform: translateX(-50%);
	bottom: 100%;
	margin-bottom: 6px;
}

[data-mc-tooltip]::after {
	content: "";
	display: none;
	position: absolute;
	width: 0;
	height: 0;
	border-color: transparent;
	border-style: solid;
	left: 50%;
	margin-left: -6px;
	bottom: calc(100% + 1px);
	border-width: 6px 6px 0;
	border-top-color: var(--mc-sw-tip-bg, #000);
}

[data-mc-tooltip]:hover::before,
[data-mc-tooltip]:hover::after {
	display: block;
	z-index: 50;
}

/* ----------------------------------------------- Formulário do cartão (PLP) */
.mc-sw-form {
	position: relative;
	width: 100%;
}

.mc-sw-form table {
	margin: 0 !important; /* neutraliza margens de tabela do tema dentro do cartão */
	border: none;
	width: 100%;
	position: relative;
}

.mc-sw-form table tbody,
.mc-sw-form table tbody tr,
.mc-sw-form table tbody tr td {
	width: 100%;
	position: relative;
}

li.product .mc-sw-form table td,
li.product .mc-sw-form table th {
	padding: 0;
}

li.product .mc-sw-form table td.value {
	margin-bottom: 10px;
	border-width: 0;
	background: transparent;
}

li.product .mc-sw-form table tr:last-child td.value {
	margin-bottom: 0;
}

.mc-sw-form .mc-sw--plp .mc-sw__item {
	margin: 0 4px 5px 0;
}

.mc-sw-form .mc-sw--plp .mc-sw__item--button {
	margin: 0 5px 5px 0;
}

.mc-sw-form .mc-sw--plp .mc-sw__item--button .mc-sw__btn {
	padding: 0 7px;
	min-width: var(--mc-sw-size);
	min-height: var(--mc-sw-size);
	line-height: 40px;
}

.mc-sw-form .mc-sw--plp .mc-sw__item--image {
	margin-right: 3px;
}

.mc-sw-form .mc-sw__title {
	display: none;
}

.mc-sw-form .mc-sw-attrs {
	display: block;
}

.mc-sw-form tr.mc-sw-hide {
	display: none !important; /* esconde atributos extras na listagem */
}

.mc-sw-form .woocommerce-variation-description,
.mc-sw-form .woocommerce-variation-price,
.mc-sw-form .woocommerce-variation-add-to-cart,
.mc-sw-form .woocommerce-variation-availability > :not(.stock.out-of-stock) {
	display: none;
}

.mc-sw-form .woocommerce-variation-availability p {
	margin: 5px 0 0;
	font-size: 12px;
}

.product.mc-sw-card--noatc .mc-sw-form .stock.out-of-stock,
.product.mc-sw-card--noatc .mc-sw-form .wc-no-matching-variations {
	display: none !important;
}

.mc-sw-form .blockUI {
	visibility: hidden;
}

.mc-sw-form.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.mc-sw-form::after {
	position: absolute;
	top: calc(50% - 15px);
	left: calc(50% - 15px);
	opacity: 0;
	content: "";
	display: inline-block;
	width: 30px;
	height: 30px;
	border: 3px solid rgba(0, 0, 0, 0.5);
	border-left-color: #000;
	border-radius: 50%;
	visibility: hidden;
	z-index: 11;
}

.mc-sw-form.is-loading::after {
	opacity: 1;
	visibility: visible;
	animation: mc-sw-rotate 450ms infinite linear;
}

/* Resumo (acordeão): só no celular */
.mc-sw-form summary {
	font-weight: bold;
	cursor: pointer;
	padding: 12px 15px;
	border-top: 1px solid var(--mc-sw-swatch-border);
	font-size: 14px;
	position: relative;
	width: 100%;
}

.mc-sw-form summary::-webkit-details-marker {
	display: none;
}

.mc-sw-form summary:focus {
	outline: 0;
}

.mc-sw-form summary::before,
.mc-sw-form summary::after {
	content: "";
	position: absolute;
	top: 50%;
	background: var(--mc-sw-selected-bg);
	transition: transform 250ms ease 0s;
}

.mc-sw-form summary::before {
	margin-top: -6px;
	width: 2px;
	height: 12px;
	right: 20px;
}

.mc-sw-form summary::after {
	margin-top: -1px;
	width: 12px;
	height: 2px;
	right: 15px;
}

.mc-sw-form details[open] summary::before {
	transform: rotate(90deg);
}

@media (min-width: 993px) {
	.mc-sw-form summary {
		display: none;
	}

	.mc-sw-form .single_variation_wrap {
		box-sizing: border-box;
		position: absolute;
		background: var(--mc-sw-bg);
		margin: 0;
		text-align: center;
		width: 100%;
	}

	.mc-sw-form .single_variation_wrap p.out-of-stock {
		margin: 0 !important;
	}

	.mc-sw-form .woocommerce-variation-availability {
		position: absolute;
		right: 0;
		top: 12px;
		margin: 0;
	}

	.mc-sw-form .mc-sw-clone {
		display: none !important;
	}

	.mc-sw-form .mc-sw-original {
		display: block;
	}

	.mc-sw__item--image ~ .mc-sw__item--more > a {
		height: 42px;
		width: auto;
		align-items: center;
		display: inline-flex;
	}
}

@media (max-width: 992px) {
	.mc-sw-form details {
		overflow: hidden;
		margin-left: -15px;
		margin-bottom: -15px;
		width: calc(100% + 30px);
	}

	.mc-sw-form summary {
		font-size: 12px;
		border: none;
		margin: 0 15px 10px;
		text-decoration: underline;
		text-decoration-thickness: 0.5px;
		text-underline-offset: 0.16em;
		padding: 0 17px 0 0;
		display: inline-block;
		width: auto;
	}

	.mc-sw-form summary::before {
		margin-top: -5.5px;
		width: 1px;
		height: 9px;
		right: 4.5px;
	}

	.mc-sw-form summary::after {
		margin-top: -1.5px;
		width: 9px;
		height: 1px;
		right: 0.5px;
	}

	.mc-sw-attrs {
		padding: 0 15px 15px;
	}

	.mc-sw-form .mc-sw-clone {
		display: block;
		margin: 10px 0;
	}

	.m-grid-2 .mc-sw-form .mc-sw-clone {
		margin-top: 0;
	}

	.mc-sw-form .mc-sw-original {
		display: none !important;
	}

	.mc-sw-form.is-single details {
		display: none !important;
	}

	.mc-sw--plp .mc-sw__list:has(.mc-sw__item--image),
	.mc-sw--plp .mc-sw__list:has(.mc-sw__item--color) {
		width: 100%;
	}
}

@media (max-width: 770px) {
	.mc-sw-form .mc-sw--plp .mc-sw__item--button .mc-sw__btn {
		width: auto;
		height: 40px;
		min-width: 40px;
		min-height: 34px;
		line-height: 33px;
		font-size: 12px;
	}

	.mc-sw-form .mc-sw-clone {
		margin-bottom: 5px;
	}

	.m-grid-2 .mc-sw--plp .mc-sw__item--image .mc-sw__btn {
		width: 36px;
		height: 36px;
	}

	.m-grid-2 .mc-sw--plp .mc-sw__item--color .mc-sw__btn {
		width: 22px;
		height: 22px;
	}

	.m-grid-2 .mc-sw--plp .mc-sw__item--color .mc-sw__color {
		width: 18px;
		height: 18px;
	}

	.mc-sw--plp .mc-sw__item--more > a {
		height: 22px;
		font-size: 12px;
		width: auto;
	}
}

/* -------------------------------------------------- Esqueleto de carregamento */
body ul.products li.product.mc-sw-card--loading .woocommerce-image__wrapper,
body ul.products li.product.mc-sw-card--loading .woocommerce-card__header > * {
	color: transparent !important;
	background: linear-gradient(100deg, var(--mc-sw-skeleton-a) 30%, var(--mc-sw-skeleton-b) 50%, var(--mc-sw-skeleton-a) 70%);
	border-radius: 5px;
	background-size: 400%;
	animation: mc-sw-loading 1.2s ease-in-out infinite;
}

body ul.products li.product.mc-sw-card--loading .woocommerce-image__wrapper > *,
body ul.products li.product.mc-sw-card--loading .woocommerce-card__header > * > * {
	visibility: hidden;
}

ul.products li.product.mc-sw-card--loading .woocommerce-card__header .product__categories,
ul.products li.product.mc-sw-card--loading .woocommerce-card__header .woocommerce-loop-product__title,
ul.products li.product.mc-sw-card--loading .woocommerce-card__header .price {
	display: table;
	width: auto;
}

ul.products li.product.mc-sw-card--loading .woocommerce-card__header .star-rating::before {
	visibility: hidden;
}

/* ------------------------------------------------------------------ Aviso */
#mc-sw-notice-wrap {
	max-width: 100%;
	width: 300px;
	margin: 0;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 10;
	font-size: 14px;
}

#mc-sw-notice-wrap .mc-sw-notice-close {
	position: absolute;
	right: 2px;
	top: 0;
	color: #fff;
	z-index: 11;
	padding: 0 5px;
	border-radius: 50%;
	text-decoration: none;
}

#mc-sw-notice .woocommerce-error {
	background-color: var(--mc-sw-error-bg);
	color: #fff;
	padding: 1em 1.618em;
	border-left: 0;
	margin-bottom: 0;
	font-size: 14px;
	border-radius: 4px;
	line-height: 1.5;
}

#mc-sw-notice .woocommerce-error a {
	display: none;
}

@keyframes mc-sw-rotate {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes mc-sw-loading {
	0% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0 50%;
	}
}

@media (prefers-reduced-motion: reduce) {
	body ul.products li.product.mc-sw-card--loading .woocommerce-image__wrapper,
	body ul.products li.product.mc-sw-card--loading .woocommerce-card__header > * {
		animation: none;
	}

	.mc-sw-form.is-loading::after {
		animation: none;
	}
}
