/* Recipe App - Custom Styles */

/* General */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f5f0 0%, #e8ddd3 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
}

/* Recipe Cards */
.recipe-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    height: 100%;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.recipe-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.recipe-card-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0ebe4;
    color: #aaa;
    font-size: 3rem;
}

.recipe-card .favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #dc3545;
    z-index: 2;
    transition: transform 0.2s;
}

.recipe-card .favorite-btn:hover {
    transform: scale(1.15);
}

.recipe-card .favorite-btn.active {
    color: #dc3545;
}

/* Recipe View */
.recipe-hero-img {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.recipe-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.recipe-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6c757d;
}

.recipe-meta-item i {
    font-size: 1.1rem;
}

.ingredient-list {
    list-style: none;
    padding: 0;
}

.ingredient-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.ingredient-list li::before {
    content: '•';
    color: var(--bs-primary);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.4;
}

.direction-step {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.direction-step:last-child {
    border-bottom: none;
}

.step-number {
    background: var(--bs-primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Filter/Search Bar */
.filter-bar {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Dynamic Form (ingredients/directions) */
.dynamic-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dynamic-row .btn-remove {
    flex-shrink: 0;
}

/* Image upload preview */
.image-preview-container {
    position: relative;
    max-width: 300px;
}

.image-preview-container img {
    max-width: 100%;
    border-radius: 0.5rem;
}

.image-preview-container .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
}

/* Tag badges */
.tag-badge {
    cursor: pointer;
    transition: opacity 0.2s;
}

.tag-badge:hover {
    opacity: 0.8;
}

.tag-badge.active {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

/* Toast notification positioning */
.swal2-container {
    z-index: 2000 !important;
}

/* Mobile touch targets */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }

    .recipe-card .card-img-top {
        height: 180px;
    }

    .recipe-hero-img {
        max-height: 250px;
    }

    .filter-bar {
        padding: 0.75rem;
    }
}

/* Print styles */
@media print {
    .navbar, .filter-bar, .btn, .favorite-btn, footer {
        display: none !important;
    }

    .recipe-hero-img {
        max-height: 300px;
    }

    body {
        font-size: 12pt;
    }

    .ingredient-list li {
        break-inside: avoid;
    }

    .direction-step {
        break-inside: avoid;
    }
}
