/* ==========================================================================
   Shared button animations — applies to every CTA/button across the site.
   Only animation-related properties are set here (hover lift, shine sweep,
   active press, idle glow pulse, focus outline). Color, text, size, font,
   border-radius and position are defined in each component's own stylesheet
   and are intentionally left untouched here.
   ========================================================================== */

.btn-primary,
.apc__cta,
.ap-cost .btn-mint,
.hn__btn--primary,
.dm__submit,
.fc__btn--mint,
.btn-white,
.sol-panel__link {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
    animation: btn-attention-glow 3s ease-in-out infinite;
}

/* 1. Hover: lift, lighter teal, deeper soft shadow */
.btn-primary:hover,
.apc__cta:hover,
.ap-cost .btn-mint:hover,
.hn__btn--primary:hover,
.dm__submit:hover,
.fc__btn--mint:hover,
.btn-white:hover,
.sol-panel__link:hover {
    transform: translateY(-3px);
    background-color: #00799F;
    box-shadow: 0 14px 28px -6px rgba(0, 107, 141, 0.45);
    animation-play-state: paused;
    
}

/* 2. Shine sweep on hover */
.btn-primary::after,
.apc__cta::after,
.ap-cost .btn-mint::after,
.hn__btn--primary::after,
.dm__submit::after,
.fc__btn--mint::after,
.btn-white::after,
.sol-panel__link::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 1;
}

.btn-primary:hover::after,
.apc__cta:hover::after,
.ap-cost .btn-mint:hover::after,
.hn__btn--primary:hover::after,
.dm__submit:hover::after,
.fc__btn--mint:hover::after,
.btn-white:hover::after,
.sol-panel__link:hover::after {
    animation: btn-shine-sweep 0.8s ease;
}

@keyframes btn-shine-sweep {
    from {
        left: -60%;
    }
    to {
        left: 120%;
    }
}

/* 3. Click: press down with a smaller shadow */
.btn-primary:active,
.apc__cta:active,
.ap-cost .btn-mint:active,
.hn__btn--primary:active,
.dm__submit:active,
.fc__btn--mint:active,
.btn-white:active,
.sol-panel__link:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 10px -4px rgba(0, 107, 141, 0.35);
    animation-play-state: paused;
}

/* 4. Attention glow: slow infinite pulse, paused on hover (see rule above) */
@keyframes btn-attention-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 107, 141, 0.7);
    }
    50% {
        box-shadow: 0 0 18px 6px rgba(0, 107, 141, 0.35);
    }
}

/* 5. Keyboard: visible focus outline */
.btn-primary:focus-visible,
.apc__cta:focus-visible,
.ap-cost .btn-mint:focus-visible,
.hn__btn--primary:focus-visible,
.dm__submit:focus-visible,
.fc__btn--mint:focus-visible,
.btn-white:focus-visible,
.sol-panel__link:focus-visible {
    outline: 2px solid rgb(0, 107, 141);
    outline-offset: 3px;
}

/* 6. Accessibility: disable all motion for users who request reduced motion */
@media (prefers-reduced-motion: reduce) {
    .btn-primary,
    .apc__cta,
    .ap-cost .btn-mint,
    .hn__btn--primary,
    .dm__submit,
    .fc__btn--mint,
    .btn-white,
    .sol-panel__link {
        transition: none;
        animation: none;
    }

    .btn-primary:hover,
    .apc__cta:hover,
    .ap-cost .btn-mint:hover,
    .hn__btn--primary:hover,
    .dm__submit:hover,
    .fc__btn--mint:hover,
    .btn-white:hover,
    .sol-panel__link:hover {
        transform: none;
        animation: none;
    }

    .btn-primary::after,
    .apc__cta::after,
    .ap-cost .btn-mint::after,
    .hn__btn--primary::after,
    .dm__submit::after,
    .fc__btn--mint::after,
    .btn-white::after,
    .sol-panel__link::after {
        display: none;
    }

    .btn-primary:active,
    .apc__cta:active,
    .ap-cost .btn-mint:active,
    .hn__btn--primary:active,
    .dm__submit:active,
    .fc__btn--mint:active,
    .btn-white:active,
    .sol-panel__link:active {
        transform: none;
    }
}
