// Lightning Design System 2.264.0-beta.1
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

/**
 * @summary Creates fixed header for inline-edit data-table
 *
 * @name fixed-header
 * @selector .slds-table_header-fixed_container
 * @restrict div
 * @variant
 */
.slds-table_header-fixed_container,
.slds-table--header-fixed_container {
  // This code creates the fixed header (faux header) used in the inline-edit data-table. I don't think we'll surface this for customers as it's very complex when scrolling horizontally and requires some other code for containers, etc
  position: relative;
  padding-top: 2rem; // This matches the height of the hover state w/border
  background-color: var(--slds-g-color-neutral-base-95, #{$table-color-background-header}); // This has to exist due to pixel paint diffs between the headers
  overflow: hidden;

  &:before {
    border-bottom: $border-width-thin solid var(--slds-g-color-border-base-1, #{$color-border});
    content: '';
    display: block;
    position: relative;
    width: 100%;
  }
}

.slds-cell-fixed {
  background-color: var(--slds-g-color-neutral-base-95, #{$table-color-background-header});
  position: absolute;
  top: 0;
  min-height: 2rem;
}

.slds-table_header-fixed,
.slds-table--header-fixed {
  border-top: 0;

  thead th {
    position: static;
    padding: 0;
    border-top: 0;
  }

  tbody tr:first-child { // Remove first border row due to faux th border
    // scss-lint:disable SelectorDepth
    td,
    th {
      border-top: 0;
    }
  }
}
