@import (reference) '../theme/variables/antdVariables.less';
/* --- 扩展组件: Card改造 --- */
.ued-card {
  display: flex;
  flex-direction: column;
  // height: 100%;  ie下样式出错
  // overflow-y: hidden;

  &.@{ant-prefix}-card-large {
    .@{ant-prefix}-card-head {
      & > .@{ant-prefix}-card-head-wrapper > .@{ant-prefix}-card-head-title {
        padding: 0;
      }
    }
  }

  .ued-card-title {
    display: flex;
    align-items: center;
    padding: 0;

    .main {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      min-width: 10px;
    }
    &::before {
      width: @padding-xxs;
      height: @font-size-sm;
      margin-right: @margin-xs;
      background: @primary-color;
      border-radius: 2px;
      content: '';
    }

    &.ued-card-title-middle,
    &.ued-card-title-icon-left,
    &.ued-card-title-icon-auto {
      &::after {
        left: -6px;
      }
    }

    // 标题内置样式边距不受主题影响
    &.ued-card-title-middle {
      &::before {
        position: static;
        transform: none;
        margin-right: 8px;
      }
    }
    &-icon-left {
      &::before {
        left: 0;
        width: @padding-sm;
        height: @padding-sm;
        border-radius: 0 (@padding-sm / 2) (@padding-sm / 2) 0;
      }
    }
    &.ued-card-title-icon-left {
      &::before {
        position: static;
        transform: none;
        margin: 0 8px 0 0;
      }
    }

    &.ued-card-title-icon-auto {
      &::after,
      &::before {
        content: none;
      }
    }

    &-icon-auto {
      > i,
      span {
        margin-right: @padding-xs;
        color: @primary-color;
      }
    }

    &-icon-custom {
      margin-left: 0;
      padding-left: 0;
      &::before {
        width: 0 !important;
      }
      &::after {
        width: 0 !important;
      }
    }
  }

  .ued-card-style-less-title {
    display: flex;
    align-items: center;
  }

  .ued-card-sub-title {
    flex: 1;
    margin-left: 4px;
    overflow: hidden;
    min-width: 20px;
    font-weight: 400;
    color: @text-color-secondary;
    .sub {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
  }

  .ued-card-children-skeleton {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: white;
    z-index: 1000;
    
  }
  .ued-card-extend {
    flex: 1 1 auto;
    text-align: right;
    display: flex;

    .anticon {
      margin-left: 0 !important;
      cursor: pointer;
    }

    .ued-card-extend-btn {
      margin-left: @padding-sm;
      i {
        margin-left: 0;
      }
    }

    .ued-card-extend-iconBtn {
      height: auto;
      padding: 0;
      color: inherit;
      margin-left: @padding-sm;
      > button {
        height: auto;
        padding: 0;
        color: inherit;
      }
    }
  }

  &.@{ant-prefix}-card > .@{ant-prefix}-card-body {
    background: transparent;
  }

  .@{ant-prefix}-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow-y: auto;
  }

  .@{ant-prefix}-card-head {
    position: relative;
    // padding: 0 @padding-20;
    border-color: #f0f0f0;
    margin-bottom: 0px;

    & > .@{ant-prefix}-card-head-wrapper {
      width: 100%;
      & > .@{ant-prefix}-card-head-title {
        padding: 0;
        font-weight: @font-weight-bold;
        font-size: @font-size-lg;
        line-height: 24px;
      }

      & > .@{ant-prefix}-card-extra {
        display: flex;
        align-items: center;
        padding: 0;
      }
    }
  }

  &.@{ant-prefix}-card-small {
    .@{ant-prefix}-card-head {
      // padding: 0 @padding-20;

      & > .@{ant-prefix}-card-head-wrapper {
        & > .@{ant-prefix}-card-head-title {
          padding: 0;
        }

        & > .@{ant-prefix}-card-extra {
          padding: 0;
        }
      }
    }
  }

  &.@{ant-prefix}-card-bordered {
    border-color: @border-color-base;
    &.@{ant-prefix}-card {
      padding: 0;
      .@{ant-prefix}-card-head > .@{ant-prefix}-card-head-wrapper > .@{ant-prefix}-card-head-title {
        padding: 0;
      }
    }

    .@{ant-prefix}-card-head {
      border-color: @border-color-base;
    }
  }
}

.ued-card-ed-box {
  display: flex;
  flex-direction: column;
}

.ued-card-simple {
  // 简约格式 头部不带分割线
  .@{ant-prefix}-card-head {
    border: none;
  }
}