* {
  box-sizing: border-box;
}

*:active {
  outline: none;
}

*:focus-visible {
  outline: none;
  box-shadow: var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc);
}

:host {
  box-shadow: none !important;
}

::-moz-focus-inner {
  border: none;
}

input,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
  font-stretch: inherit;
}

:host(.sr),
:host(.sr) button {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.sr,
.sr button {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.hidden {
  display: none;
}

:host([hidden]) {
  display: none;
}

.invisible {
  visibility: hidden;
}

@container style(--t-prefers-motion: "reduced") {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-delay: 0ms !important;
  }
}
@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")) {
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
      animation-delay: 0ms !important;
      transition-delay: 0ms !important;
    }
  }
}
/**
 * @prop --tct-pill-margin: (<length-percentage>) Controls the trailing inline margin between sibling pills.
 * @prop --tct-pill-min-height: (<length>) Controls the minimum height of the pill (and its popover container).
 * @prop --tct-pill-max-width: (<length-percentage>) Controls the maximum width of the pill label when options are present.
 * @prop --tct-pill-disabled-opacity: (<number>) Controls the opacity of the pill when disabled.
 * @prop --tct-pill-btn-height: (<length>) Controls the height of the pill button.
 * @prop --tct-pill-btn-padding-inline: (<length-percentage>+) Controls the inline padding of the pill button.
 * @prop --tct-pill-btn-border-radius: (<length-percentage>) Controls the corner radius of the pill button.
 * @prop --tct-pill-btn-border-width: (<length>+) Controls the border width of the pill button.
 * @prop --tct-pill-btn-border-color: (<color>) Controls the border color of the pill button in the default state.
 * @prop --tct-pill-btn-background: (<color>) Controls the background color of the pill button in the default state.
 * @prop --tct-pill-btn-box-shadow?: (*) Controls the optional box shadow of the pill button in the default state.
 * @prop --tct-pill-btn-backdrop-filter?: (*) Controls the optional backdrop-filter of the pill button in the default state.
 * @prop --tct-pill-btn-color: (<color>) Controls the text color of the pill button in the default state.
 * @prop --tct-pill-btn-font-size: (<length-percentage>) Controls the font size of the pill button.
 * @prop --tct-pill-btn-font-weight: (<number>) Controls the font weight of the pill button.
 * @prop --tct-pill-btn-letter-spacing?: (<length>) Controls the optional letter spacing of the pill button.
 * @prop --tct-pill-btn-tween: (*) Controls the transition timing of the pill button's interactive state changes.
 * @prop --tct-pill-btn-focus-box-shadow: (*) Controls the box shadow of the pill button when focused.
 * @prop --tct-pill-btn-focus-visible-box-shadow: (*) Controls the box shadow of the pill button when focused via keyboard.
 * @prop --tct-pill-hover-btn-background: (<color>) Controls the background color of the pill button on hover.
 * @prop --tct-pill-hover-close-btn-background: (<color>) Controls the background color of the close button on hover when the pill is active.
 * @prop --tct-pill-hover-close-btn-border-color: (<color>) Controls the border color of the close button on hover when the pill is active.
 * @prop --tct-pill-active-btn-background: (<color>) Controls the background color of the pill button when active in the default theme.
 * @prop --tct-pill-active-btn-color: (<color>) Controls the text color of the pill button when active.
 * @prop --tct-pill-active-btn-border-color: (<color>) Controls the border color of the pill button when active in the default theme.
 * @prop --tct-pill-active-btn-box-shadow?: (*) Controls the optional box shadow of the pill button when active.
 * @prop --tct-pill-active-btn-backdrop-filter?: (*) Controls the optional backdrop-filter of the pill button when active.
 * @prop --tct-pill-icon-gap: (<length-percentage>) Controls the gap between the pill label and trailing icon.
 * @prop --tct-pill-icon-size: (<length>) Controls the size of the pill's trailing icon.
 * @prop --tct-pill-icon-stroke: (<color>) Controls the stroke color of the pill's trailing icon.
 * @prop --tct-pill-icon-stroke-width?: (<number>) Controls the optional stroke width of the pill's trailing icon.
 * @prop --tct-pill-primary-active-background: (<color>) Controls the background color of the pill button when active and theme is primary.
 * @prop --tct-pill-primary-active-font-color: (<color>) Controls the text color of the pill button when active and theme is primary.
 * @prop --tct-pill-primary-active-border-color: (<color>) Controls the border color of the pill button when active and theme is primary.
 * @prop --tct-pill-primary-active-hover-background: (<color>) Controls the background color of the pill button when active and theme is primary, on hover.
 * @prop --tct-pill-primary-active-hover-border-color: (<color>) Controls the border color of the pill button when active and theme is primary, on hover.
 * @prop --tct-pill-primary-active-btn-box-shadow?: (*) Controls the optional box shadow of the pill button when active and theme is primary.
 * @prop --tct-pill-primary-active-backdrop-filter?: (*) Controls the optional backdrop-filter of the pill button when active and theme is primary.
 * @prop --tct-pill-secondary-active-background: (<color>) Controls the background color of the pill button when active and theme is secondary.
 * @prop --tct-pill-secondary-active-font-color: (<color>) Controls the text color of the pill button when active and theme is secondary.
 * @prop --tct-pill-secondary-active-border-color: (<color>) Controls the border color of the pill button when active and theme is secondary.
 * @prop --tct-pill-secondary-active-hover-background: (<color>) Controls the background color of the pill button when active and theme is secondary, on hover.
 * @prop --tct-pill-secondary-active-hover-border-color: (<color>) Controls the border color of the pill button when active and theme is secondary, on hover.
 * @prop --tct-pill-secondary-active-box-shadow?: (*) Controls the optional box shadow of the pill button when active and theme is secondary.
 * @prop --tct-pill-secondary-active-backdrop-filter?: (*) Controls the optional backdrop-filter of the pill button when active and theme is secondary.
 * @prop --tct-pill-tertiary-active-background: (<color>) Controls the background color of the pill button when active and theme is tertiary.
 * @prop --tct-pill-tertiary-active-font-color: (<color>) Controls the text color of the pill button when active and theme is tertiary.
 * @prop --tct-pill-tertiary-active-border-color: (<color>) Controls the border color of the pill button when active and theme is tertiary.
 * @prop --tct-pill-tertiary-active-hover-background: (<color>) Controls the background color of the pill button when active and theme is tertiary, on hover.
 * @prop --tct-pill-tertiary-active-hover-border-color: (<color>) Controls the border color of the pill button when active and theme is tertiary, on hover.
 * @prop --tct-pill-tertiary-active-box-shadow?: (*) Controls the optional box shadow of the pill button when active and theme is tertiary.
 * @prop --tct-pill-tertiary-active-backdrop-filter?: (*) Controls the optional backdrop-filter of the pill button when active and theme is tertiary.
 * @prop --tct-pill-decorator-icon-primary-stroke: (<color>) Controls the primary stroke color of a q2-icon placed in the decorator slot.
 * @prop --tct-pill-decorator-icon-secondary-stroke: (<color>) Controls the secondary stroke color of a q2-icon placed in the decorator slot.
 * @prop --tct-pill-active-decorator-icon-primary-stroke: (<color>) Controls the primary stroke color of a q2-icon placed in the decorator slot when the pill is active.
 * @prop --tct-pill-active-decorator-icon-secondary-stroke: (<color>) Controls the secondary stroke color of a q2-icon placed in the decorator slot when the pill is active.
 */
