.recipe-app,
.recipe-modal {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.recipe-app *,
.recipe-modal * {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.recipe-app {
  max-width: 32rem;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 2.5rem;
  color: #1c1c1c;
  background: #fff;
}

.recipe-app__intro {
  padding: 0.85rem 1rem 0.75rem;
}

.recipe-app__intro h1 {
  font-size: 1.6rem;
  margin: 0;
}

.recipe-app__title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.recipe-app__title-row h1 {
  flex: 0 1 auto;
  min-width: 0;
}

.recipe-table-view-btn {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
  background-color: #04342c;
  border-color: #04342c;
  color: #fff;
}

.recipe-table-view-btn:hover,
.recipe-table-view-btn:focus,
.recipe-table-view-btn:active {
  background-color: #04342c;
  border-color: #04342c;
  color: #fff;
}

.recipe-app__bar {
  position: sticky;
  top: 3.5rem;
  z-index: 20;
  background: #fff;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ece7e1;
}

.recipe-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.recipe-tag-filter {
  border: 0;
  border-radius: 2rem;
  background: #e9ecef;
  color: #000;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
}

.recipe-tag-filter.is-selected {
  background: #04342c;
  color: #fff;
}

.recipe-field .recipe-tag-filters {
  margin-top: 0.3rem;
}

.recipe-search {
  width: 100%;
  font-size: 16px;
  line-height: 1.3;
  border: 1px solid #d5d0ca;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: #f7f5f2;
}

.recipe-search:focus {
  outline: 2px solid #0d6efd;
  background: #fff;
}

.recipe-add-open,
.recipe-save,
.recipe-add-ingredient {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  border: 0;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

.recipe-add-open {
  margin-top: 0;
}

#recipe-add-open,
#recipe-detail-edit,
#recipe-save {
  background: #04342c;
  color: #fff;
}

#recipe-add-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
}

.recipe-login-message {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
}

.recipe-login-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.recipe-login-actions button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

#recipe-login-btn {
  background: #04342c;
  color: #fff;
}

#recipe-signup-btn {
  background: #fff;
  color: #04342c;
  border: 1px solid #04342c;
}

.recipe-detail__head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.85rem 1rem 0.65rem;
}

.recipe-detail-edit {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.4rem 0.9rem;
}

#recipe-detail-edit[hidden] {
  display: none;
}

.recipe-add-ingredient {
  background: #fff;
  color: #0d6efd;
  border: 1px solid #0d6efd;
  margin-bottom: 0.5rem;
}

.recipe-modal[hidden] {
  display: none;
}

.recipe-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(28, 28, 28, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.recipe-modal__panel {
  width: 100%;
  max-width: 32rem;
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  padding: 1rem 1rem 1.5rem;
}

.recipe-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: -1rem;
  background: #fff;
  padding: 0.25rem 0 0.5rem;
  z-index: 1;
}

.recipe-modal__header h2 {
  font-size: 1.35rem;
  margin: 0;
}

.recipe-modal__close {
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.recipe-field {
  display: block;
  margin: 0.75rem 0;
  font-weight: 600;
}

.recipe-field input,
.recipe-field textarea,
.recipe-field select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  font-size: 16px;
  font-weight: 400;
  border: 1px solid #d5d0ca;
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
}

.recipe-field input[readonly] {
  background: #f7f5f2;
  color: #1c1c1c;
}

.recipe-form-heading {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}

.recipe-ingredient-headers,
.recipe-ingredient-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.5rem;
}

.recipe-ingredient-headers {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.recipe-ingredient-row {
  margin-bottom: 0.45rem;
}

.recipe-ingredient-row input {
  width: 100%;
  font-size: 16px;
  border: 1px solid #d5d0ca;
  border-radius: 0.5rem;
  padding: 0.6rem 0.7rem;
}

.recipe-add-error {
  color: #b42318;
  margin: 0.75rem 0 0;
}

@media (min-width: 768px) {
  .recipe-modal {
    align-items: center;
    padding: 1rem;
  }

  .recipe-modal__panel {
    border-radius: 1rem;
    max-height: 85vh;
  }
}

.recipe-status {
  margin: 1.25rem 1rem;
  color: #5c564f;
}

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 0.75rem;
}

.recipe-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.recipe-card img,
.recipe-detail__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #efeae4;
}

.recipe-card__title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  margin: 0.85rem 0.5rem 0.45rem 1rem;
}

.recipe-card__title-row h2 {
  flex: 1;
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
  cursor: pointer;
}

