/* VD-1 Chatbot Styles */
#vd-chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Floating Toggle Button */
#chatbot-toggle {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #00bcd4, #0d47a1);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 188, 212, 0.8);
}

#chatbot-toggle svg {
    width: 30px;
    height: 30px;
    fill: white;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

/* Chat Window */
#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 188, 212, 0.1);
    display: none;
    /* Hidden by default */
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: openChat 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

/* Chat Header */
.chat-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: space-between;
    /* Adjusted alignment */
}

#chatbot-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    line-height: 0;
    transition: color 0.2s, transform 0.2s;
}

#chatbot-close:hover {
    color: #ff4444;
    transform: scale(1.1);
}

.bot-avatar {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, #00bcd4, #0d47a1);
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    color: white;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chat-title h3 {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    margin: 0;
    letter-spacing: 1px;
}

.chat-title span {
    color: #00bcd4;
    font-size: 0.7rem;
    display: block;
}

/* Chat Status Indicator */
.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    display: inline-block;
    margin-left: 5px;
    box-shadow: 0 0 5px #4CAF50;
    animation: pulse 2s infinite;
}

/* Chat Body */
#chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00bcd4 #0f0f19;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background-color: #00bcd4;
    border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-track {
    background-color: #0f0f19;
}

/* Messages */
.message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.message.bot {
    background: rgba(0, 188, 212, 0.1);
    border: 1px solid rgba(0, 188, 212, 0.2);
    color: #e0e0e0;
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.message.user {
    background: linear-gradient(135deg, #0d47a1, #00bcd4);
    color: white;
    margin-left: auto;
    border-top-right-radius: 2px;
    text-align: right;
}

/* Input Area */
.chat-input-area {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

#chat-input:focus {
    border-color: #00bcd4;
}

#send-btn {
    background: transparent;
    border: none;
    color: #00bcd4;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

#send-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 10px;
    background: rgba(0, 188, 212, 0.05);
    border-radius: 12px;
    width: fit-content;
    margin-bottom: 15px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #00bcd4;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes openChat {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        box-shadow: 0 0 0 5px rgba(76, 175, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #chatbot-window {
        width: 300px;
        height: 450px;
        right: -20px;
        /* Offset for better mobile alignment */
    }
}