@import "./badge.vars";

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

:host {
  /**
   * @prop --background: Background of the badge
   * @prop --color: Text color of the badge
   *
   * @prop --padding-top: Padding top of the badge
   * @prop --padding-end: Padding end of the badge
   * @prop --padding-bottom: Padding bottom of the badge
   * @prop --padding-start: Padding start of the badge
   */
  --background: #{ion-color(primary, base)};
  --color: #{ion-color(primary, contrast)};
  --padding-top: #{$badge-padding-top};
  --padding-end: #{$badge-padding-end};
  --padding-bottom: #{$badge-padding-bottom};
  --padding-start: #{$badge-padding-start};

  @include font-smoothing();
  @include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start));

  display: inline-block;

  min-width: $badge-min-width;

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

  font-family: $font-family-base;
  font-size: $badge-font-size;
  font-weight: $badge-font-weight;

  line-height: 1;

  text-align: center;

  white-space: nowrap;

  contain: content;
  vertical-align: baseline;
}

:host(.ion-color) {
  background: #{current-color(base)};
  color: #{current-color(contrast)};
}

:host(:empty) {
  display: none;
}
