/* Importa Roboto (leve e rápida) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Fonte global do chat */
#vania-chat-panel,
#vania-chat-panel * {
    font-family: 'Roboto', Arial, sans-serif !important;
}

/* Bolha flutuante */
#vania-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #ffd100;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#vania-bubble img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

/* Painel */
#vania-chat-panel {
    position: fixed;
    top: 0;
    right: -375px;
    width: 375px;
    height: 100vh;
    background: #2f3241;
    color: white;
    z-index: 999998;
    transition: right .35s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0,0,0,0.35);

    /* 👇 importante: o painel não rola, só o miolo */
    overflow: hidden;
}

/* Header */
.vania-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #1f212c;
    border-bottom: 1px solid #0003;
}

.vania-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-right: 10px;
}

.vania-title {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

/* Botões de ação no header (reset e fechar) */
.vania-reset,
.vania-close {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-weight: 300;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
}

.vania-reset {
    font-size: 20px;
}

.vania-close {
    font-size: 20px;
}

.vania-reset-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #3a4060;
    border-bottom: 1px solid #0003;
    font-size: 13px;
}

.vania-reset-text {
    flex: 1;
}

.vania-reset-confirm,
.vania-reset-cancel {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 6px;
    color: #ffffff;
}

.vania-reset-confirm {
    color: #e84b4b;
}

.vania-reset-cancel {
    color: #3195d2;
}

/* ********************************************
   NOVA ÁREA DE SCROLL EXTERNA (wrapper)
   (baseada no seu backup, só com 1 linha a mais)
********************************************* */
.vania-messages-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #3a4060;
    display: flex;
    flex-direction: column;
}

/* Área interna de mensagens */
.vania-messages {
    padding: 20px;
    background: #3a4060;

    /* Removido overflow/min-height/flex para delegar ao wrapper */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.msg {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    max-width: 90%;
    line-height: 1.4;
    font-size: 15px;
}

.msg.bot {
    background: #333C51;
    color: #fff;
}

/* Mensagens do bot com delay começam ocultas */
.msg.bot[data-delay] {
    display: none;
}

.msg.user {
    background: #25d366;
    margin-left: auto;
    color: #fff;
}

/* Botões */
.vania-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.vania-btn {
    padding: 9px 12px;
    background: #4f8cff;
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: background .2s;
    /* Remove sublinhado de links usados como botões */
    text-decoration: none !important;
}

.vania-btn:hover {
    background: #457be6;
}

/* Rodapé */
.vania-footer {
    padding: 10px;
    font-size: 12px;
    text-align: center;
    color: #ccc;
    border-top: 1px solid #0003;
}

/* Bolha de "digitando..." do bot */
.vania-typing {
    background: #333C51;
    color: #eef1f6;
}

.vania-typing-dots {
    display: inline-flex;
    gap: 4px;
}

.vania-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #eef1f6;
    opacity: 0.4;
    animation: vania-bounce 1s infinite ease-in-out;
}

.vania-typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.vania-typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes vania-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Botões Sim/Não iguais ao botão Enviar */
.vania-btn-simnao {
    background-color: #FCC435;          /* mesma cor do botão Enviar */
    color: #000;                         /* texto preto */
    border: none;
    padding: 10px 18px;
    margin: 5px 8px 0 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.vania-btn-simnao:hover {
    filter: brightness(1.1);             /* mesmo efeito hover do botão Enviar */
}

.vania-btn-simnao:active {
    transform: scale(0.97);              /* efeito clique */
}

/* Tooltip do bubble */
#vania-bubble-tooltip {
    position: fixed;
    bottom: 124px; /* 80px do bubble + ~15px de distância + folga */
    right: 24px;   /* alinhado com o canto direito do bubble */
    background: #2f3241;
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
    z-index: 999999;
}

/* Mostrar tooltip ao passar o mouse */
#vania-bubble:hover + #vania-bubble-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   Modo IA Livre – destaque visual no campo de entrada
========================================================= */

.vania-input-area.ia-livre {
    position: relative;
    box-shadow: 0 0 0 1px #FCC435 inset;
}

/* Selo/tooltip fixo acima da área de entrada, indicando o modo IA */
.vania-input-area.ia-livre::before {
    content: "Conversa livre com a Vânia";
    position: absolute;
    right: 16px;
    top: -26px;
    background: #FCC435;
    color: #000;
    padding: 4px 10px;
    border-radius: 12px 12px 0 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Pequena setinha ligando o selo à borda da área de entrada */
.vania-input-area.ia-livre::after {
    content: "";
    position: absolute;
    right: 20px;
    top: -6px;
    width: 0;
    height: 0;
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #FCC435 transparent transparent transparent;
}