/*
 * Nexus AI — Premium Liquid Glassmorphic & Elastic Animations Upgrades
 * GPU Accelerated - High FPS (60+)
 */

/* Liquid Glassmorphic Buttons - Safe & Non-Destructive */
button:not(.nav-btn):not(.logout-btn), .btn, .button, input[type="button"], input[type="submit"] {
    /* Glassmorphism blur & saturation */
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    
    /* Subtle glass highlight border */
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    
    /* Smooth GPU transition with spring easing */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                border-color 0.3s ease, 
                background-color 0.3s ease !important;
                
    will-change: transform, box-shadow; /* GPU rendering hint */
    position: relative !important;
    overflow: hidden !important;
}

/* Liquid flow sweep effect */
button:not(.nav-btn):not(.logout-btn)::before, .btn::before, .button::before, input[type="button"]::before, input[type="submit"]::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -150% !important;
    width: 200% !important;
    height: 200% !important;
    background: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 30%, 
        rgba(255, 255, 255, 0.25) 50%, 
        rgba(255, 255, 255, 0) 70%
    ) !important;
    transform: rotate(25deg) !important;
    transition: left 0.75s cubic-bezier(0.19, 1, 0.22, 1) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

/* Hover effects with spring scale and glow */
button:not(.nav-btn):not(.logout-btn):hover, .btn:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover {
    transform: scale(1.04) !important; /* Spring scale */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 
                0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

button:not(.nav-btn):not(.logout-btn):hover::before, .btn:hover::before, .button:hover::before, input[type="button"]:hover::before, input[type="submit"]:hover::before {
    left: 150% !important;
}

/* Active press spring effect */
button:not(.nav-btn):not(.logout-btn):active, .btn:active, .button:active, input[type="button"]:active, input[type="submit"]:active {
    transform: scale(0.96) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Specific exclusions/cleanups for input controls to keep them responsive */
input[type="tel"], input[type="text"], input[type="password"], textarea, select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Tab contents and card transition animations - GPU elastic */
.tab-content, .fade-in, .page-transition, iframe, .card, .dashboard-card {
    animation: nexusElasticFadeIn 0.7s cubic-bezier(0.25, 1.1, 0.5, 1) forwards !important;
    will-change: transform, opacity !important; /* Boost FPS via GPU */
}

@keyframes nexusElasticFadeIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
