@use '../../variables' as *;
$row-height: $size-l;

.root {
  background-color: var(--color-surface-0);
}

.toolbar {
  border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
}
.toolbar ~ .table {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.table {
  border-collapse: collapse;
  width: 100%;
  background-color: var(--color-surface-0);
  border-radius: var(--border-radius-small);
  overflow: hidden;

  thead {
    background-color: var(--color-surface-1);
    tr {
      height: $row-height;

      th {
        border-bottom: 1px solid var(--color-neutral-0);
      }
    }
  }

  td {
    height: $row-height;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  tbody {
    background-color: var(--color-surface-1);
  }

  tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--color-neutral-0);
  }
  tbody td {
    overflow: hidden;
    padding: 0 $space-m;
  }

  th {
    font-weight: 600;
    text-align: left;
    padding: $space-s $space-m;
    line-height: 1.3;
  }

  tbody td,
  .head th {
    &.menu {
      padding: $space-s;
      width: $row-height;
    }
  }

  .check {
    width: $row-height;
    text-align: center;
  }

  &.hasSelected {
    .toolbar {
      background-color: var(--color-accent-50);
    }
  }
}

.fixedColumns {
  table-layout: fixed;
}

.loadBtn {
  button {
    width: 100%;
  }
}

.selectable:hover {
  cursor: pointer;

  td {
    background: var(--color-surface-2);
  }
}
