#ai-chatbot-widget {
    position: fixed;
    bottom: 90px;
    right: 25px;
    z-index: 200000;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
}

.pulse-ring {
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: pulse 2s infinite;
    z-index: -1;
    opacity: 0.5;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

#chatbot-window {
    position: absolute;
    bottom: 0px;
    right: 0;
    width: 380px;
    height: 550px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    transform-origin: bottom right;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
}

.ai-chatbot-open #chatbot-window {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.ai-chatbot-open #chatbot-toggle i {
    transform: rotate(180deg);
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

#chatbot-messages {
    flex-grow: 1;
    background: #f8fafc;
}

.message-content {
    max-width: 85%;
    line-height: 1.5;
}

.ai-message .message-content {
    color: #1e293b;
    border-bottom-left-radius: 4px !important;
}

.user-message {
    display: flex;
    justify-content: flex-end;
}

.user-message .message-content {
    color: white !important;
    border-bottom-right-radius: 4px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Premium Live Voice Animation (Match Backend) */
.ai-wave-container {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clickable-avatar {
    cursor: pointer;
    transition: transform 0.2s;
}

.clickable-avatar:hover {
    transform: scale(1.05);
}

.clickable-avatar:hover .ai-avatar-circle {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.ai-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.3;
    display: none;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, rgba(14, 165, 233, 0.2) 70%, transparent 100%);
}

.ai-wave-container.active .ai-wave {
    display: block;
    animation: pulse-wave 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.wave-2 {
    animation-delay: 0.6s;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, rgba(16, 185, 129, 0.1) 70%, transparent 100%);
}

.wave-3 {
    animation-delay: 1.2s;
}

@keyframes pulse-wave {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.ai-avatar-circle {
    position: relative;
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, #10b981, #0ea5e9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.4);
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.uppercase {
    text-transform: uppercase;
}

/* Typing indicators etc */
.typing .message-content {
    padding: 10px 15px !important;
}

.dot-flashing {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 5px;
    background-color: #94a3b8;
    color: #94a3b8;
    animation: dotFlashing 1s infinite linear alternate;
    animation-delay: .5s;
    display: inline-block;
    margin: 0 10px;
}

.dot-flashing::before,
.dot-flashing::after {
    content: '';
    display: inline-block;
    position: absolute;
    top: 0;
}

.dot-flashing::before {
    left: -12px;
    width: 6px;
    height: 6px;
    border-radius: 5px;
    background-color: #94a3b8;
    color: #94a3b8;
    animation: dotFlashing 1s infinite linear alternate;
    animation-delay: 0s;
}

.dot-flashing::after {
    left: 12px;
    width: 6px;
    height: 6px;
    border-radius: 5px;
    background-color: #94a3b8;
    color: #94a3b8;
    animation: dotFlashing 1s infinite linear alternate;
    animation-delay: 1s;
}

@keyframes dotFlashing {
    0% {
        background-color: #94a3b8;
    }

    50%,
    100% {
        background-color: #cbd5e1;
    }
}

@media (max-width: 500px) {
    #chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: -60px;
        right: 0px;
    }
}