/* static/css/core/ui_interactions.css */
/* Feedback tátil global, animações neon, spinners e anéis luminosos */

/* 1. Elementos que devem pular/subir ao passar o mouse (Desktop) */
@media (min-width: 1024px) {
    button:hover, 
    a:not(.no-jump):hover, 
    .cursor-pointer:hover,
    .tab-ficheiro:hover,
    .quick-theme-swatch:hover,
    .card-aco-escovado:hover {
        transform: translateY(-2px);
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar-item:hover {
        transform: translateX(4px) !important;
    }
}

/* 2. Feedback de Toque/Clique (Desktop & Mobile) */
button:active, 
a:not(.no-jump):active, 
.cursor-pointer:active,
.btn-global:active,
.tab-ficheiro:active,
.quick-theme-swatch:active {
    transform: scale(0.94) translateY(0px) !important;
    transition: transform 0.1s ease-out !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Reset para elementos com classe no-jump */
.no-jump:active, .no-jump:hover {
    transform: none !important;
}

/* 3. Mão Neon Pulsante (Estilo Cyber-Tech) */
.fa-hand-holding-usd {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 5px var(--cor-primaria-app));
    animation: neon-pulse-hand-admin 2s infinite ease-in-out;
    display: inline-block;
}

@keyframes neon-pulse-hand-admin {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 5px var(--cor-primaria-app));
        opacity: 0.9;
    }
    50% { 
        transform: scale(1.15);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 10px var(--cor-primaria-app));
        opacity: 1;
    }
}

/* 4. Loader Financeiro em Barras Verticais */
.finance-loader {
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    height: 40px;
    gap: 5px;
}
.finance-bar {
    width: 7px;
    background-color: var(--cor-primaria-app, #8A2BE2);
    border-radius: 3px;
    animation: finance-bar-anim 1s ease-in-out infinite;
    transform-origin: bottom;
}
.finance-bar:nth-child(1) { height: 40%; animation-delay: 0.0s; }
.finance-bar:nth-child(2) { height: 55%; animation-delay: 0.1s; }
.finance-bar:nth-child(3) { height: 70%; animation-delay: 0.2s; }
.finance-bar:nth-child(4) { height: 85%; animation-delay: 0.3s; }
.finance-bar:nth-child(5) { height: 100%; animation-delay: 0.4s; }

@keyframes finance-bar-anim {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.4); opacity: 0.6; }
}

/* 5. Animação de Bounce e Spinner */
@keyframes bounce-animation {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-5px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-2px); }
}
.icon-bounce {
    animation: bounce-animation 0.5s ease-in-out;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--cor-primaria-app, #8A2BE2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 6. LED Verde Pulsante para Usuários Online */
.green-led-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 1);
    animation: pulse-green-dot 1.5s infinite;
    vertical-align: middle;
}
@keyframes pulse-green-dot {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 7. Popup com Foto no Leaflet Map */
.photo-popup .leaflet-popup-content-wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}
.photo-popup .leaflet-popup-content { margin: 0; }
.photo-popup .leaflet-popup-tip-container { display: none; }
.photo-popup .popup-thumbnail-image {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* 8. Anel RGB Luminoso Giratório */
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rotate-rgb { to { --angle: 360deg; } }
.rgb-ring-nav, .ai-mic-ring-big {
    border-radius: 50% !important;
    background: #0b0f1a !important;
    border: 2px solid transparent !important;
    background-image: linear-gradient(#0b0f1a, #0b0f1a), 
                      linear-gradient(var(--angle), #ff0000, #00ffd5, #7a00ff, #ff0000) !important;
    background-origin: border-box !important;
    background-clip: content-box, border-box !important;
    animation: rotate-rgb 3s linear infinite !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 9. Reset de PTR Legado */
.ptr, .ptr__box, .ptr__content, .ptr-cyber-spinner, .ptr-spinner-container {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
