@qynModalHeaderHeight: 40px;

.ztxk-modal {
  top: 8vh;
  .ant-modal-content {
    border-radius: 8px;
    > .ant-modal-close {
      color: #333333;
      width: @qynModalHeaderHeight;
      height: @qynModalHeaderHeight;
      > .ant-modal-close-x {
        width: @qynModalHeaderHeight;
        height: @qynModalHeaderHeight;
        line-height: @qynModalHeaderHeight;
        font-weight: normal;
      }
    }
    > .ant-modal-header {
      padding: 9px 20px 9px 24px;
      border-bottom: 1px solid #f0f0f0;
      border-radius: 8px 8px 0 0;
      > .ant-modal-title {
        color: #333333;
        line-height: 22px;
        text-align: center;
        font-weight: normal;
      }
    }
    > .ant-modal-body {
      padding: 10px;
      // 去掉最小高度
      // min-height: 200px;
      // 默认不超出高度
      max-height: 75vh;
      overflow: auto;
    }
    > .ant-modal-footer {
      text-align: center;
      border-top: 0;
      padding: 10px 0 10px 0;
    }
  }
}

.ztxk-modal-resize {
  .ant-modal-content {
    display: flex;
    flex-direction: column;
    > .ant-modal-body {
      overflow: auto;
      flex: 1;
    }
  }
  > .ant-modal-footer {
    flex-shrink: 0;
  }
}
// Modal 可调整大小样式
.ztxk-modal-resizable-wrapper {
  position: relative;

  .ztxk-modal-resize-handle {
    position: absolute;
    z-index: 98;
    pointer-events: auto;
  }

  // 四个角的拖拽手柄
  .ztxk-modal-resize-handle-tl,
  .ztxk-modal-resize-handle-tr,
  .ztxk-modal-resize-handle-bl,
  .ztxk-modal-resize-handle-br {
    width: 12px;
    height: 12px;
  }

  .ztxk-modal-resize-handle-tl {
    top: 0;
    left: 0;
    cursor: nwse-resize !important;
  }

  .ztxk-modal-resize-handle-tr {
    top: 0;
    right: 0;
    cursor: nesw-resize !important;
  }

  .ztxk-modal-resize-handle-bl {
    bottom: 0;
    left: 0;
    cursor: nesw-resize !important;
  }

  .ztxk-modal-resize-handle-br {
    bottom: 0;
    right: 0;
    cursor: nwse-resize !important;
  }

  // 四条边的拖拽手柄
  .ztxk-modal-resize-handle-t,
  .ztxk-modal-resize-handle-b {
    left: 12px;
    right: 12px;
    height: 8px;
  }

  .ztxk-modal-resize-handle-t {
    top: 0;
    cursor: ns-resize !important;
  }

  .ztxk-modal-resize-handle-b {
    bottom: 0;
    cursor: ns-resize !important;
  }

  .ztxk-modal-resize-handle-l,
  .ztxk-modal-resize-handle-r {
    top: 12px;
    bottom: 12px;
    width: 8px;
  }

  .ztxk-modal-resize-handle-l {
    left: 0;
    cursor: ew-resize !important;
  }

  .ztxk-modal-resize-handle-r {
    right: 0;
    cursor: ew-resize !important;
  }
}

// 调整大小时禁用文本选择
body.ztxk-modal-resizing {
  user-select: none !important;

  * {
    user-select: none !important;
  }
}
