/**
 * ==========================================================
 * Dallas — Filtry produktów: wygląd
 * ==========================================================
 */

.dallas-filter {
    margin-bottom: 20px;
}

.dallas-filter label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-text-color);
}

.dallas-filter-select {
    width: 100%;
    height: 46px;

    padding: 0 44px 0 14px;

    font-size: 15px;
    line-height: 1;

    border: 1px solid #d8dde6;
    border-radius: 10px;

    background: #fff;
    color: var(--theme-text-color);

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    cursor: pointer;

    transition:
        border-color .2s,
        box-shadow .2s,
        background .2s;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

.dallas-filter-select:hover {
    border-color: #bfc7d5;
}

.dallas-filter-select:focus {
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.dallas-filter-select option {
    background: #f7f8fa;
    color: #333;
    font-size: 14px;
    padding: 8px 12px;
}

.dallas-filter-select option {
    background: #f6f6f6;
    color: #333;
    font-size: 14px;
    padding: 10px 14px;
    line-height: 1.6;
}

/* ==========================================
   DALLAS RANGE
========================================== */

.dallas-range-slider {
    margin: 18px 4px 22px;
}

.dallas-range .noUi-target {

    height: 8px;

    border: 0;
    border-radius: 999px;

    background: #3b3b3b;

    box-shadow: none;

}

.dallas-range .noUi-connect {

    background: var(--theme-palette-color-1);

}

.dallas-range .noUi-handle {

    width: 24px !important;
    height: 24px !important;

    top: -8px !important;
    right: -12px !important;

    border-radius: 50%;

    background: #fff;

    border: 4px solid #222;

    box-shadow:
        0 2px 8px rgba(0,0,0,.18);

    cursor: grab;

}

.dallas-range .noUi-handle:hover {

    transform: scale(1.08);

}

.dallas-range .noUi-handle:active {

    cursor: grabbing;

}

.dallas-range .noUi-handle::before,
.dallas-range .noUi-handle::after {

    display: none;

}

.dallas-range-inputs {

    display: flex;
    gap: 12px;

    margin: 0 0 14px;

}

.dallas-range-inputs input {

    flex: 1;

}

.dallas-range-inputs input {

    height: 48px;

    padding: 0 14px;

    border: 1px solid #d6d6d6;
    border-radius: 10px;

    background: #fafafa;

    font-size: 18px;
    font-weight: 600;

    color: #222;

    transition:
        border-color .2s,
        box-shadow .2s,
        background .2s;

}

.dallas-range-inputs input:focus {

    outline: none;

    background: #fff;

    border-color: var(--theme-palette-color-1);

    box-shadow: 0 0 0 3px rgba(255,153,0,.12);

}

/* Blocksy oznacza pola number własnym stylem walidacji. W obrębie filtra
   ceny zachowujemy wygląd wspólnego komponentu niezależnie od tego stanu. */
.dallas-range-inputs input[type="number"],
.dallas-range-inputs input[type="number"]:invalid {
    border: 1px solid #d6d6d6 !important;
    border-radius: 10px !important;
    background: #fafafa !important;
    box-shadow: none !important;
    color: #222 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-align: center !important;
    appearance: textfield;
}

.dallas-range-inputs input[type="number"]::-webkit-outer-spin-button,
.dallas-range-inputs input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.dallas-range-inputs input[type="number"]:focus {
    border-color: var(--theme-palette-color-1) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(255,153,0,.12) !important;
}

.dallas-range-apply {

    width: 100%;
    height: 46px;

    border: 0;
    border-radius: 10px;

    background: #2f2f2f;
    color: #fff;

    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;

    cursor: pointer;

    transition:
        background .2s,
        transform .15s,
        box-shadow .2s;

    box-shadow:
        0 2px 8px rgba(0,0,0,.12);

}

.dallas-range-apply:hover {

    background: var(--theme-palette-color-1);

    box-shadow:
        0 6px 18px rgba(0,0,0,.18);

}

.dallas-range-apply:active {

    transform: scale(.98);

}

.dallas-range-apply:focus {

    outline: none;

    box-shadow:
        0 0 0 3px rgba(255,153,0,.18);

}

/* ==========================================
   DALLAS RANGE VALUES
========================================== */

.dallas-range-values {

    display: flex;
    gap: 12px;

    margin: 0 0 14px;

}

.dallas-range-values span {

    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    height: 48px;

    border: 1px solid #d6d6d6;
    border-radius: 10px;

    background: #f5f5f5;;

    color: #222;

    font-size: 18px;
    font-weight: 600;

    user-select: none;

    box-sizing: border-box;

}

/* ==========================================
   DALLAS ACTIVE FILTERS
========================================== */

.dallas-active-filters {

    margin-bottom: 28px;

}

.dallas-active-filters h4 {

    margin: 0 0 16px;

    font-size: 20px;
    font-weight: 700;

    color: #222;

}

.dallas-active-filter-list {

    display: flex;
    flex-wrap: wrap;

    gap: 6px;

}

.dallas-active-filter {

    display: inline-flex;
    align-items: center;

    padding: 10px 16px;

    background: #fafafa;

    border: 1px solid #d6d6d6;

    border-radius: 999px;

    color: #222;

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;

    transition:
        all .2s ease;

}

.dallas-active-filter:hover {

    background: #fff;

    border-color: var(--theme-palette-color-1);

    transform: translateY(-1px);

}

.dallas-active-filter::after {

    content: "×";

    margin-left: 8px;

    font-size: 18px;

    line-height: 1;

    color: #888;

    transition: color .2s;

}

.dallas-active-filter:hover::after {

    color: var(--theme-palette-color-1);

}

/* ==========================================
   DALLAS SLIDER ENGINE
========================================== */

.dallas-range-slider {

    position: relative;

    user-select: none;
    touch-action: none;

}

.dallas-slider-track {

    position: absolute;

    inset: 0;

}

.dallas-slider-connect {

    position: absolute;

    top: 0;
    bottom: 0;

}

.dallas-slider-thumb {

    position: absolute;

    top: 50%;

    transform: translate(-50%, -50%);

    z-index: 20;

}



/* Mobilny panel filtrów. */
#dallas-header-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: 20px !important;
    background: none;
    border: none;
    color: var(--theme-palette-color-5);
    cursor: pointer;
    flex-shrink: 0;
}

#dallas-header-filter-toggle.dallas-active {
    color: var(--theme-palette-color-2);
    background: rgba(255, 106, 0, .08);
    border-radius: 8px;
}

@media (max-width: 999px) {
    .dallas-filters-context #dallas-header-filter-toggle {
        display: flex;
    }

    .dallas-filters-context #sidebar:not(.dallas-filters-open) {
        display: none !important;
    }

    .dallas-filters-context #sidebar.dallas-filters-open {
        display: block !important;
    }
}

