<template>
  <div class="hotspot animation-show-hide">
    <img
      class=""
      src="@/assets/images/icon_hotspot-small.png"
      alt=""
      draggable="false"
    >
    <div class="text">
      <slot />
    </div>
  </div>
</template>

<script setup>
import { useDevicePixelRatio } from '@vueuse/core'

const { pixelRatio } = useDevicePixelRatio()
</script>

<style lang="less" scoped>
.hotspot{
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  >img{
    flex: 0 0 auto;
    width: calc(28px / v-bind('pixelRatio'));
    height: calc(28px / v-bind('pixelRatio'));
  }
  >.text{
    margin-top: -0.3em;
    writing-mode: vertical-lr;
    white-space: pre;
    font-family: KaiTi, KaiTi;
    font-weight: 400;
    font-size: calc(26px / v-bind('pixelRatio'));
    color: #FFFFFF;
    line-height: calc(30px / v-bind('pixelRatio'));
    text-shadow: 0px 0px calc(3px / v-bind('pixelRatio')) rgba(0,0,0,0.75);
    letter-spacing: 0.15em;
  }
}
</style>