* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    background-color: #F7F1E8;
    border-width: 0rem 0.5rem 0rem 0.5rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

main {
    background-color: #FFF9F1;
    padding: 1rem;
    border: 1px, solid, #888;
    border-radius: 50px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 0;
}

menu {
    display: flex;
}

body {
    flex-grow: 1;
    max-width: 700px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;

}

header {
    flex-direction: column;
    gap: 0.25rem;
    
}

h1 {
    font-family: "Playwrite US Trad", Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: #8B5E34;
}

h2 {
    font-family: "Playwrite US Trad", Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: #8B5E34;
}

h3 {
    font-family: "Playwrite US Trad", Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: #8B5E34;
}

p {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
}

dt {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
}

dd {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
}

li {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
}

a {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: #8B5E34;
    text-decoration: none;
}

a:hover {
    color: #A8570C;
    text-decoration: underline;
}

button {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
}

label {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
}

div {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 18px;
}

ul {
    list-style-type: none;
}

img {
    max-width: 100%;
}


.signupformmenu {
    display: flex;
    flex-direction: column;
    list-style-type: none;
    align-items: center;
    gap: 1rem
}

.pagetitle {
    font-size: 1.8rem;
}

.pagetitleedit {
    font-family: "Playwrite US Trad", Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: #8B5E34;
    font-size: 1.8rem;
}

.editingredient {
    list-style-type: disc;
    padding-bottom: .25rem;
}

.editstep {
    padding-bottom: 1rem;
}

.errors {
    color: #ff3333;
    
}

.errortext {
    color: #ff3333;
}

.errorarea {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.errorlist {
    list-style-type: disc;
    padding-left: 1rem;
}

.showpassworddiv {
    display: flex;
    flex-direction: row;
    column-gap: 0.5rem;
}

.hide {
    display: none;
}

input[type=number][size] { width: calc(attr(size type(<number>)) * 1ch + 2rem); }

.PCTY {
    font-weight: 600;
}

.recipesections {
    line-height: 1.25;
}

.indexbuttons {
    padding: .5em 1em;
    background-color: #8B5E34;
    color: #F7F1E8;
    border-radius: 25px;
}

.indexbuttons:hover {
    padding: .5em 1em;
    background-color: #A8570C;
    color: #FFF9F1;
    text-decoration: none;
}

.pagecontent {
    flex-direction: column;
    max-width: 700px;
    gap: 3rem;
    padding: 0 0.5rem 0 0.5rem;
    list-style: none;
}

.mainarea {
    display: flex;
    flex-direction: column;
    gap: 2rem;

}

.headerfirstrow {
    display: flex;
    flex-direction: row;
    border-bottom-style: solid;
    border-bottom-color: #8B5E34;
    border-bottom-width: 2px;
    justify-content: space-between;
    align-items: end;
}

.headersecondrow {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    align-items: end;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
}

.headerlinks {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    gap: 1rem;
    justify-self: end;
}

.headerprofile {
    flex-direction: row;
    gap: 0.25rem;
    width: fit-content;
}

.headersearch {
    display: flex;
    padding: 0.25rem;
}

.headersearchbarandbutton {
    padding: 0.25rem

}

.dishbooktext {
    width: fit-content;
}

.recipeheader {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 1.5rem;
    align-content:start;
    
}

.recipeheadertags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 0.5rem;
    list-style-type: none;
    align-content: start;
}

.recipeingredients {
    padding-left: 1rem;
    text-indent: -1rem;
}

.recipesteps {
    padding-left: 1rem;
}

.recipedescriptionlines {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 0.25rem 0.5rem;

}

.descriptionlinekey {
    width: calc((100% - 0.5rem) / 4);
}

.descriptionlinevalue {
    width: calc((100% - 0.5rem) * 3/4);
}


.fancybuttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.pageheader {
    margin-bottom: 3rem;
}

