/*
    Mixin to progressively-enhance :focus-visible, keeping :focus where not supported
    Add an arbitrary list of selectors into the arguments, and the styling in the block.
    I you pass no selectors to the mixin the parent ("ampersand") operator is used instead.

    There are two mixins:
    - focus-visible: a generic focus-visible, giving you "slots" to decide what to
      render for :focus, :focus reset, and :focus-visible
    - focus-visible-outline: a focus-visible, which only resets the outline. If you don't need more custom resets, use this one!

    Use focus-visible:
    The key thing here is checking which slot is being rendered.
    For example, you can reset box-shadow here, or anything else.

    @include focus-visible using ($slot) {
        @if $slot == focus {
            outline: 2px solid transparent;
            box-shadow: 0 0 0 4px blue;
        }
        @if $slot == focusReset {
            box-shadow: none;
        }
        @if $slot == focusVisible {
            box-shadow: 0 0 0 4px blue;
        }
    }

    Use focus-visible-outline:
    @include focus-visible-outline("button", "a[href]") {
        outline: 2px solid blue;
    }

    Resulting CSS (compressed):

    button:focus,
    a[href]:focus {
        outline: 2px solid blue;
    }

    button:focus:not(:focus-visible),
    a[href]:focus:not(:focus-visible) {
        outline: none;
    }
    button:focus-visible,
    a[href]:focus-visible {
        outline: 2px solid blue;
    }
*/
uic-tab {
  align-items: center;
  background-color: var(--uic-tab-background-color);
  box-sizing: border-box;
  color: var(--uic-tab-text-color);
  cursor: pointer;
  display: flex;
  outline: 2px solid transparent;
  outline-offset: -2px;
  padding: 0 20px 0 14px;
  position: relative;
  transition: all 0.1s ease;
  user-select: none;
}
uic-tab .uic-tab__label {
  overflow: hidden;
  /* stylelint-disable declaration-property-value-disallowed-list, value-no-vendor-prefix, property-no-vendor-prefix */
  /* webkit not supported by IE, but currently no other good solution is available for multiline text with ellipsis.  */
  /* stylelint-enable declaration-property-value-disallowed-list, value-no-vendor-prefix, property-no-vendor-prefix */
}
uic-tab .uic-tab__label > slot-fb {
  -webkit-box-orient: vertical;
  display: block;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}
uic-tab[icon] .uic-tab__label,
uic-tab [slot=icon] ~ .uic-tab__label,
uic-tab [name=icon] ~ .uic-tab__label {
  margin-left: 8px;
}
uic-tab slot-fb {
  display: flex;
}

@media (hover: hover) {
  uic-tab:hover {
    background-color: var(--uic-tab-background-color-hover);
  }
}
uic-tab:focus {
  color: var(--uic-tab-text-color-focus);
  outline-color: var(--uic-tab-border-color-focus);
}

uic-tab:active {
  color: var(--uic-tab-text-color-active);
}

uic-tab:disabled {
  color: var(--uic-tab-text-color-disabled);
  font-weight: normal;
}

uic-tab[selected] {
  color: var(--uic-tab-text-color-selected);
}

@media only screen and (max-width: 1919px) {
  uic-tab {
    height: 68px;
    min-width: 64px;
  }
}
@media only screen and (min-width: 1920px) {
  uic-tab {
    height: 82px;
    min-width: 77px;
  }
}
@media only screen and (max-width: 1023px) {
  uic-tab {
    min-width: 48px;
  }
}

uic-tab[vertical] {
  width: 100%;
}
@media only screen and (max-width: 1919px) {
  uic-tab[vertical] {
    height: 52px;
  }
}
@media only screen and (min-width: 1920px) {
  uic-tab[vertical] {
    height: 63px;
  }
}
@media only screen and (max-width: 1023px) {
  uic-tab[vertical] {
    height: 39px;
  }
}

@keyframes loading-tab-horizontal {
  0% {
    left: 0;
    width: 8px;
  }
  5% {
    left: 0;
    width: 8px;
  }
  50% {
    left: 0;
    width: 100%;
  }
  95% {
    left: calc(100% - 8px);
    width: 8px;
  }
  100% {
    left: calc(100% - 8px);
    width: 8px;
  }
}
@keyframes loading-tab-vertical {
  0% {
    height: 8px;
    top: 0;
  }
  5% {
    height: 8px;
    top: 0;
  }
  50% {
    height: 100%;
    top: 0;
  }
  95% {
    height: 8px;
    top: calc(100% - 8px);
  }
  100% {
    height: 8px;
    top: calc(100% - 8px);
  }
}