// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
// See LICENSE in the project root for license information.

// ---------------------------------------------------------------------

/// CSS selectors for easy reproduction of Auro Table UI.
///
/// Defaults are set by baseline Design Tokens
///
/// [Manage](/#scope-prefix-variable-scope) `$scope` options.
/// @group utility-auro
/// @example scss - import selector file
///   @import "./node_modules/@aurodesignsystem/webcorestylesheets/dist/componentSupport/table";

#{$scope}.auro_table {
  display: block;
  overflow: scroll;

  width: auto;
  margin-bottom: var(--ds-size-400, $ds-size-400);

  border-spacing: var(--ds-size-150, $ds-size-150);
  border-collapse: collapse;

  font-weight: var(--ds-text-heading-display-weight, $ds-text-heading-display-weight);

  tr {
    &:nth-child(even) {
      background-color: var(--ds-color-container-secondary-default, $ds-color-container-secondary-default);
    }
  }

  th {
    text-align: left;

    font-weight: var(--ds-text-heading-default-weight, $ds-text-heading-default-weight);
  }

  @include auro_breakpoint($min: $ds-grid-breakpoint-sm) {
    display: table;

    width: 100%;
  }

  thead {
    border-collapse: collapse;
    border-bottom: 1px solid var(--ds-color-border-tertiary-default, $ds-color-border-tertiary-default);
  }

  th,
  td {
    padding: var(--ds-size-200, $ds-size-200);
  }
}
