@import '../clinical-lowlight-theme/HiddenTab.module';
@import '../orion-fusion-theme/HiddenTab.module';

:local {
  .hidden {
    align-items: start;
    background-color: var(--terra-application-workspace-hidden-tab-hidden-background-color, #fff);
    color: var(--terra-application-workspace-hidden-tab-hidden-color, #222a2e);
    cursor: pointer;
    display: flex;
    font-size: var(--terra-application-workspace-hidden-tab-hidden-font-size, 1rem);
    font-weight: normal;
    line-height: var(--terra-application-workspace-hidden-tab-hidden-line-height, 1.4);
    margin-left: 0;
    outline: none;
    padding-bottom: var(--terra-application-workspace-hidden-tab-hidden-padding-bottom, 0.5rem);
    padding-left: var(--terra-application-workspace-hidden-tab-hidden-padding-left, 0.5714rem);
    padding-right: var(--terra-application-workspace-hidden-tab-hidden-padding-right, 0.7143rem);
    padding-top: var(--terra-application-workspace-hidden-tab-hidden-padding-top, 0.3571rem);
    position: relative;

    .label {
      flex: 1 1 auto;
      overflow: hidden;
      text-align: start;
      word-break: break-word;
    }

    @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none), (hover: hover) and (pointer: fine) {
      &:hover {
        background-color: var(--terra-application-workspace-hidden-tab-hidden-hover-background-color, #ebf6fd);
      }
    }

    &[data-focus-styles-enabled='true']:focus {
      box-shadow: var(--terra-application-workspace-hidden-tab-focus-box-shadow, none);
      outline: var(--terra-application-workspace-hidden-tab-focus-outline, 2px dashed #000);
      outline-offset: var(--terra-application-workspace-hidden-tab-focus-outline-offset, -2px);
      z-index: 5;
    }

    // -----------------------
    // Delete entry after IE support is dropped. IE doesn't support outline-offset, so this mimics it.
    // -----------------------
    @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
      &[data-focus-styles-enabled='true']:focus {
        outline: none;

        &::before { // stylelint-disable-line max-nesting-depth
          border: var(--terra-application-workspace-hidden-tab-ie-focus-before-border, 2px dashed #000);
          bottom: 0;
          box-shadow: var(--terra-application-workspace-hidden-tab-ie-focus-before-box-shadow, none);
          content: '';
          left: 0;
          position: absolute;
          right: 0;
          top: 0;
        }
      }
    }

    &.is-active {
      box-shadow: none;
      color: var(--terra-application-workspace-hidden-tab-hidden-is-active-color, #000);
      font-weight: normal;
      overflow: hidden;
  
      @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none), (hover: hover) and (pointer: fine) {
        &:hover { // stylelint-disable-line max-nesting-depth
          background-color: var(--terra-application-workspace-hidden-tab-hidden-is-active-hover-background-color, #ebf6fd);
        }
      }

      &:first-child {
        margin-left: 0;
      }
  
      &:last-child {
        border-width: 0;
      }
    }
  }

  .checkbox {
    color: var(--terra-application-workspace-hidden-tab-checkbox-color, #007cc3);
    flex: 0 0 auto;
    height: var(--terra-application-workspace-hidden-tab-checkbox-height, 0.8571rem);
    margin-right: var(--terra-application-workspace-hidden-tab-checkbox-margin-right, 0.4286rem);
    margin-top: var(--terra-application-workspace-hidden-tab-checkbox-margin-top, 0.1429rem);
    position: relative;
    width: var(--terra-application-workspace-hidden-tab-checkbox-width, 0.8571rem);

    > * {
      height: 100%;
      position: absolute;
      width: 100%;
    }
  }
}
