/* Filterleiste – gemeinsame Styles für alle Filter-Balken */

.employees-filter-bar.lost {
    border-radius: 2px;
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar-element {
    display: flex;
    align-items: center;
}

/* Suchfeld */
.filter-bar-element.search {
    position: relative;
    margin-right: 4px;
}

.filter-bar-element.search input.form-control {
    background-color: #212126;
    border: 1px solid #32323e;
    border-radius: 4px;
    
    padding: 0 30px 0 10px;
    font-size: 0.9rem;
    height: 38px;
    width: 200px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    line-height: 38px;
}

.filter-bar-element.search input.form-control:focus {
    outline: none;
    border-color: #7a5af8;
}

.filter-bar-element.search .clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
 
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: none;
    user-select: none;
}

.filter-bar-element.search input:not(:placeholder-shown) + .clear {
    display: block;
}

/* Button-Gruppen */
.btn-group {
    display: inline-flex;
    flex-wrap: wrap;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #32323e;
}

.employees-filter-bar.lost .btn,
#filterSystem .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #212126;
    
    border: none;
    border-right: 1px solid #32323e;
    padding: 0 16px;
    height: 38px;
    min-width: 38px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    margin: 0;
    border-radius: 0;
}

/* Alte Klassennamen im neuen Container ansprechen */
#filterSystem .rarity-filter-btn,
#filterSystem .category-filter-btn,
#filterSystem .region-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #212126 !important;
   
    border: none !important;
    border-right: 1px solid #32323e !important;
    padding: 0 16px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.employees-filter-bar.lost .btn:first-child,
#filterSystem .btn:first-child,
#filterSystem .rarity-filter-btn:first-child,
#filterSystem .category-filter-btn:first-child,
#filterSystem .region-btn:first-child {
    border-top-left-radius: 4px !important;
    border-bottom-left-radius: 4px !important;
}

.employees-filter-bar.lost .btn:last-child,
#filterSystem .btn:last-child,
#filterSystem .rarity-filter-btn:last-child,
#filterSystem .category-filter-btn:last-child,
#filterSystem .region-btn:last-child {
    border-right: none !important;
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

.employees-filter-bar.lost .btn:hover,
#filterSystem .btn:hover,
#filterSystem .rarity-filter-btn:hover,
#filterSystem .category-filter-btn:hover,
#filterSystem .region-btn:hover {
    background-color: #2a2a30 !important;
    color: #fff !important;
}

.employees-filter-bar.lost .btn.active,
#filterSystem .btn.active,
#filterSystem .rarity-filter-btn.active,
#filterSystem .category-filter-btn.active,
#filterSystem .region-btn.active {
    background-color: #7a5af8a1 !important;
    color: #fff !important;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.125) !important;
    border-color: #7a5af8a1 !important;
}

.employees-filter-bar.lost .btn svg,
#filterSystem .btn svg {
    fill: currentColor;
}

/* Zurücksetzen-Button */
.employees-filter-bar.lost .reset-button,
#filterSystem .reset-button,
#filterSystem .reset-all-btn {
    background-color: #2a2a30 !important;
    border: 1px solid #32323e !important;
    border-radius: 4px !important;
    
    padding: 0 16px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-size: 0.9rem !important;
    margin-left: 0 !important;
}

.employees-filter-bar.lost .reset-button:not([disabled]):hover,
#filterSystem .reset-button:not([disabled]):hover,
#filterSystem .reset-all-btn:not([disabled]):hover {
    background-color: #7a5af8a1 !important;
    border-color: #7a5af8a1 !important;
    color: white !important;
}

.employees-filter-bar.lost .reset-button[disabled],
#filterSystem .reset-button[disabled],
#filterSystem .reset-all-btn[disabled] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Bilder in Buttons */
.employees-filter-bar.lost .btn img,
#filterSystem .btn img,
#filterSystem .category-filter-btn img {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
    transition: filter 0.2s !important;
    display: block !important;
    margin: 0 !important;
    transform: scale(1.2);
}

/* Einheitliche Button-Größe für alle Filter */
.employees-filter-bar.lost .btn-group .btn,
#filterSystem .btn-group .btn {
    flex: 1;
    min-width: 38px;
}

/* Schul-Dropdown */
select.form-control,
#filterSystem .school-dropdown {
    background-color: #212126 !important;
    
    border: 1px solid #32323e !important;
    height: 38px !important;
    border-radius: 4px !important;
    padding: 0 10px !important;
    cursor: pointer !important;
    min-width: 120px !important;
}

select.form-control:focus,
#filterSystem .school-dropdown:focus {
    outline: none !important;
    border-color: #7a5af8a1 !important;
}

/* Filterleiste auf Mobilgeräten */
@media (max-width: 1080px) {
    .employees-filter-bar.lost {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        background-color: rgba(0,0,0,0.2);
    }

    .filter-bar-element {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .filter-bar-element:last-child {
        margin-bottom: 0;
    }

    .filter-bar-element.search input.form-control {
        width: 100%;
    }

    .filter-bar-element.search {
        margin-right: 0;
    }

    .btn-group {
        width: 100%;
        display: flex;
    }

    .employees-filter-bar.lost .btn,
    #filterSystem .btn,
    #filterSystem .rarity-filter-btn,
    #filterSystem .category-filter-btn,
    #filterSystem .region-btn {
        flex: 1;
        padding: 0 4px !important;
        font-size: 0.85rem !important;
    }

    .employees-filter-bar.lost .reset-button,
    #filterSystem .reset-button,
    #filterSystem .reset-all-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Desktop: Filterleiste etwas größer */
@media (min-width: 1081px) {
    .employees-filter-bar.lost {
        padding: 10px 15px;
        gap: 15px;
        margin-bottom: 29px;
    }

    .filter-bar-element.search input.form-control {
        font-size: 1.2rem;
        height: 51px;
        width: 266px;
        padding: 0 40px 0 13px;
        line-height: 51px;
    }

    .filter-bar-element.search .clear {
        font-size: 1.7rem;
        right: 13px;
    }

    .employees-filter-bar.lost .btn,
    #filterSystem .btn,
    #filterSystem .rarity-filter-btn,
    #filterSystem .category-filter-btn,
    #filterSystem .region-btn {
        padding: 0 19px;
        height: 46px;
        min-width: 46px;
        font-size: 1.1rem;
    }

    .employees-filter-bar.lost .btn-group .btn,
    #filterSystem .btn-group .btn {
        min-width: 46px;
    }

    .employees-filter-bar.lost .reset-button,
    #filterSystem .reset-button,
    #filterSystem .reset-all-btn {
        padding: 0 19px;
        height: 46px;
        font-size: 1.1rem;
        gap: 7px;
    }

    .employees-filter-bar.lost .btn img,
    #filterSystem .btn img,
    #filterSystem .category-filter-btn img {
        width: 34px;
        height: 34px;
    }

    select.form-control,
    .employees-filter-bar.lost .school-dropdown,
    #filterSystem .school-dropdown {
        height: 46px;
        padding: 0 12px;
        min-width: 145px;
        font-size: 1.1rem;
    }
}
