/**
 * A heuristic that applies CSS to tablet
 * viewports.
 *
 * Usage:
 * @include tablet-viewport() {
 *   :host {
 *     background-color: green;
 *   }
 * }
 */
/**
 * A heuristic that applies CSS to mobile
 * viewports (i.e. phones, not tablets).
 *
 * Usage:
 * @include mobile-viewport() {
 *   :host {
 *     background-color: blue;
 *   }
 * }
 */
/**
 * Convert a pixels given value into rem
 * 
 * @param pixels - Value in pixels to be converted (i.e. px)
 * @param context (optional) - Baseline value
 */
/**
 * Convert a font size to a dynamic font size.
 * Fonts that participate in Dynamic Type should use
 * dynamic font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param unit (optional) - The unit to convert to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a maximum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a minimum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * maximum and minimum font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
:host {
  /**
   * @prop --background: Background of the tab button
   * @prop --background-focused: Background of the tab button when focused with the tab key
   * @prop --background-focused-opacity: Opacity of the tab button background when focused with the tab key
   *
   * @prop --color: Color of the tab button
   * @prop --color-focused: Color of the tab button when focused with the tab key
   * @prop --color-selected: Color of the selected tab button
   *
   * @prop --padding-top: Top padding of the tab button
   * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the tab button
   * @prop --padding-bottom: Bottom padding of the tab button
   * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the tab button
   *
   * @prop --ripple-color: Color of the button ripple effect
   */
  --ripple-color: var(--color-selected);
  --background-focused-opacity: 1;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  outline: none;
  background: var(--background);
  color: var(--color);
}

.button-native {
  display: flex;
  position: relative;
  flex-direction: inherit;
  align-items: inherit;
  justify-content: inherit;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  -webkit-user-drag: none;
}

.button-inner {
  display: flex;
  position: relative;
  flex-flow: inherit;
  align-items: inherit;
  justify-content: inherit;
  width: 100%;
  height: 100%;
  z-index: 1;
}

:host(.ion-focused) .button-native {
  color: var(--color-focused);
}
:host(.ion-focused) .button-native::after {
  background: var(--background-focused);
  opacity: var(--background-focused-opacity);
}

@media (any-hover: hover) {
  a:hover {
    color: var(--color-selected);
  }
}
:host(.tab-selected) {
  color: var(--color-selected);
}

:host(.tab-hidden) {
  /* stylelint-disable-next-line declaration-no-important */
  display: none !important;
}

::slotted(ion-label),
::slotted(ion-icon) {
  display: block;
  align-self: center;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

::slotted(ion-label) {
  order: 0;
}

::slotted(ion-icon) {
  order: -1;
  height: 1em;
}

:host(.tab-has-label-only) ::slotted(ion-label) {
  white-space: normal;
}

::slotted(ion-badge) {
  box-sizing: border-box;
  position: absolute;
  z-index: 1;
}

:host(.tab-layout-icon-start) {
  flex-direction: row;
}

:host(.tab-layout-icon-end) {
  flex-direction: row-reverse;
}

:host(.tab-layout-icon-bottom) {
  flex-direction: column-reverse;
}

:host(.tab-layout-icon-hide) ::slotted(ion-icon) {
  display: none;
}

:host(.tab-layout-label-hide) ::slotted(ion-label) {
  display: none;
}

ion-ripple-effect {
  color: var(--ripple-color);
}

:host {
  --focus-ring-color: var(--token-border-focus-default, var(--token-primitives-blue-400, #b5c0f7));
  --focus-ring-width: var(--token-border-radius-025, var(--token-scale-050, 2px));
  font-size: var(--token-font-size-300, 12px);
  font-weight: var(--token-font-weight-medium, 500);
  letter-spacing: var(--token-font-letter-spacing-1, 1%);
  line-height: var(--token-font-line-height-500, var(--token-scale-500, 20px));
  text-decoration: none;
  text-transform: none;
  position: relative;
  align-content: center;
  min-width: var(--token-scale-1200, 48px);
  min-height: var(--token-scale-1200, 48px);
  max-height: var(--token-scale-1800, 72px);
}

.button-native {
  border-radius: inherit;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  -webkit-padding-start: var(--padding-start);
  padding-inline-start: var(--padding-start);
  -webkit-padding-end: var(--padding-end);
  padding-inline-end: var(--padding-end);
  padding-top: var(--padding-top);
  padding-bottom: var(--padding-bottom);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-decoration: inherit;
  text-indent: inherit;
  text-overflow: inherit;
  text-transform: inherit;
  white-space: inherit;
  overflow: visible;
}

.button-native::after {
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  content: "";
  opacity: 0;
}

:host(.tab-disabled)::after {
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  background-color: var(--token-state-disabled, rgba(255, 255, 255, 0.6));
  content: "";
  pointer-events: none;
  z-index: 1;
}

.button-native {
  min-width: var(--token-scale-1200, 48px);
  overflow: visible;
}
.button-native::after {
  border-radius: inherit;
}

:host(.ion-focused) .button-native::after {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
}

:host(.ion-activated) .button-native::after {
  background: var(--background-activated);
  opacity: var(--background-activated-opacity);
}

::slotted(ion-icon) {
  width: var(--token-scale-600, 24px);
  height: var(--token-scale-600, 24px);
}

:host(.tab-button-shape-soft) {
  border-radius: var(--token-border-radius-200, var(--token-scale-200, 8px));
}

:host(.tab-button-shape-round) {
  border-radius: var(--token-border-radius-400, var(--token-scale-400, 16px));
}

:host(.tab-button-shape-rectangular) {
  border-radius: var(--token-border-radius-0, var(--token-scale-0, 0px));
}

:host ::slotted(ion-badge) {
  inset-inline-start: calc(50% + var(--token-scale-300, 12px));
}

:host ::slotted(ion-badge.badge-vertical-top) {
  top: -2px;
}

:host ::slotted(ion-badge.badge-vertical-top:empty) {
  top: calc(var(--token-scale-100, 4px) * -1);
}

:host ::slotted(ion-badge.badge-vertical-bottom) {
  top: calc(50% - var(--token-scale-200, 8px));
}

:host ::slotted(ion-badge.badge-vertical-bottom:empty) {
  top: calc(50% - var(--token-scale-100, 4px));
}

:host ::slotted(ion-badge[vertical]:not(:empty)) {
  -webkit-padding-start: var(--token-scale-100, 4px);
  padding-inline-start: var(--token-scale-100, 4px);
  -webkit-padding-end: var(--token-scale-100, 4px);
  padding-inline-end: var(--token-scale-100, 4px);
  padding-top: var(--token-scale-100, 4px);
  padding-bottom: var(--token-scale-100, 4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

:host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-top) {
  top: calc(50% - var(--token-scale-100, 4px));
}

:host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-bottom) {
  top: calc(50% + var(--token-scale-100, 4px));
}

:host(.tab-layout-icon-bottom) ::slotted(ion-badge.badge-vertical-bottom:empty) {
  top: calc(50% + 14px);
}