﻿#aiSupportChat {
    position: fixed;
    bottom: 50px;
    left: 30px;
    z-index: 900000;
}

@media (max-width: 768px) {
    #aiSupportChat {
        display: none !important;
    }
}

/* =================================
   FLOATING ACTION BUTTON
   ================================= */
#supportButton {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    #supportButton:active {
        cursor: grabbing;
    }

/* =================================
   CHAT PANEL & LAYOUT
   ================================= */
#supportChatPanel {
    position: absolute;
    bottom: 250px; /* acima do botão */
    left: 30px;
    width: 320px;
    height: 400px; /* altura inicial */
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    padding: 12px;
    z-index: 8000051;
    /* flex vertical para alinhar header, messages e input */
    display: flex;
    flex-direction: column;
    /* redimensionável */
    resize: both;
    overflow: hidden; /* importante para o resize */
}

    #supportChatPanel.hidden {
        display: none;
    }


    /* Header fixo */
    #supportChatPanel > .d-flex {
        flex: 0 0 auto; /* não cresce, não encolhe */
    }

/* =================================
   MESSAGE AREA
   ================================= */
#supportChatMessages {
    flex: 1 1 auto; /* cresce para ocupar o espaço disponível */
    overflow-y: auto;
    margin-bottom: 10px;
}

.support-bubble {
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 85%;
}

    .support-bubble.user {
        background: #e6f0ff;
        margin-left: auto;
    }

    .support-bubble.bot {
        background: #f2f2f2;
        margin-right: auto;
    }

/* =================================
   INPUT AREA
   ================================= */
#supportChatInput {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 8px;
    outline: none;

    flex: 0 0 auto;
    box-sizing: border-box;
}