/* Portal Performance Optimizations */

/* Disable heavy animations on mobile */
@media (max-width: 768px) {
    /* Disable transforms that cause repaints */
    .gh-portal-root,
    .gh-portal-root * {
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Simplify portal animations */
    .gh-portal-popup-wrapper {
        animation: portal-fade-in 0.2s ease-out !important;
    }
    
    @keyframes portal-fade-in {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
    
    /* Disable backdrop blur on mobile for performance */
    .gh-portal-backdrop {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* Reduce box shadows */
    .gh-portal-popup-container {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Disable unnecessary transitions */
    .gh-portal-btn,
    .gh-portal-input,
    .gh-portal-select {
        transition: none !important;
    }
    
    /* Force hardware acceleration only on critical elements */
    .gh-portal-popup-container {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000;
    }
}

/* General performance improvements */
.gh-portal-root {
    contain: layout style paint;
}

/* Reduce rendering complexity */
.gh-portal-powered,
.gh-portal-poweredby {
    display: none !important;
    content-visibility: hidden;
}

/* Optimize input performance on mobile */
@media (max-width: 768px) {
    .gh-portal-input,
    .gh-portal-input-section input {
        /* Disable heavy focus effects */
        box-shadow: none !important;
        outline: 1px solid #ddd !important;
    }
    
    .gh-portal-input:focus,
    .gh-portal-input-section input:focus {
        outline: 2px solid var(--color-primary) !important;
        box-shadow: none !important;
    }
}