@import './variables.less';

// 常用的删除按钮
table {
  a, .link {
    cursor: pointer;
    color: #FF7519;
  }
  td:nth-child(1):hover,
  td:nth-child(2):hover {
    .delete {
      display: inline-block;
    }
  }
  td:nth-child(1),
  td:nth-child(2) {
    position: relative;
    .delete {
      color: #999;
      position: absolute;
      right: 5px;
      bottom: 10px;
      display: none;
      transition: all .5s;
      cursor: pointer;
    }
  }
  th {
    background: @xm-table-header !important; 
    > .center {
      text-align: center;
    }
  }
}

table.table {
  table-layout: fixed;
  width: 100%;
  .left {
    text-align: left;
    padding-left: 10px;
  }
  .right {
    text-align: right;
    padding-right: 10px;
  }
  .center {
    text-align: center;
  }
  .text-center {
    text-align: center;
  }


  tr {
    td, th {
      min-height: 30px;
      padding: 6px;
      font-size: 14px;
      color: #545455;
      text-align: left;
      border: 1px solid @xm-color-border;
    }
    th {
      background: #ffece1;
      border-bottom: none;
      > .center {
        text-align: center;
      }
    }
    td {
      overflow: hidden;
      color:@xm-table-tbody-color;
      white-space: nowrap;
      text-overflow: ellipsis;
      a {
        color: #ff8534;
        cursor: pointer;
      }
    }
  }
  thead {
    border-top: 1px solid @xm-color-border;
    tr {
      border-left: 1px solid @xm-color-border;
      border-bottom: 1px solid @xm-color-border;
      border-right: 1px solid @xm-color-border;
      background-color: @xm-table-header;
      th {
        background: none;
        color:@xm-table-head-color;
      }
    }
  }
  tbody {
    tr {
      td {
        background: none;
      }
    }
    border-bottom: 1px solid @xm-color-border;
  }

  &.table-no-top-border{
    border-top: none!important;
  }

  &.table-striped {
    tbody {
      tr:hover {
        background-color: @xm-table-body-active;
      }
    }
    th, td {
      border-top: 0;
      border-bottom: 0;
    }
    border: 1px solid @xm-color-border;
    //border-bottom: 1px solid @xm-color-border;
  }
  &.table-striped-header {
    border-bottom: none;
  }

  &.table-first-center {
    td:first-child, th:first-child {
      text-align: center;
    }
  }
}

.xm-table-filter {
  display: inline-block;
  vertical-align: top;
  >* {
    margin-left: 16px;
  }
  .xm-table-filter{
    margin: 0px;
  }

  .date-range {
    display: inline-block;
    input {
      display: inline-block;
      width: 190px;
      box-sizing: border-box;
      height: 30px;
      line-height: 30px;
    }
  }

  .xm-divider {
    position: relative;
    width: 1px;
    height: 10px;
  }
  .stockNum{
    margin-left: 5px;
    width: 18px;
    height: 18px;
    background-color: #FC0C0E;
    border-radius: 50%;
    color: #fff;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 300;
  }
}