/*
 * Luna Filter – v2.1
 * Style wyłącznie dla panelu bocznego (.luna-filter-sidebar).
 * Siatka produktów należy do motywu – nie stylujemy jej tutaj.
 */

/* ── Wrapper ────────────────────────────────────────────────── */
.luna-filter-sidebar {
    position: relative;
    font-size: 0.9rem;
    color: inherit;
}

/* ── Nagłówek ───────────────────────────────────────────────── */
.luna-sb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2em;
    gap: 0.5em;
}

.luna-sb-title {
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Przycisk "Wyczyść" */
.luna-reset {
    background: none;
    border: 1px solid currentColor;
    border-radius: 3px;
    padding: 3px 10px;
    font-size: 0.8em;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1.4;
}
.luna-reset:hover { opacity: 1; }

/* ── Sekcja grupy ───────────────────────────────────────────── */
.luna-sb-group {
    border-top: 1px solid rgba(0,0,0,.1);
    padding: 1em 0;
}
.luna-sb-group:last-of-type {
    border-bottom: 1px solid rgba(0,0,0,.1);
}

.luna-sb-label {
    font-weight: 600;
    margin-bottom: 0.7em;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Podwójny suwak ─────────────────────────────────────────── */
.luna-range-display {
    font-size: 0.85em;
    margin-bottom: 0.6em;
    opacity: 0.75;
}

.luna-slider-wrap {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
}

/* Track */
.luna-track {
    position: absolute;
    left: 0; right: 0;
    height: 4px;
    background: rgba(0,0,0,.15);
    border-radius: 2px;
    pointer-events: none;
}

/* Wypełnienie między uchwytami */
.luna-fill {
    position: absolute;
    top: 0; bottom: 0;
    background: currentColor;
    border-radius: 2px;
    opacity: 0.5;
}

/* Wspólne dla obu input[range] */
.lf-range {
    position: absolute;
    width: 100%;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
}

.lf-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid currentColor;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: transform 0.15s;
}
.lf-range::-webkit-slider-thumb:hover,
.lf-range:active::-webkit-slider-thumb { transform: scale(1.2); }

.lf-range::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid currentColor;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* Max leży na wierzchu gdy min == max */
.lf-range-max { z-index: 1; }

/* ── Kolory – checkboxy ─────────────────────────────────────── */
.luna-accordion-trigger {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.luna-arrow {
    font-size: 0.75em;
    transition: transform 0.25s;
    display: inline-block;
}
.luna-kolor-group.open .luna-arrow { transform: rotate(180deg); }

.luna-kolor-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.luna-kolor-group.open .luna-kolor-list {
    max-height: 600px;
    margin-top: 0.6em;
}

.luna-kolor-list label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.3em 0;
    cursor: pointer;
    font-size: 0.9em;
}
.luna-kolor-list label:hover { opacity: 0.8; }

.luna-kolor-list input[type="checkbox"] {
    width: 15px; height: 15px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: currentColor;
}

.lf-kolor-cnt {
    opacity: 0.5;
    font-size: 0.85em;
    margin-left: auto;
}

/* ── Spinner (podczas ładowania zakresów) ───────────────────── */
.luna-sb-loading {
    display: flex;
    justify-content: center;
    padding: 1.5em 0;
}

.luna-spinner {
    display: inline-block;
    width: 22px; height: 22px;
    border: 3px solid rgba(0,0,0,.12);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: luna-spin 0.7s linear infinite;
}

@keyframes luna-spin {
    to { transform: rotate(360deg); }
}
