@modal-prefix-cls: ~"@{css-prefix}modal";
@confirm-prefix-cls: ~"@{css-prefix}modal-confirm";
@icon-prefix-cls: ~"@{css-prefix}icon";

.@{modal-prefix-cls} {
  width: auto;
  margin: 0 auto;
  position: relative;
  outline: none;
  top: 33.33vh;


  &-hidden {
    display: none !important;
  }

  &-wrap {
    position: fixed;
    overflow: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: @zindex-modal;
    -webkit-overflow-scrolling: touch;
    outline: 0;
  }

  &-wrap * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // keep as-is
  }

  &-mask {
    .mask;
  }

  &-content {
    position: relative;
    background-color: @color-complementary-10;
    border: 0;
    border-radius: @border-radius-big;
    background-clip: padding-box;
    -webkit-background-clip: padding-box;
    box-shadow: 0 4px 16px @color-shadow1;

    &-no-mask {
      pointer-events: auto;
    }

    &-drag {
      position: absolute;

      .@{modal-prefix-cls}-header {
        cursor: move;
      }
    }

    &-dragging {
      -webkit-user-select: none;
      -moz-user-select: none;
      user-select: none;
      -ms-user-select: none;
    }
    &-confirm {
      width: 416px;
    }
  }

  &-header {
    .content-header;
    padding: 15px 32px;
    border: none;
    background: @color-bg-page;
    border-radius: @border-radius-big @border-radius-big 0 0;
    &-inner {
      color: @color-text-level1;
    }
  }

  &-close {
    z-index: 1;
    .content-close(1px, 18px, 18px);
    .@{icon-prefix-cls}-close {
      color: @modal-close-color;
      &:active {
        color: @modal-close-active-color;
      }
  }
  }

  &-body {

    padding: 20px 32px 24px;
    font-size: @font-size-middle;
    line-height: 22px;
  }

  &-footer {
    // border-top: 1px solid @border-color-split;
    padding: 0 32px 24px;
    text-align: right;

    button + button {
      margin-left: 12px;
      margin-bottom: 0;
    }
  }

  &-fullscreen {
    width: 100% !important;
    top: 0;
    bottom: 0;
    position: absolute;

    @modal-header-height: 51px;
    @modal-footer-height: 61px;

    .@{modal-prefix-cls}-content {
      width: 100%;
      border-radius: 0;
      position: absolute;
      top: 0;
      bottom: 0;
    }

    .@{modal-prefix-cls}-body {
      width: 100%;
      overflow: auto;
      position: absolute;
      top: @modal-header-height;
      bottom: @modal-footer-height;
    }

    &-no-header .@{modal-prefix-cls}-body {
      top: 0;
    }

    &-no-footer .@{modal-prefix-cls}-body {
      bottom: 0;
    }

    .@{modal-prefix-cls}-footer {
      position: absolute;
      width: 100%;
      bottom: 0;
    }
  }

  &-no-mask {
    pointer-events: none;
  }
}

@media (max-width: @screen-sm) {
  .@{modal-prefix-cls} {
    width: auto !important;
    margin: 10px;
  }

  .@{modal-prefix-cls}-fullscreen {
    width: 100% !important;
    margin: 0;
  }

  .vertical-center-modal {
    .@{modal-prefix-cls} {
      flex: 1;
    }
  }
}

.@{confirm-prefix-cls} {
  padding-top: 4px;

  &-head {
    padding: 0 12px 0 0;
    display: flex;

    &-icon {
      display: inline-block;
      font-size: 14px;
      position: relative;
      display: flex;
      align-items: center;
      height: 24px;

      &-info {
        color: @primary-color;
      }

      &-success {
        color: @success-color;
      }

      &-warning {
        color: @warning-color;
      }

      &-error {
        color: @error-color;
      }

      &-confirm {
        color: @warning-color;
      }
    }

    &-title {
      display: inline-block;
      vertical-align: middle;
      margin-left: 8px;
      font-size: @font-size-base;
      color: @text-color;
      font-weight: 500;
    }
  }

  &-body {
    padding-left: 32px;
    font-size: @font-size-base;
    color: @color-text-level3;
    position: relative;
    margin-top: 12px;
    line-height: 21px;

    &-render {
      margin: 0;
      padding: 0;
    }
  }

  &-footer {
    margin-top: 24px;
    text-align: right;

    button+button {
      margin-left: 8px;
      margin-bottom: 0;
    }
  }
}
