.aae--image-hotspot {
  position: relative;

  svg {
    width: 1em;
    height: 1em;
  }

  > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &.beat {
    .hotspot-icon {
      animation: AAEBeat var(--anim-speed, 1s) infinite;
    }
  }

  &.pulse {
    .hotspot-icon {
      &::before {
        position: absolute;
        content: "";
        width: 100%;
        height: 100%;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        border-radius: 100px;
        animation: AAEPulse var(--anim-speed, 3s) infinite cubic-bezier(.4, 0, 1, 1) both;
      }

      &::after {
        position: absolute;
        content: "";
        width: 100%;
        height: 100%;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        border-radius: 100px;
        animation: AAEPulse var(--anim-speed, 3s) 0.5s infinite cubic-bezier(.4, 0, 1, 1) both;
      }
    }
  }
}

.aae--hotspot-item {
  position: absolute;

  &.hover:hover {
    .tooltip-content {
      opacity: 1;
      visibility: visible;
    }
  }

  &.none {
    .tooltip-content {
      opacity: 1;
      visibility: visible;
    }
  }

  .hotspot-icon {
    background: #000;
    border-radius: 100px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    &.dot {
      width: 30px;
      height: 30px;
    }

    &.icon {
      padding: 5px;
      font-size: 18px;
      color: #fff;
      fill: #fff;
    }

    &.text,
    &.icon-text {
      fill: #fff;
      color: #fff;
      padding: 3px 15px;
      font-size: 16px;
      line-height: 1.5;
    }
  }

  .tooltip-content {
    position: absolute;
    width: 260px;
    background: #E8E8E8;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s ease;

    &::after {
      position: absolute;
      content: "";
      background-color: #E8E8E8;
    }

    &.active {
      opacity: 1;
      visibility: visible;
    }

    p {
      margin: 0;
    }
  }


}

.aae--tlp-position-top {
  .tooltip-content {
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: var(--tlp-gap, 20px);

    &::after {
      width: 20px;
      height: 15px;
      clip-path: polygon(100% 0, 0 0, 50% 100%);
      bottom: -14px;
      left: 50%;
      transform: translateX(-50%);
    }

    &.active {
      bottom: 100%;
    }
  }

  .hover:hover {
    .tooltip-content {
      bottom: 100%;
    }
  }
}

.aae--tlp-position-bottom {
  .tooltip-content {
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    margin-top: var(--tlp-gap, 20px);

    &::after {
      width: 20px;
      height: 15px;
      clip-path: polygon(50% 0, 0 100%, 100% 100%);
      top: -14px;
      left: 50%;
      transform: translateX(-50%);
    }

    &.active {
      top: 100%;
    }
  }

  .hover:hover {
    .tooltip-content {
      top: 100%;
    }
  }
}

.aae--tlp-position-left {
  .tooltip-content {
    right: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    margin-right: var(--tlp-gap, 20px);

    &::after {
      width: 15px;
      height: 20px;
      clip-path: polygon(0 0, 0 100%, 100% 50%);
      right: -14px;
      top: 50%;
      transform: translateY(-50%);
    }

    &.active {
      right: 100%;
    }
  }

  .hover:hover {
    .tooltip-content {
      right: 100%;
    }
  }
}

.aae--tlp-position-right {
  .tooltip-content {
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    margin-left: var(--tlp-gap, 20px);

    &::after {
      width: 15px;
      height: 20px;
      clip-path: polygon(100% 0, 0 50%, 100% 100%);
      left: -14px;
      top: 50%;
      transform: translateY(-50%);
    }

    &.active {
      left: 100%;
    }
  }

  .hover:hover {
    .tooltip-content {
      left: 100%;
    }
  }
}

@keyframes AAEBeat {
  0% {
    transform: scale(1.2);
  }

  50% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.2);
  }
}

@keyframes AAEPulse {
  0% {
    box-shadow: 0 0 0 0 var(--pulse-color, #111);
  }

  70% {
    box-shadow: 0 0 0 30px var(--pulse-color, #111);
    opacity: 0;
  }

  100% {
    box-shadow: 0 0 0 0 var(--pulse-color, #111);
    opacity: 0;
  }
}
