@import "../../constants/index.scss";

.carouselElementWrapper {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0px;
  position: relative;
  // animation: slide-up 0.3s ease-out;
  // animation-delay: 0.2s;
  // animation-fill-mode: both;
  // opacity: 0;
  &.isFirst {
    margin-left: 0;
  }
}

@keyframes slide-up {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

.carouselWrapper {
  width: $width - 32px;
  min-width: $width - 32px;
  border: 1px solid $border-color;
  border-radius: $border-radius;
  overflow: hidden;
  background-color: #fff;
  transform: scale3d(0.8, 0.8, 1);
  transition: 0.3s cubic-bezier(0.175, 0.5, 0.12, 1);
  input,
  textarea {
    display: block;
    outline: none;
    border: none;
    resize: none;
    width: 100%;
    background-color: transparent;
    &::placeholder {
      color: #000;
    }
  }

  &.enlarged {
    transform: scale3d(1, 1, 1);
    margin-top: auto;
    margin-bottom: auto;
    border: 1px solid transparent;
  }

  &.noBorder {
    border: none;
  }
}

.carouselLessMarginRight {
  margin-right: -36px;
  transform-origin: 0 50%;
}

.carouselImage {
  width: 100%;
  min-height: 150px;
  height: 150px;
  object-fit: cover;
  border-bottom: 1px solid $border-color;
}

.customKeyImage {
  width: 100%;
  min-height: 150px;
  height: 150px;
  border-bottom: 1px solid $border-color;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  > div {
    padding-bottom: 8px;
  }
}

.carouselImagePlaceholder {
  width: 100%;
  height: 150px;
  border-bottom: 1px solid $border-color;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carouselImagePlaceholderIcon {
  width: 64px;
  height: 64px;
}

.carouselText {
  padding: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid $border-color;
  * {
    cursor: pointer;
    transition: 0.2s ease-out;
    &:hover {
      color: $primary-color;
      background-color: rgba($primary-color, 0.1);
    }
    &.active {
      color: $primary-color;
    }
  }

  &:empty {
    padding: 0;
    border: none;
    margin-bottom: -5px;
  }
}

.carouselTextTitleWrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.carouselTextTitle {
  font-size: $carousel-font-size + 1;
  flex: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carouselTextMetadata {
  text-align: right;
  font-size: $carousel-font-size - 4;
  opacity: 0.7;
  flex: 1;
}

.carouselTextSubtitle {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: $carousel-font-size - 2;
}

.carouselTextDescription {
  font-size: $carousel-font-size - 2;
  opacity: 0.7;
  position: relative;
  left: -1px;
  padding: 0 !important;
  box-shadow: none !important;
}

.carouselElementActions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease-out;
  transition-delay: 0.1s;
  &.enlarged {
    opacity: 1;
    pointer-events: auto;
    &.onlyElement {
      opacity: 0;
      pointer-events: none;
    }
  }
}

.carouselElementAction {
  width: 24px;
  height: 24px;
  background-color: #fff;
  border-radius: 48px;
  margin-right: 16px;
  padding: 8px;
  cursor: pointer;
  box-sizing: content-box;
  &:last-child {
    margin-right: -16px;
  }

  &.rotated {
    transform: rotate(90deg);
  }

  &.firstElement {
    opacity: 0;
    display: none;
  }

  &.lastElement {
    opacity: 0;
    display: none;
  }
}

.miniActionable {
  position: relative;
  margin-left: -8px;
  transform: translateY(-50%);
  button {
    margin: 0 auto;
    font-size: 14px;
    font-weight: 500;
  }
}

.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  bottom: 0;
  cursor: not-allowed;
}
