/* AI Chatbot Styles */

/* Chat Button */
.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.chat-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(255, 107, 107, 0.6);
}

.chat-icon {
    font-size: 24px;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border);
}

.chat-window.hidden {
    display: none;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-bot-icon {
    font-size: 32px;
}

.chat-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.chat-status {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.close-chat-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.close-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bot-message,
.user-message {
    display: flex;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.user-message {
    justify-content: flex-end;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message-content {
    background: var(--bg-dark);
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 70%;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-reply {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-reply:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Typing Indicator */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots 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;
    }
}

/* Chat Input */
.chat-input-container {
    padding: 15px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

#chat-input:focus {
    border-color: var(--primary);
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .chat-button {
        bottom: 20px;
        right: 20px;
        padding: 14px 22px;
        font-size: 15px;
        z-index: 999;
    }

    .chat-header {
        padding: 16px;
    }

    .chat-title {
        font-size: 16px;
    }

    .chat-messages {
        padding: 16px;
    }

    .message-content {
        max-width: 80%;
        font-size: 14px;
    }

    .chat-input-container {
        padding: 12px;
    }

    #chat-input {
        font-size: 14px;
        padding: 10px 14px;
    }

    .send-btn {
        width: 44px;
        height: 44px;
        min-height: 44px;
        flex-shrink: 0;
    }

    .quick-reply {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 36px;
    }
}

/* Extra Small Mobile */
@media (max-width: 374px) {
    .chat-button {
        padding: 12px 18px;
        font-size: 14px;
    }

    .message-content {
        max-width: 85%;
    }
}