/* ═══════════════════════════════════════════════════════════ */
/* CHAT WIDGET PREMIUM - "JUDO EDITION" */
/* ═══════════════════════════════════════════════════════════ */

/* Botão Flutuante Premium */
#chat-button-ejvm {
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 60px;
    padding: 0 24px;
    border-radius: 50px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(214, 0, 0, 0.4);
    overflow: hidden;
    cursor: pointer !important;
}

/* Ícone do Botão */
#chat-button-ejvm i {
    font-size: 24px;
    color: var(--color-primary);
    z-index: 2;
}

/* Texto do Botão */
#chat-button-text {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    opacity: 1;
}

/* Efeito de Brilho no Hover */
#chat-button-ejvm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(214, 0, 0, 0.3), transparent);
    transition: 0.5s;
    z-index: 1;
}

#chat-button-ejvm:hover::before {
    left: 100%;
}

#chat-button-ejvm:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(214, 0, 0, 0.3);
    border-color: var(--color-primary);
}

/* Container do Chat */
#chat-container-ejvm {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 600px;
    background: #111;
    border-radius: 4px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(214, 0, 0, 0.3);
    cursor: default !important;
}

#chat-header-ejvm {
    background: linear-gradient(135deg, #050505 0%, #151515 100%);
    padding: 20px 24px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-primary);
}

#chat-header-ejvm h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 1px;
    color: white;
    text-transform: uppercase;
}

#chat-header-ejvm span {
    font-size: 0.75rem;
    opacity: 0.7;
    font-family: var(--font-body);
}

#chat-close-ejvm {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#chat-close-ejvm:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
    transform: rotate(90deg);
}

#chat-messages-ejvm {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #080808;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#chat-messages-ejvm::-webkit-scrollbar {
    width: 4px;
}

#chat-messages-ejvm::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

.message-ia-ejvm {
    align-self: flex-start;
    max-width: 85%;
    background: #1a1a1a;
    border-left: 3px solid var(--color-primary);
    padding: 14px 18px;
    color: #eee;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeInLeft 0.3s ease;
}

.message-usuario-ejvm {
    align-self: flex-end;
    max-width: 80%;
    background: var(--color-primary);
    color: white;
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeInRight 0.3s ease;
}

.typing-indicator-ejvm {
    display: flex;
    gap: 6px;
    padding: 14px 18px;
    background: #1a1a1a;
    border-left: 3px solid var(--color-primary);
    width: fit-content;
}

.dot-ejvm {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: typing 1.4s infinite;
}

.dot-ejvm:nth-child(2) {
    animation-delay: 0.2s;
}

.dot-ejvm:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    30% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#chat-input-area-ejvm {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    background: #111;
    display: flex;
    gap: 12px;
}

#chat-input-ejvm {
    flex: 1;
    border: 1px solid #333;
    background: #050505;
    color: white;
    padding: 14px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    font-family: var(--font-body);
    cursor: text !important;
}

#chat-input-ejvm:focus {
    border-color: var(--color-primary);
}

#send-btn-ejvm {
    background: var(--color-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer !important;
}

#send-btn-ejvm:hover {
    background: white;
    color: var(--color-primary);
}

/* Mobile Widget */
@media (max-width: 768px) {
    #chat-button-ejvm {
        width: 60px;
        height: 60px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        bottom: 20px;
        right: 20px;
    }

    #chat-button-text {
        display: none;
    }

    #chat-container-ejvm {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border: none;
    }
}