/* NOTE TO TA: I aim to clean up this CSS code after my Sunday submission and will be cleaner in my HW3 submission.*/

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

html{
    font-size: 18px;
    font-family: "Nunito", sans-serif;
    background-color: #F3E6D5;
}

body {
    max-width: 700px;          
    margin: 0 auto;            
    padding: 0.5rem;           
}

header{
    margin-bottom: 3rem;
}

header section{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: end;
}

header section nav{
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
}

header section nav menu{
    display: flex;
    flex-direction: row;
    
    gap: 10px;
}


h1{font-size: 32.4px; font-family: "Playwrite US Trad"; color: #8B5E34;}
h2{font-size: 22.5px; font-family: "Playwrite US Trad"; color: #8B5E34;}
form{font-size: 22.5px; font-family: "Nunito";}
dl dt{font-weight: 600;}
section ul li,
section ol li{ line-height: 1.25;}

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

.tag{
    gap: .5rem;

    width: 100%;
    height: auto;
    object-fit: contain;

    
}
.tag li {list-style: none;}
.tag li::before{content: "#"; color: #A8570C;}

.button{
    background-color: #8B5E34; 
    color: #F3E6D5; 
    padding: 0.5em 1em;
    border-radius: 25px;
}

.button:hover{
    background-color: #F3E6D5; 
    color: #8B5E34; 
    padding: .5em 1em; 
    border-radius: 25px;
}


.main-section{
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.index-div-button{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
}

.index-div-recipe{
    display: flex;
    flex-direction: row;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
    justify-content: space-between;
}

.main-background{
    display: flex;
    flex-direction: column;
    gap: 2rem;

    border-width: 2px 2px 2px 2px;
    border-style: solid;
    border-color: black;
    border-radius: 35px;
    padding: 1rem 1rem 1rem 1rem;
    gap: 2rem;

    background-color: #F7F1E8;
}

.recipe-section{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 1.5rem;
}

.recipe-ingredients-steps{
    display: flex;
    flex-direction: row;
    gap: 4rem;
}

.recipe-ingredients-div{
    display: flex;
    flex-direction: column;
    padding-left: 1em;
    text-indent: -1rem;
}

.recipe{
    max-width: 200px;
    text-wrap: wrap;
    border-width: 2px 2px 2px 2px;
    border-style: solid;
    border-color: black;
    border-radius: 35px;

    padding: 10px 10px 10px 10px;

    background-color: white;
}

.recipe-image{
    transform: rotate(2deg);
    max-width: 30%; 
    height: auto; 
}

.recipe-info-list{
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.recipe-info-list-div{
    display: flex;
    flex-direction: row;
    gap: .5rem;
}

.visually-hidden{
    display: none;
}

.card-container {
  max-width: 700px;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 1rem; 
  padding-top: 1rem;
  padding-bottom: 1rem;

  margin-left: auto;
  margin-right: auto; 
}

.card-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.search-form{
    width: 100%;
}

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

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

.login-form{
    display: flex;
    flex-direction: column;
    padding: .5rem;
}

.login-form-password{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
    justify-content: space-evenly;
    padding: 20px;
}

.login-button{
    width: 200px;
}

.recipe-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.recipe-header button
{
    align-self: flex-start;
}

.recipe-edit-textarea {
    width: 100%;
    resize: vertical;
}

.recipe-edit-step-directions {
    width: 100%;
    resize: vertical;
    vertical-align: top;
}

.recipe-edit-title {
    width: 100%;
    font-size: 2rem;
    font-family: "Playwrite US Trad", serif;
}

.recipe-edit-step{
    padding-bottom: 1rem;
    max-width: fit-content;
}

.recipe-edit-ingredient-list{
    padding-left: 1.5rem;
}

.recipe-edit-ingredient{
    padding-top: 0.25rem;
}

.recipe-edit-ingredient-amount{
    width: 3rem;
}

.recipe-edit-ingredient-unit{
    width: 4rem;
}

.recipe-edit-ingredient-name{
    width: 10rem;
}

.edit-form-errors{
    color: red;
    font-weight: bold;
    margin: 1em 0;
}