/* Section Headers */
.filter-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(249, 115, 22, 0.15);
    /* Orange bg */
    color: #f97316;
    /* Orange icon */
    border-radius: 6px;
}

/* Inputs Styling */
.filter-input {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.filter-input:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.25) !important;
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Input Groups (Stats) - Fixed Heights */
.filter-input-group .input-group-text {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    color: #94a3b8;
    padding: 0.5rem 0.75rem;
    /* Matches filter-input padding */
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.filter-input-group .form-control {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    color: #f8fafc;
    padding: 0.5rem 0.75rem;
    /* Matches filter-input padding */
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.filter-input-group .form-control:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* Toggle Switches */
.form-check-input.filter-switch {
    width: 2.25em;
    height: 1.25em;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    box-shadow: none !important;
}
.form-check-input.filter-switch:focus {
    border-color: rgba(255, 255, 255, 0.3);
}
.form-check-input.filter-switch:checked {
    background-color: #f97316;
    border-color: #ea580c;
}

/* Chips (Pills) Design */
.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sorting Pills */
.filter-pill-sort {
    padding: 0.4rem 1.25rem 0.6rem;
    text-decoration: none;
}
.filter-pill-sort:hover:not(.active-sort) {
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
}
.filter-pill-sort.active-sort {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #f8fafc;
}

/* Filter Trigger Pill */
.filter-pill-trigger {
    padding: 0.4rem 1.25rem 0.6rem;
    background-color: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.5);
    color: #f97316;
}
.filter-pill-trigger:hover {
    background-color: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.filter-pill-sm {
    padding: 0.35rem 0.8rem;
    min-width: 38px;
}

.filter-pill:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-pill-icon {
    filter: brightness(0) invert(1);
    opacity: 0.6;
    transition: all 0.2s;
}

/* Checked State for Pills */
.btn-check:checked+.filter-pill {
    background-color: rgba(249, 115, 22, 0.15);
    /* Orange pill */
    border-color: #f97316;
    color: #f97316;
}

.btn-check:checked+.filter-pill .filter-pill-icon {
    opacity: 1;
    /* Make icon orange */
    filter: brightness(0) saturate(100%) invert(56%) sepia(50%) saturate(1450%) hue-rotate(345deg) brightness(101%) contrast(97%);
}

/* Success / Danger Special Pills */
.btn-check:checked+.pill-success {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: #34d399;
    color: #34d399;
}

.btn-check:checked+.pill-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: #f87171;
    color: #f87171;
}

/* Select2 SINGLE Select (Tank ID) Fix */
.select2-container--bootstrap-5 .select2-selection--single {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    border-radius: 8px !important;
    min-height: 38px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #f8fafc !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection--single {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.25) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Select2 MULTI Select Adjustments */
.select2-container--bootstrap-5 .select2-selection--multiple {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    min-height: 38px;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection--multiple {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.25) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(249, 115, 22, 0.15) !important;
    border: 1px solid rgba(249, 115, 22, 0.3) !important;
    color: #ffedd5 !important;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Elegant Select2 Dropdown Menu Redesign */
.select2-container--bootstrap-5 .select2-dropdown {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    /* rounded corners */
    padding: 4px;
    /* inner spacing */
}

.select2-container--bootstrap-5 .select2-search--dropdown {
    padding: 8px;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px;
    padding: 6px 12px;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
    border-color: #f97316 !important;
    outline: none;
}

/* Inline search field in multiple selects */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field {
    background: transparent !important;
    border: none !important;
    color: #f8fafc !important;
    padding: 0 8px !important;
    margin: 0 !important;
    min-height: 36px;
    /* align center */
}

.select2-container--bootstrap-5 .select2-results__options {
    padding: 0;
}

.select2-container--bootstrap-5 .select2-results__option {
    color: #cbd5e1;
    padding: 8px 16px;
    border-radius: 6px;
    margin: 2px 4px;
    transition: background 0.1s;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: rgba(249, 115, 22, 0.15) !important;
    /* Orange highlight */
    color: #f97316 !important;
}

/* Selected option in multiple dropdown */
.select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Optgroups (The Letters A, B, V) Redesign */
.select2-container--bootstrap-5 .select2-results__group {
    background-color: transparent !important;
    color: #f97316 !important;
    /* Elegant orange text */
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px 4px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
}

.hover-white:hover {
    color: #fff !important;
}

.transition-colors {
    transition: color 0.2s ease;
}

/* Fix z-index for offcanvas to appear above navbar (z-index 1050) */
.offcanvas-backdrop {
    z-index: 1055 !important;
}

.offcanvas {
    z-index: 1060 !important;
}