/* ============================= */
/* BOTÃO FLUTUANTE */
/* ============================= */

#braziltrad-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;

    width: 58px;
    height: 58px;

    border-radius: 50%;
    border: none;

    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    font-size: 0;

    z-index: 99999;

    box-shadow:
        0 10px 24px rgba(0,0,0,0.30),
        0 0 0 5px rgba(34,197,94,0.16);

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#braziltrad-chat-toggle:hover {
    transform: scale(1.06);
    box-shadow:
        0 14px 28px rgba(0,0,0,0.34),
        0 0 0 7px rgba(34,197,94,0.22);
}

#braziltrad-chat-toggle svg {
    width: 26px;
    height: 26px;
    display: block;
}


/* ============================= */
/* CAIXA DO CHAT */
/* ============================= */

#braziltrad-chatbox {
    position: fixed;
    bottom: 100px;
    right: 20px;

    width: 340px;
    max-width: calc(100vw - 24px);

    height: 65vh;
max-height: 500px;
min-height: 380px;

    background: #f3f0e9;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.30);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 99998;
}

#braziltrad-chatbox.open {
    display: flex;
}


/* ============================= */
/* HEADER */
/* ============================= */

.bt-chat-header {
    background: linear-gradient(135deg, #101820, #0f2a22);

    color: #fff;

    padding: 14px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 64px;

    flex: 0 0 auto;
}

.bt-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.bt-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;

    background: #ffffff;
    border-radius: 10px;
    padding: 4px;
}

.bt-header-text {
    display: flex;
    flex-direction: column;
}

.bt-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.bt-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    line-height: 1.2;
}

/* botão fechar */
.bt-close-btn {
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
}

.bt-close-btn:hover {
    background: rgba(255,255,255,0.08);
}


/* ============================= */
/* ÁREA DE MENSAGENS */
/* ============================= */

.bt-chat-messages {
    flex: 1;

    padding: 12px;

    overflow-y: auto;

    background: #f3f0e9;
}


/* ============================= */
/* MENSAGENS */
/* ============================= */

.bt-message {
    margin-bottom: 12px;

    max-width: 86%;

    padding: 12px 14px;

    border-radius: 20px;

    line-height: 1.45;
    font-size: 14px;

    word-wrap: break-word;
}

/* mensagem IA */
.bt-message.assistant {
    background: linear-gradient(135deg, #10231d, #0c1a17);
    color: #ffffff;

    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* mensagem utilizador */
.bt-message.user {
    background: #dcfce7;
    color: #111827;

    margin-left: auto;
}


/* ============================= */
/* FOOTER */
/* ============================= */

.bt-chat-footer {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px;

    border-top: 1px solid rgba(16,24,32,0.08);

    background: #f8f5ef;
}


/* input */

#bt-chat-input {
    flex: 1;

    height: 46px;

    border: 1px solid #bfd5c4;
    border-radius: 16px;

    padding: 0 14px;

    font-size: 14px;

    background: #fffdf9;
    color: #111827;

    outline: none;
}

#bt-chat-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}


/* botão enviar */

#bt-chat-send {
    height: 46px;

    border: none;

    background: #16a34a;
    color: #ffffff;

    border-radius: 16px;

    padding: 0 18px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

#bt-chat-send:hover {
    background: #15803d;
}


/* ============================= */
/* MOBILE */
/* ============================= */

@media (max-width: 640px) {
    #braziltrad-chatbox {
        right: 12px;
        bottom: 90px;
        width: calc(100vw - 24px);
        height: 68vh;
        border-radius: 18px;
    }

    #braziltrad-chat-toggle {
        right: 16px;
        bottom: 16px;
    }
}
.bt-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px 0;
}

.bt-quick-reply {
    border: 1px solid #bfd5c4;
    background: #fffdf9;
    color: #10231d;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bt-quick-reply:hover {
    background: #e8f5ec;
    border-color: #22c55e;
}