/* ============================================================
   UniformArticles — AI Chatbot Stylesheet
   Developed by Pravax Systems | pravaxsystems.com
   ============================================================ */

/* Chatbot Floating Trigger Button */
.ua-chatbot-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
    color: var(--gold-400);
    border: 2px solid var(--gold-500);
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: var(--z-chatbot);
    transition: all var(--transition-base);
}
.ua-chatbot-trigger:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 8px 25px rgba(197, 165, 90, 0.4);
}

/* Chatbot Modal Container */
.ua-chatbot-window {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 380px;
    height: 520px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 8rem);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: var(--z-chatbot);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-spring);
    overflow: hidden;
}
.ua-chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.ua-chatbot-header {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: var(--white);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ua-chatbot-header .title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    font-size: 1rem;
}
.ua-chatbot-header .close-btn {
    background: none;
    border: none;
    color: var(--navy-300);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}
.ua-chatbot-header .close-btn:hover {
    color: var(--gold-400);
}

/* Message Body */
.ua-chatbot-body {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--gray-50);
}

.ua-chat-bubble {
    max-width: 82%;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}
.ua-chat-bubble.bot {
    background: var(--white);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.ua-chat-bubble.user {
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: var(--shadow-navy);
}

/* Typing indicator */
.ua-chat-typing {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
}
.ua-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-400);
    animation: typing 1.4s infinite ease-in-out both;
}
.ua-chat-typing span:nth-child(1) { animation-delay: -0.32s; }
.ua-chat-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Footer Input Area */
.ua-chatbot-footer {
    padding: 0.85rem 1rem;
    background: var(--white);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.5rem;
}
.ua-chatbot-input {
    flex: 1;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    outline: none;
    font-family: var(--font-body);
}
.ua-chatbot-input:focus {
    border-color: var(--navy-400);
}
.ua-chatbot-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--gold-500);
    color: var(--navy-900);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}
.ua-chatbot-send:hover {
    background: var(--gold-400);
    transform: scale(1.05);
}
