body {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    max-width: 1000px;
    width: 100%;
    background-color: #F7F2EC;
    font-family: sans-serif;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 700px;
}

nav {
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
    font-weight: bold;
    color: goldenrod;
}

a {
    color: goldenrod;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    color: #4caf85;
    margin: 20px;
}

form {
    margin-bottom: 30px;
}

img {
    max-width: 100%;
    height: auto;
}

.site-title {
    font-size: xxx-large;
}

.food-tag {
    color: grey;
    font-style: italic;
    text-decoration: underline;
}

.browse-description {
    font-style: italic;
}

.recipe-columns {
    width: 100%;
    padding: 20px;
}

.recipes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 0;
}

.recipe-box {
    border: 1px solid black;
    border-radius: 10px;
    padding: 18px;
    margin: 5px;
    background-color: whitesmoke;
    width: calc(50% - 53px);
}

.reviews-section {
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.review-summary {
    margin-top: 0;
}

.review-filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.review-filter-form select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
}

.hidden {
    display: none;
}

.review-form {
    background-color: whitesmoke;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.review-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 6px;
    font-weight: bold;
}

.review-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    resize: vertical;
}

.review-form button[type="submit"] {
    margin-top: 12px;
    border: 1px solid goldenrod;
    background-color: #fff6de;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
}

.review-errors {
    margin: 10px 0;
    color: #8b0000;
}

.review-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.delete-review-button {
    border: 1px solid #8b0000;
    color: #8b0000;
    background-color: #fff;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
}

.delete-review-button:hover {
    background-color: #ffeaea;
}

.rating-label {
    margin-bottom: 4px;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.star-rating input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-rating label {
    font-size: 30px;
    color: #b8b8b8;
    line-height: 1;
    cursor: pointer;
    margin: 0;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: goldenrod;
}

.star-rating input:focus-visible + label {
    outline: 2px solid #4caf85;
    border-radius: 3px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card {
    background-color: whitesmoke;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stars {
    color: goldenrod;
    letter-spacing: 2px;
}

.review-date, .review-updated-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
}

@media (max-width: 700px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .recipes {
        flex-direction: column;
        align-content: center;
    }

    .recipe-box {
        width: 80%;
    }

    .review-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

