/* ============================================
   Hospital Filter Bar Plugin — filter-bar.css
   Version: 3.0.0
   Responsive: 1024px → mobile
   Active color: #FF0247
   Layout: image reference (Filters label left | categories | search right)
   ============================================ */

/* ---- Filter Bar Wrapper ---- */
#hf-filter-bar-wrapper {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #ffffff;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 32px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

#hf-filter-bar-inner {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
    height: 52px;
}

/* ---- "Filters" Label (far left — like image) ---- */
#hf-filters-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 20px 0 16px;
    border-right: 1px solid #ebebeb;
    height: 100%;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
}

#hf-filters-label svg {
    color: #FF0247;
    flex-shrink: 0;
}

/* ---- Category Buttons (middle, scrollable) ---- */
#hf-filter-categories {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 4px;
    padding: 0 12px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    height: 100%;
    -webkit-overflow-scrolling: touch;
}

#hf-filter-categories::-webkit-scrollbar {
    display: none;
}

.hf-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 6px;
    border: 1.5px solid #e2e6ef;
    background: #ffffff;
    color: #444b5a;
    font-size: 13.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.3;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}



.hf-filter-btn.hf-active {
    background: #FF0247;
    border-color: #FF0247;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(255,2,71,0.20);
}

/* ---- Search Wrap (far right) ---- */
#hf-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 220px;
    border-left: 1px solid #ebebeb;
    height: 100%;
    padding: 0 14px;
    box-sizing: border-box;
}

.hf-search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #aab0be;
    display: flex;
    align-items: center;
    pointer-events: none;
    line-height: 0;
}

#hf-search-input {
    width: 100%;
    padding: 7px 12px 7px 34px;
    border: 1.5px solid #e2e6ef;
    border-radius: 6px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a2540;
    background: #f8f9fb;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-sizing: border-box;
}

#hf-search-input::placeholder { color: #b5bbc9; }

#hf-search-input:focus {
    border-color: #FF0247;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255,2,71,0.09);
}

/* ---- No Results ---- */
#hf-no-results {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: #aab0be;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0 0 24px;
    border: 2px dashed #e8eaf0;
    border-radius: 10px;
}

/* ---- Card highlight on search match ---- */
.hf-card {
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.hf-card.hf-highlight {
    border-color: #FF0247 !important;
    box-shadow: 0 0 0 3px rgba(255,2,71,0.15) !important;
    animation: hf-pulse 0.45s ease;
}

@keyframes hf-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.025); }
    100% { transform: scale(1); }
}

/* ============================================================
   RESPONSIVE
   1024px  → wrap: categories scroll row | search below
   768px   → same, tighter padding
   480px   → smaller buttons, full-width search
   ============================================================ */

/* 1024px and below */
@media (max-width: 1024px) {
    #hf-filter-bar-inner {
        height: auto;
        flex-wrap: wrap;
        padding: 0;
        gap: 0;
    }

    /* Row 1: Filters label + search */
    #hf-filters-label {
        order: 1;
        border-right: none;
        border-bottom: 1px solid #ebebeb;
        padding: 10px 14px;
        flex: 0 0 auto;
    }

    #hf-search-wrap {
        order: 2;
        flex: 1;
        border-left: 1px solid #ebebeb;
        border-bottom: 1px solid #ebebeb;
        width: auto;
        padding: 8px 12px;
        height: auto;
    }

    /* Row 2: category buttons scrollable full width */
    #hf-filter-categories {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        padding: 8px 12px;
        border-top: none;
        height: auto;
        gap: 6px;
    }
}

/* 768px */
@media (max-width: 768px) {
    #hf-filters-label {
        padding: 9px 12px;
        font-size: 13.5px;
    }

    .hf-filter-btn {
        font-size: 13px;
        padding: 5px 13px;
    }

    #hf-search-input {
        font-size: 13px;
    }
}

/* 480px */
@media (max-width: 480px) {
    #hf-filters-label {
        font-size: 13px;
        padding: 8px 10px;
        gap: 5px;
    }

    .hf-filter-btn {
        font-size: 12px;
        padding: 5px 11px;
        border-radius: 5px;
    }

    #hf-search-wrap {
        padding: 7px 10px;
    }

    #hf-search-input {
        font-size: 12.5px;
        padding: 6px 10px 6px 30px;
    }

    .hf-search-icon {
        left: 21px;
    }
}
