/**
 * 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;
 *   }
 * }
 */
:host {
  /**
   * @prop --background: Background of the toolbar
   *
   * @prop --border-color: Color of the toolbar border
   * @prop --border-style: Style of the toolbar border
   * @prop --border-width: Width of the toolbar border
   *
   * @prop --color: Color of the toolbar text
   *
   * @prop --min-height: Minimum height of the toolbar
   *
   * @prop --opacity: Opacity of the toolbar background
   *
   * @prop --padding-top: Top padding of the toolbar
   * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the toolbar
   * @prop --padding-bottom: Bottom padding of the toolbar
   * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the toolbar
   */
  --border-width: 0;
  --border-style: solid;
  --opacity: 1;
  --opacity-scale: 1;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: block;
  position: relative;
  width: 100%;
  padding-right: var(--ion-safe-area-right);
  padding-left: var(--ion-safe-area-left);
  color: var(--color);
  contain: content;
  box-sizing: border-box;
}

.toolbar-container {
  -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);
  display: flex;
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--min-height);
  contain: content;
  overflow: hidden;
  box-sizing: border-box;
}

.toolbar-background {
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  transform: translateZ(0);
  border-width: var(--border-width);
  border-style: var(--border-style);
  border-color: var(--border-color);
  background: var(--background);
  contain: strict;
  opacity: calc(var(--opacity) * var(--opacity-scale));
  pointer-events: none;
}

::slotted(ion-progress-bar) {
  right: 0;
  left: 0;
  bottom: 0;
  position: absolute;
}

/**
 * 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 {
  --background: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
  --color: var(--token-text-default, var(--token-primitives-neutral-1200, #242424));
  --border-color: currentColor;
  --padding-top: var(--token-space-200, var(--token-scale-200, 8px));
  --padding-bottom: var(--token-space-200, var(--token-scale-200, 8px));
  --padding-start: var(--token-space-200, var(--token-scale-200, 8px));
  --padding-end: var(--token-space-200, var(--token-scale-200, 8px));
  --min-height: var(--token-scale-1400, 56px);
}

.toolbar-container {
  gap: var(--token-space-400, var(--token-scale-400, 16px));
  z-index: 10;
}

.toolbar-background {
  z-index: -1;
}

.toolbar-content {
  flex: 1 1 auto;
  min-width: 0;
}

:host(.toolbar-searchbar) ::slotted(ion-searchbar) {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}

::slotted(ion-buttons) {
  gap: var(--token-space-200, var(--token-scale-200, 8px));
}

::slotted(ion-title) {
  -webkit-padding-start: var(--token-space-200, var(--token-scale-200, 8px));
  padding-inline-start: var(--token-space-200, var(--token-scale-200, 8px));
  -webkit-padding-end: var(--token-space-200, var(--token-scale-200, 8px));
  padding-inline-end: var(--token-space-200, var(--token-scale-200, 8px));
}

:host(.toolbar-title-default) ::slotted(ion-title) {
  text-align: center;
}

:host(.toolbar-title-large) ::slotted(ion-title) {
  -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));
}

:host(.has-end-content) slot[name=end],
:host(.show-end) slot[name=end] {
  display: flex;
  flex: 0 0 var(--start-end-size, 0);
  justify-content: flex-end;
  text-align: end;
}

:host(.has-start-content) slot[name=start],
:host(.show-start) slot[name=start] {
  display: flex;
  flex: 0 0 var(--start-end-size, 0);
}

:host(.has-primary-content) slot[name=primary],
:host(.show-primary) slot[name=primary] {
  display: flex;
  flex: 0 0 var(--primary-secondary-size, 0);
  justify-content: flex-end;
  text-align: end;
}

:host(.has-secondary-content) slot[name=secondary],
:host(.show-secondary) slot[name=secondary] {
  display: flex;
  flex: 0 0 var(--primary-secondary-size, 0);
}