@import '../var/index.less';
.file-view-modal {
  z-index: 100000 !important;
  .ant-modal {
    top: 0;
    padding: 0;
    margin: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
  }

  &.hide-modal-header {
    .ant-modal-header {
      height: 0;
      padding: 0;
    }
    .file-view-close-btn {
      position: absolute;
      top: 16px;
      left: 8px;
      z-index: 1;
    }

    .file-view-content {
      height: 100vh;
    }
  }

  .file-view-content {
    height: calc(100vh - 64px);
  }

  .file-view-close-btn {
    max-width: 90px;
    display: flex;
    align-items: center;
    color: rgb(82 82 82 / 1);

    &:hover {
      background-color: rgb(0 0 0 / 0.08);
    }

    .anticon-close {
      font-size: 16px;
    }
  }

  &-next,
  &-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    width: 50px;
    height: 50px;
    padding: 10px;
    text-align: center;
    background: rgba(#000);
    border-radius: 50%;
    line-height: 1.2;
    opacity: 0.4;
    z-index: 1100;
    transition: all ease 0.3s;

    a {
      color: #fff;
    }

    &:hover {
      opacity: 0.8;
    }
  }

  &-prev {
    left: 20px;
  }

  &-next {
    right: 20px;
  }

  .file-view-title {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: calc(100% - 100px);
    max-height: 40px;

    svg {
      font-size: 32px;
    }
  }

  .file-view-title-content {
    flex: 1;
    margin-left: 12px;

    .main {
      font-size: 16px !important;
      color: rgb(82 82 82 / 1);
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: left;
      white-space: nowrap;
      margin-right: 8px;
    }

    .other {
      font-size: 12px !important;
      color: rgb(163 163 163 / 1);
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: left;
      white-space: nowrap;
      margin-right: 8px;
    }
  }

  .ant-modal-content {
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: rgba(#000, 0.65);

    .ant-modal-header {
      padding-left: 8px;
      padding-right: 8px;
      border-radius: 0;
      // background: @primary-color;
      border-bottom: none;

      .ant-modal-title {
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #fff;
        // line-height: 30px;
        font-size: 14px;
        font-weight: normal;

        .line {
          border-right: 1px solid #dee0e3;
          margin-left: 8px;
          margin-right: 16px;
          height: 36px;
        }
      }
    }

    .ant-modal-close-x {
      color: #fff;
    }

    .file-view-num {
      margin-right: 20px;
      opacity: 0.8;
    }

    .file-view-action {
      margin-right: 20px;
      float: right;

      .ant-btn-text {
        color: #fff;
      }
    }

    .ant-modal-body {
      border-top: 1px solid #dee0e3;
      flex: 1;
      // padding: 0 10%;
      max-height: 100%;
      overflow: hidden;

      .ant-spin {
        height: 100%;
        width: 100%;
        max-height: 100%;
        color: #fff;

        .ant-spin-text {
          text-shadow: none;
        }

        .ant-spin-dot-item {
          background: #fff;
        }
      }

      .ant-spin-container {
        width: 100%;
        height: 90%;
      }

      .file-view-content {
        position: relative;
        background: #fff;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;

        img {
          max-width: 80%;
          max-height: 80%;
        }

        audio,
        video {
          width: 640px;
          height: 368px;
        }
        .text-page {
          background: #fff;
          height: 100%;
          width: 800px;
        }

        .ant-image-preview-mask {
          display: none;
        }

        .ant-image-preview-wrap {
          position: absolute;
          width: 100%;
          height: 100%;
          top: 0;
          left: 0;
        }

        .ant-image-preview-operations {
          top: unset;
          right: unset;
          width: auto;
          bottom: 0;
          left: 50%;
          transform: translateX(-50%);
          border-radius: 6px;

          .ant-image-preview-operations-operation {
            &:first-child {
              display: none;
            }
          }
        }
      }

      iframe {
        border: none;
        width: 100%;
        height: 100%;
      }

      .empty {
        color: #fff;
      }
    }
  }
}
