/* Advanced WooCommerce Smart Filter Pro - Frontend Styles */

:root {
	--awsf-primary-color: #333;
	--awsf-secondary-color: #f1f1f1;
	--awsf-accent-color: #007bff;
	--awsf-border-color: #e5e5e5;
	--awsf-text-primary: #111;
	--awsf-text-secondary: #666;
	--awsf-font-family: inherit;
    --awsf-transition: all 0.25s ease-in-out;
}

.awsf-smart-filter-container {
	font-family: var(--awsf-font-family);
	max-width: 300px;
	width: 100%;
}

.awsf-layout-horizontal {
	max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.awsf-filter-title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 20px;
	color: var(--awsf-text-primary);
}

.awsf-filter-form {
    position: relative;
}

/* Group Title (Accordion Header) */
.awsf-group-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--awsf-text-primary);
	margin: 0;
	padding: 15px 0;
	border-bottom: 1px solid var(--awsf-border-color);
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	text-transform: capitalize;
    transition: var(--awsf-transition);
}

.awsf-group-title:hover {
    color: var(--awsf-accent-color);
}

.awsf-toggle-icon {
	width: 12px;
	height: 12px;
	position: relative;
}

.awsf-toggle-icon::before,
.awsf-toggle-icon::after {
	content: '';
	position: absolute;
	background-color: currentColor;
	transition: var(--awsf-transition);
}

.awsf-toggle-icon::before {
	top: 5px; left: 0; width: 12px; height: 2px;
}

.awsf-toggle-icon::after {
	top: 0; left: 5px; width: 2px; height: 12px;
}

.awsf-group-title.awsf-active .awsf-toggle-icon::after {
	transform: rotate(90deg);
}

.awsf-group-content {
	display: none;
	padding: 15px 10px 15px 0;
	animation: slideDown 0.3s ease forwards;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar for Group Content */
.awsf-group-content::-webkit-scrollbar {
    width: 5px;
}
.awsf-group-content::-webkit-scrollbar-track {
    background: transparent;
}
.awsf-group-content::-webkit-scrollbar-thumb {
    background-color: #d1d1d1;
    border-radius: 5px;
}
.awsf-group-content::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}

@keyframes slideDown {
	from { opacity: 0; transform: translateY(-5px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Term Lists */
.awsf-term-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.awsf-term-item {
	margin-bottom: 10px;
}

.awsf-term-item:last-child {
	margin-bottom: 0;
}

/* Custom Checkboxes */
.awsf-checkbox-container {
	display: flex;
	align-items: center;
	position: relative;
	cursor: pointer;
	font-size: 14px;
	user-select: none;
	color: var(--awsf-text-secondary);
	transition: var(--awsf-transition);
}

.awsf-checkbox-container input {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.awsf-checkmark {
	position: relative;
	height: 18px;
	width: 18px;
	background-color: transparent;
	border: 1px solid #ccc;
	border-radius: 3px;
	margin-right: 10px;
	transition: var(--awsf-transition);
}

.awsf-checkbox-container:hover input ~ .awsf-checkmark {
	border-color: var(--awsf-accent-color);
}

.awsf-checkbox-container input:checked ~ .awsf-checkmark {
	background-color: var(--awsf-accent-color);
	border-color: var(--awsf-accent-color);
}

.awsf-checkmark:after {
	content: "";
	position: absolute;
	display: none;
}

.awsf-checkbox-container input:checked ~ .awsf-checkmark:after {
	display: block;
}

.awsf-checkbox-container .awsf-checkmark:after {
	left: 6px;
	top: 2px;
	width: 4px;
	height: 9px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.awsf-checkbox-container input:checked ~ .awsf-term-name {
    font-weight: 500;
    color: var(--awsf-text-primary);
}

.awsf-term-count {
	margin-left: auto;
	font-size: 12px;
	color: #999;
}

/* Professional Price Slider */
.awsf-price-slider-container {
    position: relative;
    padding: 10px 0 20px;
}

.awsf-slider-track {
    width: 100%;
    height: 4px;
    background-color: var(--awsf-border-color);
    border-radius: 4px;
    position: relative;
    margin-top: 15px;
}

.awsf-slider-progress {
    height: 4px;
    background-color: var(--awsf-accent-color);
    border-radius: 4px;
    position: absolute;
    left: 0;
    right: 0;
}

.awsf-range-inputs-overlay {
    position: relative;
    height: 4px;
}

.awsf-range-slide {
    position: absolute !important;
    top: -7px !important;
    left: 0 !important;
    width: 100% !important;
    height: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    pointer-events: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
}

.awsf-range-slide::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--awsf-accent-color);
    pointer-events: auto;
    -webkit-appearance: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.1s;
}

.awsf-range-slide::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.awsf-range-slide::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--awsf-accent-color);
    pointer-events: auto;
    -moz-appearance: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
}

.awsf-price-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 14px;
    color: var(--awsf-text-secondary);
    font-weight: 500;
}

/* Loader */
.awsf-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.awsf-loader::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    margin-left: -15px;
    border-radius: 50%;
    border: 2px solid var(--awsf-border-color);
    border-top-color: var(--awsf-accent-color);
    animation: spinner .8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Button */
.awsf-reset-btn {
    width: 100%;
    background: transparent;
    color: var(--awsf-text-secondary);
    border: 1px solid var(--awsf-border-color);
    padding: 10px 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 25px;
    cursor: pointer;
    transition: var(--awsf-transition);
    border-radius: 4px;
}

.awsf-reset-btn:hover {
    background: var(--awsf-secondary-color);
    color: var(--awsf-text-primary);
}
