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

html {
    font-family: "Nunito", serif;
    font-size: 18px;
    color: #2E261C;
    background-color: #F7F1E8;
}

body {
    display: flex;
    flex-direction: column;
    padding: 0 0.5rem;
    max-width: 700px;
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;

}

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

header p {
    margin-bottom: 0;
}

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

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

.profile_info {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
}

.profile_section {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.profile_name {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

header li {
    padding: 0 1rem 0 0;
}

.header_title {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: space-between;
    border-bottom: solid #A8570C;
}

header form {
    display: flex;
    flex-direction: row;
    margin-top: 0.25rem;
    gap: 0.25rem;
}
header form label input{
    padding: 0.25rem;
}


ul {
    list-style: none;
}

h1, h3 {
    font-family: "Playwrite US Trad", serif;
    color: #A8570C;
    font-size: 125%;
}

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

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

h2 {
    font-family: "Playwrite US Trad", serif;
    color: #A8570C;
    font-size: 180%;
}

.main_heading {
    padding: 0 0 2rem 0;
}

.password_label, .username_label, .password_input, .user_name_input, .sign-in-button {
    font-size: 125%;
}

.prep_list {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    gap: 0.25rem;
}

.prep_time, .cook_time, .yield, .total_time {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    text-wrap: wrap;
    gap: 0.5rem;
}

.prep_1 {
    flex: 0 calc((25% - 0.5rem));
}


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

.description, .ingredients, .steps {
    line-height: 1.25;
}

.description {
    display: flex;
    width: 66%;
    flex-grow: 2;
}

.steps ol {
    padding: 0 0 0 1em;
}

.ingredients {
    display: flex;flex-direction: column;
    gap: 0.5rem;
    padding: 0 0 0 1rem;
    text-indent: -1rem;
    width: 33%;
    flex-grow: 1;
}

.home_button {
    background-color: #8B5E34;
    color: #F7F1E8;
    padding: .5em 1em;
    border-radius: 30px
}

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

.recipe_img {
    transform: rotate(2deg);
    max-width: 100%;
    padding: 0 0 0.5rem 0;
}

.recipe_main {
    display: flex;
    flex-direction: column;
    background-color: #FFF9F1;
    border-radius: 30px;
    border: thin solid #2E261C;
}

.search_main {
    display: flex;
    flex-direction: column;
    background-color: #FFF9F1;
    border-radius: 30px;
    border: thin solid #2E261C;
}

.sign_in_header {
    border-bottom: solid #8B5E34;
}

.sign_in_content {
    background-color: #FFF9F1;
    border-top: thin solid #2E261C;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    border-left: thin solid #2E261C;
    border-right: thin solid #2E261C;
}

.visually-hidden {
    display: none;
}

.search_item {
    padding: 0.5rem;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    background-color: #fff;
    height: 100%;
    width: calc((100% - 2rem) / 3);
}

.tag_input {
    font-weight: bold;
}

.tag_input input {
    min-width: 100%;
    padding: 0.25rem;

}

.recipe_metadata {
    display: flex;
    flex-direction: row;
    column-gap: 1.5rem;
    flex-wrap: wrap;
}

.recipe_metadata ul {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.index_buttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    padding: 1rem 0 0 0;
}

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

.content_card img {
    max-width: 100%;
}

.index_card_content {
    padding: 0.5rem;
    border: thin solid #888;
    border-radius: 10px;
    background-color: #fff;
    height: 100%;
    width: calc((100% - 2rem) / 3);
}

.index_card_content ul, .search_item ul {
    display: flex;
    flex-direction: row;
    text-wrap: nowrap;
    flex-wrap: wrap;
    gap: 0.5rem;


}

li {
    color: #888;
}

.index_card_content li {
    display: flex;
    flex-direction: row;
    color: #888;
}

.index_recipe_head {
    padding: 0 0 1rem 0;
}

.profile_row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: 2rem;
}

.profile_row1 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

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

.profile_row2 {
    justify-content: right;
}

.profile_row2 img {
    width: 5rem;
    height: 5rem;
}

.sign_in_content h2 {
    padding: 0 0 2rem 0;
}

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

.sign-in-button {
    display: flex;
    width: 50%;
    justify-content: center;
    min-width: 200px;
    align-self: center;
}

.username_label input, .password_label input {
    align-self: end;
    width: 80%;
    padding: 0.25rem;
}

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

.ingredients li, .steps li {
    color: #000;
}

.img_and_description {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items:flex-start;
}

.pic_steps_section {
    display: flex;
    flex-direction: column;
    width: 33%;
    flex-grow: 1;
}

.ingredients_steps {
    gap: 1rem;
    display: flex;
    flex-direction: row;
}
.steps{
    display: flex; flex-direction: column;
    gap: 0.5rem;
    width: 66%;
    flex-grow: 2;
}
.recipe_content{
    display: flex; flex-direction: column;
    gap: 2rem;
}
.recipe_content_head{
    display:flex;
    flex-direction: column;
}
.recipe_content_head h2{
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.title_and_button_edit{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: start;
}

.title_and_button_edit input{
    font-family: "Playwrite US Trad", serif;
    color: #A8570C;
    font-size: 180%;
}
textarea {
    resize: vertical;
    vertical-align:top;
    width: 100%;
}
.steps ul {
    list-style: circle;
    margin-left: 1rem;
}

.edit_ingredients_list input[name^='ing_unit']{
    width: 4.25rem;
}
.edit_ingredients_list input[type="number"]{
    width: 3rem;
}

input[name^="ing_name"]{ width: 13.25rem;}

.edit_ingredients_list{
    display: flex; flex-direction: column;
    gap: .25rem
}
.edit_steps_list{
    display: flex; flex-direction: column;
    gap: 1rem;
}
output { color: red;}

@media (max-width: 700px) {
    .password_label, .username_label, .show_password_label {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .password_label input, .username_label input {
        width: 100%;
        padding: .25rem;
    }

}
.prep_list input{
    width: 3rem;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

@media (max-width: 600px) {
    .index_card_content, .search_item{
        padding: 0.5rem;
        border: thin solid #888;
        border-radius: 10px;
        background-color: #fff;
        height: 100%;
        width: calc((100% - 1rem) / 2);
    }
}
@media (max-width: 500px) {
    .img_and_description, .ingredients_steps {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    body {
        padding: 0;

    }

    .recipe_main, .search_main {
        border-left-style: none;
        border-right-style: none;
    }

    .header_title {
        padding: 0.5rem 0.5rem 0 0.5rem;
    }

    .header_navigation {
        padding: 0 0.5rem 0 0.5rem;
    }

}

@media (max-width: 400px) {
    .index_card_content, .search_item{
        padding: 0.5rem;
        border: thin solid #888;
        border-radius: 10px;
        background-color: #fff;
        height: 100%;
        width: calc(100%);
    }
}