/**
 * Lottie Animation Styles for WHMCS
 * 3VS.IO - Serververse Client Portal
 * 
 * Dark theme compatible styling for Lottie players
 */

/* Base lottie-player styling */
lottie-player {
    display: inline-block;
    vertical-align: middle;
}

/* Loading spinner animations */
.lottie-loading-spinner {
    margin: 0 auto;
    display: block;
}

.lottie-modal-spinner {
    display: inline-block !important;
    vertical-align: middle;
    margin-right: 8px;
}

/* Security animation on login page */
.lottie-security-container {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.lottie-security-animation {
    display: block;
    margin: 0 auto;
    max-width: 150px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Dashboard animation */
.lottie-dashboard-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* Alert animations */
.lottie-alert-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}

.lottie-success {
    filter: hue-rotate(0deg); /* Keep green */
}

.lottie-error {
    filter: hue-rotate(0deg); /* Keep red */
}

/* Product/Server icons */
.lottie-product-icon {
    display: block;
    margin: 0 auto 15px;
}

/* Success overlay animation */
.lottie-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s ease-out;
}

.lottie-success-overlay.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

.lottie-success-popup {
    filter: drop-shadow(0 0 20px rgba(40, 167, 69, 0.5));
}

/* Fullpage overlay enhancement */
#fullpage-overlay .inner-wrapper lottie-player {
    margin-bottom: 20px;
}

/* Dark theme compatibility */
.primary-bg-color lottie-player,
[data-theme="dark"] lottie-player {
    /* Most Lottie animations work well on dark backgrounds */
    /* Add specific overrides if needed */
}

/* Responsive sizing */
@media (max-width: 768px) {
    .lottie-security-animation {
        max-width: 120px;
    }
    
    .lottie-loading-spinner {
        width: 80px !important;
        height: 80px !important;
    }
    
    .lottie-product-icon {
        width: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 480px) {
    .lottie-security-animation {
        max-width: 100px;
    }
    
    .lottie-dashboard-icon {
        width: 30px !important;
        height: 30px !important;
    }
}

/* Scroll trigger animations - start paused */
lottie-player.scroll-trigger {
    /* Will be controlled by IntersectionObserver */
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Panel and card Lottie icons */
.panel-heading lottie-player,
.card-header lottie-player {
    margin-right: 10px;
}

/* Button loading state with Lottie */
.btn-loading lottie-player {
    width: 20px !important;
    height: 20px !important;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

/* Service status icons - could be enhanced with Lottie */
.service-status-icon lottie-player {
    width: 24px !important;
    height: 24px !important;
}

/* Network/connectivity animation */
.lottie-network-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lottie-network-status:hover {
    opacity: 1;
}

/* Tooltip with Lottie */
.tooltip-lottie {
    position: relative;
}

.tooltip-lottie lottie-player {
    width: 16px !important;
    height: 16px !important;
}

/* Form validation states with Lottie */
.form-group.has-success .lottie-validation-icon,
.form-group.has-error .lottie-validation-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
}

/* Cart and checkout Lottie enhancements */
.cart-body lottie-player,
.checkout-step lottie-player {
    margin-bottom: 15px;
}

/* Empty state animations */
.empty-state lottie-player {
    max-width: 200px;
    margin: 0 auto 20px;
    display: block;
}

/* Header notification badge with subtle animation */
#accountNotifications lottie-player {
    width: 18px !important;
    height: 18px !important;
    vertical-align: text-bottom;
}

/* Fix for Twenty-One theme specific elements */
.twenty-one-theme #fullpage-overlay lottie-player {
    filter: brightness(1.1);
}

/* Hover effects for interactive animations */
lottie-player[hover] {
    cursor: pointer;
    transition: transform 0.2s ease;
}

lottie-player[hover]:hover {
    transform: scale(1.05);
}

/* Print styles - hide animations */
@media print {
    lottie-player {
        display: none !important;
    }
}
