.tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

.tooltip {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% - 1px);
  max-width: min(34rem, calc(100vw - 2rem));
  z-index: 20;
  padding: 0.55rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--bg-color) 84%, #0b0b0b 16%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.tooltip__text {
  font-size: 0.82rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--secondary-color) 88%, #ffffff 12%);
  white-space: normal;
  overflow-wrap: anywhere;
}

.tooltip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.35rem;
  border: 1px solid color-mix(in srgb, var(--primary-color) 36%, transparent);
  border-radius: 50%;
  color: color-mix(in srgb, var(--primary-color) 84%, #ffffff 16%);
  background: color-mix(in srgb, var(--bg-color) 88%, #ffffff 12%);
  vertical-align: middle;
}

.tooltip-button:hover,
.tooltip-button:focus-visible {
  border-color: color-mix(in srgb, var(--primary-color) 70%, #ffffff 30%);
  text-decoration: none;
}

.tooltip-button__icon::before {
  content: '\25CE';
  display: block;
  font-size: 0.78rem;
  line-height: 1;
}

.tooltip--visible,
:hover > .tooltip,
:focus-within > .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}