/*
 * @Author: 焦质晔
 * @Date: 2021-02-09 09:27:46
 * @Last Modified by: 焦质晔
 * @Last Modified time: 2024-11-05 18:58:36
 */
@use '../../style/src/themes' as *;

$prefix: '#{$qm-prefix}-modal';

.#{$prefix} {
  &.el-dialog {
    padding: 0;
    margin-bottom: 10vh;
  }
  &.is-fullscreen {
    margin-top: 0;
    margin-bottom: 0;
  }
  &.no-header {
    .el-dialog__header {
      height: 0;
      border: 0;
      .el-dialog__headerbtn {
        top: 6px;
        right: 12px;
      }
      .full-screen {
        top: 8px;
        right: 42px;
      }
    }
  }
  .el-dialog__header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 44px;
    margin: 0;
    padding: 0 10px 0 15px;
    border-bottom: 1px solid $border-color-base;
    box-sizing: border-box;
    .dialog-title {
      display: flex;
      align-items: center;
      font-size: $font-size-lg;
    }
  }
  .el-dialog__headerbtn {
    display: inline-flex;
    position: absolute;
    right: 6px;
    top: auto;
    font-size: 20px;
    color: $text-color-placeholder;
    width: auto;
    height: auto;
    padding: 5px;
    line-height: 0;
    outline: none;
  }
  .full-screen {
    display: inline-block;
    text-align: center;
    text-transform: none;
    text-decoration: none;
    background: transparent;
    border: 0;
    outline: 0;
    position: absolute;
    right: 36px;
    padding: 5px;
    padding-right: 2px;
    font-size: $font-size-lg;
    color: $text-color-placeholder;
    cursor: pointer;
    &:hover {
      color: $primary-color;
    }
  }
  .el-dialog__body {
    padding: 0;
    .dialog-container {
      height: 100%;
      padding: $padding-base;
      word-break: normal;
      overflow-y: auto;
      box-sizing: border-box;
    }
  }
  .el-dialog__footer {
    display: none;
  }
  .spinning {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.65);
    z-index: 9999;
    .#{$qm-prefix}-spin-text {
      margin-top: 4px;
    }
  }
  // ------ size ------
  // 40  36  32  28
  &--large {
    .el-dialog__header {
      height: 48px;
    }
    .el-dialog__headerbtn {
      top: 8px;
    }
  }
  &--small {
    .el-dialog__header {
      height: 40px;
    }
    .el-dialog__headerbtn {
      top: 4px;
    }
  }
}
