tool-tip-container {
  position: relative;
  display: inline-block;
  cursor: help;
  text-decoration: 1px var(--theme-color--brand) wavy underline;
  z-index: 3;
}

.tooltip {
  &__title {
    display: block;
    margin-bottom: var(--theme-spacing--gutter);
  }
  &__content {
    font-size: var(--theme-type-size--5);
  }
}

tool-tip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  position: absolute;
  z-index: 1;
  max-width: 45ch;
  min-width: 30ch;
  padding: var(--theme-spacing--2);
  border: 1px solid var(--theme-color--pop);
  border-radius: var(--theme-border-radius);
  box-shadow: var(--theme-box-shadow--slim);
  background-image: linear-gradient(
    -45deg,
    var(--theme-color--block),
    var(--theme-color--paper)
  );
  color: var(--theme-color--ink);
  top: 1.5em;
  left: 50%;
  transform: translateX(-50%);
}

:has(> tool-tip):hover > tool-tip,
:has(> tool-tip):focus-visible > tool-tip,
:has(> tool-tip):focus-within > tool-tip,
:has(> tool-tip):active > tool-tip {
  opacity: 1;
  transition-delay: 200ms;
  pointer-events: all;
}
