/* Web Nova AI Agent Floating Widget */
#nova-ai-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.nova-ai-launcher {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nova-ai-launcher:hover {
    transform: scale(1.1);
}

.nova-ai-launcher svg {
    fill: white;
    width: 32px;
    height: 32px;
}

.nova-ai-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    transform-origin: bottom right;
}

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

.nova-ai-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.nova-ai-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-sizing: border-box;
}

.nova-ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nova-ai-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.nova-ai-status {
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nova-ai-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.nova-ai-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.nova-ai-close:hover {
    opacity: 1;
}

.nova-ai-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.nova-ai-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nova-ai-msg-row {
    display: flex;
    width: 100%;
}

.nova-ai-msg-row.ai {
    justify-content: flex-start;
}

.nova-ai-msg-row.user {
    justify-content: flex-end;
}

.nova-ai-bubble {
    max-width: 85%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 18px;
    word-wrap: break-word;
}

.nova-ai-msg-row.ai .nova-ai-bubble {
    background: white;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nova-ai-msg-row.user .nova-ai-bubble {
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.nova-ai-footer {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
}

.nova-ai-input {
    flex: 1;
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.nova-ai-input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.nova-ai-input:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.nova-ai-attach-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.nova-ai-attach-btn:hover {
    background: #e2e8f0;
    color: #2563eb;
    border-color: #93c5fd;
}

.nova-ai-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2563eb;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.nova-ai-send:hover {
    background: #1d4ed8;
}

.nova-ai-send svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-left: 2px;
}

.nova-ai-typing {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: fit-content;
}

.nova-ai-typing.active {
    display: flex;
}

.nova-ai-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: nova-typing 1.4s infinite ease-in-out both;
}

.nova-ai-dot:nth-child(1) { animation-delay: -0.32s; }
.nova-ai-dot:nth-child(2) { animation-delay: -0.16s; }

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

@media (max-width: 480px) {
    .nova-ai-window {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 76px;
        height: calc(100vh - 120px);
    }
}

/* Quick Replies Chips */
.nova-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    padding: 0 5px;
}

.nova-chip-btn {
    background: #ffffff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nova-chip-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: translateY(-1px);
}
