/* ===================== Widget de Chatbot ===================== */
#cb-widget-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    cursor: pointer;
    font-size: 26px;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
#cb-widget-btn:hover { transform: scale(1.06); }

#cb-widget-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 340px;
    max-width: 90vw;
    height: 460px;
    max-height: 75vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    z-index: 999999;
}
#cb-widget-window.cb-open { display: flex; }

#cb-header {
    background: #2563eb;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
}
#cb-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

#cb-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f5f7fb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cb-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}
.cb-msg.cb-bot {
    background: #e5e9f0;
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.cb-msg.cb-user {
    background: #2563eb;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

#cb-input-area {
    display: flex;
    border-top: 1px solid #e5e7eb;
    padding: 8px;
    gap: 8px;
}
#cb-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
}
#cb-input:focus { border-color: #2563eb; }

#cb-send {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 16px;
}
#cb-send:disabled { opacity: 0.5; cursor: default; }
