﻿:root {
    --nx-height: 38px;
    --nx-disc: 30px;
    --nx-pad-start: 6px;
    --nx-pad-end: 4px;
    --nx-gap: 10px;
    --nx-color: #ffdd05;
    --nx-color-ink: #ffdd05;
    --nx-light: #f1f1f1;
    --nx-dark: #1f1f1f;
    --nx-ink: #ffffff;
    --nx-radius: 9999px;
    --nx-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.06);
    --nx-shadow-hover: 0 1px 2px rgba(0,0,0,.1), 0 6px 18px rgba(0,0,0,.1);
}
.nx-btn {
    -webkit-font-smoothing: antialiased;
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--nx-gap);
    height: var(--nx-height);
    padding-inline-start: var(--nx-pad-start);
    padding-inline-end: var(--nx-pad-start);
    border-radius: var(--nx-radius);
    font: 600 15px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    text-decoration: none;
    box-shadow: var(--nx-shadow);
    transition: filter .18s ease, box-shadow .18s ease, background-color .18s ease;
    color: var(--nx-ink);
    position: relative; /* Necesario */
}


    .nx-btn:not(.nx-btn--noicon) {
        padding-inline-end: var(--nx-pad-end);
    }

.nx-btn__disc {
    position: absolute;
    right: var(--nx-pad-start); /* mismo padding que el texto */
    top: 50%;
    transform: translateY(-50%);
    width: var(--nx-disc);
    height: var(--nx-disc);
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.nx-btn--color {
    background: var(--nx-color);
    color: #0a0a0a;
}

    .nx-btn--color .nx-btn__disc {
        background: var(--nx-dark);
        color: var(--nx-color);
    }

    .nx-btn--color:hover {
        filter: brightness(1.04);
        box-shadow: var(--nx-shadow-hover);
    }

        .nx-btn--color:hover .nx-btn__disc {
            filter: brightness(1.04);
        }

.nx-btn__label {
    padding: 0 1rem 0 1rem;
    display: inline-block;
}
.nx-btn.has-icon .nx-btn__label {
    padding: 0 0.4rem 0 1rem; 
}

.nx-btn--light {
    background: var(--nx-light);
    color: #0a0a0a;
}

    .nx-btn--light .nx-btn__disc {
        background: var(--nx-dark);
        color: var(--nx-light);
    }

    .nx-btn--light:hover {
        filter: brightness(1.04);
        box-shadow: var(--nx-shadow-hover);
    }

        .nx-btn--light:hover .nx-btn__disc {
            filter: brightness(1.04);
        }



.nx-btn--dark {
    background: var(--nx-dark);
    color: #fff;
}

    .nx-btn--dark .nx-btn__disc {
        background: var(--nx-color);
        color: var(--nx-dark);
    }

    .nx-btn--dark:hover {
        filter: brightness(1.04);
        box-shadow: var(--nx-shadow-hover);
    }

        .nx-btn--dark:hover .nx-btn__disc {
            background: var(--nx-color-ink);
        }

.nx-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--nx-color), white 60%);
    outline-offset: 2px;
}

.nx-btn.has-icon {
    padding-right: calc(var(--nx-pad-start) + var(--nx-disc) + 6px);
}

.nx-btn--noicon {
    padding-right: var(--nx-pad-start);
}

    .nx-btn--noicon .nx-btn__disc {
        display: none;
    }

/* Tamaños opcionales */
.nx-btn--lg {
    --nx-pad-start: 8px;
    --nx-height: 50px;
    --nx-disc: 35px;
    --nx-pad-x: 22px;
    font-size: 16px;
}

.nx-btn--sm {
    --nx-height: 36px;
    --nx-disc: 28px;
    --nx-pad-x: 14px;
    font-size: 14px;
}
/* === Efecto de clic (presionado) === */
.nx-btn:active {
    transform: scale(0.96);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
    filter: brightness(0.98);
}

    /* Evita que el disco se vea flotando al presionar */
    /*.nx-btn:active .nx-btn__disc {
        transform: scale(0.94);
        filter: brightness(0.95);
    }*/

