/* ==========================================================================
   CSS GRID/FLEX TABLE LAYOUT FOR RECIPES (MOCK TABLE)
   ========================================================================== */

#recipe-list-container-parent {
    width: 100%;
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

#recipe-list-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Simulated Table Header */
.table-header-mock {
    display: flex;
    background: #52a341; /* Green header matching screenshot */
    color: white;
    font-weight: 500;
    padding: 12px 15px;
    font-size: 15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    scroll-margin-top: 100px;
}

.table-header-mock > div {
    padding: 0 10px;
}

.th-no { width: 60px; text-align: center; }
.th-nama { flex: 1.5; min-width: 200px; }
.th-deskripsi { flex: 2; min-width: 250px; }
.th-aksi { width: 140px; text-align: center; }

/* Recipe Container simulates Table Row */
.recipe-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    padding: 12px 15px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    flex-wrap: wrap !important;
    transition: background 0.3s !important;
}

.recipe-container:last-child {
    border-bottom: none !important;
}

.recipe-container:hover {
    background: #f9fafb !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Mock Cells */
.col-no {
    width: 60px;
    text-align: center;
    font-weight: 500;
    color: #111;
    font-size: 14px;
}

.col-nama {
    flex: 1.5;
    min-width: 200px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 0 10px;
}

.col-nama img {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #e5e7eb !important;
    box-shadow: none !important;
    background-color: #fff !important;
}

.col-nama span.recipe-name {
    font-weight: 500 !important;
    color: #111 !important;
    font-size: 14px !important;
    margin: 0 !important;
}

.col-deskripsi {
    flex: 2;
    min-width: 250px;
    line-height: 1.5;
    color: #333;
    font-size: 14px;
    padding: 0 10px;
}

.col-aksi {
    width: 140px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.btn-detail {
    background: #eefdf4 !important;
    color: #166534 !important;
    border: none !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    width: 100% !important;
    max-width: 110px !important;
}

.btn-detail:hover {
    background: #dcfce7 !important;
}

/* Override the recipe-header class if it was applied to col-aksi */
.recipe-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Hide the steps container initially */
.recipe-steps-container {
    display: none;
    width: 100%;
    padding: 20px 60px;
    background: #fcfcfc;
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
}

.recipe-steps-container .recipe-step {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
}

.recipe-steps-container .step-content h3 {
    font-size: 15px !important;
    color: #52a341 !important;
    margin-bottom: 5px !important;
}

.recipe-steps-container .step-content h3::before {
    display: none !important;
}

.recipe-steps-container .step-content p, 
.recipe-steps-container .step-content li {
    font-size: 14px !important;
    color: #444 !important;
}

/* Pagination Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    font-size: 14px;
    color: #555;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination button {
    background: white;
    border: 1px solid #e5e7eb;
    color: #555;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover {
    background: #f9fafb;
}

.pagination button.active {
    background: #52a341;
    color: white;
    border-color: #52a341;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .table-header-mock {
        display: none !important;
    }
    
    .recipe-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        position: relative !important;
        padding: 20px 15px !important;
        gap: 15px !important;
    }
    
    .col-no {
        display: none !important; /* Hide number on mobile to save space */
    }
    
    .col-nama {
        margin-bottom: 5px !important;
        padding: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    .col-nama img {
        flex-shrink: 0 !important;
    }
    
    .col-deskripsi {
        margin-bottom: 5px !important;
        padding: 0 !important;
        width: 100% !important;
        font-size: 13px !important;
    }
    
    .col-aksi {
        width: 100% !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        border: none !important;
    }
    
    .btn-detail {
        width: 100% !important;
        text-align: center !important;
    }

    .recipe-steps-container {
        padding: 15px !important;
    }

    .table-footer {
        flex-direction: column !important;
        gap: 15px !important;
    }
}
