#{$prefix}box {
  box-shadow: $box-shadow;
  @include flex-column();
  box-sizing: border-box;
  border-radius: 3px;
  overflow: hidden;
  border-width: 0 1px;
  border-style: solid;
  border-top: 1px solid $border-color2;

  > #{$prefix}box-header {
    padding: 0 5px;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    @include vertical-center(46px);
    border-bottom: 1px solid $border-color3;
    box-sizing: border-box;

    #{$prefix}box-header-icon {
      padding: 0 8px 0 3px;
      font-size: 1.5rem;
      text-align: center;
      flex-shrink: 0;

      #{$prefix}icon {
        margin-top: 6px;
        font-size: 18px;
        padding: 7px;
        border-radius: 17px;
      }
    }

    #{$prefix}box-header-title {
      flex-grow: 1;
      font-size: 16px;
      font-weight: 400;
    }

    #{$prefix}box-header-toolbar-before {
      flex-grow: 1;
    }

    #{$prefix}box-header-toolbar {
      position: relative;
      flex-shrink: 0;

      #{$prefix}button {
        margin-left: 0;
        padding: 0;
        border: none;
        background-color: transparent;
        cursor: pointer;
        padding: 10px 7px;
        color: $text-color3;
        user-select: none;
        outline: none;
        transition: all 0.2s ease-in-out;
        font-size: 16px;
        width: 30px;
        height: 30px;

        &.is-disabled {
          cursor: not-allowed;
          span {
            color: #c0c4cc;
          }
        }
        &:not(.is-disabled):hover {
          color: $text-color1;
          transform: scale(1.2);
        }
      }
    }
  }

  > #{$prefix}box-dialog {
    position: relative;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    @include flex-column();
    flex-grow: 1;

    > #{$prefix}box-content {
      position: relative;
      padding: 10px;
      flex-grow: 1;
      box-sizing: border-box;
    }

    > #{$prefix}box-footer {
      padding: 0 10px;
      flex-shrink: 0;
      flex-grow: 0;
      height: 42px;
      line-height: 41px;
      border-top: 1px solid $border-color3;
      text-align: right;
      box-sizing: border-box;

      &.left {
        text-align: left;
      }

      &.center {
        text-align: center;
      }

      &.right {
        text-align: right;
      }
    }
  }

  &.has-height {
    > #{$prefix}box-dialog {
      > #{$prefix}box-content {
        position: absolute;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        height: 100%;

        #{$prefix}box-wrapper {
          height: 100%;

          > &-scrollbar {
            > .el-scrollbar__wrap {
              padding-left: 10px;
              padding-right: 10px;
            }
          }
        }
      }
    }
  }

  &.fullscreen {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: $z-index-box-fullscreen;
  }

  &.page {
    height: 100%;

    > #{$prefix}box-dialog {
      padding: 0;

      > #{$prefix}box-content {
        padding: 0;

        > #{$prefix}box-wrapper {
          position: absolute;
          width: 100%;
          height: 100%;

          .el-scrollbar__view {
            padding: 10px;
          }
        }
      }
    }
  }

  &.no-padding {
    > #{$prefix}box-dialog {
      > #{$prefix}box-content {
        padding: 0 !important;

        > #{$prefix}box-wrapper {
          .el-scrollbar__view {
            padding: 0 !important;
          }
        }
      }
    }
  }

  &.border {
    border-top-width: 2px;

    &.success {
      border-top-color: $color-success;
    }

    &.info {
      border-top-color: $color-info;
    }

    &.primary {
      border-top-color: $color-primary;
    }

    &.warning {
      border-top-color: $color-warning;
    }

    &.danger {
      border-top-color: $color-danger;
    }
  }

  &.title-bold {
    #{$prefix}box-header-title {
      font-weight: 600;
    }
  }
}
