//-----------------------------
// Link
//-----------------------------

@import '../../globals/scss/colors';
@import '../../globals/scss/vars';
@import '../../globals/scss/layout';
@import '../../globals/scss/typography';
@import '../../globals/scss/helper-mixins';
@import '@carbon/import-once/scss/import-once';

@include exports('table') {
  .#{$prefix}--table {
    width: 100%;

    th,
    td {
      padding: $spacing-xs;
    }

    th {
      border-right: 1px solid var(--ui-04);
      text-align: left;
      &:last-child {
        border-right-width: 0px;
      }
    }

    thead,
    th {
      background: var(--ui-03);
      border-bottom: 2px solid #dfe3e6;
      font-weight: 600;
      font-size: 0.85em;
    }

    tbody {
      tr {
        border-bottom: 1px solid var(--ui-04);
        &:last-child {
          border-bottom-width: 0px;
        }
      }
    }
  }

  .#{$prefix}--table--with-border {
    border: 1px solid var(--ui-04);
  }

  /* Cell Classes in work */
  .#{$prefix}--cell--bold {
    font-weight: 700;
  }

  .#{$prefix}--cell--large-number {
    font-size: 2.5rem;
  }

  .#{$prefix}--cell--list {
    line-height: 1.5rem;
  }

  .#{$prefix}--table--sorting {
    margin-left: $spacing-2xs;
    vertical-align: text-top;
    display: inline-block;
    svg {
      //width: auto;
      //height: 0.8rem;
      path {
        fill: var(--interactive-01);
      }
    }
  }

  .#{$prefix}--table--is-sortable {
    min-width: 25px;
  }
  /*
  @include breakpointMax(bp--sm--major) {
    .ReactTable--responsive {
      .rt-thead,
      .rt-tbody {
        min-width: inherit !important;
      }

      .rt-thead {
        display: none;
      }

      .rt-tr {
        display: block;
        display: flex;
        flex-direction: column;
      }

      .rt-th,
      .rt-td {
        width: 100% !important;
        max-width: inherit !important;
      }

      .rt-expandable {
        height: inherit !important; // TODO: Write custom Expander Component
        width: inherit !important;
      }

      .rt-expander {
        color: var(--interactive-01);
        margin: 0;

        &::after {
          display: none;
        }
      }
    }

    .ReactTable--responsive__cell {
      //display: flex;
    }

    .ReactTable--responsive__cell__title {
      display: block;
      font-weight: 600;
      margin-top: rem(5px);
      margin-bottom: rem(5px);
      width: 100%;
    }

    .ReactTable--responsive__cell__content {
    }
  }

  @include breakpoint(bp--sm--major) {
    .ReactTable--responsive__cell__title {
      display: none;
    }

    .rt-expander {
      button {
        display: none;
      }
    }
  }

  .ReactTable__subcomponent {
    padding: rem(20px);
  }*/
}
