/* prettier-ignore */
* { margin: 0; padding: 0; box-sizing: border-box; }

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Playwrite US Trad, serif;
  font-size: 125%;
  color: #a8570c;
}

h1 {
  font-size: 180%;
}

html {
  display: flex;
  flex-direction: row;
  justify-content: center;
  font-size: 18px;
}

body {
  font-family: Nunito, serif;
  color: black;
  background-color: #f7f1e8;
  display: flex;
  flex-direction: column;
  width: 700px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  gap: 3rem;
}

strong {
  font-weight: 600;
}

.recipe-img-frame {
  transform: rotate(2deg);
  border: 5px solid white;
  border-radius: 3px;
  width: 100%;
}

ul {
  list-style: none;
}

ul.edit-step-ingredient-list {
  display: flex;
  flex-direction: column;
  list-style: circle;
  padding-left: 1em;
  gap: 0.25rem;
}

output {
  color: red;
}

output ul {
  padding-left: 1rem;
  list-style: circle;
}

input[type="number"][size] {
  width: calc(attr(size type(<number>)) * 1ch + 2rem);
}

ul.edit-step-ingredient-list li input.form-amount {
  width: 3rem;
}

ul.edit-step-ingredient-list li input.form-unit {
  width: 5rem;
}

ul.edit-step-ingredient-list li input.form-name {
  width: 12rem;
}

ol.recipe-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

ol.recipe-details li div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

textarea#step-description {
  vertical-align: top;
}

a {
  color: #8b5e34;
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  color: #a8570c;
  text-decoration: underline;
}

p {
  font-weight: 600;
}

.recipe-details {
  line-height: 1.25;
}

ul.recipe-details {
  padding-left: 1rem;
  text-indent: -1rem;
}

ol.recipe-details {
  padding-left: 1em;
}

input {
  padding: 0.25rem;
}

input.login {
  width: 80%;
  font-size: 125%;
}

input#search-input {
  width: 100%;
  font-size: 125%;
}

input#prep-time,
input#cook-time,
input#total-time,
input#servings {
  width: 3rem;
}

div.recipe-title {
  display: flex;
  gap: 2rem;
  align-items: start;
}

div.recipe-title h1 {
  flex-grow: 1;
}

div.recipe-title input {
  font-family: Playwrite US Trad, serif;
  font-size: 180%;
  color: #a8570c;
  flex-grow: 1;
  font-weight: bold;
}

a.index-buttons {
  color: #f7f1e8;
  background-color: #8b5e34;
  padding: 0.5em 1em;
  border-radius: 1em;
}

a.index-buttons:hover {
  background-color: #a8570c;
  color: #fff9f1;
}

main {
  background-color: #fff9f1;
  border: solid;
  border-radius: 30px 30px 0px 0px;
  border-color: #888;
  border-width: 2px;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 2rem;
}

section#index-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
}

header.top {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

div#header-top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 2px solid #8b5e34;
  align-items: end;
}

.visually-hidden {
  display: none;
}

textarea {
  width: 100%;
  resize: vertical;
}

nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

menu {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  gap: 1rem;
}

.header-search {
  padding: 0.25rem;
}

.recipe-cards {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.recipe-cards > li {
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  background-color: #fff;
  border-radius: 10px;
  border-width: 2px;
  border-color: #888;
  box-shadow: 0px 2px 5px #888;
  width: calc((100% - 2rem) / 3);
  height: max-content;
}

ul.recipe-cards li ul {
  display: flex;
  flex-direction: row;
  gap: 0 0.5rem;
  flex-wrap: wrap;
}

img {
  max-width: 100%;
  max-height: 100%;
}

section#recipe-metadata {
  display: flex;
  flex-direction: row;
  column-gap: 1.5rem;
  flex-wrap: wrap;
}

#recipe-metadata div {
  display: flex;
  column-gap: 0.5rem;
  flex-direction: row;
}

ul.tags {
  display: flex;
  flex-direction: row;
  column-gap: 0.5rem;
  row-gap: 0rem;
  flex-wrap: wrap;
  text-wrap: nowrap;
  overflow: auto;
}

.tags li {
  width: auto;
}

.tag {
  color: #888;
  font-weight: bold;
}

section#recipe-sidebar {
  display: flex;
  flex-direction: column;
  width: 0%;
  flex-grow: 1;
  gap: 0.5rem;
}

section#recipe-description {
  display: flex;
  flex-direction: column;
  width: 0%;
  flex-grow: 2;
  align-items: start;
}

div#recipe-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

div#recipe-info {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

div#recipe-lists {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

section#recipe-ingredients {
  width: 0%;
  flex-grow: 1;
}

section#recipe-steps {
  width: 0%;
  flex-grow: 2;
}

dl {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

div.dl-row {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

dt {
  font-weight: 600;
  flex: 1;
}

dd {
  flex: 3;
}

section#profile-header {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: space-between;
}

section#profile-header div {
  display: flex;
  flex-direction: column;
}

section#profile-header div#profile-metadata {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

section#profile-header img {
  width: 5rem;
  height: 5rem;
}

div#login-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

div.login-label-input {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
}

button#login-button {
  min-width: 200px;
  width: 50%;
  align-self: center;
  font-weight: bold;
  height: 1.5rem;
}

button {
  padding: 0.25rem;
}

header.content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

header#recipe {
  display: flex;
  flex-direction: column;
}

@media (max-width: 500px) {
  div#recipe-lists {
    flex-direction: column;
  }

  section#recipe-ingredients {
    width: 100%;
  }

  section#recipe-steps {
    width: 100%;
  }

  div#recipe-info {
    flex-direction: column;
  }

  section#recipe-sidebar {
    width: 100%;
  }

  section#recipe-description {
    width: 100%;
  }

  body {
    padding: 0px;
  }

  main {
    border-left-width: 0px;
    border-right-width: 0px;
  }

  div#header-top {
    padding: 0.5rem;
  }

  nav {
    padding: 0.5rem;
  }
}

@media (max-width: 700px) {
  div.login-label-input {
    flex-direction: column;
    align-items: baseline;
  }

  input.login {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .recipe-cards > li {
    width: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 400px) {
  .recipe-cards > li {
    width: 100%;
  }
}
