/* ---------- LUXA Agent AI (Master Shared Cyberpunk Glassmorphism Widget) ---------- */
.luxa-agent-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    padding: 0;
    border: 1.5px solid rgba(0, 242, 254, 0.45);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #8774e1, #100b2e 85%);
    box-shadow: 0 10px 32px rgba(135, 116, 225, 0.45), 0 0 24px rgba(0, 242, 254, 0.28);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    cursor: pointer;
    overflow: visible !important;
}
.luxa-agent-fab:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 14px 40px rgba(135, 116, 225, 0.65), 0 0 32px rgba(0, 242, 254, 0.55);
}
.luxa-agent-fab .fab-pulse-ring {
    position: absolute;
    inset: -6px;
    border: 1.5px solid rgba(0, 242, 254, 0.55);
    border-radius: 50%;
    animation: fab-glow-pulse 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
    pointer-events: none;
}
@keyframes fab-glow-pulse {
    0% { transform: scale(0.95); opacity: 0.85; }
    50% { transform: scale(1.18); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0.85; }
}
.luxa-agent-fab img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}
.luxa-agent-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid #080711;
    border-radius: 999px;
    background: #ff3366;
    color: #ffffff;
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(255, 51, 102, 0.75);
    pointer-events: none;
    animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.luxa-agent-badge[hidden],
