/**
 * 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.
 */
/**
 * 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 searchbar input
   * @prop --box-shadow: Box shadow of the searchbar input
   * @prop --border-radius: Border radius of the searchbar input
   * @prop --cancel-button-color: Color of the searchbar cancel button
   * @prop --clear-button-color: Color of the searchbar clear button
   * @prop --color: Color of the searchbar text
   * @prop --icon-color: Color of the searchbar icon
   * @prop --placeholder-color: Color of the searchbar placeholder
   * @prop --placeholder-font-style: Font style of the searchbar placeholder
   * @prop --placeholder-font-weight: Font weight of the searchbar placeholder
   * @prop --placeholder-opacity: Opacity of the searchbar placeholder
   */
  --placeholder-color: initial;
  --placeholder-font-style: initial;
  --placeholder-font-weight: initial;
  --placeholder-opacity: var(--ion-placeholder-opacity, 1);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
  color: var(--color);
  box-sizing: border-box;
}

.searchbar-search-icon {
  color: var(--icon-color);
  pointer-events: none;
}

.searchbar-input-container {
  display: block;
  position: relative;
  flex-shrink: 1;
  width: 100%;
}

.searchbar-input {
  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;
  border-radius: var(--border-radius);
  display: block;
  width: 100%;
  min-height: inherit;
  border: 0;
  outline: none;
  background: var(--background);
  font-family: inherit;
  box-shadow: var(--box-shadow);
  box-sizing: border-box;
  appearance: none;
}
.searchbar-input::placeholder {
  color: var(--placeholder-color);
  font-family: inherit;
  font-style: var(--placeholder-font-style);
  font-weight: var(--placeholder-font-weight);
  opacity: var(--placeholder-opacity);
}
.searchbar-input::-webkit-search-cancel-button, .searchbar-input::-ms-clear {
  display: none;
}

.searchbar-cancel-button {
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  display: none;
  height: 100%;
  border: 0;
  outline: none;
  color: var(--cancel-button-color);
  cursor: pointer;
  appearance: none;
}

.searchbar-cancel-button > div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.searchbar-clear-button {
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
  display: none;
  min-height: 0;
  outline: none;
  color: var(--clear-button-color);
  appearance: none;
}

/**
 * Normally, we would not want to use :focus
 * here because that would mean tapping the button
 * on mobile would focus it (and keep it focused).
 * However, the clear button always disappears after
 * being activated, so we never get to that state.
 */
.searchbar-clear-button:focus {
  opacity: 0.5;
}

:host(.searchbar-has-value.searchbar-should-show-clear) .searchbar-clear-button {
  display: block;
}

