/**
 * Thanh lọc chuyên mục cho lưới blog.
 *
 * Dùng biến CSS của Woodmart để tự ăn theo bảng màu và bo góc của theme, không
 * hardcode màu — đổi màu chủ đạo trong theme options là thanh lọc đổi theo.
 * Giá trị dự phòng lấy theo tông kem/nâu hiện tại của LaBéBé phòng khi biến
 * chưa được định nghĩa.
 */

.labebe-blog-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 25px;
}

.labebe-blog-filter__item {
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid var(--wd-form-brd-color, rgba(0, 0, 0, .12));
	border-radius: var(--wd-brd-radius, 35px);
	color: var(--wd-text-color, #777);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: .3px;
	white-space: nowrap;
	transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.labebe-blog-filter__item:hover,
.labebe-blog-filter__item:focus-visible {
	border-color: var(--wd-primary-color, #cda07a);
	color: var(--wd-primary-color, #cda07a);
}

.labebe-blog-filter__item.is-active {
	border-color: var(--wd-primary-color, #cda07a);
	background-color: var(--wd-primary-color, #cda07a);
	color: #fff;
}

/* Trạng thái đang nạp: khoá tương tác và làm mờ nhẹ để người dùng thấy phản hồi. */
.labebe-blog-filter.is-loading {
	pointer-events: none;
}

.labebe-blog-filter.is-loading .labebe-blog-filter__item:not(.is-active) {
	opacity: .5;
}

.labebe-blog-filter__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 30px 0;
	color: var(--wd-text-color, #777);
	text-align: center;
}

/* Trên mobile cho cuộn ngang thay vì xuống dòng thành nhiều hàng chiếm hết màn hình. */
@media (max-width: 768.98px) {
	.labebe-blog-filter {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-right: -15px;
		margin-left: -15px;
		padding-right: 15px;
		padding-left: 15px;
		scrollbar-width: none;
	}

	.labebe-blog-filter::-webkit-scrollbar {
		display: none;
	}

	.labebe-blog-filter__item {
		flex: 0 0 auto;
	}
}
