/* ---------------------------------
-----  dimension variables --------
---------------------------------- */
/* ------  standard elements padding & margin  ------- */
/* spacing */
/**
**  Official Font sizes
------------------------------- */
/**
** Line-heights
------------------------------- */
/*
  Mixin to progressively-enhance :focus-visible, keeping :focus where not supported
  Add an arbitrary list of selectors into the arguments, and the styling in the block.
  I you pass no selectors to the mixin the parent ("ampersand") operator is used instead.

  There are two mixins:
  - focus-visible: a generic focus-visible, giving you "slots" to decide what to render for :focus, :focus reset, and :focus-visible
  - focus-visible-outline: a focus-visible, which only resets the outline. If you don't need more custom resets, use this one!

  Use focus-visible:
  The key thing here is checking which slot is being rendered.
  For example, you can reset box-shadow here, or anything else.

  @include focus-visible using ($slot) {
      @if $slot == focus {
          outline: 2px solid transparent;
          box-shadow: 0 0 0 4px blue;
      }
      @if $slot == focusReset {
          box-shadow: none;
      }
      @if $slot == focusVisible {
          box-shadow: 0 0 0 4px blue;
      }
  }

  Use focus-visible-outline:
  @include focus-visible-outline("button", "a[href]") {
      outline: 2px solid blue;
  }

  Resulting CSS (compressed):

  button:focus,
  a[href]:focus {
      outline: 2px solid blue;
  }

  button:focus:not(:focus-visible),
  a[href]:focus:not(:focus-visible) {
      outline: none;
  }
  button:focus-visible,
  a[href]:focus-visible {
      outline: 2px solid blue;
  }
*/
/**
@prop --ux-tag-background-color: Background color of the tag
@prop --ux-tag-background-color-hover: Background color of the tag if hovered
@prop --ux-tag-border: Border style of the tag
@prop --ux-tag-border-radius: Border radius of the tag
@prop --ux-tag-color: Text color of the tag
@prop --ux-tag-font-size: Font size of the tag label
@prop --ux-tag-font-weight: Font weight of the tag label
@prop --ux-tag-gap: Gap size between tag label and icon
@prop --ux-tag-height: Absolute height of tags
@prop --ux-tag-hover-color: Text color of the tag if hovered
@prop --ux-tag-icon-color: Color of the icon
@prop --ux-tag-icon-margin-end: Optional end margin for the icon
@prop --ux-tag-icon-margin-start: Optional start margin for the icon
@prop --ux-tag-icon-size: Size of the icon
@prop --ux-tag-letter-spacing: Letter spacing for the tag label
@prop --ux-tag-margin: Outer margin of the tag
@prop --ux-tag-outline-focus: Outline style of the tag if focused
@prop --ux-tag-outline-focus-offset: Outline offset of the tag if focused
@prop --ux-tag-outline-hover: Outline of the tag if hovered
@prop --ux-tag-padding: Inner padding of the tag
@prop --ux-tag-text-transform: Text transform style for the tag label
@prop --ux-tag-transition: Transition style of the tag
@prop --ux-tag-secondary-background-color: Background color for the secondary tag
@prop --ux-tag-secondary-border: Border style of the secondary tag
@prop --ux-tag-secondary-color: Text and icon color for the secondary tag
@prop --ux-tag-secondary-font-weight: Font weight of the secondary tag
@prop --ux-tag-inactive-background-color: Background color for the inactive tag
@prop --ux-tag-inactive-border: Border style of the inactive tag
@prop --ux-tag-inactive-color: Text and icon color for the inactive tag
@prop --ux-tag-inactive-font-weight: Font weight of the inactive tag
@prop --ux-tag-interactive-border-radius: Border radius of the interactive tag
@prop --ux-tag-interactive-font-size: Font size of the interactive tag
@prop --ux-tag-interactive-font-weight: Font weight of the interactive tag
@prop --ux-tag-interactive-height: Absolute height of the interactive tag
@prop --ux-tag-interactive-padding: Padding of the interactive tag
*/
:host {
  font-family: var(--ux-font);
  font-size: var(--ux-tag-font-size);
  font-weight: var(--ux-tag-font-weight);
  align-items: center;
  background-color: var(--ux-tag-background-color);
  border-radius: var(--ux-tag-border-radius);
  border: var(--ux-tag-border);
  color: var(--ux-tag-color);
  display: flex;
  justify-content: space-between;
  gap: var(--ux-tag-gap);
  letter-spacing: var(--ux-tag-letter-spacing);
  line-height: 1;
  min-height: var(--ux-tag-height);
  padding: var(--ux-tag-padding);
  text-decoration: none;
  text-rendering: optimizeLegibility;
  text-transform: var(--ux-tag-text-transform);
  transition: var(--ux-tag-transition);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  outline-offset: -1px;
  outline: 1px solid transparent;
  user-select: none;
}
:host ux-icon {
  color: var(--ux-tag-icon-color, currentColor);
  fill: currentColor;
  font-size: var(--ux-tag-icon-size);
  margin-inline-start: var(--ux-tag-icon-margin-start);
  margin-inline-end: var(--ux-tag-icon-margin-end);
}
:host ::slotted(ux-icon) {
  font-size: 1.5em;
}
:host ::slotted(img) {
  width: 1.5em;
  height: 1.5em;
}

