/* Override the default close icon with custom SVG */
.listing-sidebar--header__close-btn::before {
    content: none !important;
}

.listing-sidebar--header__close-btn img {
    display: block;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Ensure button maintains proper sizing */
.listing-sidebar--header__close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Override scrollbar color and width in filter sidebar */
.listing-sidebar__content::-webkit-scrollbar {
    width: 6px !important;
}

.listing-sidebar__content::-webkit-scrollbar-track {
    background: #ffffff !important;
}

.listing-sidebar__content::-webkit-scrollbar-thumb,
.listing-sidebar__content::-webkit-scrollbar-thumb:hover {
    background: #A8A8A8 !important;
    border-radius: 6px !important;
}

/* =================================================================
   MOBILE SEARCH BAR STYLING - FROM FIGMA DESIGN (214:3239)
   Matches the FilterBar component design exactly
   ================================================================= */

@media (max-width: 1027px) {
    /* Remove padding from parent containers to ensure edge-to-edge design */
    .listing__top-bar {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .filter-toolbar {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Container for the entire filter toolbar search section */
    .filter-toolbar__search-wrapper {
        background: white !important;
        box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1) !important;
        width: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* Filter bar spacing is handled in mobile-sort-ui-fix.css */

    /* Search Input Container - White pill with border */
    .filter-toolbar__search-input-container {
        background: white !important;
        border: 1px solid #E8E8E8 !important;
        border-radius: 16777200px !important; /* Extremely high value for perfect pill shape */
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        padding: 1px 13px !important; /* 13px padding for icon and text spacing */
        height: 32px !important;
        width: 100% !important;
        max-width: none !important; /* Remove max-width constraint to fill wrapper */
        box-sizing: border-box !important;
        transition: border-color 0.2s ease, background-color 0.2s ease !important;
        cursor: pointer !important;
    }

    /* Search Input Container - Hover State */
    .filter-toolbar__search-input-container:hover {
        background: #FAFAFA !important;
    }

    /* Search Input Container - Active/Pressed State */
    .filter-toolbar__search-input-container:active {
        background: #F5F5F5 !important;
    }

    /* Search Input Container - Focused State */
    .filter-toolbar__search-input-container:focus {
        outline: 2px solid #C8D200 !important;
        outline-offset: 2px !important;
        border-color: #C8D200 !important;
    }

    /* Search Icon - 16x16 icon */
    .filter-toolbar__search-icon {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
    }

    .filter-toolbar__search-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .filter-toolbar__search-icon path {
        stroke: #383838 !important;
        fill: none !important;
    }

    /* Search Input Field - Matches Figma exactly */
    .filter-toolbar__search-input {
        border: none !important;
        outline: none !important;
        background: transparent !important;
        flex: 1 !important;
        font-family: 'Neue Plak', 'Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
        font-weight: 400 !important; /* Regular weight */
        font-size: 12px !important;
        line-height: 20px !important;
        letter-spacing: -0.1504px !important; /* Exact value from Figma */
        color: #383838 !important;
        text-align: left !important;
        padding: 0 !important;
        height: 100% !important;
        cursor: pointer !important;
        pointer-events: none !important;
        white-space: nowrap !important;
    }

    /* Search Input Placeholder - Matches Figma typography */
    .filter-toolbar__search-input::placeholder {
        color: #383838 !important;
        opacity: 1 !important;
        font-family: 'Neue Plak', 'Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
        font-weight: 400 !important;
        font-size: 12px !important;
        line-height: 20px !important;
        letter-spacing: -0.1504px !important;
        text-align: left !important;
    }
}
