#gal-root-v5 {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 2147483647 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

#gal-img-trigger {
    display: block !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    background: transparent !important;

    width: 160px !important;
    height: auto !important;
    will-change: transform, opacity !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#gal-img-trigger:hover {
    transform: scale(1.08) translateY(-2px) !important;
}

#gal-img-trigger:active {
    transform: scale(0.96) !important;
}

#gal-chat-box {
    display: none !important;
    flex-direction: column !important;
    background: white !important;
    border: 1px solid rgba(0,166,81,0.15) !important;
    box-shadow: 0 8px 32px rgba(0,146,63,0.2) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    margin-bottom: 15px !important;

    width: 380px !important;
    height: 550px !important;
    max-height: 80vh !important;
    transform-origin: bottom right !important;
    will-change: transform, opacity !important;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

#gal-header {
    background: linear-gradient(135deg, #00923f 0%, #00b84f 100%) !important;
    color: white !important;
    padding: 14px 18px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-shadow: 0 2px 12px rgba(0,146,63,0.25) !important;
    letter-spacing: 0.2px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

#gal-header-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
}

#gal-header-title svg {
    animation: chatPulse 2s ease-in-out infinite !important;
}

@keyframes chatPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

#gal-header-actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}

.gal-icon-btn {
    cursor: pointer !important;
    padding: 6px !important;
    border-radius: 6px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: rgba(255,255,255,0.08) !important;
}

.gal-icon-btn:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: translateY(-1px) !important;
}

.gal-icon-btn:active {
    transform: translateY(0) scale(0.95) !important;
}

#gal-frame-ref {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    flex: 1 !important;
}

@media (max-width: 768px) {
    #gal-root-v5 {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
    }

    #gal-img-trigger {
        width: 120px !important;
        min-width: 120px !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 2147483647 !important;
    }

    /* ESCONDER botão X verde em mobile */
    #gal-close-trigger {
        display: none !important;
    }

    #gal-chat-box {
        position: fixed !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        max-height: 100vh !important;
    }

    #gal-header {
        padding: 16px 20px !important;
        font-size: 17px !important;
        min-height: 56px !important;
    }

    #gal-frame-ref {
        width: 100% !important;
        height: calc(100vh - 56px) !important;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    #gal-img-trigger {
        width: 130px !important;
    }

    #gal-close-trigger {
        width: 70px !important;
        height: 70px !important;
        line-height: 70px !important;
        font-size: 35px !important;
    }

    #gal-chat-box {
        width: 400px !important;
        height: 600px !important;
    }
}
