@com-prefix-cls: if(isdefined(@ant-prefix), @ant-prefix, ant);

.@{com-prefix-cls}-image-preview-warp {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background-color: rgba(0, 0, 0, .45);

  &.none {
    display: none;
  }

  .@{com-prefix-cls}-image-preview-operations {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-variant: tabular-nums;
    line-height: 1.5715;
    font-feature-settings: "tnum";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    width: 100%;
    color: hsla(0, 0%, 100%, .85);
    list-style: none;
    background: rgba(0, 0, 0, .1);
    pointer-events: auto;

    .@{com-prefix-cls}-image-preview-operations-operation {
      margin-left: 12px;
      padding: 12px;
      cursor: pointer;

      &:last-of-type {
        margin-left: 0;
      }
    }
  }

  .@{com-prefix-cls}-image-preview-img-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    text-align: center;
    transition: transform .3s cubic-bezier(.215, .61, .355, 1) 0s;

    &:before {
      display: inline-block;
      width: 1px;
      height: 50%;
      margin-right: -1px;
      content: "";
    }

    .@{com-prefix-cls}-image-preview-img {
      max-width: 100%;
      max-height: 100%;
      vertical-align: middle;
      user-select: none;
      pointer-events: auto;
      cursor: grab;
      transform: scaleX(1);
      transition: transform .3s cubic-bezier(.215, .61, .355, 1) 0s;
    }
  }

  .@{com-prefix-cls}-image-preview-switch-left, .@{com-prefix-cls}-image-preview-switch-right {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    color: hsla(0, 0%, 100%, .85);
    background: rgba(0, 0, 0, .1);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;

    &.@{com-prefix-cls}-image-disabled {
      color: hsla(0, 0%, 100%, .45);
      cursor: not-allowed;
    }
  }

  .@{com-prefix-cls}-image-preview-switch-left {
    left: 10px;
  }

  .@{com-prefix-cls}-image-preview-switch-right {
    right: 10px;
  }
}
