/* AI Chatbot Styles */

#ai-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'DM Sans', sans-serif;
}

/* Chat Toggle Button */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #F9D423 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    animation: pulse-chat 2s ease-in-out infinite;
}

@keyframes pulse-chat {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6); }
}

.chat-toggle-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
    animation: none;
}

.chat-toggle-btn .chat-icon,
.chat-toggle-btn .close-icon {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.chat-toggle-btn .close-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
}

.chat-toggle-btn.active .chat-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.chat-toggle-btn.active .close-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #3DDC97;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(61, 220, 151, 0.4);
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #0A0E27;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

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

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #1A1F3A 0%, #0A0E27 100%);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
    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;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #F9D423 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar svg {
    width: 22px;
    height: 22px;
    color: white;
}

.chat-title {
    font-size: 16px;
    font-weight: 700;
    color: #E8E9ED;
    margin-bottom: 2px;
}

.chat-status {
    font-size: 12px;
    color: #A0A3BD;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3DDC97;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-close-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: rotate(90deg);
}

.chat-close-btn svg {
    width: 18px;
    height: 18px;
    color: #A0A3BD;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #0A0E27;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.3);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.5);
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
}

.chat-message.user {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
    align-items: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #FF6B35 0%, #F9D423 100%);
    color: #0A0E27;
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-content {
    background: rgba(255, 255, 255, 0.05);
    color: #E8E9ED;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 107, 53, 0.1);
}

.message-time {
    font-size: 10px;
    color: #A0A3BD;
    margin-top: 4px;
    padding: 0 4px;
}

/* Typing Indicator */
.typing-indicator .message-content {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF6B35;
    animation: typing 1.4s ease-in-out infinite;
}

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

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

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

/* Chat Input */
.chat-input-container {
    background: #1A1F3A;
    border-top: 1px solid rgba(255, 107, 53, 0.1);
    padding: 16px;
}

.chat-suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.suggestion-chip {
    padding: 8px 12px;
    border-radius: 20px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    color: #FF6B35;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #FF6B35;
    transform: translateY(-2px);
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.2);
    color: #E8E9ED;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input::placeholder {
    color: #A0A3BD;
}

.chat-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

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

.chat-send-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #ai-chatbot-container {
        bottom: 15px;
        right: 15px;
    }

    .chat-toggle-btn {
        width: 56px;
        height: 56px;
    }

    .chat-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 150px);
        bottom: 75px;
        right: -7.5px;
    }

    .chat-messages {
        padding: 15px;
    }

    .chat-message {
        max-width: 85%;
    }

    .message-content {
        font-size: 13px;
    }

    .chat-input-container {
        padding: 12px;
    }

    .suggestion-chip {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 20px);
        right: -10px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
