/* --- Modern Layout & Theme Inheritance --- */
.uff-sidebar {
    /* No hardcoded background or border - blends into theme widget area */
    font-family: inherit; 
    color: inherit;
    /* Removed unnecessary padding to fit tightly in sidebar */
    padding: 0; 
    margin-bottom: 30px;
}

.uff-section {
    margin-bottom: 24px;
    padding-bottom: 0;
    border: none; /* Removed separator lines for cleaner look */
}

.uff-title {
    font-size: 0.95em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    opacity: 0.9;
    color: inherit; /* Takes theme header color */
}

/* --- List & Tree --- */
.uff-list-container {
    display: flex;
    flex-direction: column;
    gap: 6px; /* Tighter spacing */
}

.uff-sub-cat {
    margin-left: 8px; /* Reduced indentation */
    padding-left: 12px;
    border-left: 1px solid rgba(0,0,0,0.1); /* Subtle guide line */
    margin-top: 4px;
    margin-bottom: 4px;
}

/* --- Modern Checkbox --- */
.uff-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95em;
    opacity: 0.8;
    transition: opacity 0.2s;
    user-select: none;
    line-height: 1.4;
    padding: 2px 0;
}

.uff-checkbox:hover {
    opacity: 1;
}

.uff-checkbox input {
    display: none; /* Hide native */
}

/* Custom Checkmark Box */
.uff-checkmark-box {
    width: 16px;
    height: 16px;
    border: 1px solid currentColor; /* Takes theme text color */
    border-radius: 3px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.4;
    transition: all 0.2s;
}

.uff-checkmark-box svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    visibility: hidden;
}

/* Checked State */
.uff-checkbox input:checked + .uff-checkmark-box {
    background: currentColor; /* Fills with theme text color */
    opacity: 1;
}

.uff-checkbox input:checked + .uff-checkmark-box svg {
    visibility: visible;
    stroke: #fff; /* Inverts check icon */
    /* If theme is dark, this might need adjustment, but usually works */
}
/* If theme background is white, stroke needs to be white. 
   If theme is dark, stroke should be black? 
   Safe bet: use css filter to invert or just keep it simple. */
   
.uff-checkbox input:checked + .uff-checkmark-box {
    /* Alternative: keep border, show tick */
    background: transparent;
    opacity: 1;
}
.uff-checkbox input:checked + .uff-checkmark-box svg {
    stroke: currentColor;
}


.uff-count {
    font-size: 0.85em;
    opacity: 0.5;
    margin-left: auto; /* Push to right */
}

/* --- Modern Slider --- */
.uff-range-slider {
    position: relative;
    height: 4px;
    margin: 25px 0 15px 0;
}

.uff-slider-track {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1); /* Neutral track */
    position: absolute;
    border-radius: 2px;
}

.uff-range-slider input {
    position: absolute;
    width: 100%;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    top: -6px; /* Center over track */
    margin: 0;
    height: 16px;
}

.uff-range-slider input::-webkit-slider-thumb {
    pointer-events: auto;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #fff; /* Clean white thumb */
    border: 2px solid currentColor; /* Theme color border */
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.uff-price-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    font-weight: 500;
    opacity: 0.8;
}

/* --- Footer --- */
.uff-footer {
    margin-top: 15px;
}

.uff-reset-btn {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: inherit;
    opacity: 0.6;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s;
}

.uff-reset-btn:hover {
    opacity: 1;
}

.uff-hidden-item { display: none; }
.uff-toggle-more {
    font-size: 0.85em;
    opacity: 0.7;
    cursor: pointer;
    margin-top: 8px;
    font-weight: 500;
    display: inline-block;
}
.uff-toggle-more:hover { opacity: 1; }