﻿
* {
    box-sizing: border-box;
}

.helpdesk-chatbot {
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* Floating Icon */
.chat-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066ff, #003399);
    color: white;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(0, 80, 200, 0.4);
    z-index: 9999;
    animation: robotPulse 2s infinite;
    transition: 0.3s;
}

    .chat-toggle:hover {
        transform: scale(1.12) rotate(5deg);
    }

.notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 14px;
    height: 14px;
    background: #20d67b;
    border: 2px solid white;
    border-radius: 50%;
}

@@keyframes robotPulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(0, 80, 200, 0.3);
    }

    50% {
        box-shadow: 0 5px 30px rgba(0, 80, 200, 0.7);
    }
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 110px;
    right: 25px;
    width: 380px;
    max-width: calc(100vw - 30px);
    height: 550px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    animation: chatOpen 0.35s ease;
}

@@keyframes chatOpen {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, #005bea, #003399);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    color: #005bea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    animation: botFloat 3s ease-in-out infinite;
}

@@keyframes botFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.header-info {
    flex: 1;
}

    .header-info h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
    }

    .header-info span {
        font-size: 12px;
        color: #d5e5ff;
    }

        .header-info span i {
            color: #20d67b;
            font-size: 8px;
            margin-right: 4px;
        }

.header-actions button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 8px;
    transition: 0.3s;
}

    .header-actions button:hover {
        transform: rotate(90deg);
    }

/* Chat Body */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: #f4f7fc;
    scroll-behavior: smooth;
}

    .chat-body::-webkit-scrollbar {
        width: 5px;
    }

    .chat-body::-webkit-scrollbar-thumb {
        background: #b5c9ec;
        border-radius: 10px;
    }

/* Messages */
.bot-message,
.user-message {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    animation: messageAppear 0.4s ease;
}

@@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    justify-content: flex-end;
}

.message-avatar {
    min-width: 32px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0066ff, #003399);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.user-message .message-avatar {
    display: none;
}

.message-content {
    max-width: 85%;
}

.message-bubble {
    padding: 12px 15px;
    border-radius: 15px;
    background: white;
    color: #25324b;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    overflow-wrap: anywhere;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #0066ff, #0044bb);
    color: white;
    border-radius: 15px 15px 3px 15px;
}

.bot-message .message-bubble {
    border-radius: 3px 15px 15px 15px;
}

.message-time {
    font-size: 10px;
    color: #8995aa;
    display: block;
    margin-top: 5px;
    padding: 0 5px;
}

.user-message .message-time {
    text-align: right;
}

/* Quick Questions */
.quick-questions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0 20px 40px;
}

.quick-btn {
    background: white;
    border: 1px solid #c8dafb;
    color: #005bea;
    border-radius: 10px;
    padding: 10px 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

    .quick-btn i {
        margin-right: 5px;
    }

    .quick-btn:hover {
        background: #005bea;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0, 91, 234, 0.2);
    }

/* Typing Animation */
.typing-container {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0 18px 12px;
    background: #f4f7fc;
}

.typing-bubble {
    display: flex;
    gap: 5px;
    background: white;
    padding: 12px 15px;
    border-radius: 15px;
}

    .typing-bubble span {
        width: 7px;
        height: 7px;
        background: #0066ff;
        border-radius: 50%;
        animation: typing 1s infinite;
    }

        .typing-bubble span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-bubble span:nth-child(3) {
            animation-delay: 0.4s;
        }

@@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-7px);
        opacity: 1;
    }
}

/* Footer */
.chat-footer {
    background: white;
    padding: 12px;
    border-top: 1px solid #e6edf8;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #f4f7fc;
    border: 1px solid #d8e4f6;
    border-radius: 30px;
    padding: 5px 6px 5px 15px;
    transition: 0.3s;
}

    .input-wrapper:focus-within {
        border-color: #0066ff;
        box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
    }

#userInput {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 0;
    font-size: 14px;
    color: #25324b;
}

#sendBtn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066ff, #003399);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

    #sendBtn:hover {
        transform: scale(1.1);
    }

    #sendBtn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.footer-text {
    text-align: center;
    font-size: 10px;
    color: #9aa7bb;
    margin-top: 8px;
}

    .footer-text strong {
        color: #005bea;
    }

/* Responsive */
@@media(max-width: 480px) {
    .chat-window {
        right: 10px;
        bottom: 90px;
        width: calc(100vw - 20px);
        height: min(600px, calc(100vh - 110px));
    }

    .chat-toggle {
        right: 15px;
        bottom: 15px;
    }
}


