/*
 * Recipes page: banner photos and recipe popup
 * Loaded only on this page.
 */

/* recipe photo collage in the banner */
.recipes-page-photos {
  position: relative;
  height: clamp(280px,27vw,390px);
}

.recipes-page-photos img {
  position: absolute;
  object-fit: cover;
  border-radius: 26px;
  border: 6px solid #fff;
  box-shadow: 0 22px 40px rgba(74,44,17,.2);
  opacity: 0;
  animation: wheelPouchIn .9s cubic-bezier(.2,.72,.25,1) forwards;
}

.recipes-page-photos img:nth-child(1) {
  left: 4%;
  top: 14%;
  width: 44%;
  aspect-ratio: 4/5;
  rotate: -6deg;
  z-index: 1;
  animation-delay: .35s;
}

.recipes-page-photos img:nth-child(2) {
  left: 30%;
  top: 0;
  width: 44%;
  aspect-ratio: 4/5;
  z-index: 3;
  animation-delay: .5s;
}

.recipes-page-photos img:nth-child(3) {
  left: 56%;
  top: 16%;
  width: 40%;
  aspect-ratio: 4/5;
  rotate: 7deg;
  z-index: 2;
  animation-delay: .65s;
}

/* recipe popup: smooth open / close */
#recipe-modal.flex {
  animation: wheelModalFadeIn .32s ease-out both;
}

#recipe-modal.flex > div {
  animation: wheelModalPanelIn .5s cubic-bezier(.2,.75,.25,1) both;
}

#recipe-modal.is-closing {
  animation: wheelModalFadeOut .26s ease-in both;
}

#recipe-modal.is-closing > div {
  animation: wheelModalPanelOut .26s ease-in both;
}

#recipe-modal.flex #recipe-modal-content > * {
  animation: wheelHeroWordIn .55s cubic-bezier(.2,.72,.25,1) both;
}

#recipe-modal.flex #recipe-modal-content > *:nth-child(2) {
  animation-delay: .14s;
}

#recipe-modal.is-closing #recipe-modal-content > * {
  animation: none;
}

/* recipe filter tabs layout */
#recipe-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width:900px) {
  .recipes-page-photos {
    height: 240px;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recipes-page-photos img,
#recipe-modal,
#recipe-modal > div,
#recipe-modal-content > * {
    animation: none !important;
    opacity: 1 !important;
  }
}
