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

html {
  max-width: 700px;
  background-color: #F7F1E8; 
  padding-left: .5rem;
  padding-right: .5rem;
}

@media (max-width: 400px) {

  html {
    padding-left: 0rem;
    padding-right: 0rem;
  }
}

main section {
  
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;

  font-size: 18px;
}

section a {
  display: flex;
  flex-direction: column;
  align-self: center;
}

section h1, h2, p {
  align-self: start;
}

.body_button {
  display: flex;
  align-self: center;
}

section p {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}
  
/* Header related formatting */
header {
  display: flex;
  flex-direction: column;
  width: 100%;

  padding: .25rem .25rem 3rem .25rem;
  justify-content: space-between;
  align-items: flex-end;

  background-color: #F7F1E8;
}

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

header form {
  padding-top: .25rem;
}

header input, button {
  padding: .25rem;
}

header p, a {
  display: flex;
  align-self: flex-end;
  gap: .5rem;
}

header ul {
  display: flex;
  align-items: flex-start;
  gap: 1rem; 
}

header h2 {
  display: flex;
  padding: 0.25rem .25rem;

  margin-top: 0rem;
}

header div, nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 0.25rem;
}

header form {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
}

@media (max-width: 400px) {
  
  header {
    padding: 0.5rem;
  }
}
/* Header related formatting */

h1 {
  font-family: "Playwrite US Trad", cursive;
  font-size: 32px;
  color: #A8570C;
}

h2 {
  font-family: "Playwrite US Trad", cursive;
  font-size: 23px;
  color: #A8570C;

  margin-top: 3rem;
}

h3 {
  font-family: "Playwrite US Trad", cursive;
  font-size: 18px;
  color: #A8570C;

  line-height: 2;
}

a {
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  color: #8B5E34;
  line-height: 1.25;
  text-decoration: none;
}

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

ul, body, p {
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  color: #191d24;
  line-height: 1.25;
}

/* Disables the bullet points! */
ul {
  list-style: none;
}

.tags li a span::before {
  content: "#";
  color: #888;
  display: inline;
}

.tags2 li a span::before {
  content: "#";
  color: #888;
  display: inline;
}

.tilted_image {
  border-radius: 3px;
  border: 5px solid white;
  transform: rotate(2deg)
}

.horizontal-line {
  border-bottom: 2px solid #8B5E34;
  margin: 0.25rem 0;
  padding: 0;
}

.btn {
  padding: .5em 1em;
  color: #FFF9F1;
  background-color: #8B5E34;
  border-radius: 16px;

  margin-bottom: 10px;
}

.btn:hover {
  color: #F7F1E8;
  background-color: #A8570C;
}

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

  max-width: 100%;
  padding: 0 1rem;
  justify-content: flex-start;
  align-items: start;
}

.card {
  display: flex;
  flex-direction: column;

  flex: 0 1 calc((100% - 2rem)/3);
  min-width: 0;
  height: fit-content;

  background-color: white;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

@media (max-width: 400px) {

  .card {
    flex: 0 1 calc((100% - 2rem)/1);
  }
}

@media (max-width: 600px) {

  .card {
    flex: 0 1 calc((100% - 2rem)/2);
  }
}

.card img {
  max-width: 100%;
  max-height: 100%;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;

  background-color: white;
  border-radius: 8px;
  text-wrap: nowrap;

  list-style: none;
}

dt {
  font-weight: 600;
}

/*All classes relating to the recipe page*/
.recipe_page {
  border: 1px solid black;
  padding: 1rem;
  border-radius: 12px;
  background-color: #FFF9F1;
  list-style: none;
}

.recipe_page_intro {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
}

.recipe_page_intro div span {
  padding-left: 1.5rem;
}

.recipe_page_intro div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.recipe_page_intro ul {
  display: flex;
  flex-direction: row;
  gap: .5rem;
}

.recipe_page_body {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding-bottom: 1rem;
}

.recipe_page_body div {
  display: flex;
  flex-direction: row;
  justify-content: start;
  gap: 1.5rem;
}

.recipe_page_body img {
  width: 150%;
  height: 100%;
  flex-grow: 0;
  padding-bottom: .5rem;
}

.recipe_page_body span {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: .5rem;
  padding-bottom: .25rem;
}

.recipe_page_bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: start;
  gap: 2.5rem;
}

.recipe_page_bottom h3 {
  font-size: 23px;
}

.recipe_page_bottom .recipe_ul {
  padding-left: 1rem;
  text-indent: -1rem;
}

.recipe_page_bottom ol {
  padding-left: 1rem;
}

.recipe_page_body .recipe_page_firstdiv
.recipe_page_bottom .recipe_page_firstdiv {
  flex: 1 1 33%;
}

.recipe_page_body .recipe_page_seconddiv,
.recipe_page_bottom .recipe_page_seconddiv {
  flex: 2 1 67%;
}

/*All classes relating to the recipe page*/

/*All classes relating to the search page*/
.search_page_header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-bottom: 3rem;
  width: 100%;
}

.search_page_header form {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.search_page_header input {
  flex: 1;
  padding: .25rem;
}
/*All classes relating to the search page*/

/*All classes relating to the login page*/
.login_page {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  font-size: 125%;
  border: 1px solid black;
  padding: 15px;
  border-radius: 8px;
  background-color: #FFF9F1;
  list-style: none;
}

.login_page div {
  display: flex;
  flex-direction: column;

  padding-bottom: 2rem;
}

.login_page form div {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 1rem;
}

.login_page input {
  padding: 0.25rem;
  width: 80%;
}

.login_page form button {
  display: flex;
  justify-content: center;
  width: 50%;
  min-width: 200px;
}

@media (max-width: 700px) {
  .login_page form div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .login_page .login_page_spacing {
    padding-top: 1rem;
  }
}
/*All classes relating to the login page*/

/*All classes relating to the profile page*/
.profile_intro {
  display: flex;
  flex-direction: column;
  justify-content: start;

  gap: 2rem;
  padding-bottom: 3rem;
}

.profile_intro div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.profile_intro div span {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile_text {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
}

.profile_intro img {
  width: 5rem;
  height: 5rem;
}
/*All classes relating to the profile page*/

/*All classes relating to the edit page*/

.recipe_flex_row {
  display: flex;
  flex-direction: row;
}

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

.recipe_flex_row button {
  height: 25%;
}

.recipe_page_intro input {
  font-family: "Playwrite US Trad", cursive;
  font-size: 32px;
  color: #A8570C;
}

.edit_step_list {
  vertical-align: top;
  gap: 1rem;
}

input[type=number][size] { width: calc(attr(size number) * 1ch + 2rem); }

.edit_ul {
  list-style: circle;
  text-indent: 0.5rem;
  padding-bottom: 1rem;
}

.edit_ul li {
  padding-bottom: 0.25rem;
}

textarea {
  resize: vertical;
}

.recipe_page_errors {
  margin-top: 2rem;
  margin-bottom: 2rem;
  background-color: #F7F1E8;
  color: red;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
}

/*All classes relating to the edit page*/

.visually-hidden {
  display: none;
}