@keyframes timeoutActiveBtn {
  0% {
    transform: translateX(-100%);
    width: 100%;
  }

  50% {
    transform: translateX(0%);
    width: 200%;
  }

  100% {
    transform: translateX(100%);
    width: 100%;
  }
}

#preview {
  background-color: white;
  min-height: 300px;
  width: 100%;
  border-top: 1px solid black;
}

/* Carusel */

.carusel-wrapper {
  position: relative;
  margin: 0 auto;
  padding: 0;
  width: 100%;
}

.carusel-wrapper > .carusel {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  width: 100%;
  display: flex;
  overflow-y: hidden;
  overflow-x: scroll;
  height: 80vh;
}

.carusel-wrapper > .carusel-mask {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.6),
    transparent,
    transparent,
    transparent
  );
  pointer-events: none;
}

.carusel-wrapper > .carusel > .carusel-slide-container {
  position: relative;
  flex: 1 0 100%;
  scroll-snap-align: start;
  width: 100%;
}

.carusel-wrapper > .carusel > .carusel-slide-container > img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.carusel-slide-txt {
  position: absolute;
  right: 10%;
  bottom: 10%;
  z-index: 3;
  overflow-y: hidden;
  pointer-events: none;
  width: 80%;
  color: white;
}

.carusel-slide-txt.desktop {
  display: none;
}

.carusel-wrapper > .carusel-btns {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.carusel-wrapper > .carusel-btns > .carusel-btn {
  background-color: lightgray;
  width: 2rem;
  height: 0.6rem;
  border-radius: 24px;
  border: none;
  margin-right: 0.3rem;
  overflow: hidden;
  padding: 0;
}

.carusel-btn > .carusel-bnt-fill {
  background-color: white;
  z-index: 99999;
  transform: translateX(-100%);
  height: 100%;
  width: 100%;
  border-radius: 24px;
}

.carusel-btn:hover {
  cursor: pointer;
}

.carusel-btn.active > .carusel-bnt-fill {
  animation: timeoutActiveBtn;
  animation-duration: 10s;
  animation-timing-function: ease-out;
}

.carusel-wrapper > .carusel-arrows {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 15%;
  width: 70%;
  justify-content: space-between;
}

.carusel-wrapper > .carusel-arrows > .carusel-arrow {
  width: 40px;
  height: 40px;
  border-radius: 100%;
  border: none;
  margin: 0 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.carusel-wrapper > .carusel-arrows > .carusel-arrow:active {
  transform: scale(0.9);
  transition: all 0.1s ease-in-out;
}

.carusel-wrapper > .carusel-arrows > .carusel-arrow > img {
  width: 32px;
  height: 32px;
}

@media only screen and (min-width: 1024px) {
  .carusel-wrapper > .carusel {
    overflow-x: hidden;
    height: 40vh;
  }

  .carusel-wrapper > .carusel-mask {
    background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9));
  }

  .carusel-slide-txt {
    right: calc(20% + 40px);
    width: 25%;
    top: 50%;
    transform: translateY(-50%);
    bottom: initial;
  }

  .carusel-slide-txt.desktop {
    display: initial;
  }

  .carusel-slide-txt.mobile {
    display: none;
  }

  .carusel-wrapper > .carusel-arrows {
    display: flex;
  }

  .carusel-wrapper > .carusel-btns {
    bottom: 0.5rem;
  }
}
