* { margin: 0; padding: 0; box-sizing: border-box; }

input[type=number][size] {
  width: calc(attr(size type(<number>)) * 1ch + 2rem);
}

h1, h2, h3, h4, h5, h6, .recipe_title_input{
  font-family: 'Playwrite US Trad', cursive;
  font-size: 125%;
  color:   #A8570C;
}

body {
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  color: #2E261C;
  background-color: #F7F1E8;

  padding-left: 0.5rem;
  padding-right: 0.5rem;

  display: flex;
  flex-direction: column;
  gap: 3rem;

  justify-content: center;
  max-width: 700px;
}

body > header{
  display: flex;
  flex-direction: column;
}

.website_title{
  display: flex;
  flex-direction: row;
  border-bottom: 2px solid #8B5E34;

  justify-content: space-between;
  align-items: flex-end;
}

header > nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.header_search{
  padding-top: 0.25rem;
  gap: 0.25rem;
}

.opening_message{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main_buttons_container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
}

.index_recipes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.card img {
  max-width: 100%;
  height: auto;
}

.card {
  padding: 0.5rem;
  background-color: #FFF9F1;
  border-radius: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.recipe_header{
  display: flex;
  flex-direction: column;
}

.recipe_header > ul {
  display: flex;
  flex-direction: row;
  column-gap: 1.5rem;
  flex-wrap: wrap;
}

.menu{
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.recipe_content {
  display: flex;
  flex-direction: column;
}

.steps {
  width: calc(100% * (2 / 3));
}

.steps ol {
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
  gap: 1rem;
}

.step_description textarea{
  vertical-align: top;
}

.recipe_label_and_description{
  width: calc(100% * (2/3));
}

.ingredients {
  padding: 1rem;
  text-indent: -1rem;
  width: calc(100% * (1/3));
}

output {
  color: red;
}

.recipe_image {
  transform: rotate(2deg);
  border: 5px solid white;
  width: calc(100% * (1/3));
}

.description, .ingredients_steps {
  display: flex;
  flex-direction: row;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

main {
  background-color: #FFF9F1;
  border: 1px solid #2E261C;
  border-radius: 50px;
  padding: 1rem;

  display: flex;
  flex-direction: column;
}

main > header{
   margin-bottom: 2rem;
}

dl {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.5rem;
  row-gap: 0.25rem;
  margin: 0;
  padding: 0;
}

dt {
  font-weight: bold;
}

ul{
  list-style: none;
}

ol ul {
  list-style: disc;
}

.welcome {
  font-size: 180%;
}

dl dt {
  font-weight: 600;
}

.main_buttons{
  color: white;
  background-color: #8B5E34;
  text-decoration: none;
  padding: .5em 1em;
  border-radius: 100px;
}

.main_buttons:hover{
   color: #FFF9F1;
  background-color: #A8570C;
}

a:hover{
    color: #A8570C;
    text-decoration: none;
  }
a{
    color: #8B5E34;
    text-decoration: none;
  }

.ingredients,
.steps,
.description {
  line-height: 1.25;
}

.visually-hidden {
  display: none;
}

.big_search_bar {
  display: flex;
  flex-direction: column;
}

.big_search_bar > form > input {
  width: 100%;
  padding: 0.25rem;
}

.profile_header {
  display: flex;
  flex-direction: row;

  gap:1rem;
  justify-content: space-between;
}

.profile_header img {
  width: 5rem;
  height: 5rem;
}

.tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;

  color: #8B5E34;
}

.tags > li {
  text-wrap: nowrap;
}

.login_boxes {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: baseline;
}

.username_box > input, .password_box > input {
  justify-content: flex-end;
  padding: 0.25rem;
  width: 80%;
}

.login_button_container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.login_button {
  max-width: 50%;
  min-width: 200px;
}

.all_ingredients_in_step {
  padding-left: 1rem;
}

.ingredient_in_step {
  display: flex;
  flex-direction: row;
  gap: 0.25rem;
}

.recipe_header > h1 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: start;
}

.recipe_label_and_description {
  display: flex;
  flex-direction: column;
}

textarea {
  resize: vertical;
  width: 100%;
}


/** Under 500px ------------------------------------------------------------------------- **/
@media (max-width: 500px) {
  body {
    padding-left: 0;
    padding-right: 0;
  }

  .website_title > h1{
    padding: 0.5rem;
  }

  .website_title > p {
    padding: 0.5rem;
  }

  body > header > nav {
    padding: 0.5rem;
  }

}

/** Under 700px ------------------------------------------------------------------------- **/
@media (max-width: 700px){
  .username_box, .password_box{
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

/** Under 600px ------------------------------------------------------------------------- **/
@media (max-width: 600px) {
  .index_recipes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: start;
  }
}

/** Under 400px ------------------------------------------------------------------------- **/
@media (max-width: 400px){
  .index_recipes {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    align-items: start;
  }
}
