/* ── CUSTOM CURSOR (TypeSafe.ai style) ──────────────────────────────────
   Desktop custom cursor with geometric arrow and dynamic context badge.
   Huisstijl: Hollands oranje (#FF6600), diepzwart (#111118), wit (#FFFFFF).
   ───────────────────────────────────────────────────────────────────────── */

@media (hover: hover) and (pointer: fine) {
  html.custom-cursor-enabled,
  html.custom-cursor-enabled * {
    cursor: none !important;
  }
}

.typesafe-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999999;
  will-change: transform;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  transform: translate3d(-100px, -100px, 0);
}

.typesafe-cursor.is-visible {
  opacity: 1;
  visibility: visible;
}

.typesafe-cursor.is-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ── Geometric Pointer Arrow ─────────────────────────────────────────── */
.typesafe-cursor__arrow {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  /* Align pointer tip (approx 9.5px, 10.7px) accurately with cursor coordinate (0, 0) */
  margin-left: -9.5px;
  margin-top: -10.5px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: 9.5px 10.5px;
}

.typesafe-cursor.is-pressed .typesafe-cursor__arrow {
  transform: scale(0.88);
}

/* ── Context Badge Tag ───────────────────────────────────────────────── */
.typesafe-cursor__badge {
  position: absolute;
  top: 22px;
  left: 24px;
  display: inline-flex;
  align-items: stretch;
  background-color: #FF6600;
  color: #111118;
  border-bottom: 2px solid #111118;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 1px 3px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.8) translate3d(-6px, -4px, 0);
  transform-origin: top left;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s ease;
  pointer-events: none;
  user-select: none;
}

.typesafe-cursor__badge.is-visible {
  opacity: 1;
  transform: scale(1) translate3d(0, 0, 0);
}

.typesafe-cursor.is-pressed .typesafe-cursor__badge {
  transform: scale(0.94);
}

/* ── Badge Text ──────────────────────────────────────────────────────── */
.typesafe-cursor__text {
  padding: 6px 10px 5px 10px;
  font-family: var(--f-sans, 'neue-haas-grotesk-display', 'Helvetica Neue', Arial, sans-serif);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #111118;
  display: flex;
  align-items: center;
}

/* ── Badge Icon Square ───────────────────────────────────────────────── */
.typesafe-cursor__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  background-color: #FF6600;
  border-left: 1px solid rgba(17, 17, 24, 0.22);
  color: #111118;
  padding: 0 5px;
}

.typesafe-cursor__icon:empty {
  display: none;
}

.typesafe-cursor__icon svg {
  width: 12px;
  height: 12px;
  display: block;
  fill: currentColor;
}

/* ── Motion safety ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .typesafe-cursor,
  .typesafe-cursor__arrow,
  .typesafe-cursor__badge {
    transition: none !important;
  }
}
