/* =====================================================
   Rezepte – Custom Styles
   ===================================================== */

/* Variablen */
:root {
    --transition-fast: 150ms ease;
}

/* ─── Layout ─────────────────────────────────────── */
body {
    background-color: #f8f9fa;
}

.main-content {
    min-height: calc(100vh - 120px);
}

/* ─── Navbar ─────────────────────────────────────── */
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ─── Flash-Nachrichten ──────────────────────────── */
.flash-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
    max-width: 360px;
}

/* ─── Rezept-Karten ──────────────────────────────── */
.recipe-card {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border-radius: .75rem;
    overflow: hidden;
}

.recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .12) !important;
}

.recipe-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.recipe-card .card-img-placeholder {
    height: 180px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
}

/* Favorit-Button auf Karte */
.btn-favorite {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    line-height: 1;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(0,0,0,.1);
    transition: background var(--transition-fast);
}

.btn-favorite:hover,
.btn-favorite.active {
    background: #fff3cd;
    color: #ffc107;
    border-color: #ffc107;
}

/* ─── Stern-Bewertung ─────────────────────────────── */
.star-rating {
    color: #ffc107;
    letter-spacing: -.1em;
}

.star-rating .empty {
    color: #dee2e6;
}

.star-rating-input label {
    cursor: pointer;
}

.star-rating-input label:hover i,
.star-rating-input label:hover ~ label i {
    color: #ffc107;
}

/* ─── Wochenplan ─────────────────────────────────── */
.weekplan-table {
    font-size: .875rem;
}

.weekplan-table .meal-cell {
    min-width: 130px;
    background: #fff;
}

.weekplan-table td.table-primary.meal-cell {
    background-color: rgba(13, 110, 253, .04) !important;
}

.meal-entry {
    border-left: 3px solid #0d6efd !important;
    border-radius: .375rem !important;
}

/* Mahlzeit-Farben */
.meal-breakfast { border-left-color: #ffc107 !important; }
.meal-lunch     { border-left-color: #198754 !important; }
.meal-dinner    { border-left-color: #0d6efd !important; }
.meal-snack     { border-left-color: #6f42c1 !important; }

.add-entry-btn {
    font-size: .75rem;
    opacity: .5;
    transition: opacity var(--transition-fast);
}

.add-entry-btn:hover {
    opacity: 1;
}

/* ─── Einkaufsliste ───────────────────────────────── */
.shopping-item {
    transition: opacity var(--transition-fast);
}

.shopping-item.is-checked {
    opacity: .5;
    text-decoration: line-through;
}

/* Bring!-Button */
.btn-bring {
    background: #f8c500;
    border-color: #f8c500;
    color: #1a1a1a;
    font-weight: 600;
}

.btn-bring:hover {
    background: #e0b200;
    border-color: #e0b200;
    color: #1a1a1a;
}

/* ─── Dashboard ──────────────────────────────────── */
.stat-card {
    border-left: 4px solid transparent;
}

.stat-card-primary   { border-left-color: #0d6efd; }
.stat-card-success   { border-left-color: #198754; }
.stat-card-warning   { border-left-color: #ffc107; }
.stat-card-info      { border-left-color: #0dcaf0; }

/* ─── Formulare ───────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .15);
}

/* Ingredient-Rows */
.ingredient-row .remove-ingredient {
    flex-shrink: 0;
}

/* ─── Badges & Tags ────────────────────────────────── */
.badge-category {
    font-size: .75rem;
    font-weight: 500;
    padding: .3em .65em;
}

/* ─── Admin ────────────────────────────────────────── */
.btn-xs {
    font-size: .7rem;
    padding: .15rem .4rem;
    line-height: 1.4;
}

/* ─── Utility ──────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 576px) {
    .weekplan-table th.meal-col { display: none; }
    .weekplan-table td:first-child { display: none; }
    .flash-container { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
}
