/* SA Filter — minimal field styles.
   The site already has CSS for .searchandfilter selects; these styles only
   cover the sa-filter-specific wrappers and range inputs. Override freely. */

.sa-filter-field {
    display: inline-block;
    vertical-align: top;
    margin: 0 8px 8px 0;
    position: relative;
}

.sa-filter-clear {
    display: none;
    position: absolute;
    bottom: 20px;
    right: 35px;
    width: 20px;
    height: 20px;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: #aaa;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    background: #FFF;
}

.sa-filter-clear:hover {
    color: #333;
}

.sa-filter-field.sa-has-value .sa-filter-clear {
    display: flex;
}

.sa-filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sa-filter-select {
    display: block;
    min-width: 160px;
    width: 100%;
    padding: 8px 38px 8px 12px;
    border: 1px solid rgba(35, 49, 66, .4);
    border-radius: 0;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpolyline points='1,1 5.5,6 10,1' fill='none' stroke='%23233142' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    height: 45px;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.sa-filter-search {
    display: block;
    min-width: 200px;
    width: 100%;
    padding: 8px 12px 8px 38px !important;
    border: 1px solid rgba(35, 49, 66, .4) !important;
    border-radius: 0px !important;
    font-size: 14px;
    height: 45px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%23233142' stroke-width='1.6' stroke-linecap='round'/%3E%3Cline x1='9.5' y1='9.5' x2='14' y2='14' stroke='%23233142' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 13px center;
}

/* ---- Range slider ---- */

.sa-range-slider {
    min-width: 200px;
    padding-bottom: 2px;
}

.sa-range-track-wrap {
    position: relative;
    height: 4px;
    margin: 18px 0 10px;
    background: #e0e0e0;
    border-radius: 2px;
}

.sa-range-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    background: #233142;
    border-radius: 2px;
    pointer-events: none;
}

.sa-range-lower,
.sa-range-upper {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    margin: 0;
    padding: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    outline: none;
}

.sa-range-lower::-webkit-slider-thumb,
.sa-range-upper::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #233142;
    cursor: pointer;
    pointer-events: all;
}

.sa-range-lower::-moz-range-thumb,
.sa-range-upper::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #233142;
    cursor: pointer;
    pointer-events: all;
    box-sizing: border-box;
}

.sa-range-lower::-webkit-slider-runnable-track,
.sa-range-upper::-webkit-slider-runnable-track,
.sa-range-lower::-moz-range-track,
.sa-range-upper::-moz-range-track {
    background: transparent;
}

.sa-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555;
}

.sa-filter-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.sa-filter-multi {
    min-height: 80px;
    height: auto;
}

.sa-filter-results {
    position: relative;
    min-height: 60px;
}

.sa-filter-results.sa-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    z-index: 9;
}

.sa-filter-results.sa-loading::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    border: 3px solid #e0e0e0;
    border-top-color: #4bb7d5;
    border-radius: 50%;
    animation: sa-spin 0.65s linear infinite;
    z-index: 10;
}

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

.sa-filter-select:focus,
.sa-filter-select:focus-visible,
.sa-filter-search:focus,
.sa-filter-search:focus-visible {
    outline: none;
    border-color: rgba(35, 49, 66, .4);
    box-shadow: none;
}

/* ---- Tag chips ---- */

.sa-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 160px;
    padding-bottom: 2px;
}

.sa-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border: 1px solid rgba(35, 49, 66, .4);
    border-radius: 20px;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    background: #fff;
    color: #233142;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
}

.sa-tag-chip:hover {
    border-color: #233142;
    background: #f5f5f5;
}

.sa-tag-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sa-tag-chip:has(input:checked),
.sa-tag-chip.sa-tag-active {
    background: #233142;
    color: #fff;
    border-color: #233142;
}

.sa-tag-count {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 3px;
}

.sa-dedicated-notice {
    margin: 25px auto 0;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.sa-dedicated-notice a {
    font-weight: 600;
    color: #233142;
}
