/* Asteron AI Chatbot Widget CSS */

#asteron-ai-chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Chat Trigger Button */
#asteron-ai-chatbot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #673DE6, #9b51e0);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(103, 61, 230, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

#asteron-ai-chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(103, 61, 230, 0.6);
}

/* Chat Window */
#asteron-ai-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1;
    transform: scale(1);
}

#asteron-ai-chatbot-window.closed {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #673DE6, #9b51e0);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#chatbot-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#chatbot-close-btn:hover {
    opacity: 1;
}

/* Body (Messages) */
.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f9f9fb;
}

.chat-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.chat-msg p {
    margin: 0;
}

.chat-msg p:not(:last-child) {
    margin-bottom: 8px;
}

.ai-msg {
    align-self: flex-start;
    background-color: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-msg {
    align-self: flex-end;
    background-color: #673DE6;
    color: white;
    border-bottom-right-radius: 4px;
}

/* Footer (Input) */
.chatbot-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: #673DE6;
}

#chatbot-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 35%;
    background-color: #673DE6;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

#chatbot-send-btn:hover {
    background-color: #552ecc;
    transform: scale(1.05);
}

/* Loading Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    #asteron-ai-chatbot-window {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 90px;
        right: 20px;
    }
}
@media (max-width: 480px) {
    #asteron-ai-chatbot-wrapper {
        bottom: 10px;
        right: 10px;
    }
    #asteron-ai-chatbot-trigger {
        width: 50px;
        height: 50px;
    }
    #asteron-ai-chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 70px;
        right: 0px;
    }
}

/* Default Questions */
.default-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
    margin-bottom: 10px;
}
.default-q-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    text-align: left;
    transition: background 0.2s;
    animation: fadeIn 0.3s ease;
}
.default-q-btn:hover {
    background: #e0e0e0;
}