/* File: /ai/ai-box.css
 * Path: /ai/ai-box.css
 * Description: Styles for the floating Nexus AI assistant chat widget.
 */

#nexus-ai-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #111;
    border: 2px solid #0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    color: #0ff;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
}

#nexus-ai-launcher:hover {
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.7);
}

#nexus-ai-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 360px;
    max-height: 520px;
    background: #05070a;
    border-radius: 16px;
    border: 1px solid #222;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#nexus-ai-header {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #05070a, #101827);
    border-bottom: 1px solid #222;
}

#nexus-ai-header-title {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

#nexus-ai-header-subtitle {
    font-size: 11px;
    color: #9ca3af;
}

#nexus-ai-header-left {
    display: flex;
    flex-direction: column;
}

#nexus-ai-header-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

#nexus-ai-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
}

#nexus-ai-close {
    cursor: pointer;
    font-size: 16px;
    color: #9ca3af;
}

#nexus-ai-close:hover {
    color: #f97316;
}

#nexus-ai-messages {
    padding: 10px 12px;
    flex: 1;
    overflow-y: auto;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent),
                radial-gradient(circle at bottom right, rgba(45, 212, 191, 0.06), transparent),
                #020617;
}

.nexus-ai-message {
    margin-bottom: 8px;
    max-width: 85%;
    font-size: 16px;
    line-height: 1.4;
}

.nexus-ai-message-user {
    margin-left: auto;
    background: #1d283a;
    color: #e5e7eb;
    padding: 8px 10px;
    border-radius: 12px 12px 2px 12px;
}

.nexus-ai-message-assistant {
    margin-right: auto;
    background: #020617;
    color: #e5e7eb;
    padding: 8px 10px;
    border-radius: 12px 12px 12px 2px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

#nexus-ai-input-row {
    border-top: 1px solid #111827;
    padding: 8px;
    background: #020617;
    display: flex;
    gap: 6px;
}

#nexus-ai-input {
    flex: 1;
    resize: none;
    border-radius: 10px;
    border: 1px solid #374151;
    padding: 6px 8px;
    font-size: 16px;
    font-family: inherit;
    background: #020617;
    color: #e5e7eb;
    max-height: 80px;
}

#nexus-ai-input:focus {
    outline: none;
    border-color: #22c55e;
}

#nexus-ai-send {
    border-radius: 999px;
    border: none;
    padding: 6px 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    background: linear-gradient(135deg, #22c55e, #14b8a6);
    color: #020617;
    white-space: nowrap;
}

#nexus-ai-send:disabled {
    opacity: 0.5;
    cursor: default;
}

#nexus-ai-typing {
    font-size: 11px;
    color: #9ca3af;
    padding: 0 12px 6px;
}


/* OTT enhancements for Nexus AI */

#nexus-ai-panel {
    backdrop-filter: blur(10px);
    background: radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent),
                radial-gradient(circle at bottom right, rgba(45,212,191,0.14), transparent),
                #020617ee;
}

.nexus-ai-message-user {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.7);
}

.nexus-ai-message-assistant {
    box-shadow: 0 4px 18px rgba(8, 47, 73, 0.7);
}

#nexus-ai-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px 4px;
    background: rgba(15,23,42,0.9);
    border-top: 1px solid #0f172a;
}

.nx-ai-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15,118,110,0.3);
    color: #e5e7eb;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid rgba(45,212,191,0.5);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out;
}

.nx-ai-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15,118,110,0.6);
    background: rgba(45,212,191,0.25);
}


/* -------------------------------------------------------------------------
 * File: /ai/ai-box.css
 * Path: /ai/ai-box.css
 * Description: Alpha 9.7 patch – move AI launcher to top + reduce dialog size.
 * ------------------------------------------------------------------------- */

/* Move the AI launcher from bottom-right to top-right (below header). */
#nexus-ai-launcher {
    top: 92px;
    right: 16px;
    bottom: auto;
}

/* Reposition + shrink the panel so it doesn't dominate the screen. */
#nexus-ai-panel {
    top: 148px;
    right: 16px;
    bottom: auto;
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: 420px;
}

/* Tighten message density (keeps it readable but not "IMAX"). */
.nexus-ai-message {
    font-size: 14px;
    line-height: 1.4;
}

#nexus-ai-input {
    font-size: 14px;
}

#nexus-ai-send {
    font-size: 14px;
    padding: 6px 10px;
}


#nexus-ai-status-dot {
    animation: nx-ai-pulse 1.4s ease-in-out infinite;
}

@keyframes nx-ai-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}
