.lv-ai-badge {
  position: relative;
  z-index: 5;
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border: 1px solid rgba(125, 22, 142, 0.32);
  border-radius: 4px;
  background: rgba(125, 22, 142, 0.08);
  color: #7d168e;
  font-family: inherit;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  vertical-align: middle;
  cursor: help;
}

.lv-ai-badge::after {
  position: absolute;
  z-index: 1000;
  bottom: calc(100% + 7px);
  left: 50%;
  width: min(340px, 78vw);
  padding: 8px 10px;
  transform: translate(-50%, 4px);
  border-radius: 5px;
  background: #25182b;
  box-shadow: 0 6px 20px rgba(36, 21, 43, 0.2);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: start;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.lv-ai-badge:hover::after,
.lv-ai-badge:focus-visible::after {
  transform: translate(-50%, 0);
  opacity: 1;
}

.lv-ai-badge:focus-visible {
  outline: 2px solid rgba(125, 22, 142, 0.3);
  outline-offset: 2px;
}

[dir='rtl'] .lv-ai-badge::after {
  text-align: end;
}
