* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    justify-items: center;
    background-color: #F7F1E8;
    color: #2E261C;
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 400;
    padding-left: .5rem;
    padding-right: .5rem;
}

main {
    width: 100%;
    max-width: 700px;
    min-width: 100px;

    border-style: solid;
    border-color: #888;
    border-width: 1px;
    border-radius: 30px;
    border-bottom-width: 0px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;

    background-color: #FFF9F1;
    padding: 1rem;
}

header {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    margin-bottom: 3rem;

    nav {
        border-top-width: 2px;
        border-top-color: #8B5E34;
        border-top-style: solid;
    }

    .header-search {
        margin-top: 0.25rem;

        input,
        button {
            padding: .25rem;
        }
    }
}

h1 {
    font-family: 'Playwrite US Trad', serif;
    font-size: 125%;
    color: #8B5E34;
}

h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playwrite US Trad', serif;
    font-size: 125%;
    color: #A8570C;
}

ul {
    list-style: none;
}

textarea {
    width: 100%;
    resize: vertical;
}

dd {
    text-align: left;

    input {
        width: 35%;
    }
}

button {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #2E261C;
    padding-top: .5rem;
    padding-bottom: .5rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

main section dt {
    font-weight: 600;
}

.header-row1 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: end;

    .link {
        margin-left: 1rem;
    }
}

.header-row2 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    .link {
        margin-right: 1rem;
    }
}

.profile-col1 {
    display: flex;
    flex-direction: column;
}

.profile-row1 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: start;

    img {
        width: 5rem;
        height: 5rem;
    }
}

.profile-row2 {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 1rem;
    padding-bottom: 2rem;
}

.recipe-col {
    display: flex;
    flex-direction: column;
}

.recipe-row1 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.recipe-row2 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.recipe-row3 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.recipe-row4 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.recipe-row5 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0rem .25rem;
    padding-bottom: 2rem;
}

.edit-errors-row {
    padding-bottom: 2rem;
    ul {
        list-style: circle;
        background-color: red;
        padding-left: 1.25rem;
    }
}

.recipe-row6 {
    display: flex;
    flex-direction: row;
    padding-bottom: 2rem;

    .description {
        margin-bottom: 0;
    }
}

.recipe-img-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem 0rem;
}

.recipe-time-col {
    display: flex;
    flex-direction: column;
    width: 11rem;
    gap: .25rem;

    input {
        width: 3.25rem;
        padding: .25rem;
    }
}

.recipe-time-row {
    display: flex;
    flex-direction: row;
    gap: .5rem;

    .recipe-time-label {
        flex: 0 0 25%;

        .recipe-time-value {
            flex: 1 1 75%;
        }
    }
}

.login-col {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;

    button {
        width: 50%;
        align-self: center;
        min-width: 200px;
    }
}

.login-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    column-gap: 1rem;

    input {
        padding: .25rem;
    }
}

.heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;

    p {
        a {
            button {
                margin-top: 1rem;
                margin-left: 1rem;
            }
        }
    }
}

.search-input {
    height: 30px;
    width: 100%;
    padding: .25rem;
    margin-bottom: 2rem;
}

.cards-row {
    display: flex;
    flex-direction: row;
    align-items: start;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 1rem;
}

@media(max-width: calc(400px + 8rem)) {
    .cards-row {
        justify-content: center;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media(max-width: 700px) {
    .login-row {
        flex-wrap: wrap;

        input {
            width: 100%;
            padding: .25rem;
        }
    }
}

.card {
    flex-basis: calc((100% - 4rem) / 3);
    padding: .5rem;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-top: 1rem;

    img {
        align-self: center;
        height: 185px;
        width: 185px;
    }

    background-color: #FFF;
    border-style: solid;
    border-color: #888;
    border-radius: 10px;
    border-width: thin;
    border-top-width: 0px;
    border-right-width: 0px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.recipe-image {
    transform: rotate(2deg);
    border-style: solid;
    border-color: #FFF;
    border-radius: 3px;
    border-width: 5px;
}

.recipe-tags {
    display: flex;
    flex-direction: row;
    width: 100%;
    flex-wrap: wrap;
    column-gap: 0.25rem;
    justify-content: center;
}

.tag {
    display: flex;
    white-space: nowrap;
    text-wrap: nowrap;
    line-height: 1;
}

.link-tag {
    display: flex;
    white-space: nowrap;
    text-wrap: nowrap;
    line-height: 1;

    color: #8B5E34;
    text-decoration: none;

    button {
        font-size: 18px;
        color: #F7F1E8;
        background-color: #8B5E34;
        border-radius: 35px;
        border-width: 0px;
    }

    button:hover {
        background-color: #A8570C;
    }
}

.link-tag:hover {
    color: #A8570C;
    text-decoration: underline;
}

.link {
    color: #8B5E34;
    text-decoration: none;

    button {
        font-size: 18px;
        color: #F7F1E8;
        background-color: #8B5E34;
        border-radius: 35px;
        border-width: 0px;
    }

    button:hover {
        background-color: #A8570C;
    }
}

.link:hover {
    color: #A8570C;
    text-decoration: underline;
}

.main-title {
    display: flex;
    flex-direction: row;
    font-size: 180%;
    color: #A8570C;
    justify-content: space-between;

    input{
        width: 87%;
        font-family: 'Playwrite US Trad', serif;
        font-size: 125%;
        color: #A8570C;
    }
}

.userEditButtons {
    display: flex;
    flex-direction: row;
    gap: 1rem;

    button{
        font-family: 'Nunito', sans-serif;
        font-size: 16px;
        font-weight: 600;
        color: #2E261C;
        padding: .25rem;
    }
}

.login-form,
.login-form label,
.login-form input,
.login-form button {
    font-size: 125%;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}

.description {
    margin-left: 1.5rem;
    width: 75%;
    flex-direction: column;
}

.ingredients-steps-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    min-width: 0;
    column-gap: 1rem;

    h3 {
        padding-bottom: .5rem;
    }
}

@media (max-width: 500px) {
    html {
        padding-left: 0rem;
        padding-right: 0rem;
    }

    main {
        border-left-width: 0px;
        border-right-width: 0px;
    }

    .header-row1 {
        padding-left: .5rem;
        padding-top: .5rem;
        padding-right: .5rem;
    }

    .header-row2 {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .recipe-col {
        align-items: center;
    }

    .recipe-row3 {
        flex-wrap: wrap;
        row-gap: 2rem;
        justify-content: center;

        .recipe-img-col {
            row-gap: 2rem;
        }
    }

    .ingredients-steps-row {
        flex-wrap: wrap;

        .ingredients {
            padding-bottom: 2rem;
        }
    }
}

.ingredients {
    padding-left: 1rem;
    text-indent: -1rem;
    flex: 0 0 30%;
}

.steps {
    flex: 0 0 67.3%;

    ol {
        padding-left: 1rem;

        input {
            height: 30px;
            padding: .25rem;
        }
    }

    ul {
        padding-top: .25rem;
        display: flex;
        flex-direction: column;
        gap: .25rem;
        list-style: circle;
        padding-left: 1rem;
        padding-bottom: 1rem;
    }
}

.edit-recipe-step-description {
    vertical-align: top;
}

.edit-recipe-step-ingredient-amount {
    width: 3.25rem;
}

.ingredients,
.steps {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

.description,
.ingredients,
.steps {
    line-height: 1.25;
}

.visually-hidden {
    display: none;
}