/* =========================================
   ITBX TECH - Chatbot Flutuante
   Estilos do chatbot assistente virtual
   ========================================= */

:root {
    --itbx-chat-primary: #0096FC;
    --itbx-chat-accent: #2665EF;
    --itbx-chat-dark: #0A1628;
    --itbx-chat-bubble: #16202A;
    --itbx-chat-user: #0096FC;
}

.chat-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    background: var(--itbx-chat-primary);
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 150, 252, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-launcher:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 150, 252, 0.5);
    background: var(--itbx-chat-accent);
}

.chat-window {
    position: fixed;
    right: 20px;
    bottom: 90px;
    z-index: 9998;
    width: 380px;
    max-width: 92vw;
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
}

.chat-window.open {
    display: block;
    animation: slideUp 0.3s ease-out;
}

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

.chat-header {
    background: linear-gradient(135deg, #272263 0%, #24458A 100%);
    color: #fff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 150, 252, 0.2);
}

.chat-header img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 50%;
    background: white;
    padding: 4px;
}

.chat-messages {
    max-height: 52vh;
    min-height: 280px;
    overflow: auto;
    padding: 16px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    display: flex;
}

.msg .bubble {
    padding: 12px 14px;
    border-radius: 16px;
    line-height: 1.4;
    font-size: 14px;
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.msg.bot .bubble {
    background: var(--itbx-chat-bubble);
    color: #e5e7eb;
    border-top-left-radius: 4px;
}

.msg.user {
    justify-content: flex-end;
}

.msg.user .bubble {
    background: var(--itbx-chat-user);
    color: #fff;
    border-top-right-radius: 4px;
}

.typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.typing .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    animation: typing 1.4s infinite;
}

.typing .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

.chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #0b1220;
    border-top: 1px solid rgba(0, 150, 252, 0.1);
}

.quick-btn {
    background: rgba(0, 150, 252, 0.1);
    color: #0096FC;
    border: 1px solid rgba(0, 150, 252, 0.3);
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: rgba(0, 150, 252, 0.2);
    border-color: rgba(0, 150, 252, 0.5);
}

.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #0b1220;
    border-top: 1px solid rgba(0, 150, 252, 0.1);
}

.chat-input textarea {
    flex: 1;
    resize: none;
    height: 44px;
    max-height: 120px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 150, 252, 0.2);
    background: #0f172a;
    color: #e5e7eb;
    font-size: 14px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.chat-input button {
    background: var(--itbx-chat-primary);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-input button:hover {
    background: var(--itbx-chat-accent);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #272263;
    border-radius: 10px;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: 20px;
    }
}
