/* Botao flutuante da Eva - Abre a IA Voyger */

.chloe-floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--voyger-white);
    border: 3px solid var(--voyger-white-dark);
    box-shadow: var(--voyger-shadow-lg);
    cursor: pointer;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--voyger-transition);
    animation: chloeFloatingBounce 3s ease-in-out infinite;
}

@keyframes chloeFloatingBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.chloe-floating-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: var(--voyger-shadow-xl);
    animation-play-state: paused;
}

.chloe-floating-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.chloe-floating-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Eva intro video with chroma key (products module) */
.eva-hi-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 58%);
}

.eva-hi-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.eva-hi-stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(36vw, 380px);
    max-width: 84vw;
    aspect-ratio: 9 / 16;
    transform: translate3d(-50%, 16vh, 0) scale(0.28);
    opacity: 0;
    pointer-events: auto;
    will-change: transform, opacity;
}

.eva-hi-overlay.active .eva-hi-stage {
    animation: evaHiFlyIn 880ms cubic-bezier(0.16, 0.84, 0.24, 1) forwards;
}

@keyframes evaHiFlyIn {
    0% {
        transform: translate3d(-50%, 18vh, 0) scale(0.24);
        opacity: 0;
    }
    45% {
        opacity: 1;
    }
    100% {
        transform: translate3d(-50%, -50%, 0) scale(1);
        opacity: 1;
    }
}

.eva-hi-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.38));
}

.eva-hi-bubble {
    position: absolute;
    left: 50%;
    bottom: -76px;
    transform: translateX(-50%);
    width: min(90vw, 540px);
    max-width: 140%;
    background: rgba(5, 7, 12, 0.84);
    border: 1px solid rgba(95, 222, 200, 0.45);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    border-radius: 14px;
    padding: 12px 16px;
    opacity: 0;
    transition: opacity 0.26s ease;
}

.eva-hi-bubble.active {
    opacity: 1;
}

.eva-hi-message {
    margin: 0;
    color: #f4f7ff;
    font-size: clamp(13px, 1.35vw, 16px);
    line-height: 1.45;
    font-weight: 500;
}

.eva-hi-actions {
    display: none;
    gap: 8px;
    margin-top: 12px;
}

.eva-hi-actions.active {
    display: flex;
}

.eva-hi-action-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #f5f8ff;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.eva-hi-action-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
}

.eva-hi-action-open {
    border-color: rgba(95, 222, 200, 0.56);
    background: rgba(95, 222, 200, 0.16);
}

/* Responsividade */
@media (max-width: 768px) {
    .chloe-floating-button {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }

    .eva-hi-stage {
        width: min(62vw, 300px);
    }

    .eva-hi-bubble {
        bottom: -70px;
        width: min(92vw, 440px);
    }
}

@media (max-width: 480px) {
    .chloe-floating-button {
        width: 52px;
        height: 52px;
        bottom: 15px;
        right: 15px;
    }

    .eva-hi-stage {
        width: min(74vw, 250px);
    }

    .eva-hi-bubble {
        bottom: -66px;
        width: min(94vw, 360px);
        padding: 10px 12px;
    }
}

/* Esconder botão quando modal 3D da loja estiver aberto no mobile */
body:has(#store-3d-modal.store-3d-modal-mobile) .chloe-floating-button,
body:has(.store-3d-modal-mobile) .chloe-floating-button,
body.store-3d-modal-open .chloe-floating-button {
    display: none !important;
}
