﻿

.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 9999;
    font-family: system-ui, sans-serif;
}

    /* Bubble button */
    .chatbot-widget .chat-toggle {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: #0078d7;
        color: #fff;
        border: none;
        cursor: pointer;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        position: relative;
    }

        .chatbot-widget .chat-toggle:hover {
            background: #005fa3;
        }

        /* Notification dot */
        .chatbot-widget .chat-toggle .notify-dot {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 14px;
            height: 14px;
            background: red;
            border-radius: 50%;
            display: none;
        }

    /* Chat window */
    .chatbot-widget .chat-container {
        display: none;
        flex-direction: column;
        width: 450px;
        height: 570px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        overflow: hidden;
        position: absolute;
        bottom: 80px;
        right: 0;
    }

/* Responsive adjustments */
@media (max-width: 480px) {
    .chatbot-widget .chat-container {
        width: 95vw; /* almost full width */
        height: 70vh; /* taller on mobile */
        right: 2.5vw; /* small margin */
        bottom: 90px;
        border-radius: 10px;
    }
}

@media (min-width: 481px) and (max-width: 1024px) {
    .chatbot-widget .chat-container {
        width: 400px; /* slightly wider for tablets */
        height: 600px;
    }
}

.chatbot-widget .chat-header {
    background: #0078d7;
    color: #fff;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-widget .close-btn,
.chatbot-widget #newSessionBtn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    margin-left: 8px;
}

.chatbot-widget .chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f5f7fa;
}

.chatbot-widget .chat-message {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
    line-height: 1.4;
    word-wrap: break-word;
}

.chatbot-widget .chat-user {
    background: #0078d7;
    color: #fff;
    margin-left: auto;
}

.chatbot-widget .chat-bot {
    background: #e9ecef;
    color: #333;
    margin-right: auto;
}

.chatbot-widget .chat-input {
    display: flex;
    border-top: 1px solid #ddd;
}

    .chatbot-widget .chat-input input {
        flex: 1;
        border: none;
        padding: 12px;
        font-size: 14px;
        outline: none;
    }

    .chatbot-widget .chat-input button {
        background: #0078d7;
        color: #fff;
        border: none;
        padding: 0 14px;
        cursor: pointer;
        font-size: 14px;
    }

        .chatbot-widget .chat-input button:hover {
            background: #005fa3;
        }
