/* ng-zorro-antd 主题 */

@import "~ng-zorro-antd/ng-zorro-antd.less";
@import "~ng-zorro-antd/resizable/style/entry.less";

@font-size-base: 12px;

/* ng-cortex-framework 公共样式 */

.ant-form-sm {
  .ant-form-item {
    margin: 0;
    padding: 2px 0;
  }

  .ant-form-item-label {
    line-height: 23px;
  }

  .ant-form-item-control {
    line-height: 24px;

    textarea.ant-input {
      margin: 0;
      vertical-align: middle;
    }
  }

  .ant-form-explain {
    position: absolute;
    top: -24px;
    left: 0;
    z-index: 999;
    line-height: 20px;
    min-width: 40px;
    padding: 0 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #ffffff;

    &>div {
      position: relative;
      z-index: 999;
    }

    &::after {
      content: '';
      position: absolute;
      left: 14px;
      bottom: -9px;
      display: block;
      width: 5px;
      height: 5px;
      box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
      transform: translateY(-6.53553391px) rotate(45deg);
    }
  }

  .has-success {

    .ant-form-explain,
    .ant-form-explain::after {
      background-color: #52c41a;
    }
  }

  .has-warning {

    .ant-form-explain,
    .ant-form-explain::after {
      background-color: #faad14;
    }
  }

  .has-error {

    .ant-form-explain,
    .ant-form-explain::after {
      background-color: #f5222d;
    }
  }

  .is-validating {

    .ant-form-explain,
    .ant-form-explain::after {
      background-color: #1890ff;
    }
  }
}

.ant-modal-sm {
  .ant-modal-close-x {
    width: 38px;
    height: 38px;
    line-height: 38px;
  }

  .ant-modal-header {
    padding: 7px 16px;
  }

  .ant-modal-body {
    padding: 16px;
  }

  .ant-modal-footer {
    padding: 6px 16px;

    button {
      height: 24px;
      padding: 0 7px;

      &+button {
        margin-left: 4px;
      }
    }
  }
}

.ant-modal-confirm-sm {
  .ant-modal-body {
    padding: 24px 24px 16px;
  }

  .ant-modal-confirm-btns {
    margin-top: 16px;

    button {
      height: 24px;
      padding: 0 7px;

      &+button {
        margin-left: 4px;
      }
    }
  }
}

.ant-input-affix-wrapper {
  .ant-input-clear-icon {
    opacity: 0;
    transition: all .3s;
  }

  &:hover,
  .ant-input:focus+.ant-input-suffix {
    .ant-input-clear-icon {
      opacity: 1;
    }
  }

  &:hover {
    .ant-input[disabled] {
      border-color: #d9d9d9;
    }
  }
}

.ant-input-affix-wrapper-sm {
  .ant-input-suffix {
    right: 9px;
  }
}

.ant-input {
  text-overflow: ellipsis;
}

.ant-cascader {
  &:hover {
    .ant-input {
      border-color: #40a9ff;
    }
  }
}

.ant-cascader-sm {
  .ant-cascader-picker-label {
    padding: 0 24px 0 7px;
  }

  .ant-cascader-picker-clear,
  .ant-cascader-picker-arrow {
    right: 9px;
  }
}