:host {
  /**
   * @prop --focus-ring-color: The color of the ring around the focused element.
   * @prop --focus-ring-width: The width of the ring around the focused element.
   */
  --background: var(--token-bg-neutral-subtle-default, var(--token-primitives-neutral-200, #eae9e9));
  --border-radius: var(--token-border-radius-400, var(--token-scale-400, 16px));
  --box-shadow: none;
  --cancel-button-color: var(--token-primitives-neutral-800, #626262);
  --clear-button-color: var(--token-primitives-neutral-1000, #3b3b3b);
  --color: var(--token-text-default, var(--token-primitives-neutral-1200, #242424));
  --icon-color: var(--token-icon-subtlest, var(--token-primitives-neutral-800, #626262));
  --placeholder-color: var(--token-text-subtlest, var(--token-primitives-neutral-800, #626262));
  --focus-ring-color: var(--token-border-focus-default, var(--token-primitives-blue-400, #b5c0f7));
  --focus-ring-width: var(--token-border-size-050, var(--token-scale-050, 2px));
  font-size: var(--token-font-size-350, 14px);
  font-weight: var(--token-font-weight-regular, 400);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-600, var(--token-scale-600, 24px));
  text-decoration: none;
  text-transform: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.searchbar-search-icon {
  width: var(--token-scale-400, 16px);
  height: var(--token-scale-400, 16px);
}

.searchbar-input {
  padding-top: var(--token-space-300, var(--token-scale-300, 12px));
  padding-bottom: var(--token-space-300, var(--token-scale-300, 12px));
  text-overflow: ellipsis;
  contain: strict;
}

.searchbar-clear-button {
  width: var(--token-scale-400, 16px);
  height: var(--token-scale-400, 16px);
  background-color: transparent;
  font-size: var(--token-scale-400, 16px);
  contain: strict;
}

.searchbar-cancel-button {
  width: var(--token-scale-400, 16px);
  height: var(--token-scale-400, 16px);
  background-color: transparent;
  font-size: var(--token-font-size-400, 16px);
}

.searchbar-search-icon,
.searchbar-clear-button,
.searchbar-cancel-button {
  top: 50%;
  position: absolute;
  transform: translateY(-50%);
}

.searchbar-clear-button:focus-visible,
.searchbar-cancel-button:focus-visible ion-icon {
  border-radius: var(--token-border-radius-100, var(--token-scale-100, 4px));
  outline: var(--token-border-size-050, var(--token-scale-050, 2px)) var(--token-border-style-solid, solid) var(--token-border-focus-default, var(--token-primitives-blue-400, #b5c0f7));
  opacity: 1;
}

:host(.searchbar-has-value) {
  --icon-color: var(--token-icon-default, var(--token-primitives-neutral-1200, #242424));
}

:host(.in-toolbar.searchbar-should-show-cancel) .searchbar-cancel-button {
  /**
   * The left edge of the cancel button
   * should align with the left edge
   * of the back button if the searchbar
   * is used in a toolbar regardless of
   * the searchbar size.
   */
}
:host(.in-toolbar.searchbar-should-show-cancel) .searchbar-cancel-button {
  inset-inline-start: var(--token-space-200, var(--token-scale-200, 8px));
}

/* Hover */
:host(:hover) {
  --background: var(--token-primitives-neutral-200, #eae9e9);
}

/* Focus */
:host(.searchbar-has-focus) .searchbar-input {
  outline: var(--focus-ring-width) var(--token-border-style-solid, solid) var(--focus-ring-color);
}

:host(.searchbar-has-focus) .searchbar-search-icon,
:host(.searchbar-has-focus) .searchbar-cancel-button,
:host(.searchbar-should-show-cancel) .searchbar-cancel-button {
  display: block;
}

:host(.searchbar-has-focus) .searchbar-cancel-button + .searchbar-search-icon,
:host(.searchbar-should-show-cancel) .searchbar-cancel-button + .searchbar-search-icon {
  display: none;
}

/* Disabled */
:host(.searchbar-disabled) {
  --color: var(--token-primitives-neutral-500, #a2a2a2);
  --icon-color: var(--token-icon-disabled, var(--token-primitives-neutral-500, #a2a2a2));
  --placeholder-color: var(--token-text-disabled, var(--token-primitives-neutral-500, #a2a2a2));
  cursor: default;
  pointer-events: none;
}

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

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

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

/* Small */
:host(.searchbar-size-small) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * no leading icons.
   *
   * Padding end is based on
   * desired padding from design,
   * no trailing icons.
   */
  -webkit-padding-start: var(--token-space-300, var(--token-scale-300, 12px));
  padding-inline-start: var(--token-space-300, var(--token-scale-300, 12px));
  -webkit-padding-end: var(--token-space-300, var(--token-scale-300, 12px));
  padding-inline-end: var(--token-space-300, var(--token-scale-300, 12px));
  height: var(--token-scale-1000, 40px);
}

/* Small with Leading Icons */
:host(.searchbar-size-small.searchbar-should-show-search-icon) .searchbar-input,
:host(.searchbar-size-small.searchbar-should-show-cancel) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   *
   * Padding end is based on
   * desired padding from design,
   * no trailing icons.
   */
  -webkit-padding-start: calc(var(--token-space-300, var(--token-scale-300, 12px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-start: calc(var(--token-space-300, var(--token-scale-300, 12px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  -webkit-padding-end: var(--token-space-300, var(--token-scale-300, 12px));
  padding-inline-end: var(--token-space-300, var(--token-scale-300, 12px));
}

/* Small with Leading Icons and Trailing Icons */
:host(.searchbar-size-small.searchbar-should-show-search-icon.searchbar-should-show-clear) .searchbar-input,
:host(.searchbar-size-small.searchbar-should-show-cancel.searchbar-should-show-clear) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   *
   * Padding end is based on
   * desired padding from design,
   * the size of the trailing icon (clear),
   * and the gap between the icon and the input.
   */
  -webkit-padding-start: calc(var(--token-space-300, var(--token-scale-300, 12px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-start: calc(var(--token-space-300, var(--token-scale-300, 12px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  -webkit-padding-end: calc(var(--token-space-300, var(--token-scale-300, 12px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-end: calc(var(--token-space-300, var(--token-scale-300, 12px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
}

/* Small with Trailing Icons */
:host(.searchbar-size-small.searchbar-should-show-clear) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * no leading icons.
   *
   * Padding end is based on
   * desired padding from design,
   * the size of the trailing icon (clear),
   * and the gap between the icon and the input.
   */
  -webkit-padding-start: var(--token-space-300, var(--token-scale-300, 12px));
  padding-inline-start: var(--token-space-300, var(--token-scale-300, 12px));
  -webkit-padding-end: calc(var(--token-space-300, var(--token-scale-300, 12px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-end: calc(var(--token-space-300, var(--token-scale-300, 12px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
}

:host(.searchbar-size-small) .searchbar-search-icon,
:host(.searchbar-size-small) .searchbar-cancel-button {
  inset-inline-start: var(--token-space-300, var(--token-scale-300, 12px));
}

:host(.searchbar-size-small) .searchbar-clear-button {
  inset-inline-end: var(--token-space-300, var(--token-scale-300, 12px));
}

/* Medium */
:host(.searchbar-size-medium) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * no leading icons.
   *
   * Padding end is based on
   * desired padding from design,
   * no trailing icons.
   */
  -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));
  height: var(--token-scale-1200, 48px);
}

/* Medium with Leading Icons */
:host(.searchbar-size-medium.searchbar-should-show-search-icon) .searchbar-input,
:host(.searchbar-size-medium.searchbar-should-show-cancel) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   *
   * Padding end is based on
   * desired padding from design,
   * no trailing icons.
   */
  -webkit-padding-start: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-start: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  -webkit-padding-end: var(--token-space-400, var(--token-scale-400, 16px));
  padding-inline-end: var(--token-space-400, var(--token-scale-400, 16px));
}

/* Medium with Leading Icons and Trailing Icons */
:host(.searchbar-size-medium.searchbar-should-show-search-icon.searchbar-should-show-clear) .searchbar-input,
:host(.searchbar-size-medium.searchbar-should-show-cancel.searchbar-should-show-clear) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   *
   * Padding end is based on
   * desired padding from design,
   * the size of the trailing icon (clear),
   * and the gap between the icon and the input.
   */
  -webkit-padding-start: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-start: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  -webkit-padding-end: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-end: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
}

/* Medium with Trailing Icons */
:host(.searchbar-size-medium.searchbar-should-show-clear) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * no leading icons.
   *
   * Padding end is based on
   * desired padding from design,
   * the size of the trailing icon (clear),
   * and the gap between the icon and the input.
   */
  -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: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-end: calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
}

:host(.searchbar-size-medium) .searchbar-search-icon,
:host(.searchbar-size-medium) .searchbar-cancel-button {
  inset-inline-start: var(--token-space-400, var(--token-scale-400, 16px));
}

:host(.searchbar-size-medium) .searchbar-clear-button {
  inset-inline-end: var(--token-space-400, var(--token-scale-400, 16px));
}

:host(.in-toolbar.searchbar-size-small.searchbar-should-show-cancel) .searchbar-input,
:host(.in-toolbar.searchbar-size-medium.searchbar-should-show-cancel) .searchbar-input {
  /**
   * Padding start is based on
   * the alignment of the back button,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   */
  padding-inline-start: var(--token-space-800, var(--token-scale-800, 32px));
}

/* Large */
:host(.searchbar-size-large) .searchbar-search-icon,
:host(.searchbar-size-large) .searchbar-cancel-button {
  width: var(--token-scale-500, 20px);
  height: var(--token-scale-500, 20px);
}

:host(.searchbar-size-large) .searchbar-cancel-button {
  font-size: var(--token-font-size-500, 20px);
}

:host(.searchbar-size-large) .searchbar-input {
  padding-top: var(--token-space-400, var(--token-scale-400, 16px));
  padding-bottom: var(--token-space-400, var(--token-scale-400, 16px));
  /**
   * Padding start is based on
   * desired padding from design,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   *
   * Padding end is based on
   * desired padding from design,
   * the size of the trailing icon (clear),
   * and the gap between the icon and the input.
   */
  -webkit-padding-start: var(--token-space-500, var(--token-scale-500, 20px));
  padding-inline-start: var(--token-space-500, var(--token-scale-500, 20px));
  -webkit-padding-end: var(--token-space-500, var(--token-scale-500, 20px));
  padding-inline-end: var(--token-space-500, var(--token-scale-500, 20px));
  height: var(--token-scale-1400, 56px);
}

/* Large with Leading Icons */
:host(.searchbar-size-large.searchbar-should-show-search-icon) .searchbar-input,
:host(.searchbar-size-large.searchbar-should-show-cancel) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   *
   * Padding end is based on
   * desired padding from design,
   * no trailing icons.
   */
  -webkit-padding-start: calc(var(--token-space-500, var(--token-scale-500, 20px)) + var(--token-scale-500, 20px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-start: calc(var(--token-space-500, var(--token-scale-500, 20px)) + var(--token-scale-500, 20px) + var(--token-space-200, var(--token-scale-200, 8px)));
  -webkit-padding-end: var(--token-space-500, var(--token-scale-500, 20px));
  padding-inline-end: var(--token-space-500, var(--token-scale-500, 20px));
}

/* Large with Leading Icons and Trailing Icons */
:host(.searchbar-size-large.searchbar-should-show-search-icon.searchbar-should-show-clear) .searchbar-input,
:host(.searchbar-size-large.searchbar-should-show-cancel.searchbar-should-show-clear) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   *
   * Padding end is based on
   * desired padding from design,
   * the size of the trailing icon (clear),
   * and the gap between the icon and the input.
   */
  -webkit-padding-start: calc(var(--token-space-500, var(--token-scale-500, 20px)) + var(--token-scale-500, 20px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-start: calc(var(--token-space-500, var(--token-scale-500, 20px)) + var(--token-scale-500, 20px) + var(--token-space-200, var(--token-scale-200, 8px)));
  -webkit-padding-end: calc(var(--token-space-500, var(--token-scale-500, 20px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-end: calc(var(--token-space-500, var(--token-scale-500, 20px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
}

/* Large with Trailing Icons */
:host(.searchbar-size-large.searchbar-should-show-clear) .searchbar-input {
  /**
   * Padding start is based on
   * desired padding from design,
   * no leading icons.
   *
   * Padding end is based on
   * desired padding from design,
   * the size of the trailing icon (clear),
   * and the gap between the icon and the input.
   */
  -webkit-padding-start: var(--token-space-500, var(--token-scale-500, 20px));
  padding-inline-start: var(--token-space-500, var(--token-scale-500, 20px));
  -webkit-padding-end: calc(var(--token-space-500, var(--token-scale-500, 20px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
  padding-inline-end: calc(var(--token-space-500, var(--token-scale-500, 20px)) + var(--token-scale-400, 16px) + var(--token-space-200, var(--token-scale-200, 8px)));
}

:host(.in-toolbar.searchbar-size-large.searchbar-should-show-cancel) .searchbar-input {
  /**
   * Padding start is based on
   * the alignment of the back button,
   * the size of the leading icon (search or cancel),
   * and the gap between the icon and the input.
   */
  padding-inline-start: var(--token-space-900, var(--token-scale-900, 36px));
}

:host(.searchbar-size-large) .searchbar-search-icon,
:host(.searchbar-size-large) .searchbar-cancel-button {
  inset-inline-start: var(--token-space-500, var(--token-scale-500, 20px));
}

:host(.searchbar-size-large) .searchbar-clear-button {
  inset-inline-end: var(--token-space-500, var(--token-scale-500, 20px));
}