/* ==========================================================================
   ARGUS AI — Tactical Cyberpunk Universal HUD Assistant Stylesheet
   ========================================================================== */

#argus-ai-widget-wrapper {
    position: static;
    z-index: 99999999;
}

/* Chat HUD Modal Drawer */
.argus-ai-modal {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    width: 480px !important;
    max-width: calc(100vw - 32px) !important;
    height: 720px !important;
    max-height: calc(100vh - 48px) !important;
    background: rgba(2, 14, 20, 0.98) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border: 1.5px solid var(--cyber-cyan, #00FFD1) !important;
    border-radius: 8px !important;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.92), 0 0 35px rgba(0, 255, 209, 0.3) !important;
    display: none;
    flex-direction: column !important;
    z-index: 99999999 !important;
    font-family: var(--cyber-font-mono, 'Share Tech Mono', monospace) !important;
    color: var(--cyber-cyan, #00FFD1) !important;
    font-size: 15.5px !important;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: scale(0.92) translateY(20px);
    transform-origin: bottom right;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    overflow: hidden;
}

.argus-ai-modal.open {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    display: flex !important;
    transform: scale(1) translateY(0) !important;
}

.argus-ai-modal.is-dragging {
    transition: none !important;
    user-select: none !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 45px rgba(0, 255, 209, 0.5) !important;
    cursor: grabbing !important;
}

/* Header */
.argus-ai-header {
    background: rgba(0, 255, 209, 0.08);
    border-bottom: 1px solid rgba(0, 255, 209, 0.25);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    cursor: grab;
    touch-action: none;
}

.argus-ai-header:active,
.argus-ai-modal.is-dragging .argus-ai-header {
    cursor: grabbing;
}

.argus-ai-drag-handle {
    opacity: 0.55;
    font-size: 16px;
    color: var(--cyber-cyan, #00FFD1);
    cursor: grab;
    transition: opacity 0.2s ease;
    margin-right: 4px;
}

.argus-ai-header:hover .argus-ai-drag-handle {
    opacity: 0.95;
}

.argus-ai-title-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
}

.argus-ai-title-wrap i {
    color: var(--cyber-cyan, #00FFD1);
    font-size: 18px;
    text-shadow: 0 0 8px var(--cyber-cyan, #00FFD1);
}

.argus-ai-title {
    font-family: var(--cyber-font-orbitron, 'Orbitron', sans-serif);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

.argus-ai-sub {
    font-size: 13px;
    color: var(--cyber-amber, #FFCC00);
    letter-spacing: 1px;
}

.argus-ai-header-controls {
    display: flex;
    align-items: center;
    gap: 9px;
}

.argus-ai-clear-btn,
.argus-ai-maximize-btn,
.argus-ai-close-btn {
    background: transparent;
    border: none;
    color: rgba(0, 255, 209, 0.7);
    font-size: 17px;
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.argus-ai-clear-btn:hover,
.argus-ai-maximize-btn:hover {
    color: #ffffff;
    background: rgba(0, 255, 209, 0.15);
}

.argus-ai-close-btn:hover {
    color: var(--cyber-red, #FF0055);
    background: rgba(255, 0, 85, 0.15);
}

/* Maximized Fullscreen HUD Drawer */
.argus-ai-modal.maximized {
    top: 14px !important;
    left: 14px !important;
    right: 14px !important;
    bottom: 14px !important;
    width: calc(100vw - 28px) !important;
    height: calc(100vh - 28px) !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 10px !important;
    transform: none !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(0, 255, 209, 0.35) !important;
}

.argus-ai-modal.maximized .argus-ai-header {
    cursor: default;
}

/* History Divider */
.argus-ai-history-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
    position: relative;
    opacity: 0.75;
}

.argus-ai-history-divider::before,
.argus-ai-history-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 209, 0.4), transparent);
}

.argus-ai-history-divider span {
    font-size: 13.5px;
    letter-spacing: 1.5px;
    color: var(--cyber-cyan, #00FFD1);
    padding: 0 10px;
    text-transform: uppercase;
}

.argus-ai-msg-meta {
    font-size: 13px;
    color: rgba(0, 255, 209, 0.65);
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

/* Telemetry & Page Context Bar */
.argus-ai-telemetry-bar {
    background: rgba(0, 20, 28, 0.8);
    border-bottom: 1px solid rgba(0, 255, 209, 0.12);
    padding: 8px 16px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(0, 255, 209, 0.85);
}

.argus-ai-telemetry-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--cyber-cyan, #00FFD1);
    font-weight: bold;
}

.argus-ai-telemetry-status .dot {
    width: 7px;
    height: 7px;
    background: var(--cyber-cyan, #00FFD1);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--cyber-cyan, #00FFD1);
    animation: argusBlink 1.5s infinite;
}

@keyframes argusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.argus-ai-page-tag {
    color: var(--cyber-amber, #FFCC00);
    text-transform: uppercase;
    font-size: 13px;
    background: rgba(255, 204, 0, 0.1);
    padding: 3px 9px;
    border-radius: 2px;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

/* Quick Suggestion Chips */
.argus-ai-quick-chips {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid rgba(0, 255, 209, 0.08);
    background: rgba(1, 10, 15, 0.7);
    flex-shrink: 0;
}

.argus-ai-quick-chips::-webkit-scrollbar {
    display: none;
}

.argus-ai-chip {
    background: rgba(0, 255, 209, 0.06);
    border: 1px solid rgba(0, 255, 209, 0.25);
    color: var(--cyber-cyan, #00FFD1);
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.argus-ai-chip:hover {
    background: rgba(0, 255, 209, 0.2);
    border-color: var(--cyber-cyan, #00FFD1);
    box-shadow: 0 0 8px rgba(0, 255, 209, 0.3);
    color: #ffffff;
}

/* Messages Area */
.argus-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.argus-ai-msg {
    display: flex;
    flex-direction: column;
    max-width: 92%;
    font-size: 16px;
    line-height: 1.6;
    word-break: break-word;
    animation: argusFadeIn 0.2s ease;
}

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

.argus-ai-msg.user {
    align-self: flex-end;
    background: rgba(0, 255, 209, 0.12);
    border: 1px solid rgba(0, 255, 209, 0.4);
    color: #ffffff;
    border-radius: 8px 8px 1px 8px;
    padding: 10px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.argus-ai-msg.bot {
    align-self: flex-start;
    background: rgba(2, 20, 28, 0.94);
    border-left: 3px solid var(--cyber-cyan, #00FFD1);
    border-top: 1px solid rgba(0, 255, 209, 0.2);
    border-right: 1px solid rgba(0, 255, 209, 0.2);
    border-bottom: 1px solid rgba(0, 255, 209, 0.2);
    color: rgba(230, 255, 250, 0.95);
    border-radius: 2px 8px 8px 8px;
    padding: 14px 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.65;
    font-size: 16px;
    word-break: break-word;
}

/* Headings */
.argus-ai-msg.bot h1,
.argus-ai-msg.bot h2,
.argus-ai-msg.bot h3,
.argus-ai-msg.bot h4 {
    font-family: var(--cyber-font-orbitron, 'Orbitron', sans-serif);
    color: var(--cyber-cyan, #00FFD1);
    letter-spacing: 1px;
    margin: 14px 0 8px 0;
    text-shadow: 0 0 10px rgba(0, 255, 209, 0.3);
    border-bottom: 1px solid rgba(0, 255, 209, 0.25);
    padding-bottom: 4px;
    line-height: 1.35;
}
.argus-ai-msg.bot h1 { font-size: 22px; color: var(--cyber-amber, #FFCC00); border-color: rgba(255, 204, 0, 0.4); }
.argus-ai-msg.bot h2 { font-size: 19.5px; color: var(--cyber-cyan, #00FFD1); }
.argus-ai-msg.bot h3 { font-size: 18px; color: #88ffea; }
.argus-ai-msg.bot h4 { font-size: 16.5px; color: #a5f3fc; }

.argus-ai-msg.bot p {
    margin: 6px 0;
}

/* Markdown Tables */
.argus-ai-msg.bot table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 15px;
    background: rgba(1, 14, 20, 0.9);
    border: 1px solid rgba(0, 255, 209, 0.35);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.argus-ai-msg.bot th {
    background: rgba(0, 255, 209, 0.15);
    color: var(--cyber-cyan, #00FFD1);
    padding: 10px 14px;
    font-family: var(--cyber-font-orbitron, 'Orbitron', monospace);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 255, 209, 0.4);
    border-right: 1px solid rgba(0, 255, 209, 0.15);
    text-align: left;
}

.argus-ai-msg.bot th:last-child {
    border-right: none;
}

.argus-ai-msg.bot td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(0, 255, 209, 0.12);
    border-right: 1px solid rgba(0, 255, 209, 0.08);
    color: #c5e8ef;
    font-size: 14.5px;
}

.argus-ai-msg.bot td:last-child {
    border-right: none;
}

.argus-ai-msg.bot tr:hover {
    background: rgba(0, 255, 209, 0.08);
}

.argus-ai-msg.bot tr:last-child td {
    border-bottom: none;
}

/* Lists */
.argus-ai-msg.bot ul,
.argus-ai-msg.bot ol {
    margin: 6px 0 8px 20px;
    padding: 0;
}

.argus-ai-msg.bot li {
    margin-bottom: 6px;
    line-height: 1.6;
    font-size: 15.5px;
}

.argus-ai-msg.bot strong {
    color: var(--cyber-cyan, #00FFD1);
    font-weight: bold;
}

.argus-ai-msg.bot em {
    color: #ffdf70;
    font-style: italic;
}

/* Blockquotes */
.argus-ai-msg.bot blockquote {
    margin: 8px 0;
    padding: 10px 14px;
    border-left: 3px solid var(--cyber-amber, #FFCC00);
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    background: rgba(255, 204, 0, 0.08);
    border-radius: 0 4px 4px 0;
}

/* Code Blocks */
.argus-ai-msg.bot pre {
    background: #01080d;
    border: 1px solid rgba(0, 255, 209, 0.3);
    border-radius: 4px;
    padding: 14px;
    overflow-x: auto;
    font-size: 14px;
    margin: 10px 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.argus-ai-msg.bot code {
    font-family: 'Share Tech Mono', monospace;
    color: var(--cyber-cyan, #00FFD1);
    background: rgba(0, 255, 209, 0.1);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 14.5px;
}

.argus-ai-msg.bot pre code {
    background: transparent;
    padding: 0;
    color: #72f5d9;
    font-size: 14px;
}

/* LaTeX KaTeX Styling */
.argus-ai-msg.bot .katex {
    font-size: 1.2em;
    color: #FFCC00;
    text-shadow: 0 0 4px rgba(255, 204, 0, 0.3);
}

.argus-ai-msg.bot .katex-display {
    margin: 10px 0;
    padding: 10px 14px;
    background: rgba(1, 15, 24, 0.85);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-left: 3px solid #FFCC00;
    border-radius: 4px;
    overflow-x: auto;
    text-align: center;
}

.argus-ai-msg.bot hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(0,255,209,0.5), rgba(0,255,209,0.1), transparent);
    margin: 12px 0;
}

/* Action Buttons in Bot Messages */
.argus-ai-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 6px 6px 6px 0;
    padding: 8px 14px;
    background: rgba(0, 255, 209, 0.15);
    border: 1px solid var(--cyber-cyan, #00FFD1);
    color: #ffffff;
    border-radius: 3px;
    font-family: var(--cyber-font-orbitron, monospace);
    font-size: 13.5px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 255, 209, 0.2);
}

.argus-ai-action-btn:hover {
    background: var(--cyber-cyan, #00FFD1);
    color: #020a0f;
    box-shadow: 0 0 15px rgba(0, 255, 209, 0.6);
    transform: translateY(-1px);
}

.argus-ai-action-btn.flight {
    border-color: #00b4d8;
    background: rgba(0, 180, 216, 0.15);
}
.argus-ai-action-btn.flight:hover {
    background: #00b4d8;
    color: #000;
    box-shadow: 0 0 15px #00b4d8;
}

.argus-ai-action-btn.vessel {
    border-color: #48cae4;
    background: rgba(72, 202, 228, 0.15);
}
.argus-ai-action-btn.vessel:hover {
    background: #48cae4;
    color: #000;
    box-shadow: 0 0 15px #48cae4;
}

.argus-ai-action-btn.scan {
    border-color: var(--cyber-amber, #FFCC00);
    background: rgba(255, 204, 0, 0.15);
}
.argus-ai-action-btn.scan:hover {
    background: var(--cyber-amber, #FFCC00);
    color: #000;
    box-shadow: 0 0 15px var(--cyber-amber, #FFCC00);
}

/* Loading State */
.argus-ai-typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    color: var(--cyber-cyan, #00FFD1);
    font-size: 14px;
}

.argus-ai-typing span {
    width: 6px;
    height: 6px;
    background: var(--cyber-cyan, #00FFD1);
    border-radius: 50%;
    animation: argusTyping 1.2s infinite ease-in-out;
}

.argus-ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.argus-ai-typing span:nth-child(3) { animation-delay: 0.4s; }

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

/* Footer / Input Control */
.argus-ai-footer {
    padding: 12px 16px 14px 16px;
    background: rgba(1, 10, 15, 0.95);
    border-top: 1px solid rgba(0, 255, 209, 0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.argus-ai-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(0, 255, 209, 0.75);
}

.argus-ai-toggle-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
}

.argus-ai-toggle-switch {
    position: relative;
    width: 28px;
    height: 15px;
}

.argus-ai-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.argus-ai-toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    transition: 0.2s;
    border: 1px solid rgba(0, 255, 209, 0.3);
}

.argus-ai-toggle-slider:before {
    position: absolute;
    content: "";
    height: 9px;
    width: 9px;
    left: 2px;
    bottom: 2px;
    background-color: var(--cyber-cyan, #00FFD1);
    border-radius: 50%;
    transition: 0.2s;
}

.argus-ai-toggle-switch input:checked + .argus-ai-toggle-slider {
    background-color: rgba(0, 255, 209, 0.3);
}

.argus-ai-toggle-switch input:checked + .argus-ai-toggle-slider:before {
    transform: translateX(13px);
    background-color: #ffffff;
    box-shadow: 0 0 6px var(--cyber-cyan, #00FFD1);
}

.argus-ai-input-row {
    display: flex;
    gap: 9px;
    align-items: center;
}

.argus-ai-input {
    flex: 1;
    background: rgba(0, 20, 28, 0.9);
    border: 1px solid rgba(0, 255, 209, 0.3);
    border-radius: 4px;
    padding: 12px 16px;
    color: #ffffff;
    font-family: var(--cyber-font-mono, 'Share Tech Mono', monospace);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.argus-ai-input:focus {
    border-color: var(--cyber-cyan, #00FFD1);
    box-shadow: 0 0 10px rgba(0, 255, 209, 0.3);
}

.argus-ai-send-btn {
    background: var(--cyber-cyan, #00FFD1);
    border: none;
    color: #020a0f;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    outline: none;
}

.argus-ai-send-btn:hover {
    background: #ffffff;
    box-shadow: 0 0 12px var(--cyber-cyan, #00FFD1);
    transform: scale(1.05);
}
