/* 
    ASSISTENTE VIRTUAL CONTÁBIL - HAMILTON CONTABILIDADE
    Estilos modernos, corporativos e responsivos
*/

:root {
    --bot-primary: #232d3f;
    --bot-secondary: #D1D5DB;
    --bot-accent: #9ec6fa;
    --bot-bg: #F8FAFC;
    --bot-text: #232d3f;
    --bot-white: #FFFFFF;
    --bot-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    --bot-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Botão Flutuante */
#bot-floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--bot-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--bot-shadow);
    z-index: 9999;
    transition: var(--bot-transition);
    border: 2px solid var(--bot-secondary);
}

#bot-floating-button:hover {
    transform: scale(1.1);
    background-color: #2c3950;
}

#bot-floating-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Modal do Chat */
#bot-chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background-color: var(--bot-bg);
    border-radius: 16px;
    box-shadow: var(--bot-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    border: 1px solid rgba(31, 58, 95, 0.1);
    font-family: 'Poppins', sans-serif;
}

#bot-chat-container.active {
    display: flex;
    animation: slideUp 0.4s ease-out;
}

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

/* Header do Chat */
.bot-header {
    background-color: var(--bot-primary);
    color: var(--bot-white);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 45px;
    height: 45px;
    background: var(--bot-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

.bot-status h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.bot-status span {
    font-size: 0.75rem;
    opacity: 0.8;
}

.bot-close {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

/* Área de Mensagens */
.bot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f0f4f8;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.message.bot {
    align-self: flex-start;
    background-color: var(--bot-white);
    color: var(--bot-text);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message.user {
    align-self: flex-end;
    background-color: var(--bot-accent);
    color: var(--bot-primary);
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

/* Digitação */
.typing-indicator {
    display: none;
    align-self: flex-start;
    background: var(--bot-white);
    padding: 10px 15px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #bbb;
    display: inline-block;
    border-radius: 50%;
    margin-right: 2px;
    animation: bounce 1.3s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* Botões de Ação */
.bot-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.action-btn {
    background: var(--bot-white);
    border: 1px solid var(--bot-accent);
    color: var(--bot-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--bot-transition);
    font-weight: 500;
    text-align: left;
    width: 100%;
}

.action-btn:hover {
    background: var(--bot-accent);
    color: var(--bot-primary);
    transform: translateX(5px);
}

/* Responsividade */
@media (max-width: 768px) {
    #bot-chat-container {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
        height: 70vh;
    }
    #bot-floating-button {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 425px) {
    #bot-chat-container {
        width: 100%;
        right: 0;
        bottom: 0;
        height: 100%;
        border-radius: 0;
    }
    .bot-header {
        padding: 20px;
    }
}
