/*
 * LEO Commerce UI — Marcas com multisseleção visual
 * v0.5.11.28.5
 *
 * A lógica de seleção é nativa do WC_Widget_Brand_Nav. Este arquivo altera
 * somente a apresentação dos links para o padrão visual de checkbox.
 */

body.woocommerce.archive .widget_brand_nav ul[class*="wc-brand-list-layered-nav-"] {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	width: 100% !important;
	margin: 0 0 8px !important;
	padding: 0 !important;
	box-sizing: border-box !important;
	flex-wrap: wrap !important;
}

/* Se uma marca possuir subtaxonomias, a árvore continua em uma nova linha. */
body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > ul.children {
	flex: 0 0 100% !important;
	width: 100% !important;
	margin: 4px 0 0 !important;
	padding-left: 25px !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term:last-child {
	margin-bottom: 0 !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > a {
	display: inline-flex !important;
	align-items: center !important;
	flex: 1 1 auto !important;
	gap: 8px !important;
	min-width: 0 !important;
	min-height: 30px !important;
	margin: 0 !important;
	padding: 3px 4px 3px 0 !important;
	box-sizing: border-box !important;
	border-radius: 6px !important;
	color: #555555 !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	line-height: 1.35 !important;
	text-decoration: none !important;
	cursor: pointer !important;
}

/* Caixa visual. Mantemos <a> nativo: sem JS, sem input falso e sem submit. */
body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > a::before {
	content: "" !important;
	display: inline-block !important;
	flex: 0 0 17px !important;
	width: 17px !important;
	height: 17px !important;
	box-sizing: border-box !important;
	border: 1.5px solid #123B82 !important;
	border-radius: 4px !important;
	background-color: #ffffff !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-size: 11px 11px !important;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > a:hover,
body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > a:focus-visible {
	color: #123B82 !important;
	background: rgba(255, 212, 0, .12) !important;
	outline: none !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > a:focus-visible::before {
	box-shadow: 0 0 0 3px rgba(18, 59, 130, .15) !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term.chosen > a {
	color: #123B82 !important;
	font-weight: 600 !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term.chosen > a::before {
	border-color: #123B82 !important;
	background-color: #123B82 !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.2 8.4 6.4 11.4 12.9 4.8'/%3E%3C/svg%3E") !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > .count {
	flex: 0 0 auto !important;
	margin-left: auto !important;
	color: #777777 !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	line-height: 1.35 !important;
}

body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term.chosen > .count {
	color: #123B82 !important;
}

/* Tablet: mantém área de toque confortável sem alterar a estrutura da sidebar. */
@media (min-width: 768px) and (max-width: 1024px) {
	body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > a {
		min-height: 34px !important;
	}

	body.woocommerce.archive .widget_brand_nav .wc-layered-nav-term > a::before {
		flex-basis: 18px !important;
		width: 18px !important;
		height: 18px !important;
	}
}

/* Mobile: o mesmo widget é movido para o painel já homologado. */
@media (max-width: 767px) {
	body.woocommerce.archive #leo-v3-filter-portal .widget_brand_nav .wc-layered-nav-term {
		margin-bottom: 7px !important;
	}

	body.woocommerce.archive #leo-v3-filter-portal .widget_brand_nav .wc-layered-nav-term > a {
		min-height: 38px !important;
		padding-top: 5px !important;
		padding-bottom: 5px !important;
		font-size: 14px !important;
	}

	body.woocommerce.archive #leo-v3-filter-portal .widget_brand_nav .wc-layered-nav-term > a::before {
		flex-basis: 19px !important;
		width: 19px !important;
		height: 19px !important;
		background-size: 12px 12px !important;
	}
}
