* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

body {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 .5rem 0 .5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;

    color: #2E261C;
    background-color: #F7F1E8;
    font-family: "Nunito", Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.bodyHeader {
    display: flex;
    justify-content: column;
    gap: 1rem;
    padding: 0 0 2rem 0;
    flex-wrap: wrap;

}



h1 {
    font-size: 32px;
    color: #A8570C;
    font-weight: 600;
    font-family: "Playwrite US Trad", cursive;
}

header h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: 22.5px;
    color: #A8570C;
    font-weight: 500;
    font-family: "Playwrite US Trad", cursive;
}

.visuallyHidden {
    display: none;
}

a {
    color: #8B5E34;
    text-decoration: none;
}

a:hover {
    color: #A8570C;
    text-decoration: underline;
}


/* -----------------------------------------------------HEADER---------------------------------------------- */
header {
    display: flex;
    flex-direction: column;


    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.5;
}

.HeaderUpperRow {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    border-bottom: 2px solid #A8570C;
    width: 100%;
    align-items: flex-end;
    flex-wrap: nowrap;

}

.HeaderLowerRow {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: .25rem 0 0 0;

}

.HeaderLowerRow ul {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.authorViewProfile {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.loginError{
    color: red;
}

/* --------------------------------------------------------_________________----------------------------------------------------------- */

.listHeader {
    font-weight: 600;
}

.list {
    line-height: 1.25;
}

ul {
    list-style: none;
}

.signInMain {
    font-size: 22.5;
}

.recipeImageCard {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    gap: 1rem;
    padding: 0 0 .5rem 0;
}

.timeList {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex-wrap: wrap;
}

.timeList div {
    display: flex;
    flex-direction: row;
    gap: .5rem;
}


.indexBodyRecipes {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 1rem;
}

.recipeImage {
    border: 5px solid white;
    border-radius: 3px;
    overflow: hidden;
}

.recipeImage img {
    transform: rotate(2deg);
    height: auto;
    width: 100%;
    display: block;
    padding: 0;
}

img {
    max-width: 100%;
}

figure {
    max-width: 100%;
}


.signInButton {
    font-size: 22.5px;
    width: 60%;
    margin: 0 auto;
    padding: .25rem;
}


.indexButtons {
    margin: 0 auto;
    gap: 1rem;
}

.button {
    border: 7px solid #8B5E34;
    background-color: #8B5E34;
    border-radius: 12px;
    color: white;

}

.button:hover {
    color: white;
}


.indexMain {
    border-top: 1px solid #2E261C;
    border-left: 1px solid #2E261C;
    border-right: 1px solid #2E261C;

    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    background-color: #FFF9F1;

}

Main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;

    border-top: 1px solid #2E261C;
    border-left: 1px solid #2E261C;
    border-right: 1px solid #2E261C;

    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    background-color: #FFF9F1;

}

/* __________________________________________________Recipe Header Meta Data___________________________________ */

Main header {
    display: flex;
    flex-direction: column;
}

Main header div {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

Main header ul {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.errors {
    color: red;
}

/* -------------------------------------------------------------------------------------------------------------------------- */
.IngredientSteps {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 2rem 0 0 0;
}

.recipe_title_with_button {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.edit_steps {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin: .25rem;
}


.Steps {
    padding: .5rem 0 0 1em;
    width: 70%;

}

.Ingredients {
    text-indent: -1rem;
    padding: .5rem 0 0 1rem;
}

.recipeSection {
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-radius: 9px;
    background-color: #FFF9F1;
    margin: 0;
    flex-grow: 0;
}

.recipeImageList {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    max-width: 100%;
    gap: 1rem;
}

.searchHeader {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 0 0 1rem 0;
}

.recipeImageList li {
    display: flex;
    flex-direction: column;
    flex: 0 1 calc(33.333% - 1rem);

}

.recipeImageList li img {
    padding: .5rem;
}

.indexTagList {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
    row-gap: 0;
}

.indexTagList li {
    flex: 0 0 auto;
}

.edit_title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.edit_title_input {
    display: felx;
    flex: 1;
    font-size: 30.5px;
    color: #A8570C;
    font-weight: 500;
    font-family: "Playwrite US Trad", cursive;
    width: 30rem;
    height: 4rem;
}

.authorLine {
    border-bottom: 2px solid #A8570C;
}

.edit_text_area {
    width: 100%;
    display: block;
    max-width: 100%;
}

.edit_text_area_description {
    width: 100%;
    display: block;
    max-width: 100%;
    min-height: 5rem;
    resize: vertical;

    flex: 1;
}

.edit_description {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
}

.authorLine p {
    margin: 0;
    padding: 0;
}

Input[name="searchBar"] {
    height: 20px;
    width: 250px;
    color: #2E261C;
}

figure {
    margin: 0;
    padding: 0;
}

.profilePic {
    width: 5rem;
    height: 5rem;
}

.loginPage {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.loginGroup {
    display: flex;
    flex-direction: column;
}

.textBar {
    padding: .25rem;
    width: 100%;
}

.profileHeader {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 0 1rem 0;
}

.profileHeaderLeft {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.profileHeaderLeftBottom {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}


@media(max-width: 700px) {
    .loginGroup {
        flex-direction: column;
        gap: 0;
    }

    .loginPage {
        gap: 1rem;
    }

}


@media(max-width: 600px) {
    .recipeImageList li {
        display: flex;
        flex-direction: column;
        flex: 0 1 calc(50% - 1rem);

    }
}

@media(max-width: 500px) {
    .profilePic {
        display: none;
    }

    .profileHeaderLeftBottom {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
    }

    .profileHeader {
        justify-content: center;
        gap: .25rem;
    }


}

@media(max-width: 400px) {
    .recipeImageCard {
        flex-direction: column;
        gap: 2rem;
        padding: 0 0 2rem 0;
    }

    .IngredientSteps {
        flex-direction: column;
        justify-content: space-between;
        gap: 2rem;
    }

    .recipeImageCardOuter {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    Body {
        padding: 0;

    }

    Main {
        border-left: 0;
        border-right: 0;
    }


    .loginPage {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .loginGroup {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: baseline;
    }

    .textBar {
        padding: .25rem;
        width: 80%;
    }



    .signInButton {
        font-size: 22.5px;
        width: 50%;
        min-width: 200px;
        margin: 0 auto;
        padding: .25rem;
    }


    .recipeImageList li {
        display: flex;
        flex-direction: column;
        flex: 0 1 calc(100%);

    }

    .HeaderUpperRow {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .HeaderLowerRow {
        flex-direction: column;
        align-items: center;
    }

    .indexButtons {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex-wrap: wrap;
    }

}