/*
* Table component
*
*/

.dnb-table {
  tr.sticky {
    position: sticky;
    z-index: 4; // over borders and TDs

    transform: translate3d(0, var(--table-offset, 0), 0);
  }

  tr.sticky.css-position {
    top: var(--table-top, 0); // is set by "stickyOffset" prop
  }

  tr.sticky.is-sticky th::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;

    // The @mixin defaultDropShadow() does not work in this case
    // because we need only a bottom shadow (with clip-path)
    box-shadow: var(--shadow-default-x) -2px 12px 8px
      var(--shadow-default-color);
    clip-path: inset(6px 0 -48px 0);
  }
}
