:root {
    --csf-bg: #333333;
    --csf-darker: #2b2b2b;
    --csf-accent: #b08d49;
    --csf-text: #ffffff;
    --csf-text-dim: #bbbbbb;
    --csf-border: #4a4a4a;
}

.csf-sidebar-container {
    background-color: var(--csf-bg) !important;
    color: var(--csf-text) !important;
    padding: 20px !important;
    direction: rtl !important;
    font-family: Tahoma, sans-serif !important;
    border-radius: 12px !important;
    max-width: 320px !important;
}

.csf-filter-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    font-weight: bold;
    border-bottom: 1px solid var(--csf-border);
    padding-bottom: 10px;
}

.csf-clear-all {
    color: #fff !important;
    font-size: 11px;
    background: #b08d49;
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
}

/* Switches */
.csf-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 13px;
}

.csf-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.csf-switch input { opacity: 0; width: 0; height: 0; }

.csf-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #eee;
    transition: .4s;
    border-radius: 20px;
}

.csf-slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 2px; bottom: 2px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .csf-slider { background-color: var(--csf-accent); }
input:checked + .csf-slider:before { transform: translateX(18px); }

/* Section Labels */
.csf-label {
    color: var(--csf-accent) !important;
    display: block;
    margin: 15px 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    border-bottom: solid 1px;
}

/* List containers with scrolling */
.csf-list {
    max-height: 160px;
    overflow-y: hidden; /* JS handle overflow */
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.csf-list.expanded {
    max-height: 400px;
    overflow-y: auto;
}

/* Custom Checkbox (Removing default browser style) */
.csf-checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    position: relative;
    padding-right: 28px;
    color: #fff !important;
}

.csf-checkbox-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0; width: 0;
}

.csf-checkmark {
    position: absolute;
    right: 0;
    height: 18px;
    width: 18px;
    background-color: #f0f0f0;
    border-radius: 3px;
}

.csf-checkbox-item input:checked ~ .csf-checkmark {
    background-color: var(--csf-accent);
}

.csf-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.csf-checkbox-item input:checked ~ .csf-checkmark:after {
    display: block;
}

.csf-count { margin-right: auto; color: #888; font-size: 11px; }

/* Show More Link */
.csf-show-more {
    color: var(--csf-accent);
    cursor: pointer;
    font-size: 11px;
    text-decoration: underline;
    margin-top: 5px;
    display: block;
    text-align: center !important;
}

/* Input Boxes */
.csf-input-wrapper input, .csf-select {
    width: 100% !important;
    background: #fff !important;
    color: #333 !important;
    border: none !important;
    padding: 10px !important;
    border-radius: 6px !important;
}

.csf-range-inputs { display: flex; gap: 8px; }

.csf-input-box {
    flex: 1;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.csf-input-box span { color: #888; font-size: 11px; margin-left: 5px; }

.csf-input-box input {
    background: transparent !important;
    border: none !important;
    color: #333 !important;
    width: 100% !important;
    padding: 8px 0 !important;
    text-align: center;
}

/* Buttons */
.csf-submit-btn {
    width: 100% !important;
    background-color: var(--csf-accent) !important;
    color: white !important;
    border: none !important;
    padding: 12px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    margin-top: 15px;
}

.csf-reset-btn {
    width: 100% !important;
    background-color: #555 !important;
    color: white !important;
    border: none !important;
    padding: 8px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    margin-top: 8px;
    font-size: 13px;
}

.csf-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-radius: 0 0 8px 8px;
    margin-top: -25px; /* چسبیدن به هدر */
    margin-right: -20px;
    margin-left: -20px;
}

.csf-active-tag {
    background: #fff;
    color: #333;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d4af37;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.csf-remove-item {
    color: #ef4056 !important;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none !important;
    line-height: 1;
}

.csf-active-tag span {
    white-space: nowrap;
    font-weight: 500;
}


.csf-clear-all:hover {
    background: #ef4056 !important;
    color: #fff !important;
}