/* Tee-Luxe Finder result reveal — selected taste tiles across the full page */

#tlf-res.tlf-result-rain-host {
  position: relative;
  isolation: isolate;
}

body > .tlf-result-rain {
  position: absolute;
  top: var(--tlf-result-rain-top, 0);
  left: 0;
  z-index: 999999;
  width: 100%;
  height: var(--tlf-result-rain-height, 680px);
  overflow: hidden;
  contain: layout paint style;
  pointer-events: none;
  perspective: 1050px;
}

#tlf-res.tlf-result-rain-host > .tlf-rh {
  position: relative;
  z-index: auto;
}

#tlf-res.tlf-result-rain-host > #tlf-pl,
#tlf-res.tlf-result-rain-host > .tlf-rst {
  position: relative;
  z-index: 2;
}

#tlf-res.tlf-result-rain-host .tlf-profile-mobile-title,
#tlf-res.tlf-result-rain-host .tlf-choice__mobile-heading,
#tlf-res.tlf-result-rain-host .tlf-choice-strip__top,
#tlf-res.tlf-result-rain-host .tlf-choice-strip__chips,
#tlf-res.tlf-result-rain-host .tlf-profile-panel__section > * {
  position: relative;
  z-index: 2;
}

.tlf-result-rain__piece {
  position: absolute;
  top: calc((var(--tlf-result-size) + 28px) * -1);
  left: var(--tlf-result-x);
  width: var(--tlf-result-size);
  opacity: var(--tlf-result-opacity);
  filter: drop-shadow(0 13px 19px rgba(25, 21, 16, 0.25));
  transform: translateX(-50%);
  animation:
    tlf-result-rain-fall
    var(--tlf-result-duration)
    cubic-bezier(0.28, 0.12, 0.34, 0.98)
    var(--tlf-result-delay)
    1
    both;
  will-change: transform;
}

.tlf-result-rain__sway {
  display: block;
  animation:
    tlf-result-rain-sway
    var(--tlf-result-sway-duration)
    cubic-bezier(0.37, 0, 0.63, 1)
    var(--tlf-result-delay)
    2
    alternate
    both;
  will-change: transform;
}

.tlf-result-rain__card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.62;
  transform-style: preserve-3d;
  animation:
    tlf-result-rain-spin
    var(--tlf-result-duration)
    cubic-bezier(0.37, 0, 0.63, 1)
    var(--tlf-result-delay)
    1
    both;
  will-change: transform;
}

.tlf-result-rain__face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: clamp(8px, 1vw, 13px);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.76), transparent 56%),
    var(--tlf-result-bg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tlf-result-rain__face--back {
  transform: rotateY(180deg);
}

.tlf-result-rain__meta {
  position: absolute;
  top: 12%;
  left: 8%;
  z-index: 2;
  display: block;
  max-width: 65%;
}

.tlf-result-rain__kind {
  display: block;
  margin-bottom: 4%;
  color: rgba(33, 31, 28, 0.52);
  font-family: "Open Sans", sans-serif;
  font-size: clamp(5px, calc(var(--tlf-result-size) * 0.055), 7px);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
}

.tlf-result-rain__name {
  display: block;
  color: #282521;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(8px, calc(var(--tlf-result-size) * 0.105), 14px);
  font-weight: 500;
  line-height: 1.04;
}

.tlf-result-rain__art {
  position: absolute;
  right: -2%;
  bottom: -5%;
  display: block;
  width: 56%;
  height: auto;
  max-width: none;
  border: 0;
  box-shadow: none;
}

.tlf-choice--result-arrival .tlf-choice-strip__chip {
  animation:
    tlf-result-choice-settle
    0.48s
    cubic-bezier(0.22, 0.72, 0.3, 1)
    4.05s
    1
    both;
}

.tlf-choice--result-arrival .tlf-choice-strip__chip:nth-child(2n) {
  animation-delay: 4.22s;
}

.tlf-choice--result-arrival .tlf-choice-strip__chip:nth-child(3n) {
  animation-delay: 4.39s;
}

@keyframes tlf-result-rain-fall {
  from {
    transform: translate3d(-50%, 0, 0);
  }

  to {
    transform: translate3d(
      calc(-50% + var(--tlf-result-drift)),
      calc(var(--tlf-result-rain-height) + var(--tlf-result-size) + 72px),
      0
    );
  }
}

@keyframes tlf-result-rain-sway {
  from {
    transform: translateX(calc(var(--tlf-result-sway) * -0.42));
  }

  to {
    transform: translateX(var(--tlf-result-sway));
  }
}

@keyframes tlf-result-rain-spin {
  from {
    transform: rotateX(0turn) rotateY(0turn) rotateZ(-0.025turn);
  }

  to {
    transform:
      rotateX(var(--tlf-result-rotate-x))
      rotateY(var(--tlf-result-rotate-y))
      rotateZ(var(--tlf-result-rotate-z));
  }
}

@keyframes tlf-result-choice-settle {
  from {
    opacity: 0.42;
    transform: translateY(-12px) rotate(-0.5deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@media (max-width: 820px) {
  .tlf-result-rain__kind {
    font-size: 5px;
  }

  .tlf-result-rain__name {
    font-size: clamp(8px, calc(var(--tlf-result-size) * 0.105), 10px);
  }
}

@media (max-width: 560px) {
  .tlf-choice--result-arrival.is-open .tlf-choice-strip__chip {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body > .tlf-result-rain {
    display: none;
  }

  .tlf-choice--result-arrival .tlf-choice-strip__chip {
    animation: none !important;
  }

}
