/* Una sola fuente para el pin y los CTA. El centro nunca se pinta ni se oculta. */
@property --cc-light-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.cc-light-border {
  --cc-light-width: 1px;
  --cc-light-blue: #1f5e9a;
  --cc-light-white: #dae9f8;
  --cc-light-orange: #f56600;
  --cc-light-delay: 2s;
  --cc-light-duration: 6s;
  --cc-light-opacity: .9;
}
/* La etiqueta del pin conserva su posición absoluta. */
:where(a, button).cc-light-border { position: relative; }
.cc-light-border--text { padding: 8px 14px; border: 1px solid #dfe3e9; border-radius: 12px; }

@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  .cc-light-border::after {
    content: "";
    box-sizing: border-box;
    position: absolute;
    inset: -1px;
    z-index: 1;
    padding: var(--cc-light-width);
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: conic-gradient(from var(--cc-light-angle), transparent 0deg 280deg, var(--cc-light-blue) 303deg, var(--cc-light-white) 322deg, var(--cc-light-orange) 337deg, transparent 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
  }
  .cc-light-border[data-light-ready]::after {
    animation: cc-light-orbit var(--cc-light-duration) linear var(--cc-light-delay) infinite both;
  }
  .cc-light-border[data-light-paused]::after,
  .cc-light-border:is(:hover, :focus-within)::after {
    animation-play-state: paused;
  }
  /* El pin sigue recorriendo su contorno durante la interacción. */
  .cc-light-border-trigger:is(:hover, :focus-within) .cc-light-border:not([data-light-paused])::after {
    animation-play-state: running;
  }
}

@keyframes cc-light-orbit {
  0% { --cc-light-angle: 0deg; opacity: 0; }
  8% { opacity: var(--cc-light-opacity); }
  90% { opacity: var(--cc-light-opacity); }
  100% { --cc-light-angle: 360deg; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-light-border::after {
    animation: none !important;
    --cc-light-angle: 30deg;
    opacity: var(--cc-light-opacity);
  }
}
@media (forced-colors: active) {
  .cc-light-border::after { display: none; }
  .cc-light-border { border: 1px solid ButtonText; }
}
