/* Use sizing's for fixed heights/widths e.g. the db-button has always a fixed height */
/* Use fixed spacings for all kind of distances (margin, padding, ...) */
/* The primary use-case for responsive spacings are
paddings/gaps in an application e.g. the <main> should have a responsive padding. */
/* Elevation */
/* Border */
/* Opacity */
/* Transitions */
/* Screen sizes */
/* Container sizes */
/* Variants for adaptive components like input, select, notification, ... */
@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

/**
	Generates 3 types of placeholders, e.g:
	- %db-component-variables-md
	- %db-font-size-md
	- %db-overwrite-font-size-md
 */
@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

.db-badge[data-size=medium], .db-badge[data-size=medium] > *,
.db-badge[data-size=medium] .db-icon {
  font: var(--db-type-body-sm);
  /* stylelint-disable-next-line at-rule-prelude-no-invalid,layer-name-pattern */
}
@layer variables {
  .db-badge[data-size=medium], .db-badge[data-size=medium] > *,
  .db-badge[data-size=medium] .db-icon {
    /* Those variables are only for components to calculate heights and change icons */
    --db-icon-font-weight: var(--db-base-body-icon-weight-sm);
    --db-icon-font-size: var(--db-base-body-icon-font-size-sm);
  }
}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

.db-badge, .db-badge > *,
.db-badge .db-icon {
  font: var(--db-type-body-2xs);
  /* stylelint-disable-next-line at-rule-prelude-no-invalid,layer-name-pattern */
}
@layer variables {
  .db-badge, .db-badge > *,
  .db-badge .db-icon {
    /* Those variables are only for components to calculate heights and change icons */
    --db-icon-font-weight: var(--db-base-body-icon-weight-2xs);
    --db-icon-font-size: var(--db-base-body-icon-font-size-2xs);
  }
}

@layer variables {}

@layer variables {}

@layer variables {}

@layer variables {}

/* Use for body tags like <p> */
/* Use for headline tags like <h1> */
.db-badge {
  font-weight: 700;
  overflow-wrap: break-word;
  white-space: pre-line;
  justify-content: center;
  text-align: center;
  align-items: center;
  vertical-align: top;
}
.db-badge:not([hidden]) {
  display: inline-flex;
}

/**
 * @mixin screen-min-max
 * @param $data an object like (min:"sm", max:"lg") or (min: "sm")
 */
.db-badge {
  border: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
}

.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button, .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button {
  --db-tag-border-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
  border-color: var(--db-tag-border-color);
  background-color: var(--db-adaptive-bg-vibrant-default);
  color: var(--db-adaptive-on-bg-vibrant-default);
  /* stylelint-disable-next-line a11y/selector-pseudo-class-focus */
}
.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button::before, .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button::before, .db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button::after, .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button::after {
  --db-icon-color: var(--db-adaptive-on-bg-vibrant-default);
}
.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]) {
  cursor: var(--db-overwrite-cursor, pointer);
  background-color: var(--db-adaptive-bg-vibrant-hovered);
}
.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]):is(textarea), .db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]):is(input), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]):is(input) {
  cursor: initial;
}
.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:hover:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
  cursor: pointer;
}
.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]) {
  cursor: var(--db-overwrite-cursor, pointer);
  background-color: var(--db-adaptive-bg-vibrant-pressed);
}
.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]):is(textarea), .db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]):is(input), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]):is(input) {
  cursor: initial;
}
.db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]):is(input[type=checkbox]), .db-badge:not([data-semantic])[data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)), .db-badge[data-semantic=adaptive][data-emphasis=strong] .db-tab-remove-button:active:not(:disabled, [aria-disabled=true]):is(input[type=radio]:not(:checked)) {
  cursor: pointer;
}

.db-badge[data-placement^=corner] {
  position: absolute;
  transform: translate(var(--badge-transform-x), var(--badge-transform-y));
}
[data-placement$=right].db-badge[data-placement^=corner] {
  --badge-transform-x: 50%;
  inset-inline-end: 0;
}
[data-placement$=left].db-badge[data-placement^=corner] {
  --badge-transform-x: -50%;
  inset-inline-start: 0;
}
[data-placement*=top].db-badge[data-placement^=corner] {
  --badge-transform-y: -50%;
  inset-block-start: 0;
}
[data-placement*=center].db-badge[data-placement^=corner] {
  --badge-transform-y: -50%;
  inset-block-start: 50%;
}
[data-placement*=bottom].db-badge[data-placement^=corner] {
  --badge-transform-y: 50%;
  inset-block-end: 0;
}

