.yk-image-preview {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: 100%;
  height: 100vh;

  &__mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000066;
    transition: all 0.3s ease;
  }

  &__body {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease;
  }

  &__img {
    display: inline-block;
    max-width: 96%;
    max-height: 96%;
    vertical-align: middle;
    cursor: grab;
    user-select: none;
  }

  &__close-btn,
  &__arrow-left,
  &__arrow-right {
    position: absolute;

    display: flex;
    justify-content: center;
    align-items: center;

    width: 36px;
    height: 36px;
    border: none;
    border-radius: 18px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  &__close-btn {
    top: 20px;
    right: 20px;
    background: #00000080;

    &:hover {
      background: #000000a8;
    }
  }

  &__arrow-left {
    left: 20px;
  }

  &__arrow-right {
    right: 20px;
  }

  &__arrow-left,
  &__arrow-right {
    top: 50%;
    transform: translateY(-50%);
    background: #0000004d;

    &:hover {
      background: #00000086;
    }
  }

  &__toolbar {
    position: absolute;
    bottom: 46px;
    left: 50%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: #ffffff;
    transform: translateX(-50%);
  }

  &__toolbar-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    color: #374151;
    background: transparent;
    transition: background 0.2s ease;
    cursor: pointer;

    &:hover {
      background: #f3f3f4;
    }
  }
}

.preview-fade-enter-active {
  animation: preview-zoomer-in 0.2s ease-in-out;
}

.preview-fade-leave-active {
  animation: preview-zoomer-in 0.2s ease-in-out reverse;
}

@keyframes preview-zoomer-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