/* === Estado Disabled === */
.nx-btn:disabled,
.nx-btn[disabled] {
    opacity: 0.6; /* aspecto atenuado */
    background: #f1f1f1;
    color: #666;
    /*font-weight:normal;*/
    cursor: not-allowed; /* icono de prohibido */
    filter: grayscale(40%) brightness(0.95);
    box-shadow: none; /* elimina sombra para mayor realismo */
    transform: none; /* sin efecto de click */
    pointer-events: none; /* evita eventos accidentales */
}

    /* Disco dentro del botón deshabilitado */
    .nx-btn:disabled .nx-btn__disc,
    .nx-btn[disabled] .nx-btn__disc {
        filter: grayscale(100%) brightness(0.8);
        opacity: 0.9;
    }

.nx-btn {
    transition: all 0.25s ease-in-out;
}


/* ===================================================
   BOTÓN CIRCULAR INDEPENDIENTE
   =================================================== */
.nx-btn-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    font-size: 1.1rem; /* tamaño base del ícono */
    line-height: 1;
    vertical-align: middle;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

    /* Contenedor interno del icono */
    .nx-btn-circle span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        line-height: 0; /* elimina espacio del font baseline */
    }

    /* Ícono Font Awesome */
    .nx-btn-circle i {
        display: block;
        font-size: inherit;
        line-height: 1;
        vertical-align: middle;
    }

/* ===================================================
   VARIANTES DE COLOR
   =================================================== */
.nx-btn-circle--light {
    background-color: #f8f8f8;
    color: #1f1f1f;
}

    .nx-btn-circle--light:hover {
        background-color: #eaeaea;
        transform: scale(1.05);
    }

.nx-btn-circle--dark {
    background-color: #111827;
    color: #ffffff;
}

    .nx-btn-circle--dark:hover {
        background-color: #000;
        transform: scale(1.05);
    }

/* ===================================================
   EFECTOS OPCIONALES
   =================================================== */

/* efecto de "presionar" */
.nx-btn-circle:active {
    transform: scale(0.96);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
    filter: brightness(0.98);
}

/* === Estado Disabled === */
.nx-btn-circle:disabled,
.nx-btn-circle[disabled] {
    opacity: 0.6; /* aspecto atenuado */
    background: #f1f1f1;
    color: #666;
    /*font-weight: normal;*/
    cursor: not-allowed; /* icono de prohibido */
    filter: grayscale(40%) brightness(0.95);
    box-shadow: none; /* elimina sombra para mayor realismo */
    transform: none; /* sin efecto de click */
    pointer-events: none; /* evita eventos accidentales */
}




/* Botón con barrido oscuro (sin bleed) */
.btn-hover-slide {
    position: relative;
    display: inline-flex; /* alinear texto + ícono */
    align-items: center;
    justify-content: center;
    gap: .5rem; /* espacio texto/ícono */
    width: 100%; /* cambia a 100% si quieres full width */
    padding: .75rem 1.5rem;
    padding-right: 1.75rem; /* margen extra para el deslizamiento del ícono */
    font-weight: 300;
    border-radius: 50rem;
    color: #000;
    background-color: #fff; /* amarillo */
    border: none;
    overflow: hidden; /* recorta la capa animada */
    z-index: 0;
    transition: color .3s ease, transform .3s ease, box-shadow .3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
    will-change: transform;
}

    .btn-hover-slide::before {
        content: "";
        position: absolute;
        inset: -1px; /* evita gaps en bordes redondeados */
        background-color: #000; /* capa oscura del barrido */
        transform: translateX(-105%);
        transition: transform .5s ease;
        z-index: -1;
        border-radius: inherit;
    }

    .btn-hover-slide:hover::before {
        transform: translateX(0);
    }

    .btn-hover-slide:hover {
        color: #fff;
        transform: translateY(-1px) scale(1.02);
        box-shadow: 0 8px 18px rgba(0,0,0,.22);
    }

    /* Animación del ícono en hover */
    .btn-hover-slide i {
        color: #ccc;
        display: inline-block;
        transform: translateX(0);
        transition: transform .35s ease, opacity .35s ease;
        transition-delay: 0s; /* sin delay en reposo */
        will-change: transform;
    }

    .btn-hover-slide:hover i {
        color: #fff;
        transform: translateX(8px); /* movimiento sutil hacia la derecha */
        transition-delay: .1s; /* pequeño retraso para coordinar con el barrido */
    }

    /* Accesibilidad con teclado */
    .btn-hover-slide:focus-visible {
        outline: 0;
        box-shadow: 0 0 0 4px rgba(253, 224, 71, 0.45), 0 8px 18px rgba(0,0,0,.22);
    }