.db-badge {
  --badge-size: var(--db-spacing-fixed-xs);
  border-radius: var(--db-border-radius-full);
  padding-inline: var(--db-spacing-fixed-2xs);
  block-size: fit-content;
  inline-size: fit-content;
  font-weight: 700;
}
.db-badge:not([data-semantic]):not([data-emphasis]), .db-badge:not([data-semantic])[data-emphasis=weak], .db-badge[data-semantic=adaptive]:not([data-emphasis]), .db-badge[data-semantic=adaptive][data-emphasis=weak] {
  --db-tag-border-color: var(
  	--db-adaptive-on-bg-basic-emphasis-70-default
  );
  border-color: var(--db-tag-border-color);
  background-color: var(--db-adaptive-bg-basic-level-3-default);
  color: var(--db-adaptive-on-bg-basic-emphasis-80-default);
  /* stylelint-disable-next-line at-rule-empty-line-before */
}
.db-badge:not([data-semantic]):not([data-emphasis])::before, .db-badge:not([data-semantic]):not([data-emphasis])::after, .db-badge:not([data-semantic])[data-emphasis=weak]::before, .db-badge:not([data-semantic])[data-emphasis=weak]::after, .db-badge[data-semantic=adaptive]:not([data-emphasis])::before, .db-badge[data-semantic=adaptive]:not([data-emphasis])::after, .db-badge[data-semantic=adaptive][data-emphasis=weak]::before, .db-badge[data-semantic=adaptive][data-emphasis=weak]::after {
  --db-icon-color: var(--db-adaptive-on-bg-basic-emphasis-80-default);
}
.db-badge:not([data-semantic])[data-emphasis=strong], .db-badge[data-semantic=adaptive][data-emphasis=strong] {
  --db-tag-border-color: var(--db-adaptive-on-bg-basic-emphasis-70-default);
  border-color: var(--db-tag-border-color);
  background-color: var(--db-adaptive-bg-vibrant-default);
  color: var(--db-adaptive-on-bg-vibrant-default);
}
.db-badge:not([data-semantic])[data-emphasis=strong]::before, .db-badge:not([data-semantic])[data-emphasis=strong]::after, .db-badge[data-semantic=adaptive][data-emphasis=strong]::before, .db-badge[data-semantic=adaptive][data-emphasis=strong]::after {
  --db-icon-color: var(--db-adaptive-on-bg-vibrant-default);
}
.db-badge[data-semantic=neutral]:not([data-emphasis]), .db-badge[data-semantic=neutral][data-emphasis=weak] {
  --db-tag-border-color: var(
  	--db-neutral-on-bg-basic-emphasis-70-default
  );
  border-color: var(--db-tag-border-color);
  background-color: var(--db-neutral-bg-basic-level-3-default);
  color: var(--db-neutral-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=neutral]:not([data-emphasis])::before, .db-badge[data-semantic=neutral]:not([data-emphasis])::after, .db-badge[data-semantic=neutral][data-emphasis=weak]::before, .db-badge[data-semantic=neutral][data-emphasis=weak]::after {
  --db-icon-color: var(--db-neutral-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=neutral][data-emphasis=strong] {
  --db-tag-border-color: var(--db-neutral-on-bg-basic-emphasis-70-default);
  border-color: var(--db-tag-border-color);
  background-color: var(--db-neutral-bg-vibrant-default);
  color: var(--db-neutral-on-bg-vibrant-default);
}
.db-badge[data-semantic=neutral][data-emphasis=strong]::before, .db-badge[data-semantic=neutral][data-emphasis=strong]::after {
  --db-icon-color: var(--db-neutral-on-bg-vibrant-default);
}
.db-badge[data-semantic=critical]:not([data-emphasis]), .db-badge[data-semantic=critical][data-emphasis=weak] {
  --db-tag-border-color: var(
  	--db-critical-on-bg-basic-emphasis-70-default
  );
  border-color: var(--db-tag-border-color);
  background-color: var(--db-critical-bg-basic-level-3-default);
  color: var(--db-critical-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=critical]:not([data-emphasis])::before, .db-badge[data-semantic=critical]:not([data-emphasis])::after, .db-badge[data-semantic=critical][data-emphasis=weak]::before, .db-badge[data-semantic=critical][data-emphasis=weak]::after {
  --db-icon-color: var(--db-critical-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=critical][data-emphasis=strong] {
  --db-tag-border-color: var(--db-critical-on-bg-basic-emphasis-70-default);
  border-color: var(--db-tag-border-color);
  background-color: var(--db-critical-bg-vibrant-default);
  color: var(--db-critical-on-bg-vibrant-default);
}
.db-badge[data-semantic=critical][data-emphasis=strong]::before, .db-badge[data-semantic=critical][data-emphasis=strong]::after {
  --db-icon-color: var(--db-critical-on-bg-vibrant-default);
}
.db-badge[data-semantic=successful]:not([data-emphasis]), .db-badge[data-semantic=successful][data-emphasis=weak] {
  --db-tag-border-color: var(
  	--db-successful-on-bg-basic-emphasis-70-default
  );
  border-color: var(--db-tag-border-color);
  background-color: var(--db-successful-bg-basic-level-3-default);
  color: var(--db-successful-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=successful]:not([data-emphasis])::before, .db-badge[data-semantic=successful]:not([data-emphasis])::after, .db-badge[data-semantic=successful][data-emphasis=weak]::before, .db-badge[data-semantic=successful][data-emphasis=weak]::after {
  --db-icon-color: var(--db-successful-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=successful][data-emphasis=strong] {
  --db-tag-border-color: var(--db-successful-on-bg-basic-emphasis-70-default);
  border-color: var(--db-tag-border-color);
  background-color: var(--db-successful-bg-vibrant-default);
  color: var(--db-successful-on-bg-vibrant-default);
}
.db-badge[data-semantic=successful][data-emphasis=strong]::before, .db-badge[data-semantic=successful][data-emphasis=strong]::after {
  --db-icon-color: var(--db-successful-on-bg-vibrant-default);
}
.db-badge[data-semantic=warning]:not([data-emphasis]), .db-badge[data-semantic=warning][data-emphasis=weak] {
  --db-tag-border-color: var(
  	--db-warning-on-bg-basic-emphasis-70-default
  );
  border-color: var(--db-tag-border-color);
  background-color: var(--db-warning-bg-basic-level-3-default);
  color: var(--db-warning-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=warning]:not([data-emphasis])::before, .db-badge[data-semantic=warning]:not([data-emphasis])::after, .db-badge[data-semantic=warning][data-emphasis=weak]::before, .db-badge[data-semantic=warning][data-emphasis=weak]::after {
  --db-icon-color: var(--db-warning-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=warning][data-emphasis=strong] {
  --db-tag-border-color: var(--db-warning-on-bg-basic-emphasis-70-default);
  border-color: var(--db-tag-border-color);
  background-color: var(--db-warning-bg-vibrant-default);
  color: var(--db-warning-on-bg-vibrant-default);
}
.db-badge[data-semantic=warning][data-emphasis=strong]::before, .db-badge[data-semantic=warning][data-emphasis=strong]::after {
  --db-icon-color: var(--db-warning-on-bg-vibrant-default);
}
.db-badge[data-semantic=informational]:not([data-emphasis]), .db-badge[data-semantic=informational][data-emphasis=weak] {
  --db-tag-border-color: var(
  	--db-informational-on-bg-basic-emphasis-70-default
  );
  border-color: var(--db-tag-border-color);
  background-color: var(--db-informational-bg-basic-level-3-default);
  color: var(--db-informational-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=informational]:not([data-emphasis])::before, .db-badge[data-semantic=informational]:not([data-emphasis])::after, .db-badge[data-semantic=informational][data-emphasis=weak]::before, .db-badge[data-semantic=informational][data-emphasis=weak]::after {
  --db-icon-color: var(--db-informational-on-bg-basic-emphasis-80-default);
}
.db-badge[data-semantic=informational][data-emphasis=strong] {
  --db-tag-border-color: var(--db-informational-on-bg-basic-emphasis-70-default);
  border-color: var(--db-tag-border-color);
  background-color: var(--db-informational-bg-vibrant-default);
  color: var(--db-informational-on-bg-vibrant-default);
}
.db-badge[data-semantic=informational][data-emphasis=strong]::before, .db-badge[data-semantic=informational][data-emphasis=strong]::after {
  --db-icon-color: var(--db-informational-on-bg-vibrant-default);
}
.db-badge:not(:empty) {
  min-inline-size: calc(1.4em - 2 * var(--db-spacing-fixed-2xs));
  box-sizing: content-box;
}
.db-badge:has(.db-icon) {
  padding: var(--db-spacing-fixed-3xs);
}
.db-badge[data-size=medium] {
  --badge-size: var(--db-spacing-fixed-sm);
  padding-inline: var(--db-spacing-fixed-xs);
  font-weight: 700;
}
.db-badge[data-size=medium]:has(.db-icon) {
  padding: var(--db-spacing-fixed-2xs);
}
.db-badge:empty,
.db-badge > span:empty {
  block-size: var(--badge-size);
  inline-size: var(--badge-size);
  padding: 0;
}
.db-badge[data-placement^=corner][data-label]::before {
  content: attr(data-label);
  position: fixed;
  font-size: 0;
}

[data-has-badge=true] {
  position: relative;
}
