table {
  border-style: none;
  border-spacing: 0 $default-padding;
  padding: 0;
  font-size: inherit;
  width: 100%;

  &.list .tools {
    button, a {
      display: inline-block;
      width: 18px;
      height: 18px;
      padding: 0;
      margin: 0 $default-margin;
      line-height: inherit;
      text-align: center;

      > .icon {
        margin: 0;
      }
    }
  }
}

.list td, .list th {
  padding: 2*$default-padding;
  vertical-align: top;
  line-height: 18px;
  border-right: 1px solid $medium-gray;
  transition: background-color $transition-duration;

  &:last-child {
    border-right: 0 none;
  }

  &.wrap-text {
    white-space: normal !important;
  }

  &.icon {
    width: 16px;
    text-align: center;
  }
}

.list th {
  position: relative;

  &.icon {
    border-bottom: 1px solid $medium-gray;
  }
}

th {
  white-space: nowrap;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid $medium-gray;
  font-weight: bold;

  i {
    font-style: normal;
    position: absolute;
    right: 2px;
    top: 4px;
    text-shadow: 1px 1px 1px #fff;
  }

  a {

    &.sortable {
      display: block;
      margin: -4px -8px;
      padding: 4px 18px 4px 8px;
      text-shadow: 1px 1px 1px #fff;
    }

    &.sorted {
      position: relative;
      background: $medium-gray;
    }
  }
}

tr.even td {
  background-color: $table-row-even-background-color;
}

tr.odd td {
  background-color: $table-row-odd-background-color;
}

.list tr .tools {
  width: 40px;
  white-space: nowrap;
  @extend .disable-user-select;

  &.long {
    width: 60px;
  }
}

td.heading {
  padding: $default-padding 0;
  font-weight: bold;
  text-decoration: underline;
}

.list .tools .icon,
.list td.icon .icon {
  @extend .disable-user-select;
  margin: 0 $default-margin;
}

.list tr:hover td {
  background-color: $table-row-hover-color;
}

td, th {

  &.center, &.boolean {
    text-align: center;
  }

  &.right {
    text-align: right;
  }
}

td {

  &.file_name {
    word-break: break-all;
  }

  &.file_type {
    width: 130px;
  }

  &.file_size {
    width: 80px;
  }

  &.date {
    width: 150px;
  }

  &.login {
    width: 100px;
  }

  &.email {
    width: 270px;
  }

  &.role {
    width: 10%;
  }

  &.rights {
    width: 60px;
  }
}

th.count, td.count {
  width: 120px;
  text-align: right;
  padding-right: 16px;
}

table.window_form {
  width: 100%;
}

.list .login_status {
  width: 16px;
}

td#user_roles {
  padding: 9px 0;

  label {
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    min-width: 40%;
  }
}
