/* The triangle's tip stays exactly at the native click position. */
.tg-direction-cursor {
  position: fixed;
  inset: 0 auto auto 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 99990;
  color: #fff;
  --cursor-outline: #0d1116;
}
.light-mode .tg-direction-cursor { color: #0d1116; --cursor-outline: #fff; }
.tg-direction-cursor.is-link { color: #2e73ea; --cursor-outline: #fff; }
.tg-direction-cursor[hidden] { display: none !important; }
.tg-direction-cursor svg {
  position: absolute;
  left: -24px;
  top: -20px;
  width: 48px;
  height: 40px;
  overflow: visible;
  transform-origin: 50% 50%;
}
.tg-direction-cursor path {
  fill: currentColor;
  stroke: var(--cursor-outline);
  stroke-width: 1;
  stroke-linejoin: round;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.tg-direction-active, html.tg-direction-active body, html.tg-direction-active body * { cursor: none !important; }
  html.tg-direction-active :is(input, textarea, select, [contenteditable], iframe, video, audio) { cursor: auto !important; }
}
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .tg-direction-cursor { display: none !important; }
}

/* Keep a native pointer even before pointermove notices a newly opened dialog. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.tg-direction-active :is(#iubenda-iframe, #iubenda-iframe-popup, #iubenda-cs-banner, .iubenda-cs-container, .iubenda-tp-btn, dialog, [role="dialog"], [role="alertdialog"]),
  html.tg-direction-active :is(#iubenda-iframe, #iubenda-iframe-popup, #iubenda-cs-banner, .iubenda-cs-container, .iubenda-tp-btn, dialog, [role="dialog"], [role="alertdialog"]) * {
    cursor: auto !important;
  }
  html.tg-direction-active :is(#iubenda-iframe, #iubenda-iframe-popup, #iubenda-cs-banner, .iubenda-cs-container, dialog, [role="dialog"], [role="alertdialog"]) :is(a[href], button, summary, [role="button"], input[type="checkbox"], input[type="radio"]),
  html.tg-direction-active .iubenda-tp-btn {
    cursor: pointer !important;
  }
}
html:has(#iubenda-iframe.iubenda-iframe-visible) .tg-direction-cursor {
  display: none !important;
}
