/* ==========================================
   NEWZEEFY AI AGENT CHAT WIDGET STYLES
   ========================================== */

.zeefy-agent-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Floating Launcher Button */
.zeefy-agent-launcher {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(13, 110, 253, 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;
}

.zeefy-agent-launcher:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 30px rgba(13, 110, 253, 0.6);
}

.launcher-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.4);
    animation: zeefyPulse 2s infinite ease-out;
    pointer-events: none;
}

@keyframes zeefyPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.launcher-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #198754;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #ffffff;
}

/* Agent Chat Window Card */
.zeefy-agent-card {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: zeefySlideUp 0.3s ease forwards;
    transform-origin: bottom right;
}

@keyframes zeefySlideUp {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.zeefy-agent-header {
    background: linear-gradient(135deg, #0b1329 0%, #1a2542 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.agent-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0d6efd, #6610f2) !important;
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
}

/* Chat Body */
.zeefy-agent-body {
    flex: 1;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
}

/* Messages */
.agent-msg {
    max-width: 85%;
}

.agent-msg.bot-msg {
    align-self: flex-start;
}

.agent-msg.user-msg {
    align-self: flex-end;
}

.bot-msg .msg-bubble {
    background: #ffffff !important;
    color: #212529 !important;
    border: 1px solid #e9ecef;
    border-top-left-radius: 4px !important;
}

.user-msg .msg-bubble {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
    color: #ffffff !important;
    border-top-right-radius: 4px !important;
}

.msg-bubble p {
    font-size: 0.875rem;
    line-height: 1.5;
}

.msg-bubble a {
    color: #0d6efd;
    font-weight: 600;
    text-decoration: underline;
}

.user-msg .msg-bubble a {
    color: #ffffff;
}

.msg-time {
    font-size: 0.7rem;
    margin-top: 2px;
    display: block;
}

/* Quick Prompt Pills */
.quick-prompt-btn {
    transition: all 0.2s ease;
    font-weight: 500;
}

.quick-prompt-btn:hover {
    background: #0d6efd !important;
    color: #ffffff !important;
    border-color: #0d6efd !important;
}

/* Typing Indicator */
.typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #6c757d;
    animation: typingBlink 1.4s infinite ease-in-out both;
    margin-right: 3px;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBlink {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* Dark Mode Support */
[data-bs-theme="dark"] .zeefy-agent-card {
    background: #151d30;
    border-color: rgba(255,255,255,0.1);
    color: #ffffff;
}

[data-bs-theme="dark"] .zeefy-agent-body {
    background: #0e1526;
}

[data-bs-theme="dark"] .bot-msg .msg-bubble {
    background: #1e2942 !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .zeefy-agent-footer {
    background: #151d30 !important;
    border-color: rgba(255,255,255,0.1) !important;
}

[data-bs-theme="dark"] .zeefy-agent-footer input {
    background: #0e1526 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .quick-prompt-btn {
    background: #1e2942 !important;
    color: #cbd5e1 !important;
    border-color: rgba(255,255,255,0.1) !important;
}