.recipetitle {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

textarea {
    vertical-align: top;
    width:100%
}

.recipesteps ul {
    padding-left: 1rem;
}

.cards {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;

    
}

.card {
    width: calc((100% - 2rem) / 3);

    padding: 0.5rem;
    background-color: #FFF;
    height: fit-content;
    border-radius: 10px;
    border-width: 1px;
    border-color:#888;
    border-style: solid;

}

.cardtitle {
    display: flex;
    text-wrap: wrap;
    gap: 0rem;

}

.cardtags {
    display: flex;
    text-wrap: nowrap;
    flex-wrap: wrap;


}

.cardtag {
    display: flex;
    text-wrap: nowrap;
    margin-right: 0.5rem
}

.searchbar * {
    width: 100%;
    padding: 0.25rem;
    
}

.profileheader {
    display: flex;
    flex-direction: row;
    height: fit-content;
    gap: 1rem;
    justify-content: space-between;
}

.profilepicture {
    height: 5rem;
    width: 5rem;
}

.responsiverecipelayout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.responsiverecipelayouttop {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.responsiverecipelayouttopfirst {
    width: calc((100% - 1rem) / 3);
}

.responsiverecipelayouttopsecond {
    width: calc((100% - 1rem) * 2/3);
}

.responsiverecipelayoutbottom {
    display: flex;
    flex-direction: row;
    gap: 1rem;

}

.responsiverecipelayoutbottomfirst {
    width: calc((100% - 1rem) / 3);
}

.responsiverecipelayoutbottomsecond {
    width: calc((100% - 1rem) * 2/3);
}

.recipeingredientslabel {
    padding-bottom: 1rem;
}

.recipestepslabel {
    padding-bottom: 1rem;
}

#recipepicture {
    transform: rotate(2deg);
    border: 5px;
    border-color: #FFF;
    border-radius: 3px;
    border-style: solid;
    margin-bottom: .5rem;
    max-width: 100%

}

.usernamesection {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: baseline;
    justify-content: space-between;

}

.usernamelabel {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
}

.usernameentry {
    padding: 0.25rem;
    width: calc((100% - 1rem) * (4 / 5))
}

.passwordsection {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: baseline;
    justify-content: space-between;
}

.passwordlabel {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
}

.passwordentry {
    padding: 0.25rem;
    width: calc((100% - 1rem) * (4 / 5))
}

.signupform {
    font-family: "Nunito", Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    width: 100%;
}

.signupformdiv{
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.signupformbutton {
    width: calc(clamp(200px, 50vw, 50vw));
    align-self: center;
}




@media screen and (width <= 700px) {
    .usernamesection {
        flex-direction: column;
        gap: 0rem;
        padding-bottom: 1rem;

    }

    .usernameentry {
        width: 100%;
    }

    .passwordsection {
        flex-direction: column;
        gap: 0rem;
    }

    .passwordentry {
        width: 100%;
    }
}

@media screen and (width <= 600px){
    .card {
        width: calc((100% - 2rem) / 2)
    }
}

@media screen and (width <= 500px){

    .recipeheader {
        padding-bottom: 1rem;
    }

    .responsiverecipelayout {
        gap: 0;
    }

    .responsiverecipelayouttop {
        display: inline;
        
    }

    .responsiverecipelayoutbottom {
        display: inline;
    }

    .responsiverecipelayouttopfirst {
        width: auto;
        padding-bottom: 2rem;
    }

    .responsiverecipelayouttopsecond {
        width: auto;
        padding-bottom: 2rem
    }

    .responsiverecipelayoutbottomfirst {
        width: auto;
        padding-bottom: 2rem;
    }

    .responsiverecipelayoutbottomsecond {
        width: auto;
    }

    #recipepicture {
        margin-bottom: 2rem;
    }

    main {
        padding: 0rem;
        border-width: 0px;
    }

    body {
        padding: 0rem;
    }
    
    .pageheader {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

}

@media screen and (width <= 400px){
    .card {
        width: calc(100% - 2rem)
    }
}
