.spaab-badge-anchor.spaab-badge-positioned {
  position: relative;
}

.spaab-badge-slot-host:not(.spaab-badge-slot-host--visible),
.spaab-badge-slot[hidden],
.spaab-badge-control-active .spaab-badge-legacy {
  display: none !important;
}

.spaab-badge-anchor .spaab-badge-slot-host {
  position: absolute !important;
  inset: clamp(7px, 1.5vw, 12px) clamp(7px, 1.5vw, 12px) auto auto;
  z-index: 3;
  margin: 0 !important;
  padding: 0 !important;
  width: max-content;
  max-width: calc(100% - 24px);
  pointer-events: none;
}

.spaab-badge-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 100%;
  opacity: 0;
  transition: opacity var(--spaab-badge-fade, 260ms) ease;
}

.spaab-badge-face {
  display: inline-flex;
  flex-direction: column;
  box-sizing: border-box;
  align-items: center;
  gap: 1px;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: 6px;
  background: var(--spaab-badge-background, #473024);
  color: var(--spaab-badge-color, white);
  font-size: clamp(11px, 2.9vw, 16px);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.spaab-badge-slot.spaab-badge-visible {
  opacity: 1;
}

.spaab-badge-slot .spaab-badge-icon {
  display: block;
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  margin: 0;
  flex: 0 0 1.15em;
}

.spaab-badge-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  min-width: 0;
  max-width: 100%;
  line-height: 1.05;
}

.spaab-badge-title strong {
  color: inherit;
  font-weight: 700;
  min-width: 0;
  text-transform: uppercase;
}

.spaab-badge-copy {
  max-width: 100%;
  font-size: .9em;
  font-weight: 500;
}

.spaab-badge-slot[data-placement="card"] .spaab-badge-title strong {
  font-size: max(11px, calc(1em - 2px));
}

.spaab-badge-slot[data-placement="card"] .spaab-badge-copy {
  font-size: max(10px, calc(.9em - 2px));
}

.spaab-badge-slot[data-placement="product"] .spaab-badge-face {
  display: inline-grid;
  grid-template-columns: auto minmax(0, max-content);
  grid-template-areas:
    "icon title"
    "icon copy";
  justify-items: start;
  gap: 0;
  padding-block: 8px;
  text-align: left;
}

.spaab-badge-slot[data-placement="product"] .spaab-badge-title {
  display: contents;
  line-height: inherit;
}

.spaab-badge-slot[data-placement="product"] .spaab-badge-icon {
  grid-area: icon;
  width: 1.5em;
  height: 1.5em;
  margin-inline-end: .65em;
}

.spaab-badge-slot[data-placement="product"] .spaab-badge-title strong {
  grid-area: title;
}

.spaab-badge-slot[data-placement="product"] .spaab-badge-copy {
  grid-area: copy;
}

@media (prefers-reduced-motion: reduce) {
  .spaab-badge-slot {
    transition: none;
  }
}

.spaab-badge-anchor .spaab-badge-slot-host--lower-left,
.spaab-badge-anchor .spaab-badge-slot-host--bottom-center {
  --spaab-badge-inset: clamp(7px, 1.5vw, 12px);
  inset: auto auto calc(var(--spaab-badge-bottom, 0px) + var(--spaab-badge-inset)) calc(var(--spaab-badge-left, 0px) + var(--spaab-badge-inset));
  max-width: calc(var(--spaab-badge-width, 100%) - 2 * var(--spaab-badge-inset));
}

.spaab-badge-anchor .spaab-badge-slot-host--bottom-center {
  left: calc(var(--spaab-badge-left, 0px) + var(--spaab-badge-width, 100%) / 2);
  translate: -50% 0;
}

.spaab-badge-slot-host--bottom-center .spaab-badge-slot {
  align-items: center;
}
