/**
 * Custom Categories Widget Styles
 */

.custom-categories-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	line-height: 1;
}

.custom-category-item {
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-block;
	user-select: none;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.5px;
}

.custom-category-item:hover {
	opacity: 0.7;
}

/* Use text-shadow to simulate bold without changing layout */
.custom-category-item.active {
	text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
}

.category-separator {
	display: inline-block;
	user-select: none;
	pointer-events: none;
	margin: -10px 10px 0 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.custom-categories-wrapper {
		flex-direction: column;
		align-items: flex-start;
	}

	.category-separator {
		display: none;
	}

	.custom-category-item {
		margin-bottom: 10px;
		display: block;
	}
}

/**
 * Filter Styles
 */
.custom-categories-filters {
	margin-top: 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-end;
}

.filter-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 150px;
}

.thc-filter-group {
	/* Specific styling for THC filter group if needed */
}

.filter-label {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	margin-bottom: 0;
	line-height: 1.2;
	display: block;
}

/* Custom Dropdown Styles for Filters */
.filter-dropdown.custom-dropdown {
	position: relative;
	width: 100%;
}

.filter-dropdown .custom-dropdown-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
	color: #333;
	font-size: 14px;
	font-weight: normal;
	line-height: 1.4;
	cursor: pointer;
	transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
	box-sizing: border-box;
	text-align: left;
}

.filter-dropdown .custom-dropdown-toggle:hover {
	border-color: #999;
}

.filter-dropdown .custom-dropdown-toggle:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.filter-dropdown .dropdown-selected-text {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.filter-dropdown .dropdown-chevron {
	margin-left: 8px;
	transition: transform 0.3s ease;
	flex-shrink: 0;
	font-size: 12px;
}

.filter-dropdown.custom-dropdown.open .dropdown-chevron {
	transform: rotate(180deg);
}

.filter-dropdown .custom-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	max-height: 200px;
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.filter-dropdown.custom-dropdown.open .custom-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.filter-dropdown .custom-dropdown-item {
	padding: 8px 12px;
	color: #333;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	border-bottom: 1px solid #f5f5f5;
}

.filter-dropdown .custom-dropdown-item:last-child {
	border-bottom: none;
}

.filter-dropdown .custom-dropdown-item:hover {
	background-color: #f8f9fa;
	color: #007cba;
}

.filter-dropdown .custom-dropdown-item.active {
	background-color: #007cba;
	color: #fff;
}

.filter-dropdown .custom-dropdown-item.active:hover {
	background-color: #005a87;
	color: #fff;
}

.filter-select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
	font-size: 14px;
	line-height: 1.4;
	color: #333;
	min-width: 150px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 12px;
	padding-right: 30px;
	box-sizing: border-box;
}

.filter-select:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.filter-select:hover {
	border-color: #999;
}

/* Responsive adjustments for filters */
@media (max-width: 768px) {
	.custom-categories-filters {
		flex-direction: column;
		align-items: stretch;
		gap: 15px;
	}

	.filter-group {
		min-width: auto;
		width: 100%;
	}

	.filter-select {
		min-width: auto;
		width: 100%;
	}
}

@media (max-width: 480px) {
	.custom-categories-filters {
		gap: 10px;
	}

	.filter-group {
		gap: 6px;
	}

	.filter-label {
		font-size: 13px;
	}

	.filter-select {
		font-size: 13px;
		padding: 6px 10px;
		padding-right: 28px;
	}
}