html {
    font-size: 18px;
    font-family: "Nunito", sans-serif;
    color: #2E261C;
    background-color: #F7F1E8;
    list-style-type: none;
    max-width: 700px;
}

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

body {
    display: flex;
    flex-direction: column;
    padding: .5rem;
    justify-content: center;
}

dl {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 0 0 .25rem;
    flex-wrap: wrap;
}

dl section {
    display: flex;
    flex-direction: row;
    gap: .5rem;
}

header {
    padding: 0 0 3rem;
    display: flex;
    flex-direction: column;
}

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

main {
    display: flex;
    flex-direction: column;
    border-color: #888;
    background-color: #FFF9F1;
    border-width: 1px;
    border-radius: 15px;
    border-style: solid;
    padding: 1rem;
}

textarea {
    width: 100%;
    resize: vertical;
}

input[type=number][size] {
    width: calc(attr(size type(<number>)) * 1ch + 2rem);
}

.title {
    color: #A8570C;
    font-family: "Playwrite US Trad", sans-serif;
    font-size: 32px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: start;
}

.small-title {
    color: #A8570C;
    font-family: "Playwrite US Trad", sans-serif;
    font-size: 22.5px;
}

.recipe-metadata-font {
    font-weight: 600;
    display: flex;
}

.button {
    padding: .5em 1em;
    text-decoration: none;
    border-radius: 10px;
    color: #F7F1E8;
    background-color: #8B5E34;
}

.button:hover {
    padding: .5em 1em;
    text-decoration: none;
    border-radius: 10px;
    border-width: 1px;
    border-style: solid;
    color: #A8570C;
    background-color: #FFF9F1;
}

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

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

.recipe-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    background-color: #FFF;
    box-shadow: 1px 1px 5px #888;
    padding: .5rem;
    width: calc((100% - 2rem) / 3);
    height: calc(100% / 1);
}

.recipe-card-container {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0 0;
}

.recipe-card-tags {
    display: flex;
    list-style: none;
    gap: 0 .5rem;
    flex-wrap: wrap;
    text-wrap: nowrap;
}

.recipe-line-height {
    line-height: 1.25;
    padding: 0 0 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 2;
    width: 100%;
}

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

.recipe-sidebar-left {
    display: flex;
    flex-direction: column;
    flex-grow: 1
}

.recipe-sidebar-right {
    display: flex;
    flex-direction: column;
    flex-grow: 2
}

.search-page-searchbox {
    width: 100%;
    padding: .25rem;
}

.visually-hidden {
    display: none;
}

main header {
    display: flex;
    flex-direction: column;
    padding: 0 0 2rem;
}

#main-button {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0 0;
}

#header-first-row {
    border-width: 0 0 2px 0;
    border-color: #8B5E34;
    border-style: solid;
    display: flex;
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
}

#header-second-row-links {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

#header-title {
    font-family: "Playwrite US Trad", sans-serif;
    font-size: 23px;
    text-decoration: none;
    color: #8B5E34;
}

#header-search-bar {
    gap: .25rem;
    padding: 0 .25rem;
}

#search-page-container {
    display: flex;
    flex-direction: row;
}

#login-form {
    font-size: 25px;
}

#recipe-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#recipe-metadata {
    display: flex;
    flex-direction: row;
    gap: 0 1.5rem;
    flex-wrap: wrap;
}

#recipe-ingredients {
    line-height: 1.25;
    list-style: none;
    padding: 0 0 0 1em;
    text-indent: -1rem;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

#recipe-metadata-tags {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: .5rem;
}

#recipe-photo {
    display: flex;
    flex-direction: column;
    transform: rotate(2deg);
    border-width: 5px;
    border-style: solid;
    border-color: #FFF;
    border-radius: 3px;
    width: 100%;
    height: auto;
    padding: 0 0 .5rem;
}

#recipe-steps {
    line-height: 1.25;
    padding: 0 0 0 1em;
}

#recipe-steps-container {
    padding: 0 0 1rem;
}

#recipe-steps li label textarea {
    vertical-align: top;
}

#recipe-steps li ul li label {
    padding: .25rem 0
}

#user-profile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#user-profile-header-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#user-profile-photo {
    width: 5rem;
    height: 5rem;
}

#login-field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1rem 0 1rem;
}

.login-input-container {
    display: flex;
    flex-direction: row;
    align-items: baseline;
}

.login-inputbox {
    display: flex;
    flex-direction: column;
    width: 80%;
    padding: .25rem;
}

#login-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 200px;
    padding: 0 25%;
}

.errors-list {
    color: red;
    padding: 0 0 0.5rem 1rem;
}

.new-ingredient {
    padding: 0 0 0 1rem;
}

@media (max-width: 500px) {
    #recipe-container {
        gap: 2rem;
    }

    .recipe-row-container {
        flex-direction: column;
        gap: 2rem;
    }

    .recipe-line-height {
        padding: 0;
    }

    body {
        padding: 0;
    }

    header {
        padding: .5rem .5rem 3rem;
    }
}

@media (max-width: 600px) {
    .recipe-card {
        width: calc((100% - 2rem) / 2);
    }
}

@media (max-width: 400px) {
    .recipe-card {
        width: calc((100% - 2rem) / 1);
    }
}

@media (max-width: 700px) {
    .login-input-container {
        display: flex;
        flex-direction: column;
        align-items: baseline;
    }

    .login-inputbox {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: .25rem;
    }

    #login-field {
        gap: 1rem;
    }
}