/* 🛰️ NETOS COMMS ARRAY V6.1 - ORBITAL UI STYLES */

:root {
    --orb-red: #ff0033;
    --orb-blue: #00f3ff;
    --orb-green: #00ff88;
    --orb-dark: #0a0a12;
    --glass-heavy: rgba(10, 10, 20, 0.95);
    --glass-light: rgba(255, 255, 255, 0.05);
}

/* --- CONTAINER --- */
.netos-hud {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    width: 70px; height: 70px;
    font-family: 'Saira', sans-serif;
    pointer-events: none; /* Pass clicks through empty space */
}

.netos-hud.is-booting {
    visibility: hidden;
    opacity: 0;
}

/* --- 1. REACTOR TRIGGER (The Main Button) --- */
.reactor-btn {
    position: absolute; bottom: 0; right: 0;
    width: 70px; height: 70px;
    background: transparent; border: none; cursor: pointer;
    pointer-events: auto;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 50;
}

.reactor-btn:hover { transform: scale(1.1); }

/* The Glowing Core */
.reactor-core {
    width: 50px; height: 50px;
    background: radial-gradient(circle at 30% 30%, #ff4d6d, var(--orb-red));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem;
    z-index: 10;
    box-shadow: 0 0 30px rgba(255, 0, 51, 0.5), inset 0 2px 5px rgba(255,255,255,0.4);
    position: relative;
    transition: all 0.3s ease;
}

/* Icon Swap Logic */
.icon-active { display: none; }
.netos-hud.active .icon-idle { display: none; }
.netos-hud.active .icon-active { display: block; }
.netos-hud.active .reactor-core { 
    background: white; 
    color: var(--orb-red); 
    box-shadow: 0 0 40px white; 
    transform: rotate(90deg);
}

/* Spinning Rings */
.reactor-ring {
    position: absolute; border-radius: 50%;
    border: 1px solid transparent;
    transition: all 0.5s ease;
    pointer-events: none;
}

.ring-outer {
    width: 100%; height: 100%;
    border-top-color: var(--orb-red);
    border-bottom-color: var(--orb-red);
    animation: orbit 4s linear infinite;
    opacity: 0.6;
}

.ring-inner {
    width: 80%; height: 80%;
    border-left-color: var(--orb-blue);
    border-right-color: var(--orb-blue);
    animation: orbit 3s linear infinite reverse;
    opacity: 0.8;
}

.reactor-glow {
    position: absolute; inset: -10px;
    background: radial-gradient(circle, rgba(255,0,51,0.2) 0%, transparent 70%);
    z-index: 0; animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

/* --- 2. ORBITAL STACK (Menu Items) --- */
.hud-stack {
    position: absolute; bottom: 85px; right: 5px;
    display: flex; flex-direction: column-reverse; gap: 15px;
    align-items: flex-end; pointer-events: none; width: 250px;
}

/* Capsule Design */
.orbital-capsule {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 15px; cursor: pointer; pointer-events: auto;
    opacity: 0; transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.netos-hud.active .orbital-capsule { opacity: 1; transform: translateY(0) scale(1); }
.netos-hud.active .orbital-capsule:nth-child(1) { transition-delay: 0.05s; }
.netos-hud.active .orbital-capsule:nth-child(2) { transition-delay: 0.1s; }

/* --- NEW LABEL BOX (The Fix) --- */
.cap-label-box {
    background: rgba(10, 10, 15, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    text-align: right; color: white;
    opacity: 0; transform: translateX(10px);
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

/* Show labels on hover */
.orbital-capsule:hover .cap-label-box { opacity: 1; transform: translateX(0); }

.cap-title { display: block; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.5px; line-height: 1.2; }
.cap-sub { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.6); }

/* Icons */
.cap-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--glass-heavy);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orbital-capsule:hover .cap-icon { transform: scale(1.15); }

/* Colors */
.cap-wa .cap-icon { color: var(--orb-green); border-color: rgba(0,255,136,0.3); }
.cap-wa:hover .cap-icon { background: var(--orb-green); color: black; box-shadow: 0 0 20px var(--orb-green); }

.cap-call .cap-icon { color: var(--orb-blue); border-color: rgba(0,243,255,0.3); }
.cap-call:hover .cap-icon { background: var(--orb-blue); color: black; box-shadow: 0 0 20px var(--orb-blue); }

/* --- 3. HOLO-CHAT TERMINAL (WITH PROFILE) --- */
.netos-chat-window {
    position: fixed; bottom: 120px; right: 30px;
    width: 340px;
    background: rgba(12, 12, 18, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    overflow: hidden; pointer-events: auto; z-index: 100;
    
    opacity: 0; visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.netos-chat-window.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* Header */
.holo-header {
    background: linear-gradient(135deg, #151520, #0a0a10);
    padding: 15px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.agent-profile {
    display: flex; align-items: center; gap: 12px;
}

.profile-pic-container {
    position: relative;
    width: 40px; height: 40px;
}

.profile-pic {
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem;
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
}

/* If using an img inside profile-pic */
.profile-pic img { width: 100%; height: 100%; object-fit: cover; }

.status-indicator-dot {
    position: absolute; bottom: 0; right: 0;
    width: 12px; height: 12px;
    background: var(--orb-green);
    border: 2px solid #151520;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--orb-green);
    animation: pulse 2s infinite;
}

.agent-info {
    display: flex; flex-direction: column;
}

.agent-name {
    font-weight: 700; color: white; font-size: 0.95rem; line-height: 1.2;
}

.response-time {
    font-size: 0.75rem; color: rgba(255,255,255,0.6);
}

.close-terminal {
    background: none; border: none; color: rgba(255,255,255,0.4); cursor: pointer; font-size: 1.1rem;
    transition: color 0.2s;
}
.close-terminal:hover { color: var(--orb-red); }

/* Body */
.holo-body {
    padding: 20px; min-height: 140px; position: relative;
    background: radial-gradient(circle at 50% 0%, rgba(0,243,255,0.05), transparent);
}
.grid-overlay {
    position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.bot-msg {
    display: flex; gap: 12px; align-items: flex-start;
    animation: slideIn 0.3s ease;
}
.msg-text {
    background: rgba(255,255,255,0.08); padding: 12px 15px;
    border-radius: 0 12px 12px 12px; color: #eee; font-size: 0.9rem; line-height: 1.5;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Footer */
.holo-footer {
    padding: 12px; background: rgba(0,0,0,0.3); border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; gap: 10px;
}
#netos-input {
    flex: 1; background: transparent; border: none; color: white;
    font-family: 'Saira', sans-serif; outline: none; font-size: 0.95rem;
}
#netos-input::placeholder { color: rgba(255,255,255,0.3); }

.holo-send-btn {
    width: 35px; height: 35px; background: var(--orb-blue); color: #000;
    border: none; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.holo-send-btn:hover { transform: scale(1.1); box-shadow: 0 0 15px var(--orb-blue); }

/* Animations */
@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile */
@media (max-width: 768px) {
    .netos-hud {
        bottom: 24px;
        right: 16px;
        width: 86px;
        height: 86px;
    }
    .reactor-btn { bottom: 8px; right: 8px; }
    .cap-label-box { display: none !important; }
    .netos-chat-window { width: calc(100vw - 40px); right: 20px; bottom: 116px; }
}
