
/*
 * Copyright (C) 2025 BIRU
 *
 * This file is part of Tenzu.
 *
 * Tenzu is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 *
 * You can contact BIRU at ask@biru.sh
 *
 */

.app-table {
  @apply table;
  min-width: 100%;
  border: 0;
  border-spacing: 0;
  table-layout: auto;
  white-space: normal;
  background-color: var(--mat-table-background-color, var(--mat-sys-surface));

  .app-table-header-group {
    @apply table-header-group;
    min-height: 48px;
    align-items: center;

    .app-table-header-row {
      @apply table-row;
      min-height: var(--mat-table-row-item-container-height, 52px);
      color: var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));
      display: flex;
      height: unset;
      border-width: 0;
      border-bottom-width:  var(--mat-table-row-item-outline-width, 1px);
      border-style: solid;
      border-bottom-color: var(--mat-sys-outline-variant);
      align-items: center;
      box-sizing: border-box;
      -webkit-font-smoothing: antialiased;
      line-height: var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));
      font-size: var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));
    }
    .app-table-header-cell {
      @apply table-cell last:pe-6 first:ps-6;
      letter-spacing: var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));
      padding: 0 16px;
      box-sizing: border-box;
      overflow: hidden;
      text-align: left;
      text-overflow: ellipsis;
      flex: 1;
      display: flex;
      align-items: center;
      word-wrap: break-word;
      min-height: inherit;
      color: var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));
      font-family: var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));
      line-height: var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));
      font-size: var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));
      font-weight: var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500));
    }
  }

  .app-table-row-group {
    @apply table-row-group;
  }
  .app-table-row:last-child  {
    border-bottom-width: 0;
  }


  .app-table-row {
    @apply table-row;
    min-height: var(--mat-table-row-item-container-height, 52px);
    color: var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));
    display: flex;
    height: unset;
    border-width: 0;
    border-bottom-width:  var(--mat-table-row-item-outline-width, 1px);
    border-style: solid;
    border-bottom-color: var(--mat-sys-outline-variant);
    align-items: center;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    line-height: var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));
    font-size: var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));
    font-weight: var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight));


    .app-table-cell {
      @apply table-cell last:pe-6 first:ps-6;

      letter-spacing: var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));
      line-height: inherit;
      padding: 0 16px;
      box-sizing: border-box;
      overflow: hidden;
      text-align: left;
      text-overflow: ellipsis;
      flex: 1;
      display: flex;
      align-items: center;
      word-wrap: break-word;
      min-height: inherit;
    }
  }
}
