/**
 * CSS für die Member Directory Suche und Filter
 */
 
.peteitcms-search-filter-container {
    margin: 20px 0;
    width: 100%;
}

.search-filter-toggle {
    width: 100%;
    background: linear-gradient(180deg, #c19be9 0%, #000 100%);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-filter-toggle:hover {
    opacity: 0.9;
}

.search-filter-panel {
    margin-top: 15px;
    padding: 20px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.member-search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    margin-bottom: 5px;
}

.filter-item {
    flex-grow: 1;
    min-width: 200px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    height: 75px; /* Konsistente Gesamthöhe für jeden Filter-Block */
}

.filter-item label {
    color: #fff;
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
    height: 20px; /* Konsistente Höhe für Labels */
    line-height: 20px;
}

.filter-item input,
.filter-item select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #333 !important; /* Textfarbe für Eingabefelder und Dropdown-Menü */
    height: 40px; /* Einheitliche Höhe für alle Eingabefelder */
    box-sizing: border-box; /* Sicherstellen, dass Padding nicht die Höhe beeinflusst */
    line-height: normal; /* Normalisieren der Zeilenhöhe */
}

/* Dropdown Optionen Text Farbe */
.filter-item select option {
    background-color: white;
    color: #333 !important;
    padding: 5px;
}

/* Dropdown-Optionen bei Hover */
.filter-item select option:hover,
.filter-item select option:focus {
    background-color: #c19be9;
    color: white;
}

/* Optgroup Styling für bessere Lesbarkeit */
.filter-item select optgroup {
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
    padding: 5px;
}

.filter-item input[type="number"] {
    width: 100px;
    height: 40px; /* Konsistente Höhe */
}

/* Spezielles Styling für den Altersfilter */
.filter-item[for="filter-age-min"],
.filter-item[for="filter-age-max"] {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.filter-button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px; /* Gleiche Höhe wie Input-Felder */
    box-sizing: border-box;
}

.filter-button.apply {
    background: linear-gradient(180deg, #c19be9 0%, #000 100%);
    color: white;
}

.filter-button.reset {
    background-color: #888;
    color: white;
}

.filter-button:hover {
    opacity: 0.9;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 30px;
    color: #c19be9;
}

/* Stelle sicher, dass die Members-Grid immer als Grid dargestellt wird */
.peteitcms-members-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    margin-top: 30px !important;
}

/* Stats Container für Likes und Views */
.member-stats-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
}

/* Styling für die Stats-Anzeigen */
.member-views-count,
.member-likes-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.3);
}

/* Styling für Views-Icon */
.member-views-count i {
    font-size: 0.9rem;
}

/* Styling für Likes-Icon */
.member-likes-count i {
    font-size: 0.9rem;
}

/* Dropdown-Menü Verbesserungen */
.filter-item select {
    -webkit-appearance: menulist;
    appearance: menulist; /* Standardaussehen für Dropdowns wiederherstellen */
}

/* Aktive Dropdown-Option */
.filter-item select option:checked {
    background-color: #c19be9;
    color: white;
}

/* Firefox spezifische Styles */
@-moz-document url-prefix() {
    .filter-item select option {
        background-color: white !important;
        color: #333 !important;
    }
    
    .filter-item select option:checked {
        box-shadow: 0 0 10px 100px #c19be9 inset;
        color: white !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-item {
        min-width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-button {
        width: 100%;
        justify-content: center;
    }
}
