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

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

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

    .with-icon {
      margin-left: var(--terra-tabs-label-next-to-icon-margin-left, 0.357rem);
    }

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

    &[data-focus-styles-enabled='true']:focus {
      box-shadow: var(--terra-tabs-workspace-hidden-tab-focus-box-shadow, none);
      outline: var(--terra-tabs-workspace-hidden-tab-focus-outline, 2px dashed #000);
      outline-offset: var(--terra-tabs-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-tabs-workspace-hidden-tab-ie-focus-before-border, 2px dashed #000);
          bottom: 0;
          box-shadow: var(--terra-tabs-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-tabs-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-tabs-workspace-hidden-tab-hidden-is-active-hover-background-color, #ebf6fd);
        }
      }

      &:first-child {
        margin-left: 0;
      }

      &:last-child {
        border-width: 0;
      }
    }

    &.is-disabled {
      background-color: var(--terra-tabs-structural-disabled-background-color, #fff);
      background-size: 0 0;
      color: var(--terra-tabs-structural-disabled-color, rgba(28, 31, 33, 0.2));
      cursor: default;
      opacity: var(--terra-tabs-structural-disabled-opacity, 1);
    }

    @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none), (hover: hover) and (pointer: fine) {
      &.is-disabled:hover {
        background-color: var(--terra-tabs-structural-disabled-hover-background-color, #fff);
        background-size: 0 0;
        color: var(--terra-tabs-structural-disabled-hover-color, rgba(28, 31, 33, 0.2));
        cursor: default;
        opacity: var(--terra-tabs-structural-disabled-hover-opacity, 1);
      }
    }

    &.is-disabled .label,
    &.is-disabled svg {
      color: var(--terra-tabs-structural-disabled-label-color, rgba(28, 31, 33, 0.7));
      opacity: var(--terra-tabs-structural-disabled-label-opacity, 0.3);
    }
  }

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

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

  .tabs-remove-button {
    background-color: #fff;
    border: 0;
    border-radius: 0.85714rem;
    color: #585d5f;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
    height: 1rem;
    line-height: 1;
    margin: 0;
    margin-left: 10px;
    min-width: 1.22857rem;
    outline: none;
    padding: 0;
    right: 0;
  }
}
