/* ============================================
   CHATBOT STYLES
   Modern, responsive, easy to customize
   ============================================ */

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: var(--bg-card, #161616);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

.chat-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
    color: #0a0a0a;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(10, 10, 10, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-header-text h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.chat-header-text p {
    font-size: 12px;
    margin: 0;
    opacity: 0.8;
}

.chat-close {
    background: none;
    border: none;
    color: #0a0a0a;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

/* Chat Body */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #0a0a0a;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.ai {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.chat-message.ai .message-avatar {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
}

.chat-message.user .message-avatar {
    background: #3b82f6;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.ai .message-bubble {
    background: #161616;
    border: 1px solid #2a2a2a;
    color: #ffffff;
}

.chat-message.user .message-bubble {
    background: #3b82f6;
    color: #ffffff;
}

.message-time {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 10px 16px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    width: fit-content;
}

.typing-indicator.active {
    display: block;
}

.typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #d4af37;
    border-radius: 50%;
    margin: 0 2px;
    animation: typingDot 1.4s infinite;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Chat Input */
.chat-input {
    border-top: 1px solid #2a2a2a;
    padding: 15px 20px;
    background: #111111;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 25px;
    padding: 12px 20px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
}

.chat-input input:focus {
    border-color: #d4af37;
}

.chat-send-btn {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.1);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Login Form (in chat window) */
.chat-login-form {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-login-form h3 {
    text-align: center;
    margin-bottom: 10px;
    color: #d4af37;
}

.chat-login-form input {
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 14px;
}

.chat-login-form input:focus {
    border-color: #d4af37;
    outline: none;
}

.chat-login-btn {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: none;
    padding: 14px;
    border-radius: 10px;
    color: #0a0a0a;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-login-btn:hover {
    transform: translateY(-2px);
}

.chat-switch-mode {
    text-align: center;
    font-size: 13px;
    color: #a0a0a0;
    cursor: pointer;
}

.chat-switch-mode:hover {
    color: #d4af37;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-window {
        right: 20px;
        left: 20px;
        width: auto;
        bottom: 90px;
        height: 500px;
    }
}
