/**
 * Falgar range filter: button (in Alla filter box) + side panel from LEFT (Width, Center Bore, Offset)
 */

.autohjul-falgar-range-filter {
    margin-bottom: 0;
}

/* Button inside Alla filter box – styled like SÖK */
.autohjul-shop-dack-filters__btn--more {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    background-color: #2563eb;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.autohjul-shop-dack-filters__btn--more:hover {
    background-color: #1d4ed8;
    color: #fff;
}

/* Overlay */
.autohjul-falgar-range-filter__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    z-index: 9998;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.autohjul-falgar-range-filter__overlay--open {
    opacity: 1;
    visibility: visible;
}

/* Side panel – opens from LEFT */
.autohjul-falgar-range-filter__panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: #fff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 24px;
}

.autohjul-falgar-range-filter__panel--open {
    transform: translateX(0);
}

.autohjul-falgar-range-filter-body-open {
    overflow: hidden;
}

.autohjul-falgar-range-filter__close {
    position: absolute;
    top: 16px;
    right: 16px;
    left: auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    color: #374151;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.autohjul-falgar-range-filter__close:hover {
    background-color: #f3f4f6;
    color: #111;
}

.autohjul-falgar-range-filter__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    padding-right: 48px;
}

.autohjul-falgar-range-filter__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.autohjul-falgar-range-filter__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.autohjul-falgar-range-filter__label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.autohjul-falgar-range-filter__range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.autohjul-falgar-range-filter__input {
    width: 100%;
    max-width: 100px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
}

.autohjul-falgar-range-filter__sep {
    color: #6b7280;
    font-weight: 500;
}

/* Dual range sliders – track + two thumbs */
.autohjul-falgar-range-filter__range-wrap {
    margin-bottom: 10px;
}

.autohjul-falgar-range-filter__slider-track {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
}

.autohjul-falgar-range-filter__range {
    position: absolute;
    width: 100%;
    height: 6px;
    margin: 0;
    padding: 0;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.autohjul-falgar-range-filter__range::-webkit-slider-runnable-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
}

.autohjul-falgar-range-filter__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    pointer-events: auto;
    margin-top: -6px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.autohjul-falgar-range-filter__range::-moz-range-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
}

.autohjul-falgar-range-filter__range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.autohjul-falgar-range-filter__slider-track .autohjul-falgar-range-filter__range:first-of-type {
    z-index: 2;
}

.autohjul-falgar-range-filter__slider-track .autohjul-falgar-range-filter__range:last-of-type {
    z-index: 1;
}

.autohjul-falgar-range-filter__actions {
    margin-top: 8px;
}

.autohjul-falgar-range-filter__submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    background-color: #2563eb;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.autohjul-falgar-range-filter__submit:hover {
    background-color: #1d4ed8;
}

@media (max-width: 480px) {
    .autohjul-falgar-range-filter__panel {
        max-width: 100%;
    }
}
