@use "base/reset";
@use "base/_animations";

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

body,
html {
  font-family: Verdana, sans-serif;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

turbo-frame {
  display: block;
  width: 100%;
  min-width: 100%;
}

.slider-container {
  gap: 1rem;
}

.slider-amounts {
  display: flex;
  justify-content: space-between;
  justify-content: flex-end;

  div:nth-child(2) {
    margin: 0 0.5rem;
  }
}

.slider-item {
  padding: 1rem 0;
}

h4 + .slider-item {
  border-top: none;
}

.selected-recipes[open] .selected-recipes-chevron {
  transform: rotate(180deg);
}

#shopping-list label, #shopping-list label div input[type="checkbox"] {
  cursor: pointer;
}

#shopping-list label:hover {
  background-color: #eee;
}

#shopping-list .shopping-list-item {
  z-index: 0;
  transition: background-color 180ms ease, opacity 180ms ease;
}

#shopping-list .shopping-list-item-frame {
  margin-bottom: 1rem;
  max-height: 8rem;
  overflow: visible;
}

#shopping-list .shopping-list-category {
  max-height: 100vh;
  overflow: visible;
}

#shopping-list .shopping-list-category.is-hidden-completed,
#shopping-list .shopping-list-item-frame.is-hidden-completed {
  margin-bottom: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#shopping-list .shopping-list-category:not(.is-hidden-completed):not(:has(input[type="checkbox"]:not(:checked))) {
  animation: checked-shopping-list-category-collapse 2s ease 500ms forwards;
  overflow: hidden;
}

#shopping-list .shopping-list-category.is-hidden-completed,
#shopping-list .shopping-list-item-frame.is-hidden-completed,
#shopping-list .shopping-list-item-frame.is-hidden-completed:has(input[type="checkbox"]:checked) {
  animation: none;
}

#shopping-list .shopping-list-item-frame:not(.is-hidden-completed):has(input[type="checkbox"]:checked) {
  animation: checked-shopping-list-item-collapse 2s ease 500ms forwards;
  overflow: hidden;
}

#shopping-list:has(#shopping-list-show-completed:checked) .shopping-list-items .shopping-list-category,
#shopping-list:has(#shopping-list-show-completed:checked) .shopping-list-items .shopping-list-item-frame {
  animation: none;
  margin-bottom: 1rem;
  max-height: 100vh;
  opacity: 1;
  overflow: visible;
}

#shopping-list:has(#shopping-list-show-completed:checked) .shopping-list-items .shopping-list-item-frame {
  max-height: 8rem;
}

#shopping-list .shopping-list-item:has(.inventory-edit[open]) {
  z-index: 30;
}

#shopping-list .shopping-list-item .inventory-edit {
  max-width: 3rem;
  opacity: 1;
  overflow: visible;
  transform: translateX(0);
  transition: max-width 180ms ease, opacity 140ms ease, transform 180ms ease, border-color 180ms ease;
}

#shopping-list .shopping-list-item:has(input[type="checkbox"]:checked) {
  background-color: #bbf7d0;
  text-decoration: line-through;
  opacity: 0.7;
}

#shopping-list .shopping-list-item:has(input[type="checkbox"]:checked) label:hover {
  background-color: transparent;
}

#shopping-list .shopping-list-item:has(input[type="checkbox"]:checked) .inventory-edit {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0.5rem);
  border-color: transparent;
}

@keyframes checked-shopping-list-item-collapse {
  from {
    margin-bottom: 1rem;
    max-height: 8rem;
    opacity: 1;
  }

  to {
    margin-bottom: 0;
    max-height: 0;
    opacity: 0;
  }
}

@keyframes checked-shopping-list-category-collapse {
  from {
    max-height: 100vh;
    opacity: 1;
  }

  to {
    max-height: 0;
    opacity: 0;
  }
}

h1{
  font-size:2.25rem;
  line-height:2.5rem
}

h2{
  font-size:1.875rem;
  line-height:2.25rem
}

h3{
  font-size:1.5rem;
  line-height:2rem
}

h4{
  font-size:1.25rem;
  line-height:1.75rem
}

h5{
  font-size:1.125rem;
  line-height:1.75rem
}

.pb-3\/4 {
  padding-bottom: 75%;
}

.menu-auswahl-grid-container label:has(input:checked) {
  border: 5px solid lightgreen;
}

.menu-auswahl-grid-container label:has(input:not(:checked)) {
  border: 5px solid white;
  box-shadow: 0 0 5px 1px rgb(225, 225, 225);
}

.site-navbar__row {
  min-height: 4rem;
  align-items: center;
  gap: 1rem;
}

.site-navbar__button,
.site-navbar__link {
  white-space: nowrap;
}

.recipe-mockup-table {
  min-width: 34rem;
}

.auth-layout {
  padding-bottom: 3rem;
}

.public-feedback-image {
  height: 24rem;
}

.public-hero-content {
  padding-top: 4rem;
}

.public-hero-kicker {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

@media (min-width: 640px) {
  .public-spaced-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

@media (max-width: 639px) {
  .public-layout h1,
  .auth-layout h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .public-layout h2,
  .auth-layout h2 {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .public-layout h3,
  .auth-layout h3 {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .site-navbar__inner {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .site-navbar__row {
    flex-wrap: wrap;
    min-height: auto;
  }

  .site-navbar__brand {
    flex: 1 1 auto;
    gap: 0.75rem;
    min-width: 0;
  }

  .site-navbar__middle {
    order: 3;
    flex: 1 0 100%;
    gap: 1rem;
    overflow-x: auto;
    padding-top: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .site-navbar__actions {
    gap: 0.5rem;
  }

  .site-navbar__button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .flash-stack {
    left: 1rem;
    right: 1rem;
    width: auto;
    transform: none;
  }

  .auth-layout .bg-white.shadow {
    border-radius: 0.5rem;
  }

  .auth-layout {
    padding-bottom: 3rem;
  }

  .public-layout section,
  .public-layout > div {
    overflow-x: clip;
  }

  .btn-primary,
  .btn-secondary,
  .btn-primary-inverted {
    display: flex;
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .public-feedback-image {
    height: 18rem;
  }

  .public-hero-content {
    padding-top: 3rem;
  }

  .public-hero-kicker {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}
