/* Recipe List Page Styles */
.recipelist-container {
    max-width: 1200px;
    margin: 10px auto 30px;
    padding: 20px;
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.recipelist-container h1 {
    font-size: 28px;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
}

.recipelist-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin: 80px auto 10px;
    padding-left: 60px;
}

.recipelist-header h1 {
    font-size: 28px;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Filters sidebar */
.recipelist-filters {
    flex: 0 0 250px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.recipelist-filters h3 {
    margin-top: 0;
    color: #444;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.recipelist-filters label {
    display: block;
    margin: 15px 0 5px;
    font-weight: 600;
    color: #555;
}

.recipelist-filters input[type="text"],
.recipelist-filters select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    margin-bottom: 10px;
}

.recipelist-filters input[type="checkbox"] {
    margin-right: 8px;
}

.recipelist-filter-btn {
    background: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: background 0.3s;
}

.recipelist-filter-btn:hover {
    background: #003d82;
}

/* Recipe list */
.recipelist-list {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.recipelist-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.recipelist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.recipelist-image-container {
    height: 180px;
    overflow: hidden;
}

.recipelist-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recipelist-card:hover .recipelist-image {
    transform: scale(1.05);
}

.recipelist-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.recipelist-details h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.recipelist-details p {
    margin-bottom: 10px;
    color: #666;
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.4;
}

.recipelist-buttons-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.recipelist-buttons-container form {
    flex: 1;
    display: flex;
}

.recipelist-buttons-container form button {
    width: 100%;
}

.recipelist-open-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    background: #4a6da7;
    color: white;
    text-decoration: none;
    text-align: center;
    flex: 1;
}

.recipelist-open-btn:hover {
    background: #3a5d97;
}

.recipelist-select-btn,
.recipelist-unselect-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    flex: 1;
}

.recipelist-select-btn {
    background: #0056b3;
    color: white;
}

.recipelist-select-btn:hover {
    background: #003d82;
}

.recipelist-unselect-btn {
    background: #dc3545;
    color: white;
}

.recipelist-unselect-btn:hover {
    background: #bd2130;
}

/* Selected recipe styling */
.selected-recipe {
    border: 2px solid #28a745;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .recipelist-container {
        flex-direction: column;
    }

    .recipelist-filters {
        position: relative;
        top: 0;
        width: 100%;
        max-width: none;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .recipelist-container {
        margin: 70px auto 20px;
        padding: 15px;
    }

    .recipelist-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .recipelist-list {
        grid-template-columns: 1fr;
    }
}