@use "../../themes/functions.color" as color;
@import "../../themes/mixins";

// Badge
// --------------------------------------------------

:host {
  /**
   * @prop --background: Background of the badge
   * @prop --color: Text color of the badge
   *
   * @prop --padding-top: Top padding of the badge
   * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the badge
   * @prop --padding-bottom: Bottom padding of the badge
   * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the badge
   */
  @include font-smoothing();
  @include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start));

  display: inline-block;

  background: var(--background);
  color: var(--color);

  text-align: center;

  white-space: nowrap;

  contain: content;
  vertical-align: baseline;
}

// Badge (hint)
// --------------------------------------------------

:host([vertical]:not(.in-tab-button)) {
  @include position(null, 0, null, null);
  position: absolute;
}

:host(:not(.in-tab-button)[vertical].badge-vertical-top) {
  top: 0;
}

:host(:not(.in-tab-button)[vertical].badge-vertical-bottom) {
  bottom: 0;
}
