* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Nunito;
}

html {
  font-size: 18px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Playwrite US Trad;
  font-size: 125%;
  color: #a8570c;
}

h2 {
  font-size: 180%;
}

body {
  font-size: 18px;
  color: #2e261c;
  background-color: #f7f1e8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.5rem;
}

/* header styling*/
.header {
  width: 100%;
  max-width: 700px;
  margin-bottom: 3rem;
}

.header-top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: end;
  border-bottom: solid;
  border-color: #8b5e34;
}

.header nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.header ul {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.header input,
button {
  padding: 0.25rem;
}

.header p {
  align-items: end;
}

a {
  color: #8b5e34;
  text-decoration: none;
}

a:hover {
  color: #a8570c;
  text-decoration: underline;
}

.dishbook {
  font-family: Playwrite US Trad;
  font-size: 125%;
}

#signIn {
  border-bottom: solid;
  border-color: #8b5e34;
  color: #8b5e34;
}

ul {
  list-style-type: none;
}

/*end of header styling*/

main {
  width: 100%;
  max-width: 700px;
  background-color: #fff9f1;
  border: 1px solid #2e261c;
  border-radius: 20px 20px 0 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* INdex stying */

#indexButtonContainer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.indexButtons {
  color: #f7f1e8;
  background: #8b5e34;
  border-radius: 20px;
  padding: 0.5em 1em;
}

#FeaturedRecipePrev {
  padding-bottom: 0px;
}

/*Recipe cards styling */

.recipeGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
  align-items: start;
  justify-content: center;
}

.recipe {
  padding: 0.5rem;
  flex-direction: column;
  min-width: 200px;
  border-radius: 20px;
  box-shadow: 0px 2px 5px #888;
  margin-left: 0;
  margin-bottom: 0px;
  background-color: #fff;
}

.recipe img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.recipe h3 a {
  margin: 0.5rem 0;
  font-family: Playwrite US Trad;
}

.recipe .tags {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.5rem;
  row-gap: 0;
  font-weight: 600;
}

.recipe .tags a {
  white-space: nowrap;
  text-decoration: none;
  color: #8b5e34;
  padding: 2px 6px;
  border-radius: 4px;
}

.recipe ul li {
  display: inline;
}

/*resizing for grid */
@media (max-width: 600px) {
  .recipeGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .recipeGrid {
    grid-template-columns: 1fr;
  }
}

/* end of resizing grid */

/*end of recipe grid */
/*end of index.html */

/* search.html */

.searchRecipeBox input {
  width: 100%;
  padding: 0.25rem;
  margin-bottom: 2rem;
}

/* end of search.html */

/* profile.html*/

.profileInfo {
  display: flex;
  justify-content: space-between;
  margin: 0px;
}

.profileInfo img {
  height: 5rem;
  width: 5rem;
}

.profileDetails {
  display: flex;
  gap: 3rem;
}

.profileText {
  justify-content: space-evenly;
}

/* end of profile.html*/

/* login.html*/
#loginForm,
#loginForm input,
#loginForm button,
#loginForm label {
  font-size: 125%;
}

#loginForm {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.formRow {
  display: flex;
  gap: 1rem;
}

.formRow input {
  width: 80%;
  padding: 0.25rem;
  text-align: right;
}

#loginButton {
  display: flex;
  justify-content: center;
}

#loginButton button {
  width: 50%;
  min-width: 200px;
}

#loginForm .formRow .showPass {
  display: flex;
  flex-direction: row;
  font-size: 65%;
  align-content: center;
  gap: 1rem;
}

#loginForm .formRow .showPass input[type="checkbox"] {
  width: 3rem;
  height: 3rem;
  display:flex;
  justify-content: center;
}

/*Resizing*/

@media (max-width: 700px) {
  .formRow {
    display: block;
    gap: 0;
  }

  .formRow input {
    width: 100%;
    margin-top: 0;
    text-align: left;
  }

  .formRow + .formRow {
    margin-top: 1rem;
  }
}

/* end of login.html*/

/* recipe.html */

.sidebar {
  max-width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

#rotatedPhoto {
  transform: rotate(2deg);
  border: 5px solid white;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

#recipeTags {
  font-weight: 600;
}

#recipePreview {
  gap: 1.5rem;
  display: block;
}

#recipePreview h2 input {
  font-family: Playwrite US Trad;
  font-size: 125%;
  color: #a8570c;
}

#recipePreview h2 {
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: space-between;
}

.recipeArticle textarea {
  min-width: 100%;
  resize: vertical;
}

#recipePreviewText {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

#recipePreviewTextTags ul {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#recipeSection {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#recipeOverview {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

#rotatedPhoto {
  max-width: 100%;
  display: block;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
}

#recipeOverview p {
  flex: 1;
  margin: 0;
}

.photoUpload {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

#recipeTimes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

#recipeTimes dt {
  flex: 0 0 calc(25% - 0.5rem);
  font-weight: 600;
}

#recipeTimes dd {
  flex: 0 0 calc(75% - 0.5rem);
  margin: 0;
}

.recipeContainer {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex;
}

.recipeInfo ol {
  line-height: 1.25;
  flex: 1;
}

.recipeInfo ol li ul li {
  padding-top: 0.25rem;
  padding-left: 1rem;
  list-style-type: circle;
}

.recipeInfo ul {
  padding-left: 1rem;
}

.recipeInfo ul li {
  text-indent: -1rem;
}

.recipeInfo ol li textarea {
  padding-left: 1em;
  vertical-align: top;
}

.recipeInfo h4,
.recipeInfo h5 {
  margin-bottom: 0.5rem;
}

.recipeContainer > .recipeInfo:first-child {
  flex: 1 0 200px;
}

.recipeContainer > .recipeInfo:last-child {
  flex: 2 0 355px;
}

@media (max-width: 500px) {
  #upperRecipeSection,
  .recipeContainer {
    display: block;
  }

  #recipePreview {
    margin-bottom: 2rem;
  }

  #recipeOverview {
    margin-bottom: 2rem;
  }

  .recipeContainer > .recipeInfo:first-child {
    margin-bottom: 2rem;
  }

  body {
    padding-left: 0;
    padding-right: 0;
  }

  main {
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .header-top {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* end of recipe.html*/

/* recipe edit styling*/
textarea {
  width: 100%;
  resize: vertical;
  vertical-align: top;
}

.recipeInfo ol li ul {
  padding-left: 1.5rem;
  margin-top: 0.25rem;
}

.recipeInfo ol li {
  margin-bottom: 1rem;
}

/* end of edit*/

.visually-hidden {
  display: none;
}

header p {
  margin-top: 0px;
  margin-bottom: 0px;
}

input[type="number"][size="10"] {
  width: calc(10ch + 2rem);
}

input[type="number"][size] {
  width: calc(attr(size number) * 1ch + 2rem);
}

output.error-list {
  color: red;
  font-weight: bold;
  margin-bottom: 1em;
}

/* colors used throughout the webpage.
{ 
    color: #A8570C;
    color: #F7F1E8;
    color: #2E261C;
    color: #FFF9F1;
    color: #888;
    color: #8B5E34;
    color: #FFF;
}
 */