:host(:focus),
:host(:active) {
  outline: var(--ux-tag-outline-focus);
  outline-offset: var(--ux-tag-outline-focus-offset);
}

:host([variant=secondary]) {
  background-color: var(--ux-tag-secondary-background-color);
  color: var(--ux-tag-secondary-color);
  border: var(--ux-tag-secondary-border);
  font-weight: var(--ux-tag-secondary-font-weight);
}
:host([variant=secondary]) ux-icon,
:host([variant=secondary]) .ux-icon {
  color: currentColor;
}

:host([removable]:not([removable=false])),
:host(.ux-tag--removable) {
  cursor: pointer;
}

:host([interactive]:not([interactive=false])),
:host(.ux-tag--interactive) {
  border-radius: var(--ux-tag-interactive-border-radius);
  font-size: var(--ux-tag-interactive-font-size);
  font-weight: var(--ux-tag-interactive-font-weight);
  height: var(--ux-tag-interactive-height);
  min-height: var(--ux-tag-interactive-height);
  padding: var(--ux-tag-interactive-padding);
  cursor: pointer;
}
:host([interactive]:not([interactive=false])):host([variant=secondary]),
:host(.ux-tag--interactive):host([variant=secondary]) {
  font-weight: var(--ux-tag-interactive-secondary-font-weight, var(--ux-tag-interactive-font-weight));
}

:host([variant=inactive]),
:host([interactive][variant=inactive]) {
  background-color: var(--ux-tag-inactive-background-color);
  color: var(--ux-tag-inactive-color);
  border: var(--ux-tag-inactive-border);
  font-weight: var(--ux-tag-inactive-font-weight);
}
:host([variant=inactive]) ux-icon,
:host([variant=inactive]) .ux-icon,
:host([interactive][variant=inactive]) ux-icon,
:host([interactive][variant=inactive]) .ux-icon {
  color: currentColor;
}
:host([variant=inactive]):hover,
:host([interactive][variant=inactive]):hover {
  color: var(--ux-tag-hover-color);
}

:host(:hover) {
  background-color: var(--ux-tag-background-color-hover);
  color: var(--ux-tag-hover-color);
  border-color: var(--ux-tag-border-color-hover);
  outline: var(--ux-tag-outline-hover);
  outline-offset: -1px;
}
:host(:hover) ux-icon {
  color: currentColor;
  fill: currentColor;
}

:host([disabled]) {
  pointer-events: none;
}