/* Kategória attribútumszűrők: desktop oldalsáv, mobilon drawer.
   Bootstrap 3.3.5 — nincs offcanvas komponens, ezért saját, egyszerű drawer. */

.attr-category-form {
    margin: 0;
}

/* --- Oldalsáv (>= 992px) --- */

.attr-filter-sidebar {
    margin-top: 6px;
}

.attr-filter-panel {
    border: 1px solid #e3e8ee;
    border-radius: 3px;
    background: #ffffff;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
}

.attr-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.attr-filter-title {
    font-weight: bold;
    font-size: 15px;
    color: #1E5594;
    text-transform: uppercase;
}

/* A bezáró gomb csak a mobil drawerben látszik. */
.attr-filter-close {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888888;
    padding: 0 4px;
}

/* --- Aktív szűrőcímkék --- */

.attr-filter-active {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e3e8ee;
}

.attr-filter-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    background: #1E5594;
    color: #ffffff;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attr-filter-tag:hover,
.attr-filter-tag:focus {
    background: #174374;
    color: #ffffff;
    text-decoration: none;
}

.attr-filter-tag-x {
    margin-left: 6px;
    font-weight: bold;
}

.attr-filter-clear {
    font-size: 12px;
    color: #666666;
    text-decoration: underline;
    white-space: nowrap;
}

/* --- Facetek --- */

.attr-facet {
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
}

.attr-facet:last-of-type {
    border-bottom: none;
}

.attr-facet-title {
    font-weight: bold;
    color: #333333;
    margin-bottom: 5px;
}

.attr-facet-options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.attr-facet-options li {
    margin: 0;
    padding: 0;
}

.attr-option {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 2px 0;
    font-weight: normal;
    cursor: pointer;
    min-height: 26px; /* mobilon is jól célozható */
}

.attr-option input {
    margin: 0;
    flex: 0 0 auto;
}

.attr-option-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.attr-option-count {
    flex: 0 0 auto;
    color: #888888;
    font-size: 12px;
}

.attr-option-count::before {
    content: '(';
}

.attr-option-count::after {
    content: ')';
}

/* Színminta */
.attr-swatch {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #c8ced6;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}

.attr-swatch-none {
    display: none; /* színkód nélkül a szöveg a jelölés */
}

.attr-option input:checked ~ .attr-swatch {
    outline: 2px solid #1E5594;
    outline-offset: 1px;
}

/* Tartomány */
.attr-range-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.attr-range-input {
    width: 0;
    flex: 1 1 0;
    min-width: 56px;
    padding: 4px 6px;
    height: 30px;
}

.attr-range-sep,
.attr-range-unit {
    flex: 0 0 auto;
    color: #666666;
}

.attr-range-slider {
    position: relative;
    height: 26px;
    margin-top: 8px;
}

/* Két egymásra tett natív csúszka: csak a fogantyúk fogadják az eseményt. */
.attr-range-slider-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    height: 26px;
}

.attr-range-slider-input::-webkit-slider-runnable-track {
    height: 4px;
    background: #d9dee5;
    border-radius: 2px;
}

.attr-range-slider-input::-moz-range-track {
    height: 4px;
    background: #d9dee5;
    border-radius: 2px;
}

/* Csak az első csúszka rajzol sávot; a fölé kerülő második sávja átlátszó,
   különben a vonal belelóg az alsó fogantyúba. */
.attr-range-slider-input + .attr-range-slider-input::-webkit-slider-runnable-track {
    background: transparent;
}

.attr-range-slider-input + .attr-range-slider-input::-moz-range-track {
    background: transparent;
}

.attr-range-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border-radius: 50%;
    background: #1E5594;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #1E5594;
    cursor: pointer;
}

.attr-range-slider-input::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1E5594;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #1E5594;
    cursor: pointer;
}

.attr-range-bounds {
    display: flex;
    justify-content: space-between;
    color: #888888;
    font-size: 11px;
    margin-top: 2px;
}

/* JS-sel az inputok azonnal frissítenek, a gomb felesleges. */
.attr-filter-actions {
    margin-top: 10px;
    text-align: right;
}

.attr-js .attr-filter-actions {
    display: none;
}

/* --- Aktív szűrők a lista fölött (a toolbar mellett) --- */

.attr-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 6px 0 10px;
}

/* --- Töltés közben --- */

.attr-loading #content {
    opacity: .5;
    pointer-events: none;
    transition: opacity .15s;
}

/* --- Mobil toggle gomb: csak drawer módban látszik --- */

.attr-filter-toggle {
    display: none;
    margin: 6px 0 10px;
}

.attr-filter-toggle .badge {
    background: #ffffff;
    color: #1E5594;
    margin-left: 6px;
}

/* --- Nincs találat a szűrésre --- */

.attr-no-result {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    margin: 30px 0;
    min-height: 200px;
}

.attr-no-result a {
    display: inline-block;
    margin-top: 10px;
    font-weight: normal;
    text-decoration: underline;
}

/* --- Drawer (< 992px) --- */

@media (max-width: 991px) {
    .attr-filter-toggle {
        display: inline-block;
    }

    .attr-filter-sidebar {
        margin-top: 0;
    }

    .attr-filter-panel {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 85%;
        max-width: 360px;
        z-index: 100001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: none;
        border-radius: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, .3);
        transform: translateX(-105%);
        transition: transform .2s ease-out;
        padding-bottom: 60px;
    }

    .attr-drawer-open .attr-filter-panel {
        transform: translateX(0);
    }

    .attr-filter-close {
        display: block;
    }

    .attr-facet-options {
        max-height: none;
    }

    .attr-option {
        min-height: 36px;
    }

    /* JS-sel is legyen elérhető „Kész" gomb a drawer alján. */
    .attr-js .attr-filter-actions {
        display: block;
        position: sticky;
        bottom: 0;
        background: #ffffff;
        padding: 10px 0;
        border-top: 1px solid #e3e8ee;
    }

    .attr-drawer-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 100000;
    }

    .attr-drawer-open .attr-drawer-backdrop {
        display: block;
    }

    .attr-drawer-open {
        overflow: hidden;
    }
}