.luxa-agent-prompt[hidden] {
    display: none !important;
}
@keyframes badge-pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Prompt Teaser */
.luxa-agent-prompt {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 9998;
    display: grid;
    gap: 8px;
    width: min(320px, calc(100vw - 40px));
    padding: 16px 38px 16px 18px;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 16px;
    background: rgba(14, 18, 30, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 242, 254, 0.12);
    color: #e2e8f0;
    animation: agent-prompt-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.luxa-agent-prompt .prompt-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.luxa-agent-prompt .prompt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
}
.luxa-agent-prompt strong { color: #ffffff; font-size: 0.92rem; font-weight: 700; }
.luxa-agent-prompt span { color: #94a3b8; font-size: 0.82rem; line-height: 1.45; }
.luxa-agent-prompt-open {
    justify-self: start;
    margin-top: 4px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    color: #060a12;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.luxa-agent-prompt-open:hover { transform: translateY(-1px); }
.luxa-agent-prompt-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.luxa-agent-prompt-close:hover { color: #ffffff; }
@keyframes agent-prompt-in {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

/* Master Chat Modal Window */
.luxa-agent-modal {
    position: fixed;
    right: 28px;
    bottom: 96px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    width: 430px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100dvh - 110px);
    overflow: hidden;
    border: 1px solid rgba(0, 242, 254, 0.28);
    border-radius: 22px;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 242, 254, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.96);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.luxa-agent-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.luxa-sheet-handle {
    display: none;
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    margin: 8px auto 2px auto;
    cursor: pointer;
}

/* Modal Header */
.luxa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(16, 22, 38, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.agent-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1.5px solid rgba(0, 242, 254, 0.6);
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.12);
    overflow: visible;
    flex-shrink: 0;
}
.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.agent-avatar .status-indicator {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #0a0e1a;
    background: #00f2fe;
    box-shadow: 0 0 10px #00f2fe;
}
.agent-title-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.agent-title {
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
}
.agent-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.agent-sub-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.4;
}
.agent-sub-pill i {
    font-size: 0.64rem;
    color: #00f2fe;
}
.agent-sub-pill.chain-pill {
    border-color: rgba(0, 242, 254, 0.35);
    background: rgba(0, 242, 254, 0.08);
    padding: 0;
}
.agent-sub-pill.chain-pill code {
    border: none;
    background: transparent;
    padding: 1px 6px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.7rem;
    color: #00f2fe;
    white-space: nowrap;
}

/* Header Actions */
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.header-action-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-action-btn:hover {
    color: #00f2fe;
    border-color: rgba(0, 242, 254, 0.4);
    background: rgba(0, 242, 254, 0.12);
    transform: translateY(-1px);
}
.header-action-btn.close-action-btn:hover {
    color: #ff4d6d;
    border-color: rgba(255, 77, 109, 0.45);
    background: rgba(255, 77, 109, 0.12);
}

/* 9-Languages Strip */
.luxa-lang-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.06), rgba(135, 116, 225, 0.06));
    border-bottom: 1px solid rgba(0, 242, 254, 0.12);
    font-size: 0.72rem;
}
.lang-strip-left {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.lang-strip-icon {
    color: #00f2fe;
    font-size: 0.78rem;
}
.lang-chips-row {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.lang-chips-row::-webkit-scrollbar { display: none; }
.lang-chips-row span {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 242, 254, 0.1);
    color: #00f2fe;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Chat Messages Container */
.luxa-chat-messages {
    display: flex;
    flex: 1 1 0%;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto !important;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px 18px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 242, 254, 0.35) rgba(0, 0, 0, 0.25);
}
.luxa-chat-messages::-webkit-scrollbar { width: 6px; }
.luxa-chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
}
.luxa-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.35);
    border-radius: 999px;
}
.luxa-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 254, 0.65);
}
.chat-bubble {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.84rem;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-break: normal;
    animation: bubble-in 0.25s ease both;
}
@keyframes bubble-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
.chat-bubble p { margin: 0 0 8px 0; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble ul, .agent-intro-list {
    margin: 6px 0;
    padding-left: 18px;
}
.chat-bubble li {
    margin-bottom: 4px;
    line-height: 1.45;
}
.cyan-highlight {
    color: #00f2fe;
}

/* Monospace & Code Tags (NEVER WRAP HYPHENS) */
.luxa-agent-modal code,
.chat-bubble code,
.mono-tag {
    display: inline-block;
    white-space: nowrap !important;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 242, 254, 0.25);
    color: #00f2fe !important;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.76rem;
    line-height: 1.25;
    vertical-align: baseline;
}
.user-bubble {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background: linear-gradient(135deg, #00f2fe, #8774e1);
    color: #050811;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.25);
}
.agent-bubble {
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
    background: rgba(22, 28, 44, 0.78);
    color: #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Quick Prompt Chips */
.luxa-quick-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    overflow-x: auto;
    padding: 10px 16px;
    background: rgba(14, 18, 30, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.luxa-quick-chips::-webkit-scrollbar { display: none; }
.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 6px 13px;
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 999px;
    background: rgba(0, 242, 254, 0.06);
    color: #cbd5e1;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.chip-btn i {
    color: #00f2fe;
    font-size: 0.72rem;
}
.chip-btn:hover {
    background: rgba(0, 242, 254, 0.18);
    border-color: #00f2fe;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.25);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 10px;
}
.typing-indicator[hidden] { display: none !important; }
.typing-bubble {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(23, 30, 46, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.typing-bubble span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00f2fe;
    animation: luxa-chat-typing 1.2s infinite ease-in-out;
}
.typing-bubble span:nth-child(2) { animation-delay: .2s; }
.typing-bubble span:nth-child(3) { animation-delay: .4s; }
.typing-text {
    font-size: 0.74rem;
    color: #64748b;
    font-family: var(--font-mono, monospace);
}
@keyframes luxa-chat-typing {
    0%, 80%, 100% { opacity: .3; transform: scale(.6); }
    40% { opacity: 1; transform: scale(1); }
}

/* Modal Footer & Input Wrapper */
.luxa-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    padding: 12px 16px;
    background: rgba(12, 16, 26, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: rgba(22, 28, 44, 0.88);
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-radius: 16px;
    padding: 4px 6px 4px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-wrapper:focus-within {
    border-color: #00f2fe;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.22);
}
.luxa-modal-footer textarea {
    flex: 1;
    min-width: 0;
    resize: none;
    height: 38px;
    min-height: 38px;
    max-height: 100px;
    padding: 8px 4px;
    border: none;
    outline: none;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.86rem;
    line-height: 1.45;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-sizing: border-box;
}
.luxa-modal-footer textarea::-webkit-scrollbar {
    display: none;
}
.luxa-modal-footer textarea::placeholder {
    color: #64748b;
    font-size: 0.82rem;
}
.luxa-send-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 2px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    color: #050811;
    font-size: 0.88rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.luxa-send-btn:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.5);
}
.luxa-send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.65rem;
    color: #64748b;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}
.footer-legal span {
    letter-spacing: 0.02em;
}

/* Smartphone Responsive Override (Bottom Sheet Drawer) */
@media (max-width: 640px) {
    .luxa-agent-fab {
        right: 16px;
        bottom: 16px;
        width: 54px;
        height: 54px;
    }
    .luxa-agent-fab img {
        width: 46px;
        height: 46px;
    }
    .luxa-agent-prompt {
        right: 16px;
        bottom: 80px;
        width: calc(100vw - 32px);
    }
    .luxa-agent-modal {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: 88dvh;
        max-height: 88dvh;
        border-radius: 24px 24px 0 0;
        border-right: none;
        border-left: none;
        border-bottom: none;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    }
    .luxa-agent-modal.active {
        transform: translateY(0);
    }
    .luxa-sheet-handle {
        display: block;
    }
    .luxa-modal-footer {
        padding-bottom: max(16px, env(safe-area-inset-bottom, 20px));
    }
    .chat-bubble {
        max-width: 90%;
        font-size: 0.85rem;
    }
}

