/* StarBorder — React Bits port (enhances existing .btn) */

.star-border {
  --star-border-radius: 7px;
  --star-border-thickness: 1px;
  --star-border-track: rgba(255, 255, 255, 0.28);
  position: relative;
  isolation: isolate;
  overflow: visible !important;
  -webkit-tap-highlight-color: transparent;
}

/* Track via element (not ::before) so .btn-whatsapp shine ::before stays intact */
.star-border__track {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 var(--star-border-thickness) var(--star-border-track);
  pointer-events: none;
}

.star-border__light {
  position: absolute;
  top: -48px;
  left: -48px;
  z-index: 0;
  width: calc(100% + 96px);
  height: calc(100% + 96px);
  pointer-events: none;
}

.star-border > .btn-whatsapp__icon,
.star-border > .btn-whatsapp__label,
.star-border > *:not(.star-border__light):not(.star-border__track) {
  position: relative;
  z-index: 1;
}

/* Ghost CTAs: darker track on light / soft track on dark */
.btn-ghost.star-border {
  --star-border-track: rgba(0, 173, 182, 0.35);
}

body.theme-light .btn-ghost.star-border {
  --star-border-track: rgba(24, 24, 27, 0.14);
}

body.theme-light .btn-primary.star-border,
body.theme-light .btn-whatsapp.star-border {
  --star-border-track: rgba(255, 255, 255, 0.4);
}

.star-border:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .star-border__light {
    opacity: 0.55;
  }
}
