/* ============================================================
 * StarBorder (React Bits) — port vanilla, sin dependencias.
 * Dos haces de luz barren el borde en direcciones opuestas.
 * Uso: <button class="..." data-star data-star-color="#34d399"
 *        data-star-speed="5s" data-star-thickness="1.5">Texto</button>
 * El enhancer (star-border.js) envuelve el contenido en
 * .inner-content y setea color/velocidad/grosor. Acá solo la
 * parte visual; el botón conserva sus clases y su radio.
 * ============================================================ */

.star-border-container {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.star-border-container .border-gradient-bottom {
    position: absolute;
    width: 300%;
    height: 50%;
    opacity: 0.7;
    bottom: -12px;
    right: -250%;
    border-radius: 50%;
    animation: star-movement-bottom linear infinite alternate;
    animation-duration: 6s;
    z-index: 0;
    pointer-events: none;
}

.star-border-container .border-gradient-top {
    position: absolute;
    opacity: 0.7;
    width: 300%;
    height: 50%;
    top: -12px;
    left: -250%;
    border-radius: 50%;
    animation: star-movement-top linear infinite alternate;
    animation-duration: 6s;
    z-index: 0;
    pointer-events: none;
}

/* El contenido hereda la cara del botón: el aro de luz solo se ve
 * en el borde (grosor = padding del container). */
.star-border-container .inner-content {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    width: 100%;
    height: 100%;
    background: inherit;
    border: none;
    border-radius: inherit;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    white-space: nowrap;
}

@keyframes star-movement-bottom {
    0% {
        transform: translate(0%, 0%);
        opacity: 1;
    }
    100% {
        transform: translate(-100%, 0%);
        opacity: 0;
    }
}

@keyframes star-movement-top {
    0% {
        transform: translate(0%, 0%);
        opacity: 1;
    }
    100% {
        transform: translate(100%, 0%);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .star-border-container .border-gradient-bottom,
    .star-border-container .border-gradient-top {
        animation: none;
        opacity: 0.3;
    }
}
