* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

.page-container {
  max-width: 700px;
  width: 100%;
  height: 100%;
  padding: 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

html, 
body {
  caret-color: transparent;
  user-select: none;
  display: flex;
  justify-content: center;
  height: 100%;
}

html {
  font-size: 18px;
}

body {
  font-family: "Nunito";
  font-size: 18px;
  background-color: #F7F1E8;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Playwrite US Trad";
  color: #A8570C;
}

h2, h3, h4, h5, h6 {
  font-size: 1.25em;
}

h1 {
  font-size: 1.8em;
}

a {
  text-decoration: none;
  color: #8B5E34;
}

a:hover {
  text-decoration: underline;
  color: #A8570C;
}

input {
  caret-color: auto;
  user-select: text;
}

img:not(.profile-picture) {
  width: 100%;
  height: auto;
}

.visually-hidden {
  display: none;
}

.header-link {
  color: #A8570C;
}

.header-link:hover {
  color: #8B5E34;
}



/* Header */
.header-outer-container {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.header-inner-container {
  display: flex;
  gap: 10px;
  align-items: end;
}

hr {
  border: none;
  background-color: #8B5E34;
  height: 2px;
}



/* Nav */
.nav-outer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-inner-left-container {
  display: flex;
  justify-content: left;
  gap: 1rem;
}

.nav-inner-right-container {
  display: flex;
  justify-content: right;
  gap: 5px;
  height: 30px;
  padding-top: .25rem;
}

.nav-search-button {
  width: 70px;
  font-weight: bold;
}



/* Main */
main {
  background-color: #FFF9F1;
  border-top: 1px solid #888;
  border-left: 1px solid #888;
  border-right: 1px solid #888;
  border-radius: 30px 30px 0 0;
}



/* Index Page */
.index-main-outer-container {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 2rem;
}

.index-welcome-container {
  display: flex;
  flex-direction: column;
}

.p-button {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.index-buttons-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.index-buttons {
  border: 1px solid black;
  background-color: #8B5E34;
  color: #FFF9F1;
  border-radius: 99px;
  display: flex;
  width: 150px;
  height: 50px;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
}

.index-buttons:hover {
  background-color: #F7F1E8;
  color: #8B5E34;
}

.index-featured-container {
  display: flex;
  flex-direction: column;
}

.index-featured-container span {
  padding-bottom: 1rem;
}



/* Login Page */
.login-main-outer-container {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 2rem;
}

.login-inner-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.login-details-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: baseline;
}

.login-button-container {
  display: flex;
  justify-content: center;
}

#login-btn {
  font-size: 18px;
  width: 50%;
  height: 40px;
  font-weight: bold;
}

#login-form {
  font-size: 1.25em;
}

#username,
#password {
  height: 30px;
  width: 80%;
  justify-content: end;
  padding: 0.25rem;
}

#username:focus,
#password:focus {
  background-color: #e1effd;
}



/* Profile Page */
.profile-main-outer-container {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 2rem;
}

.profile-details-container {
  display: flex;
  justify-content: space-between;
  height: 100px;
  gap: 1rem;
}

.profile-details-left-container {
  display: flex;
  flex-direction: column;
}

.profile-details-container img {
  max-width: 5rem;
  max-height: 5rem;
}

.profile-overview-container {
  display: flex;
}



/* Search Page */
.search-main-outer-container {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 2rem;
}

.search-top-container {
  display: flex;
  flex-direction: column;
}

.search-form {
  display: flex;
}

.search-input {
  width: 100%;
  height: 30px;
  font-weight: bold;
  font-size: 20px;
  padding: .25rem;
}



/* Recipe Page */
.recipe-main-outer-container {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 2rem;
}

.recipe-row-2-container {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
}

.recipe-row-2-container span {
  display: flex;
  flex-direction: row;
}

.recipe-row-3-container {
  display: flex;
  flex-direction: row;
  gap: .5rem;
}

.recipe-overview-container {
  display: flex;
  align-items: center;
  gap: 20px;
  align-items: start;
  padding-bottom: .5rem;
}

.recipe-overview-container img {
  height: auto;
  max-width: 30%;
}

.recipe-bottom-container {
  display: flex;
  gap: 1rem;
}

.recipe-ingredients-container {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

.recipe-ingredients-container ul li {
  padding-left: 1rem;
  text-indent: -1rem;
}

.recipe-steps-container {
  display: flex;
  flex-direction: column;
}

.left {
  flex: 1;
}

.right {
  flex: 2;
}

ol {
  padding-left: 1em;
}

#ingredients,
#steps,
#description {
  line-height: 1.25;
}

#chicken-adobo-img {
  transform: rotate(2deg);
  border: 5px solid white;
  border-radius: 3px;
}

dt {
  font-weight: bold;
}

.row-container {
  gap: .25rem;
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  gap: .5rem;
}



/* Edit Page */
.title-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
}

.edit-save-button {
  width: 50px;
  height: 30px;
}

input[name="title"] {
  font-family: "Playwrite US Trad", serif;
  font-size: 1em;
  color: #A8570C;
  font-weight: bold;
  width: 85%;
}

.description-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

textarea {
  resize: vertical;
  width: 100%;
}

#prep_time_minutes,
#cook_time_minutes,
#total_time_minutes,
#serves {
  width: 50px;
}

.ingredient-amount {
  width: 15%;
}

.ingredient-unit {
  width: 22%;
}

.ingredient-name {
  width: 58%;
}

.step-ingredient-list li {
  display: list-item;
  margin-left: 20px;
  padding-top: 0.25rem;
}

.step-ingredient-list input {
  height: 30px;
  padding-left: 5px;
}

.step-ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ingredient-row {
  display: flex;
  gap: 5px;
}

.step-list {
  padding-bottom: 1rem;
}

.error-list {
  color: red;
}



/* Section Cards */
.section-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-cards {
  background-color: #FFF;
  border: 1px solid #888;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  height: fit-content;
  flex: 0 1 calc((100% - 2rem) / 3);
}

.card-details {
  display: flex;
  flex-direction: column;
  padding: .5rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  text-wrap: nowrap;;
  gap: 0.5rem;
}

.card-details img {
  display: block;
  width: 100%;
  height: auto;
}



/* Media */
@media (max-width: 500px) {

  .page-container {
    padding: 0;
  }

  main {
    border-left: none;
    border-right: none;
  }

  .header-outer-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .nav-inner-left-container {
    padding-left: 0.5rem;
  }

  .nav-inner-right-container {
    padding-right: 0.5rem;
  }

}

@media (max-width: 400px) {

  #login-btn {
    min-width: 200px;
  }

}

@media (max-width: 700px) {

  .login-inner-container {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .login-details-container {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 0;
  }

  .login-button-container {
    padding-top: 2rem;
  }

  #firstline {
    padding-bottom: 1rem;
  }

}

@media (max-width: 400px) {

  .section-cards {
    background-color: #FFF;
    border: 1px solid #888;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: fit-content;
    flex: 0 1 100%;
  }

}

@media (max-width: 600px) {

  .section-cards {
    background-color: #FFF;
    border: 1px solid #888;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: fit-content;
    flex: 0 1 calc((100% - 2rem) / 2);
  }

}