.react-tabs {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: 100%;
  align-content: stretch;

  &.react-tabs--nested {
    border: none;
    .react-tabs__tab-list {
      .react-tabs__tab {
        border-width: 0;
        height: var(--line-height-md);
      }
      .react-tabs__tab--selected {
        border-bottom: 2px solid var(--hl-xl);
      }
      &::after {
        width: 100%;
        height: var(--line-height-sm);
        content: '';
        border-bottom: none;
      }
    }
  }
  
  .tab-action-wrapper {
    border-bottom: 1px solid var(--hl-md);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-content: flex-start;
    align-items: center;

    &>div:nth-of-type(1) {
      order: 0;
      flex: 1;
      overflow: auto;
      .react-tabs__tab-list {
        &::-webkit-scrollbar {
          display: none !important;
          height: 0px !important;
        }
      }
    }

    &>div:nth-of-type(2) {
      order: 0;
      flex: 0 0 auto;
      align-self: auto;
    }
  }
  .tab-action-tabs {
    border: none; 
  }
  .react-tabs__tab-list {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: var(--color-bg);

    &::-webkit-scrollbar {
      height: var(--padding-sm);
      border-radius: calc(var(--padding-sm) / 2);
    }

    &::-webkit-scrollbar-track {
      background-color: var(--color-bg);
    }

    &::-webkit-scrollbar-thumb {
      background-color: transparent;
    }

    &::-webkit-scrollbar-thumb {
      background-color: var(--hl-xxs);
    }

    &:hover::-webkit-scrollbar-thumb {
      background-color: var(--hl-sm);
    }

    &::after {
      width: 100%;
      height: var(--line-height-sm);
      content: '';
      border-bottom: 1px solid var(--hl-md);
    }
  }

  .react-tabs__tab {
    height: var(--line-height-sm);
    border: 1px solid transparent;
    border-bottom: 1px solid var(--hl-md);
    border-top: 0 !important;
    white-space: nowrap;
    display: flex;
    position: relative;

    &:not(.react-tabs__tab--selected)::after {
      content: ' ';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }

    .bubble {
      position: relative;
      bottom: 0.4em;
      font-size: 0.8em;
      min-width: 0.6em;
      background: var(--hl-sm);
      padding: 2px;
      border-radius: 3px;
      display: inline-block;
      text-align: center;
      line-height: 0.8em;
      border: 1px solid var(--hl-xxs);
    }

    &:first-child {
      border-left: 0 !important;
    }

    &:focus {
      outline: 0;
    }

    & > * {
      color: var(--hl);
      height: 100%;
      padding-left: calc(var(--padding-md) / 4);
      padding-right: calc(var(--padding-md) / 4);

      &:first-child {
        padding-left: var(--padding-md);
      }

      &:last-child {
        padding-right: var(--padding-md);
      }
    }

    &:not(.react-tabs__tab--selected) .dropdown i.fa {
      opacity: var(--opacity-super-subtle);
    }

    &.react-tabs__tab--selected:focus {
      background-color: var(--hl-md);
    }

    &.react-tabs__tab button:focus {
      text-decoration: underline;
    }

    &.react-tabs__tab--selected {
      border: 1px solid var(--hl-md);
      border-bottom-color: transparent;

      * {
        color: inherit;
      }
    }
  }

  .react-tabs__tab > button,
  .react-tabs__tab > .dropdown > button {
    background: transparent;
  }

  .react-tabs__tab > button > a {
    color: inherit;
  }

  .react-tabs__tab-panel {
    width: 100%;
    height: 100%;
    position: relative;
    box-sizing: border-box;
    &:not(.react-tabs__tab-panel--selected) {
      display: none;
    }
  }
}
