/* rezepte.css – Views, Rezepte-Grid (aus style.css ausgelagert, unveraendert) */

/* Views */
.view {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Header für Views (für verschobenen Button & neue Titel) */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.view-header h2 {
    color: #667eea;
    margin: 0;
}

/* Vorschläge-Karte */
.vorschlag-karte {
    background: linear-gradient(135deg, #f0f2f5, #e6e9ed); /* Etwas anderer Hintergrund */
    border-radius: 15px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vorschlag-karte:hover {
    border-color: #764ba2; /* Andere Akzentfarbe */
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(118, 75, 162, 0.2);
}

.vorschlag-karte h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.vorschlag-person {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
}

/* Anpassung für Formulare mit Labels (Vorschlag-Modal) */
#vorschlag-modal form {
    gap: 10px; /* Weniger Abstand im kompakteren Modal */
}
#vorschlag-modal label {
    font-weight: bold;
    color: #555;
    margin-top: 10px;
    display: block;
}

.view.active {
    display: block;
}

/* Suche und Filter */
.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    border-color: #667eea;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Rezepte Grid */
.rezepte-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Angepasst für bessere Responsivität */
    gap: 20px;
}

.rezept-karte {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex; /* Für bessere Button-Positionierung */
    flex-direction: column;
    justify-content: space-between;
}

.rezept-karte:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.rezept-karte h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.rezept-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.kategorie {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.dauer, .portionen {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.letzte-nutzung {
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 15px;
}

.rezept-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: auto; /* Buttons am unteren Rand der Karte */
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 18px;
}

/* Kategorie-Dropdown nur für Mobil */
.filter-dropdown-wrap {
    display: none;
}

/* iPhone (bis 600px): Dropdown oben rechts, Buttons kompakt nebeneinander */
@media (max-width: 600px) {
    #rezepte-view.active {
        display: flex;
        flex-direction: column;
    }

    #rezepte-view .filter-dropdown-wrap {
        display: flex;
        justify-content: flex-end;
        order: -1;
        margin-bottom: 12px;
    }

    #filter-kategorie-select {
        padding: 9px 14px;
        border: 2px solid #667eea;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 600;
        color: #667eea;
        background: white;
        outline: none;
        cursor: pointer;
        max-width: 200px;
    }

    #rezepte-view .view-header {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    #rezepte-view .view-header .btn-primary,
    #rezepte-view .view-header .btn-secondary {
        flex: 1 1 0;
        min-width: 0;
        padding: 10px 6px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    #rezepte-view .filter-buttons {
        display: none;
    }

    /* Mobil: kein Erstellen (nur iPad/PC) */
    #rezepte-view #neues-rezept-btn {
        display: none;
    }
}