.recipe-edit {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #1c1c1c;
  padding: 0.15rem;
  line-height: 1;
}

.recipe-edit .material-icons {
  font-size: 1.35rem;
}

.recipe-current-photo {
  display: block;
  width: 100%;
  max-height: 10rem;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-top: 0.4rem;
}

.recipe-photo-note {
  display: block;
  margin-top: 0.35rem;
  font-weight: 400;
  color: #5c564f;
}

.recipe-card p {
  margin: 0 1rem;
  color: #5c564f;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-detail[hidden],
.recipe-browse[hidden] {
  display: none;
}

.recipe-back {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #ece7e1;
  background: #fff;
  font-size: 1rem;
  padding: 0.9rem 1rem;
}

.recipe-detail__photo {
  position: relative;
  z-index: 0;
}

.recipe-detail h2 {
  flex: 1;
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 0;
}

.recipe-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 1rem 0.65rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

#recipe-author[hidden],
.recipe-author[hidden] {
  display: none;
}

.recipe-author__photo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  background: #e9ecef;
  flex-shrink: 0;
}

.recipe-author__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.recipe-author__name {
  font-weight: 700;
  color: #0f1419;
  font-size: 0.95rem;
  line-height: 1.2;
}

.recipe-author__handle {
  line-height: 1.2;
}

.recipe-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 1rem 0.75rem;
}

.recipe-favorite {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6c757d;
  cursor: pointer;
  line-height: 1;
}

.recipe-favorite .material-icons {
  font-size: 1.5rem;
  line-height: 1;
}

.recipe-favorite.is-favorited {
  color: #e63946;
}

.recipe-favorite:disabled {
  opacity: 0.6;
  cursor: wait;
}

.recipe-card__meta .recipe-tags {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0 1rem 0.75rem;
}

.recipe-tags[hidden] {
  display: none;
}

.recipe-tags .contact-my-group-pill {
  border-radius: 2rem;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  line-height: 1.25;
  display: inline-block;
  border: 1px solid transparent;
}

.recipe-tags .contact-my-group-pill--member {
  background: #e9ecef;
  color: #212529;
  border-color: #ced4da;
}

.recipe-created-at {
  margin-left: 0.35rem;
  color: #5c564f;
  font-size: 0.875rem;
  white-space: nowrap;
}

.recipe-notes {
  margin: 0 1rem 0.4rem;
  color: #5c564f;
}

.recipe-detail h3 {
  font-size: 1.05rem;
  margin: 1.25rem 1rem 0.45rem;
}

.recipe-ingredients,
.recipe-steps {
  list-style: none;
  margin: 0;
  padding: 0 1rem;
}

.recipe-ingredients li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #efeae4;
  font-size: 1rem;
}

.recipe-qty {
  flex: 0 0 5.5rem;
  color: #5c564f;
}

.recipe-ingredient-name {
  flex: 1;
}

.recipe-shop {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.recipe-shop-link {
  display: flex;
  align-items: center;
}

.recipe-shop-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: block;
  object-fit: contain;
}

.recipe-shop-icon--amazon {
  width: 3.4rem;
  height: 1.35rem;
}

.recipe-steps > li {
  padding: 0.85rem 0 0.2rem;
  border-bottom: 1px solid #efeae4;
}

.recipe-steps h3 {
  margin: 0 0 0.4rem;
}

.recipe-steps ul {
  margin: 0 0 0.8rem;
  padding-left: 1.1rem;
}

.recipe-steps li li {
  margin: 0.25rem 0;
}

.recipe-table-page {
  max-width: 56rem;
}

.recipe-table-page__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.recipe-table-page__head h1 {
  flex: 0 1 auto;
  font-size: 1.6rem;
  margin: 0;
}

.recipe-table-page__title-link {
  color: inherit;
  text-decoration: none;
}

.recipe-table-page__title-link:hover,
.recipe-table-page__title-link:focus {
  color: inherit;
  text-decoration: underline;
}

.recipe-table-page .recipe-app__bar {
  padding-left: 0;
  padding-right: 0;
}

.recipe-table-owner {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.recipe-table-owner__photo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  background: #e9ecef;
  flex-shrink: 0;
}

.recipe-table-owner__handle {
  font-weight: 600;
}

.recipe-table-name {
  color: inherit;
  font-weight: 600;
}

.recipe-table-favorite-col {
  width: 2.5rem;
  text-align: center;
  vertical-align: middle;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.recipe-table-favorite-col .recipe-favorite {
  margin: 0 auto;
}

.recipe-table .recipe-tags {
  margin: 0;
}
