table {
  width: 100%;
  border-spacing:0;
  margin-top: 2em;
  th {
    &.shortable {
      cursor: pointer;
    }
    &.td-1pc {
      width: 1%;
    }
    &.td-10pc {
      width: 10%;
    }
    &.td-15pc {
      width: 15%;
    }
    &.td-20pc {
      width: 20%;
    }
    &.td-25pc {
      width: 25%;
    }
    &.td-30pc {
      width: 30%;
    }
  }

  tr:nth-child(even) {
    background-color: #e5e5e5;
  }

  td {
    font-size: 0.85em;
    &.table-loading {
      padding: 2em 2em;
      text-align: center;
      font-size: 2em;
    }
    &.no-data {
      padding: 2em 2em;
      text-align: center;
      font-size: 1.5em;
    }
    &.td-tools {
      display: flex;
      flex-direction: row;
      justify-content: space-around;
    }
  }

  tfoot {
    td {
      padding: 2em 0 1em 0;
      div.tfoot-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5em;

        div {
          padding: .5em 0;
        }

        > div:first-child {
          flex: 1 1 auto;
        }

        ul {
          display: flex;
          flex: none;
          flex-wrap: nowrap;
          list-style: none;
          margin: 0;
          padding: 0;
          li {
            border : 1px solid var(--color-red);
            border-left: none;
            padding: .5em;
            min-width: 1em;
            text-align: center;
            &:first-child {
              border-radius: .3em 0 0 .3em;
              border-left: 1px solid var(--color-red);
            }
            &:last-child {
              border-radius: 0 .3em .3em 0;
            }
            &.current-page, &.link:hover {
              background-color: var(--color-red);
              color: white;
            }
            &.link:hover {
              cursor: pointer;
            }
          }
        }
        .pagesize-selector {
          display: flex;
          flex: none;
          flex-direction: row;
          align-items: center;
          gap: .5em;
          padding: 0;
          margin: 0;
          white-space: nowrap;

          select {
            appearance: none;
            font: inherit;
            padding: .4em 2em .4em .7em;
            border: 1px solid var(--color-red);
            border-radius: .3em;
            background-color: white;
            background-image:
              linear-gradient(45deg, transparent 50%, var(--color-red) 50%),
              linear-gradient(135deg, var(--color-red) 50%, transparent 50%);
            background-position:
              calc(100% - 1.1em) 55%,
              calc(100% - .75em) 55%;
            background-size: .4em .4em;
            background-repeat: no-repeat;
            cursor: pointer;
            &:hover {
              background-color: #f5f5f5;
            }
          }
        }
      }
    }
  }
}

.table-container {
  position: relative;
  div.loader {
    position: absolute;
  }
  table, div.loader {
    top:0;
    left:0;
    right: 0; bottom: 0;
  }
  div.loader {
    color: #7c7c7c;
    font-size: 2.5em;
    text-align: center;
    background-color: rgba(245,245,245,0.8);
    padding-top: 1em;
    min-height: 4em;
  }
}

table.manage-color {
  th.shortable {
    color: var(--color-red);
  }
  a {
    color: var(--color-red);
    text-decoration: none;
  }
}
