/* ==========================================
   CHATBOT CAMPEÃ SEGUROS (ESTILO JORDANA/PREMIUM)
   VERSÃO MACGYVER V7.0 - ACABAMENTO FINO
   ========================================== */

/* --- SCROLLBAR MODERNA --- */
#chatbot-container::-webkit-scrollbar { width: 6px; }
#chatbot-container::-webkit-scrollbar-track { background: transparent; }
#chatbot-container::-webkit-scrollbar-thumb { background: #cccccc; border-radius: 10px; }
#chatbot-container::-webkit-scrollbar-thumb:hover { background: #999999; }
#chatbot-container { position: fixed; z-index: 9999; max-width: 360px; bottom: 20px; right: 20px; font-family: "Open Sans", "Segoe UI", sans-serif !important; }

/* --- BUBBLE (O BALÃO FLUTUANTE INICIAL) --- */
#chatbot-bubble { display: flex; align-items: center; justify-content: flex-end; position: fixed; z-index: 9999; bottom: 20px; right: 20px; cursor: pointer; transition: all 0.4s ease-in-out; }

.chatbot-bubble-avatar { 
    background-image: url('../img/avatar.jpg'); 
    border-radius: 50%; 
    background-size: cover; 
    width: 60px; 
    height: 60px; 
    border: 3px solid #ffffff; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
}

.chatbot-bubble-avatar-online {  
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px; 
    height: 14px; 
    border-radius: 50%; 
    background-color: #25D366; 
    border: 2px solid #ffffff;
}

.chatbot-bubble-message { 
    background-color: #ffffff; 
    color: #333333; 
    padding: 12px 18px; 
    border-radius: 20px 0 20px 20px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    font-size: 14px;
    font-weight: 600;
    margin-right: -10px;
    padding-right: 20px;
    transition: all 0.3s ease;
}

#chatbot-bubble:hover .chatbot-bubble-message { box-shadow: 0 6px 20px rgba(0,0,0,0.15); transform: translateY(-2px); }
#chatbot-bubble:hover .chatbot-bubble-avatar { box-shadow: 0 6px 20px rgba(0,0,0,0.2); transform: translateY(-2px); }

/* --- CAIXA PRINCIPAL DO CHAT --- */
#chatbot-box { 
    visibility: hidden; 
    position: relative; 
    z-index: 10000; 
    background-color: #ffffff; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); 
    border-radius: 16px; 
    overflow: hidden;
    transition: all 0.4s ease-out; 
    display: flex;
    flex-direction: column;
}

/* --- CABEÇALHO --- */
.chatbot-box-header { 
    color: #fff; 
    background: linear-gradient(135deg, #000107, #1a1a24); 
    padding: 15px; 
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

.chatbot-box-header-avatar { 
    background-image: url('../img/avatar.jpg'); 
    border-radius: 50%; 
    background-size: cover; 
    width: 45px; 
    height: 45px; 
    position: relative; 
    margin-right: 12px;
}

.chatbot-box-header-avatar-online { 
    position: absolute; 
    bottom: 0; 
    right: 0; 
    background: #25D366; 
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    border: 2px solid #000107; 
}

.chatbot-box-header-status { font-size: 12px; color: #a0a0a0; margin-top: 2px;}
.chatbot-box-header-name { font-weight: bold; font-size: 15px; }

/* --- ÁREA DE MENSAGENS --- */
#chatbot-box-content { 
    height: 330px; 
    padding: 15px 15px 5px 15px; 
    overflow-y: auto; 
    background-color: #f8f9fa;
    scroll-behavior: smooth;
}

#chatbot-box-content > div { width: 100%; display: inline-block; clear: both; }

/* Mensagem do Robô (Esquerda) */
.chatbot-box-content-chat { 
    padding: 12px 16px; 
    max-width: 85%; 
    margin-bottom: 12px; 
    background: #ffffff !important; 
    color: #333333;
    border-radius: 0 16px 16px 16px; 
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    float: left;
}

/* Mensagem do Usuário (Direita) */
.chatbot-box-content-chat-right { 
    padding: 12px 16px; 
    max-width: 85%; 
    margin-bottom: 12px; 
    background: #000107 !important; 
    color: #ffffff; 
    border-radius: 16px 0 16px 16px; 
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    float: right;
}

/* --- BOTÕES DE OPÇÃO (ESTILO OUTLINE PREMIUM) --- */
.chatbot-btn { 
    margin: 8px 6px 0 0; 
    padding: 8px 14px; 
    border-radius: 20px; 
    display: inline-block; 
    cursor: pointer; 
    color: #ce0e0e; 
    background-color: #ffffff; 
    border: 1px solid #ce0e0e;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease; 
}
.chatbot-btn > * { pointer-events: none; }
.chatbot-btn:hover { background-color: #ce0e0e; color: #ffffff; box-shadow: 0 4px 10px rgba(206, 14, 14, 0.3); }

.chatbot-start { background-color: #ce0e0e; color: #ffffff; padding: 10px 18px; margin-top: 10px; border: none; box-shadow: 0 4px 10px rgba(206, 14, 14, 0.3); }
.chatbot-start:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(206, 14, 14, 0.4); }

/* --- RODAPÉ E INPUTS --- */
#chatbot-box-footer { 
    background-color: #ffffff; 
    padding: 12px 65px 12px 15px; 
    position: relative;
    border-top: 1px solid #eeeeee;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}

.chatbot-input { 
    display: none; 
    background-color: #f1f3f5 !important; 
    border: 1px solid transparent !important; 
    border-radius: 24px !important; 
    padding: 12px 15px !important; 
    width: 100% !important; 
    font-size: 14px !important;
    color: #333 !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease;
}
.chatbot-input:focus { outline: none !important; border: 1px solid #ce0e0e !important; background-color: #ffffff !important; }
.chatbot-input-error { background-color: #fff0f0 !important; }
#chatbot-input-none { display: block; cursor: no-drop !important; background-color: #e9ecef !important; color: #888 !important; }

/* --- BOTÕES DE ENVIAR --- */
#chatbot-send, #chatbot-not-send { 
    position: absolute; 
    bottom: 11px; 
    right: 15px; 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
#chatbot-send { cursor: pointer; background: #ce0e0e; box-shadow: 0 4px 10px rgba(206, 14, 14, 0.3); }
#chatbot-send:hover { background: #a80a0a; transform: scale(1.05); }
#chatbot-not-send { cursor: no-drop; background-color: #cccccc; }
#chatbot-send svg, #chatbot-not-send svg { width: 20px; height: 20px; margin: 0; }

/* --- ANIMAÇÃO DE DIGITANDO --- */
.lds-ellipsis-content { width: 100%; text-align: left; padding-left: 10px; }
.lds-ellipsis { display: inline-block; position: relative; width: 60px; height: 30px; }
.lds-ellipsis div { position: absolute; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: #ce0e0e; animation-timing-function: cubic-bezier(0, 1, 1, 0); }
.lds-ellipsis div:nth-child(1) { left: 6px; animation: lds-ellipsis1 0.6s infinite; }
.lds-ellipsis div:nth-child(2) { left: 6px; animation: lds-ellipsis2 0.6s infinite; }
.lds-ellipsis div:nth-child(3) { left: 24px; animation: lds-ellipsis2 0.6s infinite; }
.lds-ellipsis div:nth-child(4) { left: 42px; animation: lds-ellipsis3 0.6s infinite; }
@keyframes lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(18px, 0); } }