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

html {
    font-size: 18px;
}

body {
    font-family: 'Nunito', 'Times New Roman', Times, serif;
    font-size: 18px;
    background-color: #F7F1E8;
    color: #A8570C;

    max-width: 700px;
    justify-content: center;
    align-items: center;

    margin: 0 .5rem;
}

p {
    color: #2E261C;
    line-height: 1.25;
}

span p {
    margin: 0;
}

dl {
    color: #2E261C;
    line-height: 1.25;
}

aside ul li {
    color: #2E261C;
    line-height: 1.25;
}

ol li {
    list-style-position: inside;
    padding-left: 1rem;
    text-indent: -1rem;
    color: #2E261C;
    line-height: 1.25;
}

label {
    color: #2E261C;
}

header {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    width: 100%;
}

header div {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;

}

header ul {
    display: flex;
    flex-direction: row;
}

header ul li {
    margin-right: 1rem;
}

.header-top {
    border-bottom: 1px solid #A8570C;
    justify-content: space-between;
    gap: 1rem;
}

.header-bottom {
    display: flex;
    flex-direction:row;
    flex-wrap: wrap;
    align-items: flex-start;
}

.header-bottom .search-form {
    padding: .25rem;
    margin-left: .25rem;
    margin-top: .25rem;
}

.header-bottom button {
    border-radius: .25rem;
}

h3 {
    font-family: 'Playwrite US Trad', 'Times New Roman', Times, serif;
}

h2 {
    font-family: 'Playwrite US Trad', 'Times New Roman', Times, serif;
    font-size: 22.5px;
}

h1 {
    font-family: 'Playwrite US Trad', 'Times New Roman', Times, serif;
    font-size: 32.4px;
}

ul {
    list-style: none;
}

input {
    font-size: 1rem;
    border-radius: .25rem;
    border-style: solid;
    height: auto;
}

button {
    border-radius: 0;
    border-style: solid;
    background-color: gainsboro;
    text-align: center;
    height: auto;
    font-size: 1rem;
}

form {
    display: flex;
    align-items: center;
}

main {
    background-color: #FFF9F1;
    border-radius: 25px;
    border-style: solid;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    width: 100%;
}

main .heading {
    margin-bottom: 2rem;
}

main .heading .button-box {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}

.recipe-description {
    margin-bottom: 2rem;
}

.card-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
}

.card-container .card {
    background-color: #FFF;
    border-radius: 12px;
    border-style: solid;
    border-width: 1px;
    border-color: lightgray;
    margin: 1rem .5rem;
    height: auto;
    padding: .5rem;
}

@media screen and (min-width: 600px) {
    .card-container .card {
        width: calc((100% - 3rem) / 3);
    }
}

@media screen and (min-width: 400px) and (max-width:599px) {
    .card-container .card {
        width: calc((100% - 3rem) / 2);
    }
}

@media screen and (max-width: 399px){
    .card-container .card {
        width: calc((100% - 3rem) / 2);
    }
}

.card-container .card ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .5rem;
    text-wrap: nowrap;
    justify-items: flex-start;
}

.card-container .card li {
    margin: 0;
}

.button_label {
    padding: .5rem 1rem;
    margin: .5rem;
    background-color: #8B5E34;
    color: #F7F1E8;
    border-radius: 17px;
}

.button_label:hover {
    background-color: #A8570C;
    color: #FFF9F1;
}

li {
    color: #2E261C;
}

a {
    color: #A8570C;
    text-decoration: none;
}

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

.rot {
    transform: rotate(2deg)
}

.recipe-header span {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 1.5rem;
}

.recipe-header ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    column-gap: .5rem;
}


/* 
For my reference: 
https://www.w3schools.com/cssref/atrule_media.php 
*/

@media screen and (min-width: 600px) {
    .recipe-info {
        display: flex;
        flex-direction: row;
        gap: 1rem;
    }

    .recipe-info .recipe-left {
        width: calc(((100% / 3) * 1) - 1rem);
    }

    .recipe-info .recipe-right {
        width: calc(((100% / 3) * 2) - 1rem);
    }

    main {
        padding: 1rem;
        border-width: 1px;
    }

    header {
        padding: 0;
    }
}

@media screen and (max-width: 599px) {
    .recipe-info {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .recipe-info .recipe-left {
        width: 100%;
    }

    .recipe-info .recipe-right {
        width: 100%;
    }

    main {
        padding: 0;
        border-width: 0;
    }

    header {
        padding: .5rem;
    }
}

.recipe-info .recipe-ingredients {
    text-indent: -1rem;
    padding-left: 1rem;
}

dl {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    row-gap: .25rem;
}

dt {
    width: 25%;
    margin-right: .5rem;
}

dd {
    width: calc(75% - .5rem);
    margin-left: 0;
}

.search-body{
    width: 100%;
}

.search-body input {
    width: 100%;
    padding: .25rem;
}

.profile-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.profile-picture {
    width: 5rem;
    height: 5rem;
}

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

@media screen and (max-width: 699px) {
    .login-form div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: baseline;
    }

    .login-form div input {
        width: 100%;
    }

    .login-form div label {
        width: 100%;
    }
}

@media screen and (min-width: 700px) {
    .login-form div {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: baseline;
    }

    .login-form div input {
        width: 80%;
    }

    .login-form div label {
        width: calc(20% - 1rem);
    }
}

.login-form button {
    width: 50%;
    min-width: 200px;
}

.tag::before {
    content: "#";
    color: gray;
}

textarea {
    resize:vertical;
    width: 100%;
    font-size: 1rem;
}

.step_description {
    vertical-align: top;
}

input[type=number] {
    width: 3.5rem;
}

.ingredient_unit {
    width: 3.5rem;
}

.ingredient_name {
    width: 13rem;
}

.ingredient_list {
    list-style: circle;
}

.step_list {
    list-style:decimal;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.step_item {
    width: 100%;
    list-style-position:outside;
    margin-left: 1rem;
    padding-bottom: 1rem;
}

#recipe_title {
    font-family: 'Playwrite US Trad';
    font-size: 2rem;
}

.ingredient_list li {
    padding-top: .25rem;
}