/* ==========================================================================
   Admin Pill Bars & Filter Buttons (Mobile/Tablet Horizontal Scroll Only)
   ========================================================================== */

/* Mobile & Tablet Specific: Enforce horizontal swipe bar, no text wrap, no white bleed */
@media (max-width: 1023px) {
    .admin-pill-bar,
    div[class*="bg-slate-100"][class*="overflow-x-auto"] {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 4px !important;
        border-radius: 12px !important;
        background-color: #f1f5f9;
        border: 1px solid #e2e8f0;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .admin-pill-bar::-webkit-scrollbar,
    div[class*="bg-slate-100"][class*="overflow-x-auto"]::-webkit-scrollbar {
        display: none !important;
    }

    html.dark .admin-pill-bar,
    html.dark div[class*="bg-slate-100"][class*="overflow-x-auto"] {
        background-color: rgba(30, 41, 59, 0.85) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .admin-pill-bar button,
    .admin-pill-btn,
    button[id*="btnDays-"],
    button[id*="btnStatus-"],
    button[id*="btnKpi-"],
    button[id*="btnType-"] {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        flex-shrink: 0 !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        padding: 5px 12px !important;
        border-radius: 8px !important;
        border: none !important;
        cursor: pointer !important;
        transition: all 0.15s ease !important;
        line-height: 1.3 !important;
        box-sizing: border-box !important;
    }

    /* Inactive State on Mobile */
    html:not(.dark) .admin-pill-btn:not(.active):not([class*="bg-brand"]):not([class*="bg-emerald"]):not([class*="bg-blue"]):not([class*="bg-amber"]):not([class*="bg-rose"]):not([class*="bg-violet"]):not([class*="bg-purple"]),
    html:not(.dark) .admin-pill-bar button:not(.active):not([class*="bg-brand"]):not([class*="bg-emerald"]):not([class*="bg-blue"]):not([class*="bg-amber"]):not([class*="bg-rose"]):not([class*="bg-violet"]):not([class*="bg-purple"]) {
        color: #475569 !important;
        background-color: transparent !important;
    }

    html.dark .admin-pill-btn:not(.active):not([class*="bg-brand"]):not([class*="bg-emerald"]):not([class*="bg-blue"]):not([class*="bg-amber"]):not([class*="bg-rose"]):not([class*="bg-violet"]):not([class*="bg-purple"]),
    html.dark .admin-pill-bar button:not(.active):not([class*="bg-brand"]):not([class*="bg-emerald"]):not([class*="bg-blue"]):not([class*="bg-amber"]):not([class*="bg-rose"]):not([class*="bg-violet"]):not([class*="bg-purple"]) {
        color: #94a3b8 !important;
        background-color: transparent !important;
    }

    .admin-pill-btn:hover,
    .admin-pill-bar button:hover {
        color: #0f172a !important;
        background-color: rgba(0, 0, 0, 0.05) !important;
    }
    html.dark .admin-pill-btn:hover,
    html.dark .admin-pill-bar button:hover {
        color: #ffffff !important;
        background-color: rgba(255, 255, 255, 0.08) !important;
    }
}

/* Base pill button layout (universal across desktop, tablet, and mobile) */
.admin-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    font-weight: 700;
    transition: all 0.15s ease;
    cursor: pointer;
}

/* Active State Colors (Universal across desktop, tablet, and mobile) */
.admin-pill-btn.active,
.admin-pill-bar button.active,
button[id*="btnDays-"].active,
button[id*="btnStatus-"].active {
    background-color: #0ea5e9 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}
.admin-pill-btn.active-all, button[id*="btnStatus-all"].active { background-color: #0ea5e9 !important; color: #fff !important; }
.admin-pill-btn.active-success, button[id*="btnStatus-success"].active { background-color: #10b981 !important; color: #fff !important; }
.admin-pill-btn.active-processing, button[id*="btnStatus-processing"].active { background-color: #3b82f6 !important; color: #fff !important; }
.admin-pill-btn.active-pending, button[id*="btnStatus-pending"].active { background-color: #f59e0b !important; color: #fff !important; }
.admin-pill-btn.active-waiting_payment, button[id*="btnStatus-waiting_payment"].active { background-color: #8b5cf6 !important; color: #fff !important; }
.admin-pill-btn.active-pending_verification, button[id*="btnStatus-pending_verification"].active { background-color: #a855f7 !important; color: #fff !important; }
.admin-pill-btn.active-canceled, button[id*="btnStatus-canceled"].active { background-color: #f43f5e !important; color: #fff !important; }
