*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ---------- Broad Tags ---------- */

body {
    display: flex;
    flex-direction: column;
    align-items: center;

    max-width: 700px;
    margin: auto;
    padding-bottom: 2rem;
    border: 2px solid gray;
    font-family: Arial, sans-serif;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    background-color: whitesmoke;
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    gap: 3%;

    width: 100%;
    height: 30px;
    font-size: 20px;
    font-weight: bold;
    background-color: gainsboro;
}

a {
    text-decoration: none;
    color: rgb(34, 99, 196);
}

a:hover {
    text-decoration: underline;
}

nav a.nav-link-active {
    color: black;
    text-decoration: underline;
}

hr {
    border: 1px solid black;
    width: 90%;
}

/* ---------- Recipe Cards ---------- */

.cards-area {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;

    width: 90%;
}

.card {
    display: flex;
    flex-direction: column;

    width: 100%;
    overflow: hidden;
    padding-bottom: 20px;

    background-color: whitesmoke;
    border: 2px solid gray;
    border-radius: 5px;
}
.card img {
    width: 100%;
}

.title-lane {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px 20px;

    margin-top: 20px;
}

.title-lane h2 {
    margin: 0;
}

.title-lane p {
    color: rgb(64, 64, 64);
    margin: 0;
    padding: 3px 0;
}

.title-lane a {
    font-weight: bold;
}

.recipe-text {
    display: flex;
    flex-direction: column;

    margin: 0 20px;
}

.recipe-text ul {
    display: flex;
    flex-direction: row;
    gap: 10px;

    padding: 0;
    margin: 0;
    list-style-type: none;
}
.recipe-text ul li {
    background-color: gainsboro;
    padding: 5px;
    border-radius: 5px;
    border: 2px solid gray;
    font-weight: bold;
}

/* TODO ---------- Cookbook Cards ---------- */

.cookbook-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.cookbook-card {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
    
    margin-bottom: 0;
    padding: 1rem;
    background-color: whitesmoke;
    border: 1px solid gray;
    border-radius: 5px;
    width: 90%;
}

.cookbook-card .cards-area {
    width: 100%;
}

.cookbook-card .cards-area {
    width: 100%;
}

.cookbook-card .card {
    background-color: white;
}

.cookbook-card .card .title-lane {
    margin-top: 20px;
}

.cookbook-card .title-lane {
    margin-top: 0;
}


/* ---------- Recipe Details ---------- */

.recipe {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 90%;
    gap: 20px;

    margin-bottom: 2rem;
}

.recipe .card {
    flex-grow: 1;
}

.recipe-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.recipe-info p {
    margin: 0;
}

.recipe-columns {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0 50px;

    /* color: blue; */
    /* background-color: blue; */

    max-width: 86%;
}

.recipe-columns div {
    width: 100%;
}

.recipe-columns h2 {
    margin: 0;
}

.recipe-columns ul, .recipe-columns ol {
    margin-bottom: 0;
}

.recipe-columns ul {
    margin-bottom: 1rem;
}

/* ---------- Home Opener ---------- */

.top {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    max-width: 86%;
    margin-bottom: 1rem;
}

.top h1 {
    margin-bottom: 0;
}

.sign-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    max-width: 86%;
    margin-bottom: 0;
}

.sign-in h1 {
    margin-bottom: 0;
}

/* ---------- Search Form ---------- */

.search-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    max-width: 86%;
    margin-bottom: 1rem;
}

.search-block {
    display: flex;
    flex-direction: row;
    align-items: center;
}

/* ---------- Media Queries ---------- */

@media (min-width: 600px) {
    nav {
        gap: 5%;
    }

    .card {
        width: calc(50% - 20px / 2);
    }

    .recipe-columns div {
        width: calc(50% - 50px / 2);
    }

    .recipe-columns ul {
        margin-bottom: 0;
    }
}

/* ---------- Wide Forms ---------- */

.wide-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 86%;
}

.wide-form p {
    margin-bottom: 0.5rem;
}

.wide-form label, .wide-form input, .wide-form textarea, .wide-form button {
    width: 100%;
}

.horizontal-subform {
    display: flex;
    flex-direction: row;
    align-items: end;
    gap: 10px;
}

/* ---------- Recipe Form ---------- */

.dynamic-list-block {
    margin-bottom: 1rem;
}

.dynamic-list-block h2 {
    margin-bottom: 0;
}

.dynamic-list-block > p {
    margin-top: 0.5rem;
}

.step-entry {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid gray;
    border-radius: 5px;
    background-color: whitesmoke;
}

.step-entry:last-child {
    margin-bottom: 0;
}

.step-ingredients {
    margin-top: 0.5rem;
}

.step-ingredients h3 {
    margin-bottom: 0.5rem;
}

.ingredient-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.ingredient-row p {
    margin: 0;
    flex: 1 1 120px;
}

.ingredient-row .ingredient-name-field {
    flex-basis: 220px;
}

/* ---------- Cookbook Form ---------- */



.cookbook-actions {
    width: 86%;
}

.cookbook-actions-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    width: 86%;
    margin-bottom: 1rem;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    width: calc(43% - 10px / 2);

    padding: 0.6rem 1rem;
    background-color: gainsboro;
    border: 2px solid gray;
    border-radius: 5px;
    color: black;
    font-weight: bold;
}

.action-button:hover {
    text-decoration: none;
    background-color: rgb(206, 206, 206);
}

.action-link {
    font-weight: bold;
}

.cookbook-form-block {
    width: 86%;
}

.cookbook-form-block h2 {
    margin-bottom: 0;
}

.cookbook-form-block p {
    margin-top: 0.5rem;
}

.cookbook-form button {
    align-self: start;
}

.make-public {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    align-self: start;
    max-width: 100%;
    /* gap: 0; */
    /* min-width: 200px; */
    margin-bottom: 1rem;
}

.make-public label {
    padding-left: 5px;
    white-space: nowrap;
}




/* Your site should:

center the header and main content box on the page
use a reasonable maximum width for readability
include consistent spacing between major sections
visually separate cards from the page background
group related content clearly
You should use flexbox where appropriate. */
