
@import "colors";

.cm-card {
  background: #fff;
  border-radius: 2px;
  font-size: 12px;
  position: relative;
  overflow: hidden;
  -webkit-transition: all .3s;
  transition: all .3s;

  &.cm-card-bordered{
    border: 1px solid #e9e9e9;
  }

  .cm-card-head {
    height: 48px;
    line-height: 48px;
    border-bottom: 1px solid #e9e9e9;
    padding: 0 24px;
  }

  .cm-card-head-title{
    font-size: 14px;
    display: inline-block;
    text-overflow: ellipsis;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    margin: 0;
    line-height: inherit;
    font-weight: 600;
  }

  .cm-card-tools{
    position: absolute;
    right: 24px;
    top: 14px;
    line-height: normal;
    a{
      color: @color-blue;
    }
  }

  .cm-card-body{
    padding: 24px;
  }

  &:hover {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
    border-color: transparent;
    z-index: 1;
  }
  .cm-card-loading-block {
    display: inline-block;
    margin: 5px 1% 0;
    height: 14px;
    border-radius: 2px;
    background: -webkit-linear-gradient(left, rgba(207, 216, 220, 0.2), rgba(207, 216, 220, 0.4), rgba(207, 216, 220, 0.2));
    background: linear-gradient(90deg, rgba(207, 216, 220, 0.2), rgba(207, 216, 220, 0.4), rgba(207, 216, 220, 0.2));
    -webkit-animation: card-loading 1.4s ease infinite;
    animation: card-loading 1.4s ease infinite;
    background-size: 600% 600%;
  }

  @-webkit-keyframes card-loading {
    0%,
    100% {
      background-position: 0 50%;
    }
    50% {
      background-position: 100% 50%;
    }
  }
  @keyframes card-loading {
    0%,
    100% {
      background-position: 0 50%;
    }
    50% {
      background-position: 100% 50%;
    }
  }
}