/* Custom filter layout for Orders page */

/* Force filters container to full width */
.fi-ta-filters-ctn {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 1rem 0 !important;
}

/* Main filters wrapper */
.fi-ta-filters {
    display: block !important;
    width: 100% !important;
}

/* Filters header (with toggle button) */
.fi-ta-filters-trigger {
    margin-bottom: 1rem !important;
}

/* The actual filters form when expanded */
.fi-ta-filters[x-show="isOpen"] form,
.fi-ta-filters-form {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1rem !important;
    width: 100% !important;
    padding: 1rem !important;
    background: rgba(0, 0, 0, 0.02) !important;
    border-radius: 0.5rem !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Dark mode styles */
.dark .fi-ta-filters-form {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Each filter field */
.fi-fo-field-wrp {
    width: 100% !important;
}

/* Make search section span 2 columns */
.fi-ta-filter[wire\\:key*="order_search"] .fi-fo-field-wrp,
.fi-fo-field-wrp:has(.fi-section) {
    grid-column: span 2 !important;
}

/* Remove any column span from individual filters */
.fi-ta-filter {
    grid-column: span 1 !important;
}

/* Order search filter spans 2 columns */
.fi-ta-filter[wire\\:key*="order_search"] {
    grid-column: span 2 !important;
}

/* Ensure filters are always visible when using AboveContentCollapsible */
.fi-ta-filters[x-show="isOpen"] {
    display: block !important;
}

/* Style the collapsible trigger button */
.fi-ta-filters-trigger {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.fi-ta-filters-trigger:hover {
    background: #e5e7eb !important;
}

.dark .fi-ta-filters-trigger {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark .fi-ta-filters-trigger:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Filter count badge */
.fi-ta-filters-count {
    background: #3b82f6 !important;
    color: white !important;
    padding: 0.125rem 0.5rem !important;
    border-radius: 9999px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Remove default margins/paddings that might interfere */
.fi-ta-content > .fi-ta-filters-ctn {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}