/**
 * BlackSpace – Store Listing Algolia Search (styles)
 *
 * Standalone seller search bar rendered at the top of /store-listing/.
 * JS repositions #bs-seller-search-bar from wp_footer to just before
 * #dokan-store-listing-filter-wrap.
 */

/* ─────────────────────────────────────────────────────────────
 * Search bar container
 * Pill-shaped input with magnifier icon, full-width of its parent.
 * ──────────────────────────────────────────────────────────── */

#bs-seller-search-bar.bs-seller-search-bar {
    margin: 0 0 20px 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.bs-seller-search-bar .bs-seller-search-inner {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    padding: 0 18px 0 48px;
    min-height: 54px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bs-seller-search-bar .bs-seller-search-inner:focus-within {
    border-color: #b0743e;
    box-shadow: 0 2px 12px rgba(176, 116, 62, 0.14);
}

.bs-seller-search-bar .bs-seller-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #8a8a8a;
    pointer-events: none;
    flex-shrink: 0;
}

.bs-seller-search-bar .bs-seller-search-inner:focus-within .bs-seller-search-icon {
    color: #b0743e;
}

/* ─────────────────────────────────────────────────────────────
 * Search input
 * Override WoodMart's form-input defaults (bordered rectangles,
 * fixed heights, backgrounds).
 * ──────────────────────────────────────────────────────────── */

.bs-seller-search-bar .bs-seller-search-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: #1a1a1a;
    min-height: 54px !important;
    height: 54px !important;
    max-height: 54px !important;
    border-radius: 0 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.bs-seller-search-bar .bs-seller-search-input::placeholder {
    color: #8a8a8a;
    opacity: 1;
}

/* Hide the native clear (x) button that type="search" renders in WebKit. */
.bs-seller-search-bar .bs-seller-search-input::-webkit-search-cancel-button,
.bs-seller-search-bar .bs-seller-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

/* ─────────────────────────────────────────────────────────────
 * Filtered grid state
 * ──────────────────────────────────────────────────────────── */

#dokan-seller-listing-wrap .dokan-single-seller.bs-hidden-by-search {
    display: none !important;
}

.bs-seller-search-empty {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
    font-style: italic;
}

/* ─────────────────────────────────────────────────────────────
 * Responsive
 * ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .bs-seller-search-bar .bs-seller-search-inner {
        min-height: 48px;
        padding: 0 14px 0 42px;
    }

    .bs-seller-search-bar .bs-seller-search-icon {
        left: 14px;
        width: 16px;
        height: 16px;
    }

    .bs-seller-search-bar .bs-seller-search-input {
        font-size: 14px;
        min-height: 48px !important;
        height: 48px !important;
        max-height: 48px !important;
    }
}
