@import (reference) "../../../assets/css/index";

@picture-preview-prefix: ~"@{fishd-prefix}-picturepreview";

/* stylelint-disable declaration-no-important */
.@{picture-preview-prefix}-root {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: @border-radius-base;
  z-index: @zindex-modal;
}

.@{picture-preview-prefix}-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
}

.@{picture-preview-prefix}-hide {
  display: none !important;
}

.@{picture-preview-prefix} {
  position: absolute;
  z-index: @zindex-modal;
  user-select: none;
  touch-action: none;
  border-radius: @border-radius-lg;
  // background-color: rgba(222, 222, 222, 0.5);
  // box-shadow: 0px 2px 14px rgba(183, 183, 183, 0.5);
  background: #5c5f66;
  box-shadow: 0 2px 6px 0 rgba(23, 23, 26, 0.1);
  overflow: hidden;

  // &:-webkit-full-screen {
  //   background: rgba(0,0,0,0.8);
  // }

  &.draggable {
    cursor: move;
  }

  &:hover {
    .prev,
    .next {
      display: flex;
    }
    .toolbar {
      display: block;
    }
  }

  .canvas[moving] {
    transition: none;
  }

  .img {
    display: none;
    transition: none;
  }

  .img.active {
    display: block;
    transition: all 0.3s ease-out;
    border-radius: @border-radius-lg;
  }

  .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;

    > a::before,
    > span::before {
      color: #fff;
    }
  }

  .icon-disabled {
    color: @disabled-color-dark;
    cursor: not-allowed;
  }

  /* 向左以及向右翻页的icon */
  .iconDir {
    position: absolute;
    display: none;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    width: 32px;
    height: 32px;
    font-size: 16px;
    .icon;
  }

  .close {
    position: absolute;
    right: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 16px;
    height: 32px;
    width: 32px;
    border-radius: 0 0 0 32px;
    .icon;

    &:before {
      position: absolute;
      top: 5px;
      right: 5px;
    }
  }

  .close-fullscreen {
    position: absolute;
    right: 20px;
    top: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 16px;
    height: 32px;
    width: 32px;
    border-radius: 50%;
    .icon;
  }

  .prev {
    left: 0;
    margin-left: 20px;
    .iconDir;

    &:before {
      transform: rotate(180deg);
    }
  }

  .next {
    right: 0;
    margin-right: 20px;
    .iconDir;
  }

  .toolbar {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 248px;
    display: block;
    color: #fff;
    font-size: 20px;
  }

  .toolbarTitle {
    font-size: 12px;
    line-height: 1;
    height: 20px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    opacity: 0.5;
    color: #ccc;
    text-align: center;
  }

  .toolbarCon {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 40px;
    padding: 0 12px;
  }

  .divider {
    width: 1px;
    background-color: #3a3a3a;
    height: 24px;
  }
}
/* stylelint-enable */
