/* ===================================
   AI CHATBOT STYLES
   =================================== */

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9998;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 229, 255, 0.6);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    color: #0a1320;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info h3 {
    margin: 0;
    color: #0a1320;
    font-size: 1.1rem;
    font-weight: 700;
}

.chatbot-header-info p {
    margin: 4px 0 0;
    color: #0a1320;
    font-size: 0.85rem;
    opacity: 0.9;
}

.chatbot-close {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close:hover {
    background: rgba(10, 19, 32, 0.1);
}

.chatbot-close svg {
    width: 20px;
    height: 20px;
    color: #0a1320;
}

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

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.chatbot-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    background: var(--bg-primary);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.message-content p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.message-content strong {
    color: var(--accent);
    font-weight: 600;
}

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-reply {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: 20px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply:hover {
    background: var(--accent);
    color: #0a1320;
    transform: translateY(-2px);
}

/* Input Container */
.chatbot-input-container {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    background: var(--bg-primary);
    border-radius: 0 0 16px 16px;
}

#chatbot-input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

#chatbot-input:focus {
    border-color: var(--accent);
}

#chatbot-input::placeholder {
    color: var(--text-muted);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 229, 255, 0.4);
}

.chatbot-send svg {
    width: 20px;
    height: 20px;
    color: #0a1320;
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 80px;
        right: 20px;
        left: 20px;
    }

    .chatbot-window {
        width: 100%;
        height: 500px;
        right: 0;
    }

    .chatbot-toggle {
        width: 56px;
        height: 56px;
        position: fixed;
        right: 20px;
    }
}

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

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}