/* =======================
   VARIANTES DE TAMAÑO
   ======================= */
.nx-btn-circle--sm {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.nx-btn-circle--lg {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
}







/* === CONTENEDOR === */
#container-neo {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* === BOTÓN === */
.btn-neo {
    background-color: #181819;
    border: 2px solid #ffdd05;
    min-width: 170px;
    height: 45px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: border-color .6s ease;
}

    .btn-neo:hover {
        background-color: #181819 !important;
    }

    .btn-neo:active:focus,
    .btn-neo:focus {
        outline: none !important;
        box-shadow: none !important;
    }

/* === CAPAS === */
.white-neo,
.border-neo {
    position: absolute;
    width: 173px;
    height: 47px;
    border-radius: 50px;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity .4s ease;
}

    /* Capa 1 */
    .white-neo::before {
        content: "";
        position: absolute;
        width: 600px;
        height: 600px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(83deg); /* punto de inicio */
        filter: brightness(1.4);
        background-repeat: no-repeat;
        background-image: conic-gradient( rgba(0,0,0,0) 0%, #ffe855, rgba(0,0,0,0) 8%, rgba(0,0,0,0) 50%, #ffe855, rgba(0,0,0,0) 58% );
        animation-play-state: paused;
        animation-fill-mode: forwards;
    }

    /* Capa 2 */
    .border-neo::before {
        content: "";
        position: absolute;
        width: 600px;
        height: 600px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(70deg); /* punto de inicio */
        filter: brightness(1.3);
        background-repeat: no-repeat;
        background-image: conic-gradient( #1c191c, #ffdd05 5%, #1c191c 14%, #1c191c 50%, #ffdd05 60%, #1c191c 64% );
        animation-play-state: paused;
        animation-fill-mode: forwards;
    }

/* Mostrar glow en hover */
#container-neo:hover .white-neo,
#container-neo:hover .border-neo,
#container-neo:focus-within .white-neo,
#container-neo:focus-within .border-neo {
    opacity: 1;
}

/* === ANIMACIONES (EXACTAMENTE 1 VUELTA) === */
@keyframes spinWhite {
    from {
        transform: translate(-50%, -50%) rotate(83deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(calc(83deg + 360deg));
    }
    /* 1 vuelta */
}

@keyframes spinBorder {
    from {
        transform: translate(-50%, -50%) rotate(70deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(calc(70deg + 360deg));
    }
    /* 1 vuelta */
}

/* Activamos animación SOLO en hover/focus */
#container-neo:hover .white-neo::before,
#container-neo:focus-within .white-neo::before {
    animation: spinWhite 3.6s ease forwards;
}

#container-neo:hover .border-neo::before,
#container-neo:focus-within .border-neo::before {
    animation: spinBorder 3.6s ease forwards;
}


/* Animación inicial, para que ocurra al cargar */
/* ============================================
   ANIMACIÓN INICIAL EJECUTADA UNA SOLA VEZ
   ============================================ */

#container-neo.run-once .white-neo::before {
    animation: spinWhite 3.6s ease forwards !important;
}

#container-neo.run-once .border-neo::before {
    animation: spinBorder 3.6s ease forwards !important;
}

#container-neo.run-once .white-neo,
#container-neo.run-once .border-neo {
    opacity: 1 !important;
}

/* Durante animación inicial: ocultamos borde para que el glow se vea */
#container-neo.run-once .btn-neo {
    border-color: transparent !important;
}

/* Móvil */
@media (max-width: 576px) {
    .btn-neo {
        /*background-color: #181819;*/
        /*border: 2px solid #ffdd05;*/
        min-width: 120px;
        font-size: 0.85rem;
        height: 40px;
        /*border-radius: 50px;*/
        /*color: white;*/
        /*cursor: pointer;*/
        /*position: relative;*/
        /*z-index: 2;*/
        /*transition: border-color .6s ease;*/
    }

    .white-neo,
    .border-neo {
        /*position: absolute;*/
        width: 123px;
        height: 42px;
        /*border-radius: 50px;*/
        /*overflow: hidden;*/
        /*z-index: -1;*/
        /*pointer-events: none;*/
        /*opacity: 0;*/
        /*transition: opacity .4s ease;*/
    }

}