/**
 * 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 bar
   * @prop --border: Border of the tab bar
   * @prop --color: Color of the tab bar
   */
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: var(--border);
  background: var(--background);
  color: var(--color);
  text-align: center;
  user-select: none;
  /* stylelint-disable-next-line declaration-no-important */
  box-sizing: content-box !important;
}

:host(.ion-color) ::slotted(ion-tab-button.ion-focused),
:host(.tab-bar-translucent) ::slotted(ion-tab-button.ion-focused) {
  background: var(--background-focused);
}

:host(.tab-bar-translucent) ::slotted(ion-tab-button) {
  background: transparent;
}

:host([slot=top]) {
  border-top: 0;
  border-bottom: var(--border);
}

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

/* Full */
:host(.tab-bar-full) {
  width: auto;
  contain: strict;
  /* stylelint-disable */
  padding-bottom: var(--ion-safe-area-bottom, 0);
  padding-right: var(--ion-safe-area-right);
  padding-left: var(--ion-safe-area-left);
  /* stylelint-enable */
}

:host([slot=top].tab-bar-full) {
  padding-top: var(--ion-safe-area-top, 0);
  padding-bottom: 0;
}

:host {
  --background: var(--ion-tab-bar-background, var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff)));
  --background-activated: var(--ion-tab-bar-background-activated, var(--token-bg-select-default, var(--token-semantics-primary-100, var(--token-primitives-blue-100, #e9ecfc))));
  --background-focused: var(--ion-tab-bar-background-focused, transparent);
  --border: var(--token-border-size-0, var(--token-scale-0, 0px)) var(--token-border-style-solid, solid) var(--ion-tab-bar-border-color, transparent);
  --color: var(--ion-tab-bar-color, var(--token-primitives-neutral-800, #626262));
  --color-selected: var(--ion-tab-bar-color-selected, var(--token-text-primary, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3))));
  /*
   * In case there's scrolling, justify the content to the start.
   */
  justify-content: unset;
  /*
   * Ensure the tab bar does not grow larger than the viewport width.
   * Useful for when the tab buttons have large labels, allowing the space
   * to be evenly divided among the buttons.
   */
  max-width: 100%;
  /**
   * Tab bar has a box sizing of content-box to ensure the padding
   * is not included in the height. This is important for the
   * component to adjust to the safe area bottom.
   *
   * In order for the height to be calculated correctly, the padding
   * top and bottom must be excluded from the height calculation.
   */
  min-height: calc(var(--token-scale-1400, 56px) - var(--token-space-100, var(--token-scale-100, 4px)) * 2);
  gap: var(--token-space-300, var(--token-scale-300, 12px));
  box-shadow: var(--token-elevation-2, 0px 1px 5px 0px rgba(0, 0, 0, 0.05), 0px 8px 25px 0px rgba(0, 0, 0, 0.08));
  /*
   * In case there are more tab buttons than can fit in the tab bar, enable
   * horizontal scrolling.
   */
  overflow: auto hidden;
  z-index: 10;
}

/* Full */
:host(.tab-bar-full) {
  /* stylelint-disable */
  padding-top: var(--token-space-100, var(--token-scale-100, 4px));
  padding-bottom: calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-bottom, 0));
  padding-right: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-right, 0));
  padding-left: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-left, 0));
  /* stylelint-enable */
}

:host([slot=top].tab-bar-full) {
  padding-top: calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-top, 0));
  padding-bottom: var(--token-space-100, var(--token-scale-100, 4px));
}

/* Compact */
:host(.tab-bar-compact) {
  -webkit-padding-start: var(--token-space-400, var(--token-scale-400, 16px));
  padding-inline-start: var(--token-space-400, var(--token-scale-400, 16px));
  -webkit-padding-end: var(--token-space-400, var(--token-scale-400, 16px));
  padding-inline-end: var(--token-space-400, var(--token-scale-400, 16px));
  padding-top: var(--token-space-100, var(--token-scale-100, 4px));
  padding-bottom: var(--token-space-100, var(--token-scale-100, 4px));
  position: absolute;
  align-self: center;
  width: fit-content;
  contain: content;
}

:host([slot=top].tab-bar-compact) {
  top: calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-top, 0));
}

:host([slot=bottom].tab-bar-compact) {
  bottom: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-bottom, 0));
}

/* Soft */
:host(.tab-bar-soft) {
  border-radius: var(--token-border-radius-400, var(--token-scale-400, 16px));
}

/* Round */
:host(.tab-bar-round) {
  border-radius: var(--token-border-radius-full, 999px);
}

/* Rectangular */
:host(.tab-bar-rectangular) {
  border-radius: var(--token-border-radius-0, var(--token-scale-0, 0px));
}