/* ==========================================================================
   Bhoovix Archive Search Bar
   ========================================================================== */

/* ── Container ───────────────────────────────────────────────────────────── */
#bhoovix-archive-search {
    background: #ffffff;
    border: 1px solid #e2e8e8;
    border-radius: 8px;
    padding: 18px 18px 14px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

#bhoovix-archive-search.bas--loading {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ── Progress bar (loading indicator) ───────────────────────────────────── */
.bas-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--e-global-color-primary, #1d6602);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

/* ── Field wrapper ───────────────────────────────────────────────────────── */
.bas-field {
    display: flex;
    flex-direction: column;
}

/* ── Label ───────────────────────────────────────────────────────────────── */
.bas-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a9090;
    margin-bottom: 8px;
    line-height: 1.3;
    white-space: nowrap;
}

/* Price value next to label */
.bas-price-val {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--e-global-color-primary, #1d6602);
    letter-spacing: 0;
    text-transform: none;
}

/* ==========================================================================
   Price Range Slider
   ========================================================================== */
.bas-field--price {
    padding-bottom: 2px;
}

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

/* Static grey track */
.bas-track-bg {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: #dce0e0;
    border-radius: 2px;
    z-index: 1;
}

/* Coloured fill between handles */
.bas-track-fill {
    position: absolute;
    height: 4px;
    background: var(--e-global-color-primary, #1d6602);
    border-radius: 2px;
    z-index: 2;
    left: 0;
    right: 0;
    transition: background-color 0.2s;
}

/* Range inputs (overlaid, thumbs only interactive) */
.bas-range {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    z-index: 3;
    outline: none;
    margin: 0;
    padding: 0;
}

.bas-range--from { z-index: 2; }
.bas-range--to   { z-index: 3; }

/* Webkit thumb */
.bas-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid var(--e-global-color-primary, #1d6602);
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, border-color 0.2s;
}

.bas-range::-webkit-slider-thumb:hover,
.bas-range:focus::-webkit-slider-thumb {
    transform: scale(1.18);
    border-color: var(--e-global-color-secondary, #145200);
}

/* Firefox thumb */
.bas-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid var(--e-global-color-primary, #1d6602);
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease;
}

.bas-range::-moz-range-thumb:hover {
    transform: scale(1.18);
}

/* Firefox track */
.bas-range::-moz-range-track {
    background: transparent;
    border: none;
}

/* Remove default IE outline */
.bas-range:focus { outline: none; }

/* ==========================================================================
   Select Dropdowns
   ========================================================================== */
.bas-select {
    width: 100%;
    height: 40px;
    padding: 0 36px 0 12px;
    font-size: 13px;
    font-family: inherit;
    color: #3a3a3a;
    background: #f6f8f8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23909090'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
    border: 1px solid #dce0e0;
    border-radius: 6px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    line-height: 40px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bas-select:hover {
    border-color: #b0b8b8;
}

.bas-select:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #1d6602);
    box-shadow: 0 0 0 3px rgba(29, 102, 2, 0.12);
}

/* ==========================================================================
   Reset Button
   ========================================================================== */
.bas-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 40px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: #8a9090;
    background: #f6f8f8;
    border: 1px solid #dce0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.bas-reset:hover {
    color: #e05050;
    background: #fff5f5;
    border-color: #e8b0b0;
}

.bas-reset svg {
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.bas-reset:hover svg {
    transform: rotate(-180deg);
}

/* ==========================================================================
   Loading state — listings fade + spinner overlay
   ========================================================================== */
.bas-listings--loading {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.2s ease;
    user-select: none;
}

/* Spinner overlay — appended inside the listing container */
.bas-spinner-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 4px;
    pointer-events: none;
}

.bas-spinner-ring {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--e-global-color-primary, #1d6602);
    border-radius: 50%;
    animation: bas-spin 0.75s linear infinite;
}

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

/* ==========================================================================
   AJAX Pagination
   ========================================================================== */
.bas-pagination {
    margin: 20px 0 4px;
    text-align: center;
}

.bas-pagination ul {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bas-pagination li {
    display: flex;
}

.bas-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: #555;
    background: #ffffff;
    border: 1px solid #dce0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.bas-page-btn:hover,
.bas-page-btn--active {
    color: #ffffff;
    background: var(--e-global-color-primary, #1d6602);
    border-color: var(--e-global-color-primary, #1d6602);
}

.bas-page-prev,
.bas-page-next {
    font-size: 16px;
    font-weight: 700;
}

.bas-page-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 4px;
    color: #aaa;
    font-size: 16px;
    user-select: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Medium — reset button: icon only */
@media (min-width: 992px) and (max-width: 1199px) {
    .bas-reset-text {
        display: none;
    }
    .bas-reset {
        padding: 0;
        min-width: 40px;
        width: 40px;
    }
}

/* Small tablet & mobile */
@media (max-width: 991px) {
    #bhoovix-archive-search {
        padding: 14px 14px 10px;
    }

    .bas-reset {
        width: 100%;
        height: 38px;
    }
}

@media (max-width: 575px) {
    #bhoovix-archive-search {
        border-radius: 6px;
        margin-bottom: 16px;
    }

    .bas-label {
        font-size: 9px;
    }

    .bas-price-val {
        font-size: 11px;
    }
}
