@use '../tokens/components';
@use '../functions/tokens';

tokens.$default-map: components.$post-badge;

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: tokens.get('badge-large-height');
  min-width: tokens.get('badge-large-height');
  padding-inline: tokens.get('badge-large-padding-inline');
  border-radius: tokens.get('badge-border-radius');
  border: tokens.get('badge-large-border-width') solid tokens.get('badge-stroke');
  font-size: tokens.get('badge-font-size');
  font-weight: tokens.get('badge-font-weight');
  background-color: tokens.get('badge-bg');
  color: tokens.get('badge-fg');

  &.badge-sm {
    height: tokens.get('badge-small-height');
    min-width: tokens.get('badge-small-height');
    padding-inline: tokens.get('badge-small-padding-inline');
    line-height: tokens.get('badge-small-line-height');
    border-width: tokens.get('badge-small-border-width');
  }

  // Dot variant
  &:empty {
    height: tokens.get('badge-dot-height');
    width: tokens.get('badge-dot-height');
    border-width: tokens.get('badge-dot-border-width');
    min-width: unset;
    padding-inline: unset;
  }
}
