/**
 * IO Widget – Taxonomy Menu 1.3.6
 * List/grid, scroll+fade, color swatches, icon hover.
 */

.io-tm-wrap {
	width: 100%;
	box-sizing: border-box;
	direction: rtl;
}

.io-tm-wrap *,
.io-tm-wrap *::before,
.io-tm-wrap *::after {
	box-sizing: border-box;
}

.io-tm__title {
	font-weight: 700;
	margin: 0 0 12px;
	color: #111827;
}

/* Scroll container with bottom fade */
.io-tm-scroll {
	position: relative;
	max-height: 240px;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.io-tm-scroll::after {
	content: "";
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	display: block;
	height: 40px;
	pointer-events: none;
	background: linear-gradient(to bottom, transparent, #fff);
	margin-top: -40px;
	z-index: 2;
}

.io-tm--list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.io-tm--grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.io-tm__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.io-tm__link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	text-decoration: none;
	color: #111827;
	line-height: 1.4;
	transition: color 0.2s ease, background-color 0.2s ease;
	border-radius: 6px;
	min-width: 0;
}

.io-tm--grid .io-tm__link {
	flex-direction: column;
	justify-content: center;
	text-align: center;
	padding: 10px 8px;
}

.io-tm__link:hover,
.io-tm__link:focus {
	color: #0da7d5;
	outline: none;
}

.io-tm__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.io-tm__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	line-height: 1;
	transition: color 0.2s ease, fill 0.2s ease;
}

.io-tm__icon svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
	transition: fill 0.2s ease;
}

.io-tm__swatch {
	display: inline-block;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.15);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.io-tm__label {
	flex: 1 1 auto;
	min-width: 0;
}

.io-tm--grid .io-tm__label {
	flex: 0 1 auto;
	font-size: 0.85em;
}

.io-tm__count {
	flex: 0 0 auto;
	color: #9ca3af;
	font-size: 0.9em;
}

.io-tm .io-tm {
	margin-top: 4px;
	padding-inline-start: 16px;
}

.io-tm-notice {
	margin: 8px 0 0;
	font-size: 13px;
	color: #9ca3af;
}

.elementor-widget-io-taxonomy-menu.elementor-invisible {
	visibility: visible !important;
	opacity: 1 !important;
}

body.io-widget-ltr .io-tm-wrap,
html[dir="ltr"] .io-tm-wrap {
	direction: ltr;
}

@media (max-width: 767px) {
	.io-tm__link {
		padding: 10px 12px;
	}
	.io-tm--grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
