/**
 * CTM Kinetic Arena — Button Effects
 * Paleta: lime #bded4d / midnight navy #081425
 * Los tabs y action buttons quedan EXCLUIDOS del glow (son navegación, no CTAs).
 */

/* ─── CTA BUTTONS ONLY (excluye tab-btn, action-btn, detail-tab) ─────────── */
.ctm-btn,
.ctm-btn-submit,
.ctm-btn-logout,
.ctm-btn-logout-sm,
.ctm-login-btn,
.ctm-submit-btn,
.ctm-profile-btn,
.ctm-filter-btn,
.ctm-t-btn-register,
.ctm-t-btn-cancel,
.ctm-t-btn-filter,
input[type="submit"].ctm-btn,
input[type="submit"].ctm-submit-btn,
button.ctm-btn {
    position: relative !important;
    z-index: 0 !important;
    font-weight: 700 !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    border-radius: 0.75rem !important;
    overflow: visible !important;
    transition: transform 0.1s, opacity 0.2s !important;
}

/* ─── PRIMARY CTA: lime gradient ─────────────────────────────────────────── */
.ctm-btn-primary,
input[type="submit"].ctm-btn,
input[type="submit"].ctm-submit-btn,
.ctm-login-btn,
.ctm-submit-btn {
    background: linear-gradient(135deg, #bded4d, #a2d031) !important;
    color: #081425 !important;
}
.ctm-btn-primary:hover { opacity: 0.9 !important; }

/* ─── SECONDARY CTA ──────────────────────────────────────────────────────── */
.ctm-btn-secondary {
    background: #1f2a3c !important;
    color: #d8e3fb !important;
    border: none !important;
}
.ctm-btn-secondary:hover { background: #2a3548 !important; }

/* ─── DANGER ─────────────────────────────────────────────────────────────── */
.ctm-btn-danger,
.ctm-btn-danger::after {
    background: #e30613 !important;
    color: #fff !important;
}

/* ─── SUCCESS ────────────────────────────────────────────────────────────── */
.ctm-btn-success,
.ctm-btn-success::after {
    background: #00c851 !important;
    color: #fff !important;
}

/* ─── GLOW BORDER on hover (::before) — solo CTAs, color lime ───────────── */
.ctm-btn::before,
.ctm-btn-submit::before,
.ctm-login-btn::before,
.ctm-submit-btn::before,
.ctm-filter-btn::before,
.ctm-t-btn-register::before,
input[type="submit"].ctm-btn::before {
    content: '' !important;
    background: linear-gradient(
        45deg,
        #bded4d, #a2d031, #98d59e,
        #bded4d, #ffffff, #a2d031,
        #bded4d
    ) !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    background-size: 400% !important;
    z-index: -1 !important;
    filter: blur(5px) !important;
    width: calc(100% + 4px) !important;
    height: calc(100% + 4px) !important;
    animation: ctm-glowing 20s linear infinite !important;
    opacity: 0 !important;
    transition: opacity .3s ease-in-out !important;
    border-radius: 0.75rem !important;
}

/* ─── FONDO sólido detrás del contenido (::after) — lime ────────────────── */
.ctm-btn::after,
.ctm-btn-submit::after,
.ctm-login-btn::after,
.ctm-submit-btn::after,
.ctm-filter-btn::after,
.ctm-t-btn-register::after,
input[type="submit"].ctm-btn::after {
    z-index: -1 !important;
    content: '' !important;
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #bded4d, #a2d031) !important;
    left: 0 !important;
    top: 0 !important;
    border-radius: 0.75rem !important;
}

/* Override ::after para variantes que NO son primary */
.ctm-btn-secondary::after { background: #1f2a3c !important; }
.ctm-btn-danger::after    { background: #e30613 !important; }
.ctm-btn-success::after   { background: #00c851 !important; }

/* ─── HOVER: activar glow ────────────────────────────────────────────────── */
.ctm-btn:hover::before,
.ctm-btn-submit:hover::before,
.ctm-login-btn:hover::before,
.ctm-submit-btn:hover::before,
.ctm-t-btn-register:hover::before,
input[type="submit"].ctm-btn:hover::before {
    opacity: 1 !important;
}

/* ─── ACTIVE: scale feedback ─────────────────────────────────────────────── */
.ctm-btn:active { transform: scale(0.97) !important; }

/* ─── DISABLED ───────────────────────────────────────────────────────────── */
.ctm-btn-disabled,
.ctm-btn-disabled::before,
.ctm-btn-disabled::after {
    animation: none !important;
    background: #2a3548 !important;
    filter: none !important;
    opacity: 0.6 !important;
}
.ctm-btn-disabled { cursor: not-allowed !important; color: #777 !important; }

/* ─── TAB BUTTONS: sin glow, sin fondo rojo ─────────────────────────────── */
.ctm-tab-btn,
.ctm-tab-btn::before,
.ctm-tab-btn::after,
.ctm-detail-tab,
.ctm-detail-tab::before,
.ctm-detail-tab::after {
    background: none !important;
    position: relative !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    animation: none !important;
    filter: none !important;
    opacity: 1 !important;
}
.ctm-tab-btn::before,
.ctm-tab-btn::after,
.ctm-detail-tab::before,
.ctm-detail-tab::after {
    content: none !important;
    display: none !important;
}
.ctm-tab-btn { color: rgba(216,227,251,0.45) !important; }
.ctm-tab-btn:hover { color: #d8e3fb !important; }
.ctm-tab-btn.active {
    color: #bded4d !important;
    border-bottom: 3px solid #bded4d !important;
    background: none !important;
    box-shadow: none !important;
}

/* ─── ACTION BUTTONS: sin glow ───────────────────────────────────────────── */
.ctm-action-btn,
.ctm-action-btn::before,
.ctm-action-btn::after {
    background: #1f2a3c !important;
    color: rgba(216,227,251,0.45) !important;
    border-radius: 0.5rem !important;
    animation: none !important;
    filter: none !important;
}
.ctm-action-btn::before,
.ctm-action-btn::after {
    content: none !important;
    display: none !important;
}
.ctm-action-btn:hover { background: #2a3548 !important; color: #d8e3fb !important; }
.ctm-action-approve:hover { background: rgba(0,200,81,0.15) !important; color: #00c851 !important; }
.ctm-action-reject:hover  { background: rgba(227,6,19,0.15) !important; color: #e30613 !important; }
.ctm-action-primary:hover { background: rgba(189,237,77,0.15) !important; color: #bded4d !important; }

/* ─── Keyframes ──────────────────────────────────────────────────────────── */
@keyframes ctm-glowing {
    0%   { background-position: 0 0; }
    50%  { background-position: 400% 0; }
    100% { background-position: 0 0; }
}
