/**
 * DevRev PLuG Animated Launcher Styles
 * 
 * This CSS provides a custom animated launcher for DevRev PLuG integration.
 * Features:
 * - White circular button with subtle styling
 * - Sprite sheet animation support
 * - Responsive design (desktop and mobile)
 * - Accessibility support (reduced motion, keyboard focus)
 * - Click-to-spin animation
 * 
 * @version 1.0.0
 * @author DevRev Integration
 */

/* ==========================================================================
   Main Launcher Button
   ========================================================================== */

.animated-plug-launcher {
    width: 80px;
    height: 80px;
    background: #FFFFFF;
    bottom: 30px;
    right: 30px;
    position: fixed;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 2px solid #e0e0e0;
    outline: none;
    overflow: hidden;
    padding: 10px;
}

.animated-plug-launcher:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.animated-plug-launcher:focus {
    outline: 3px solid #ffbb00;
    outline-offset: 2px;
}

.animated-plug-launcher:active {
    transform: scale(0.95);
}

/* ==========================================================================
   Static Image Display
   ========================================================================== */

.plug-avatar-static {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    position: absolute;
    z-index: 10;
    pointer-events: none;
    top: 0;
    left: 0;
    opacity: 1;
    visibility: visible;
}

.plug-avatar-static.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================================================
   Sprite Sheet Animation Container
   ========================================================================== */

.plug-avatar-sprite {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 11;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    opacity: 1;
    visibility: visible;
}

.plug-avatar-sprite.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================================================
   Sprite Animation
   ========================================================================== */

/* Inner sprite image that animates */
.plug-avatar-sprite::before {
    content: '';
    position: relative;
    width: 7000%;
    height: 100%;
    background-image: url('../images/idle.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Sprite animation keyframes - shifts left through all frames */
@keyframes spriteAnimation {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* ==========================================================================
   Click Animation Removed
   ========================================================================== */
/* Spinning animation removed per user request */

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .animated-plug-launcher {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .plug-avatar-sprite.animate::before {
        animation: none !important;
    }
    
    .animated-plug-launcher:hover {
        transform: none;
    }
    
    .animated-plug-launcher:active {
        transform: none;
    }
}

/* ==========================================================================
   Hide Default PLuG Launcher
   ========================================================================== */

/* Hide any default PLuG launchers to prevent double buttons */
iframe[src*="plug-platform.devrev.ai"] + div,
div[data-devrev-plugin],
.devrev-plugin-launcher,
.plug-launcher-default {
    display: none !important;
}


