/* Explyra Employee AI Agent Styles - Geist/Vercel Premium Design */

:root {
    --ai-primary: #000;
    --ai-secondary: #fff;
    --ai-accent: #0ea5e9;
    --ai-border: #eaeaea;
    --ai-bg-msg-user: #000;
    --ai-bg-msg-bot: #f9fafb;
    --ai-text-main: #171717;
    --ai-text-muted: #666;
    --ai-radius: 12px;
}

.dark {
    --ai-primary: #fff;
    --ai-secondary: #000;
    --ai-border: #333;
    --ai-bg-msg-user: #fff;
    --ai-bg-msg-bot: #111;
    --ai-text-main: #ededed;
    --ai-text-muted: #888;
}

/* AI Launcher Button */
.emp-ai-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255,255,255,0.1);
}

.dark .emp-ai-trigger {
    background: #fff;
    color: #000;
    border: 2px solid rgba(0,0,0,0.1);
}

.emp-ai-trigger:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.emp-ai-trigger i {
    font-size: 24px;
    animation: bounceSlow 2s infinite ease-in-out;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Chat Window */
.emp-ai-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--ai-secondary);
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius);
    box-shadow: 0 24px 60px rgba(0,0,0,0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.emp-ai-window.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Header */
.emp-ai-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ai-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ai-secondary);
}

.emp-ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emp-ai-avatar {
    width: 32px;
    height: 32px;
    background: var(--ai-primary);
    color: var(--ai-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.emp-ai-title h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ai-text-main);
}

.emp-ai-title p {
    margin: 0;
    font-size: 11px;
    color: var(--ai-text-muted);
}

.emp-ai-controls {
    display: flex;
    gap: 8px;
}

.emp-ai-btn-small {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ai-text-muted);
    transition: all 0.2s;
}

.emp-ai-btn-small:hover {
    background: var(--ai-bg-msg-bot);
    color: var(--ai-text-main);
}

/* Messages Area */
.emp-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--ai-border) transparent;
}

.emp-ai-messages::-webkit-scrollbar {
    width: 5px;
}

.emp-ai-messages::-webkit-scrollbar-thumb {
    background: var(--ai-border);
    border-radius: 10px;
}

.msg {
    max-width: 85%;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.6;
    border-radius: 12px;
    position: relative;
    animation: msgFadeUp 0.3s ease-out forwards;
}

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

.msg.ai {
    align-self: flex-start;
    background: var(--ai-bg-msg-bot);
    color: var(--ai-text-main);
    border: 1px solid var(--ai-border);
    border-bottom-left-radius: 2px;
}

.msg.user {
    align-self: flex-end;
    background: var(--ai-bg-msg-user);
    color: var(--ai-secondary);
    border-bottom-right-radius: 2px;
}

/* Quick Actions */
.emp-ai-actions {
    padding: 0 20px 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.emp-ai-actions::-webkit-scrollbar {
    display: none;
}

.action-chip {
    padding: 6px 12px;
    background: var(--ai-secondary);
    border: 1px solid var(--ai-border);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: var(--ai-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.action-chip:hover {
    border-color: var(--ai-primary);
    color: var(--ai-text-main);
    background: var(--ai-bg-msg-bot);
}

/* Input Area */
.emp-ai-input-wrapper {
    padding: 16px 20px;
    border-top: 1px solid var(--ai-border);
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--ai-secondary);
}

.emp-ai-input {
    flex: 1;
    background: var(--ai-bg-msg-bot);
    border: 1px solid var(--ai-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--ai-text-main);
    outline: none;
    transition: all 0.2s;
}

.emp-ai-input:focus {
    border-color: var(--ai-primary);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.02);
}

.emp-ai-send {
    width: 36px;
    height: 36px;
    background: var(--ai-primary);
    color: var(--ai-secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.emp-ai-send:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.emp-ai-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: var(--ai-bg-msg-bot);
    border: 1px solid var(--ai-border);
    border-radius: 12px;
    align-self: flex-start;
    display: none;
}

.dot {
    width: 4px;
    height: 4px;
    background: var(--ai-text-muted);
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out both;
}

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

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .emp-ai-window {
        width: 100%;
        height: 100%;
        max-height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}
