/* Chatbot styles: clean, professional, collapsible, message bubbles, Material icon button, notification toasts */

#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}

#chatbot-toggle {
    background: #1976d2;
    color: #fff;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 32px;
    border: none;
    outline: none;
    transition: background 0.2s, transform 0.2s cubic-bezier(0.4,0.0,0.2,1);
    /* Added transform transition for smooth scaling */
}

    #chatbot-toggle:hover {
        background: #1565c0;
        transform: scale(1.15);
        /* Grows the button on hover */
    }

    #chatbot-toggle .material-symbols-outlined {
        font-size: 32px;
    }

#chatbot-container.chatbot-open #chatbot-toggle {
    margin-bottom: -20px;
    z-index: 1000;
    margin-left: -30px;
    position: relative;
}

#chatbot-header .material-symbols-outlined {
    vertical-align: middle;
}

#chatbot-header .chatbot-header-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

    #chatbot-header .chatbot-header-controls .material-symbols-outlined {
        margin-top: 3px;
        margin-bottom: 5px;
        transition: color 0.2s, transform 0.2s cubic-bezier(0.4,0.0,0.2,1);
    }

        #chatbot-header .chatbot-header-controls .material-symbols-outlined:hover {
            color: #000;
            transform: scale(1.2);
            cursor: pointer;
        }

#chatbot-kill-session {
    margin-left: 10px;
}


        #chatbot-window {
            flex-direction: column;
            width: 350px;
            height: 500px;
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 24px rgba(0,0,0,0.18);
            overflow: hidden;
            margin-bottom: 10px;
            display: flex;
            opacity: 0;
            transform: scale(0.85);
            transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1);
            pointer-events: none;
        }

#chatbot-container.chatbot-open #chatbot-window {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}


#chatbot-header {
    background: #1976d2;
    color: #fff;
    padding: 16px;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
}

/* HEADER -  Slider switch styles for chatbot sound toggle */
.chatbot-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    margin-top: 4px;
}

    .chatbot-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.chatbot-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 22px;
}

    .chatbot-slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

.chatbot-switch input:checked + .chatbot-slider {
    background-color: #89abcd;
}

    .chatbot-switch input:checked + .chatbot-slider:before {
        transform: translateX(16px);
    }

#chatbot-messages {
    flex: 1 1 auto;
    padding: 16px;
    overflow-y: auto;
    background: #f5f5f5;
    min-height: 0; /* Important for flexbox scrolling */
    max-height: 100%;
}

.chatbot-bubble {
    max-width: 90%;
    margin-bottom: 12px;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 15px !important;
    line-height: 1.5;
    display: inline-block;
    clear: both;
}

    .chatbot-bubble * {
        font-size: 15px !important;
    }

    .chatbot-bubble a {
        color: blue;
        text-decoration: underline;
        font-weight: bold;
    }

    .chatbot-bubble.user {
        background: #e3f2fd;
        color: #1976d2;
        float: right;
        border-bottom-right-radius: 4px;
    }

    .chatbot-bubble.bot {
        background: #fff;
        color: #333;
        float: left;
        border-bottom-left-radius: 4px;
        border: 1px solid #e0e0e0;
    }

#chatbot-input-area {
    display: flex;
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid #eee;
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 2;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 15px;
    outline: none;
}

#chatbot-send {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    margin-left: 8px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.3s;
}

    #chatbot-send:hover {
        background: #1565c0;
    }

/* Toast notification */
#chatbot-toast {
    position: fixed;
    bottom: 100px;
    right: 40px;
    background: #323232;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 10000;
}

    #chatbot-toast.show {
        opacity: 1;
        pointer-events: auto;
    }







#chatbot-session-form {
    padding: 12px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

    #chatbot-session-form .chatbot-session-fields {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

        #chatbot-session-form .chatbot-session-fields input {
            border-radius: 8px;
            padding: 8px;
            border: 1px solid #ccc;
        }

    #chatbot-session-form .chatbot-session-actions {
        display: flex;
        justify-content: flex-end;
    }

#chat-session-submit {
    background: #1976d2;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
}

/* Processing state styles */
#chatbot-input.processing {
    color: #666;
    cursor: wait;
}

/* Make disabled send button visually appear disabled */
#chatbot-send[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