:host {
  display: inline-block;
  position: relative;
  line-height: 0;
}

:host(:not(:last-child)) {
  margin-inline-end: var(--tct-pill-margin, var(--t-pill-margin, var(--app-scale-2x, 10px)));
}

q2-popover,
.btn-wrapper {
  --comp-pill-min-height: var(--tct-pill-min-height, var(--t-pill-min-height, 44px));
  --comp-pill-btn-height: var(--tct-pill-btn-height, var(--t-pill-btn-height, 30px));
}

.popover-top-container {
  position: sticky;
  top: 0;
  z-index: 5;
}

.popover-bottom-container {
  position: sticky;
  bottom: 0;
  z-index: 5;
}

.btn-wrapper {
  --comp-pill-btn-border-width: var(--tct-pill-btn-border-width, var(--t-pill-btn-border-width, 2px));
  --comp-close-size: 0px;
  --comp-btn-background: var(--tct-pill-btn-background, var(--t-pill-btn-background, var(--t-base, #ffffff)));
  --comp-btn-box-shadow: var(--tct-pill-btn-box-shadow, none);
  --comp-btn-backdrop-filter: var(--tct-pill-btn-backdrop-filter, none);
  --comp-hover-btn-background: var(--tct-pill-hover-btn-background, var(--t-pill-hover-btn-background, var(--t-gray-13, #e6e6e6)));
  --comp-btn-padding: var(--tct-pill-btn-padding-inline, var(--t-pill-btn-padding-inline, var(--app-scale-3x, 15px)));
  --comp-btn-letter-spacing: var(--tct-pill-btn-letter-spacing, inherit);
  --comp-btn-color: var(--tct-pill-btn-color, var(--t-pill-btn-color, var(--t-gray-3, #262626)));
  --comp-active-btn-color: var(--tct-pill-active-btn-color, var(--comp-btn-background));
  --comp-active-btn-background: var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-7, #666666)));
  --comp-active-btn-box-shadow: var(--tct-pill-active-btn-box-shadow, var(--tct-pill-btn-box-shadow, none));
  --comp-active-btn-backdrop-filter: var(--tct-pill-active-btn-backdrop-filter, none);
  --comp-active-btn-border-color: var(--tct-pill-active-btn-border-color, var(--t-pill-active-btn-border-color, var(--t-gray-7, #666666)));
  --comp-hover-active-btn-background: var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-6, #4d4d4d)));
  --comp-hover-active-btn-border-color: var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-6, #4d4d4d)));
  position: relative;
}
.btn-wrapper.has-options, .btn-wrapper.has-icon {
  --comp-close-size: var(--comp-pill-btn-height);
}
:host([active]:not([active=false])) .btn-wrapper {
  --comp-btn-color: var(--tct-pill-active-btn-color, var(--t-pill-active-btn-color, var(--t-base, #ffffff)));
}
:host([theme=primary]) .btn-wrapper {
  --comp-active-btn-background: var(--tct-pill-primary-active-background, var(--t-primary, #0079c1));
  --comp-active-btn-box-shadow: var(--tct-pill-primary-active-btn-box-shadow, none);
  --comp-active-btn-backdrop-filter: var(--tct-pill-primary-active-backdrop-filter, none);
  --comp-active-btn-color: var(--tct-pill-primary-active-font-color, var(--t-primary-text, #ffffff));
  --comp-active-btn-border-color: var(--tct-pill-primary-active-border-color, var(--t-primary, #0079c1));
  --comp-hover-active-btn-background: var(--tct-pill-primary-active-hover-background, var(--t-primary-l3, #21acff));
  --comp-hover-active-btn-border-color: var(--tct-pill-primary-active-hover-border-color, var(--t-primary-l3, #21acff));
}
:host([theme=secondary]) .btn-wrapper {
  --comp-active-btn-background: var(--tct-pill-secondary-active-background, var(--t-secondary, #b3c2cc));
  --comp-active-btn-box-shadow: var(--tct-pill-secondary-active-box-shadow, none);
  --comp-active-btn-backdrop-filter: var(--tct-pill-secondary-active-backdrop-filter, none);
  --comp-active-btn-color: var(--tct-pill-secondary-active-font-color, var(--t-secondary-text, #141414));
  --comp-active-btn-border-color: var(--tct-pill-secondary-active-border-color, var(--t-secondary, #b3c2cc));
  --comp-hover-active-btn-background: var(--tct-pill-secondary-active-hover-background, var(--t-secondary-l3, #c9d5db));
  --comp-hover-active-btn-border-color: var(--tct-pill-secondary-active-hover-border-color, var(--t-secondary-l3, #c9d5db));
}
:host([theme=tertiary]) .btn-wrapper {
  --comp-active-btn-background: var(--tct-pill-tertiary-active-background, var(--t-tertiary, #e8f5fc));
  --comp-active-btn-box-shadow: var(--tct-pill-tertiary-active-box-shadow, none);
  --comp-active-btn-backdrop-filter: var(--tct-pill-tertiary-active-backdrop-filter, none);
  --comp-active-btn-color: var(--tct-pill-tertiary-active-font-color, var(--t-tertiary-text, #141414));
  --comp-active-btn-border-color: var(--tct-pill-tertiary-active-border-color, var(--t-tertiary, #e8f5fc));
  --comp-hover-active-btn-background: var(--tct-pill-tertiary-active-hover-background, var(--t-tertiary-l3, #eff8fd));
  --comp-hover-active-btn-border-color: var(--tct-pill-tertiary-active-hover-border-color, var(--t-tertiary-l3, #eff8fd));
}

.btn-height-wrapper {
  height: var(--comp-pill-min-height);
  display: flex;
  align-items: center;
  cursor: pointer;
}
.btn-height-wrapper:focus {
  box-shadow: none;
}
:host([disabled]) .btn-height-wrapper {
  cursor: not-allowed;
}

.btn-close,
.btn-primary {
  cursor: pointer;
  height: var(--comp-pill-btn-height);
  border-style: solid;
  border-radius: var(--tct-pill-btn-border-radius, var(--t-pill-btn-border-radius, 30px));
  transition-property: background, color, padding, width, opacity;
  transition: var(--tct-pill-btn-tween, var(--t-pill-btn-tween, var(--app-tween-1, 0.2s ease)));
}

:host([disabled]) .btn-close,
:host([disabled]) .btn-primary,
:host([disabled]) q2-icon {
  opacity: var(--tct-pill-disabled-opacity, var(--t-pill-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))));
  cursor: not-allowed;
}

.btn-primary {
  background: var(--comp-btn-background);
  box-shadow: var(--comp-btn-box-shadow);
  backdrop-filter: var(--comp-btn-backdrop-filter);
  border-width: var(--comp-pill-btn-border-width);
  border-color: var(--tct-pill-btn-border-color, var(--t-pill-btn-border-color, var(--t-a11y-gray-color-AA, #949494)));
  letter-spacing: var(--comp-btn-letter-spacing);
  padding-inline: var(--comp-btn-padding);
  padding-right: calc(var(--comp-btn-padding) + var(--comp-close-size));
  font-size: var(--tct-pill-btn-font-size, var(--t-pill-btn-font-size, var(--app-font-size, var(--const-px-14, 14px))));
  font-weight: var(--tct-pill-btn-font-weight, 400);
  color: var(--comp-btn-color);
  display: flex;
  align-items: center;
  gap: var(--app-scale-1x, 5px);
  width: 100%;
  text-align: start;
}
.btn-primary ::slotted(q2-icon[slot=decorator]) {
  --tct-icon-size: 1em;
  --tct-icon-stroke-primary: var(--tct-pill-decorator-icon-primary-stroke, var(--comp-btn-color));
  --tct-icon-stroke-secondary: var(--tct-pill-decorator-icon-secondary-stroke, var(--comp-btn-color));
}
.btn-primary:focus {
  box-shadow: var(--tct-pill-btn-focus-box-shadow, var(--const-double-focus-ring));
}
.btn-primary:focus-visible {
  box-shadow: var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring));
}
.btn-primary:hover {
  background: var(--comp-hover-btn-background);
}
.has-options .btn-primary, .has-icon .btn-primary {
  padding-right: calc(var(--tct-pill-icon-gap, var(--t-pill-icon-gap, var(--app-scale-1x, 5px))) + var(--comp-close-size));
}
.has-options .btn-primary {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: var(--tct-pill-max-width, var(--t-pill-max-width, 200px));
}
:host([active]:not([active=false])) .btn-primary {
  background: var(--comp-active-btn-background);
  box-shadow: var(--comp-active-btn-box-shadow);
  backdrop-filter: var(--comp-active-btn-backdrop-filter);
  border-color: var(--comp-active-btn-border-color);
  color: var(--comp-active-btn-color);
}
:host([active]:not([active=false])) .btn-primary:focus {
  box-shadow: var(--tct-pill-btn-focus-box-shadow, var(--const-double-focus-ring));
}
:host([active]:not([active=false])) .btn-primary:focus-visible {
  box-shadow: var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring));
}
:host([active]:not([active=false])) .btn-primary:hover {
  background: var(--comp-hover-active-btn-background);
  border-color: var(--comp-hover-active-btn-border-color);
}
:host([active]:not([active=false])) .btn-primary ::slotted(q2-icon[slot=decorator]) {
  --tct-icon-stroke-primary: var(--tct-pill-active-decorator-icon-primary-stroke, var(--tct-pill-decorator-icon-primary-stroke, var(--comp-active-btn-color)));
  --tct-icon-stroke-secondary: var(--tct-pill-active-decorator-icon-secondary-stroke, var(--tct-pill-decorator-icon-secondary-stroke, var(--comp-active-btn-color)));
}

.btn-close {
  background: transparent;
  border-color: transparent;
  border-width: var(--comp-pill-btn-border-width);
  width: var(--comp-close-size);
  height: var(--comp-close-size);
  padding: 0;
  border: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
}
.btn-close:focus-visible {
  box-shadow: var(--tct-pill-btn-focus-visible-box-shadow, var(--const-double-focus-ring));
}
:host([active]:not([active=false])) .btn-close {
  color: var(--comp-active-btn-color);
}
.has-options .btn-close, .has-icon .btn-close {
  opacity: 1;
}

q2-icon {
  --tct-icon-stroke-primary: var(--tct-pill-icon-stroke, currentcolor);
  --tct-icon-stroke-width: var(--tct-pill-icon-stroke-width, inherit);
  width: var(--tct-pill-icon-size, var(--t-pill-icon-size, var(--const-px-18, 18px)));
  height: var(--tct-pill-icon-size, var(--t-pill-icon-size, var(--const-px-18, 18px)));
  transition-property: transform;
  transition: var(--tct-pill-btn-tween, var(--t-pill-btn-tween, var(--app-tween-1, 0.2s ease)));
}

div.btn-close {
  pointer-events: none;
}
:host([open]) div.btn-close q2-icon {
  transform: rotate(180deg);
}

:host([active]:not([active=false])) button.btn-close:focus, :host([active]:not([active=false])) button.btn-close:hover {
  background: var(--tct-pill-hover-close-btn-background, var(--t-pill-hover-close-btn-background, var(--t-top-a1, rgba(13, 13, 13, 0.35))));
  border-color: var(--tct-pill-hover-close-btn-border-color, var(--t-pill-hover-close-btn-border-color, var(--t-top-a1, rgba(13, 13, 13, 0.35))));
}

q2-popover {
  top: calc(var(--comp-pill-min-height) - (var(--comp-pill-min-height) - var(--comp-pill-btn-height)) / 2);
}

:host([borderless]:not([borderless=false])) button {
  border-style: none;
}