.tfl-product-filters,
.tfl-product-filters * {
	box-sizing: border-box;
}

.tfl-product-filters {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	margin: 12px 0 20px;
	padding: 12px;
	border: 1px solid var(--global-palette6, #d9d9d9);
	border-radius: 12px;
	background: var(--global-palette9, #fff);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.3;
	color: var(--global-palette3, #1a202c);
}

.tfl-filter-slot {
	width: 100%;
	max-width: 100%;
}

.tfl-product-filters button,
.tfl-product-filters select,
.tfl-product-filters input,
.tfl-product-filters a.button {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
}

.tfl-product-filters__header {
	margin: 0 0 10px;
}

.tfl-product-filters__header h3 {
	margin: 0;
	font-size: 19px;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.15;
	color: var(--global-palette3, #1a202c);
}

.tfl-product-filters__status {
	margin: 0 0 8px;
	min-height: 14px;
	font-size: 11px;
	line-height: 1.2;
	color: var(--global-palette5, #6b7280);
}

.tfl-product-filters__status.is-error {
	color: var(--global-palette13, #b82105);
}

.tfl-product-filters__groups-grid {
	display: block;
}

.tfl-product-filters.tfl-preview-loading .tfl-filter-picker__add {
	opacity: 0.85;
}

.tfl-product-filters__group {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	margin: 0 0 10px;
	padding: 8px 9px 9px;
	border: 1px solid var(--global-palette7, #eceff4);
	border-radius: 10px;
	background: var(--global-palette9, #fff);
}

.tfl-filter-slot--wide .tfl-product-filters__groups-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.tfl-filter-slot--wide .tfl-product-filters__group {
	margin: 0;
}

.tfl-product-filters__group legend {
	display: block;
	width: 100%;
	margin: 0 0 6px;
	padding: 0;
	font-size: 14px;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--global-palette4, #2d3748);
}

.tfl-filter-picker__summary {
	margin: 0 0 6px;
	padding: 0;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--global-palette5, #6b7280);
}

.tfl-filter-picker__summary.is-hidden {
	display: none;
}

.tfl-product-filters .tfl-filter-picker__chips,
.tfl-filter-picker__chips.tfl-filter-picker__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 4px;
	margin: 0 0 6px;
	padding: 0;
	min-width: 0;
}

.tfl-product-filters .tfl-filter-picker__chips:empty,
.tfl-filter-picker__chips.tfl-filter-picker__chips:empty {
	display: none;
	margin: 0;
}

.tfl-filter-chip.tfl-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: 0 1 auto;
	max-width: 100%;
	margin: 0;
	padding: 2px 6px;
	border: 1px solid var(--global-palette7, #d9e0ea);
	border-radius: 7px;
	background: var(--global-palette8, #eef3fb);
	color: var(--global-palette3, #21324a);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	cursor: pointer;
}

.tfl-filter-chip:focus {
	outline: 2px solid var(--global-palette2, #014566);
	outline-offset: 1px;
}

.tfl-filter-chip__text {
	display: inline-block;
	max-width: 150px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tfl-filter-chip__remove {
	margin-left: 2px;
	color: var(--global-palette5, #6b7280);
	font-size: 11px;
	line-height: 1;
}

.tfl-filter-chip:hover .tfl-filter-chip__remove,
.tfl-filter-chip:focus .tfl-filter-chip__remove {
	color: var(--global-palette3, #1a202c);
}

.tfl-filter-chip:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.tfl-filter-picker__controls {
	display: flex;
	justify-content: flex-start;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.tfl-filter-picker__add.tfl-filter-picker__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	min-width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--global-palette6, #d7dde8);
	border-radius: 8px;
	background: #fff;
	color: var(--global-palette2, #014566);
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}

.tfl-filter-picker__add.tfl-filter-picker__add:hover {
	background: var(--global-palette8, #f3f6fb);
}

.tfl-filter-picker__add.tfl-filter-picker__add:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.tfl-product-filters .tfl-filter-picker__panel,
.tfl-filter-picker__panel.tfl-filter-picker__panel {
	margin-top: 6px;
	padding: 4px;
	border: 1px solid var(--global-palette6, #d7dde8);
	border-radius: 8px;
	background: var(--global-palette9, #fff);
	max-height: 176px;
	overflow: auto;
}

.tfl-product-filters .tfl-filter-picker__options,
.tfl-filter-picker__options.tfl-filter-picker__options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tfl-product-filters .tfl-filter-picker__option-item,
.tfl-filter-picker__option-item.tfl-filter-picker__option-item {
	margin: 0;
	padding: 0;
}

.tfl-filter-picker__option-btn.tfl-filter-picker__option-btn {
	display: flex;
	align-items: center;
	width: 100%;
	min-width: 0;
	height: 30px;
	margin: 0;
	padding: 0 8px 0 4px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--global-palette3, #1a202c);
	font-size: 12px;
	line-height: 1.2;
	text-align: left;
	cursor: pointer;
}

.tfl-filter-picker__option-btn:hover,
.tfl-filter-picker__option-btn:focus {
	background: var(--global-palette8, #eff3f9);
	outline: none;
}

.tfl-filter-picker__option-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.tfl-filter-picker__option-text {
	display: inline-block;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tfl-filter-picker__empty {
	margin: 4px 0 2px;
	font-size: 12px;
	color: var(--global-palette5, #6b7280);
}

.tfl-filter-picker__empty.is-hidden {
	display: none;
}

.tfl-filter-picker__noscript-label {
	display: block;
	margin-top: 6px;
	margin-bottom: 4px;
	font-size: 12px;
}

.tfl-filter-picker__noscript-select {
	width: 100%;
	min-height: 90px;
}

.tfl-product-filters__actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 8px;
	margin-top: 8px;
	width: 100%;
}

.tfl-product-filters__actions .button,
.tfl-product-filters__actions .button.button-primary,
.tfl-product-filters__actions .button.button-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	height: 37px;
	min-height: 37px;
	margin: 0;
	padding: 0 9px;
	border-radius: 8px;
	border: 1px solid var(--global-palette2, #014566);
	background: var(--global-palette2, #014566);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
}

.tfl-product-filters__actions .button.button-secondary {
	background: var(--global-palette8, #eff3f9);
	border-color: var(--global-palette6, #d5dce7);
	color: var(--global-palette3, #1a202c);
}

.tfl-product-filters__actions .button.button-primary:hover {
	background: var(--global-palette1, #047cbb);
	border-color: var(--global-palette1, #047cbb);
	color: #fff;
}

.tfl-product-filters__actions .button.button-secondary:hover {
	background: #e5ecf7;
}

.tfl-product-filters__option {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 5px 0;
	font-size: 13px;
	line-height: 1.25;
}

.tfl-product-filters__option em {
	font-style: normal;
	font-size: 11px;
	color: var(--global-palette5, #6b7280);
}

.tfl-product-filters__option input[type="checkbox"] {
	margin: 0;
}

[data-tfl-grid="1"] {
	position: relative;
	transition: opacity 0.2s ease;
}

[data-tfl-grid="1"].tfl-grid-loading {
	opacity: 0.45;
	pointer-events: none;
}

[data-tfl-grid="1"].tfl-grid-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 28px;
	height: 28px;
	margin-top: -14px;
	margin-left: -14px;
	border-radius: 50%;
	border: 3px solid #d4deec;
	border-top-color: var(--global-palette2, #014566);
	animation: tfl-spin 0.8s linear infinite;
}

@keyframes tfl-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 767px) {
	.tfl-product-filters {
		padding: 10px;
	}
	.tfl-product-filters__header h3 {
		font-size: 18px;
		font-size: 1.12rem;
	}
	.tfl-product-filters__actions {
		grid-template-columns: 1fr;
	}
	.tfl-filter-picker__add.tfl-filter-picker__add {
		width: 32px;
		min-width: 32px;
		height: 32px;
	}
	.tfl-filter-chip__text {
		max-width: 132px;
	}
	.tfl-filter-slot--wide .tfl-product-filters__groups-grid {
		grid-template-columns: 1fr;
	}
}
