/* Chatbot CSS */
#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--font-body);
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    color: white;
    border: none;
    box-shadow: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
}

#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#chatbot-window.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.chatbot-header {
    background: transparent;
    color: var(--color-text-main);
    padding: 15px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header button {
    background: transparent;
    border: none;
    color: var(--color-text-main);
    cursor: pointer;
    font-size: 1.2rem;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-bubble.bot {
    background: rgba(14, 165, 233, 0.08);
    color: var(--color-text-main);
    border: 1px solid rgba(14, 165, 233, 0.15);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.chat-bubble.user {
    background: transparent;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.chat-bubble.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    align-self: center;
    font-size: 0.85rem;
}

.chatbot-input {
    padding: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.02);
}

.chatbot-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    outline: none;
    background: var(--color-background);
    color: var(--color-text-main);
    font-family: var(--font-body);
}

[data-theme="dark"] .chatbot-input input {
    border-color: rgba(255,255,255,0.1);
}

.chatbot-input button {
    background: var(--color-secondary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-input button:hover {
    background: var(--color-secondary-hover);
}

.chatbot-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px 10px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

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

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 480px) {
    #chatbot-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        transform: translateY(20px);
    }
}
