@import url('/css/design-tokens.css');
/**
 * Voice-First UI Styles
 * Minimal, clean, conversational-first design
 * With stunning 3D WebGL background
 */

/* ===== Voice-First Container ===== */
.igz-voice-first {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    /* Dark semi-transparent background to see 3D scene through */
    background: linear-gradient(180deg,
        rgba(5, 10, 20, 0.85) 0%,
        rgba(10, 18, 35, 0.75) 30%,
        rgba(5, 12, 25, 0.70) 70%,
        rgba(8, 15, 30, 0.85) 100%
    );
    color: #e8f0ff;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    position: relative;
}

/* Subtle animated background - reduced opacity for 3D scene visibility */
.igz-voice-first::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
}

/* ===== Header ===== */
.vf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(15, 25, 45, 0.6);
    border-bottom: 1px solid rgba(60, 100, 150, 0.2);
    z-index: 100 !important; /* Higher than scene container (5) */
    position: relative;
    flex-shrink: 0;
    pointer-events: auto !important;
}

.vf-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vf-greeting {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Learning Widget Redesign */
.igz-learning-mini-stats {
    display: flex;
    align-items: center;
    background: rgba(30, 50, 100, 0.4);
    border: 1px solid rgba(100, 150, 255, 0.2);
    border-radius: 20px;
    padding: 2px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 10px;
    max-height: 32px;
    overflow: hidden;
    max-width: 180px;
}

.igz-learning-mini-stats:hover {
    background: rgba(50, 80, 150, 0.6);
    border-color: rgba(100, 150, 255, 0.4);
    transform: translateY(-1px);
}

/* Hide most of the widget in the header anchor */
.igz-learning-widget-anchor .igz-learning-widget {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    min-width: auto !important;
}

.igz-learning-widget-anchor .igz-lw-header {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 10px !important;
    flex-direction: row !important;
}

.igz-learning-widget-anchor .igz-lw-level-badge {
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
    margin: 0 !important;
}

.igz-learning-widget-anchor .igz-lw-level-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

.igz-learning-widget-anchor .igz-lw-level-title {
    font-size: 0.8rem !important;
    white-space: nowrap;
}

.igz-learning-widget-anchor .igz-lw-xp {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    opacity: 0.8;
}

.igz-learning-widget-anchor .igz-lw-rank,
.igz-learning-widget-anchor .igz-lw-progress-container,
.igz-learning-widget-anchor .igz-lw-streak,
.igz-learning-widget-anchor .igz-lw-leaderboard,
.igz-learning-widget-anchor .igz-lw-weekly,
.igz-learning-widget-anchor .igz-lw-streak-card,
.igz-learning-widget-anchor .igz-lw-tabs,
.igz-learning-widget-anchor .igz-lw-content,
.igz-learning-widget-anchor .igz-lw-actions {
    display: none !important;
}

/* Full Widget Overlay */
.igz-learning-overlay {
    position: absolute;
    top: 55px; /* Stay below header */
    left: 10px;
    right: 10px;
    bottom: 85px; /* Stay above footer */
    background: rgba(10, 20, 35, 0.95);
    backdrop-filter: blur(25px);
    z-index: 1000; /* High z-index */
    border-radius: 16px;
    border: 1px solid rgba(100, 150, 255, 0.3);
    display: none;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    overflow-y: auto;
}

.igz-learning-overlay.visible {
    display: flex;
    animation: vf-fade-in 0.3s ease;
}

.igz-learning-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.igz-learning-overlay-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
}

/* Ensure 3D scene is the hero */
.vf-3d-scene-container {
    flex: 1 1 200px; /* More flexible minimum height for small windows */
    margin: 5px 0;
    min-height: 180px;
    position: relative; /* Context for absolute canvas */
    overflow: hidden;
    z-index: 5;
}

/* XP Notification Animation */
.xp-notification {
    position: fixed;
    pointer-events: none;
    color: #fbbf24;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 10000;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    animation: xp-float-up 1.8s cubic-bezier(0.2, 0.6, 0.35, 1) forwards;
}

@keyframes xp-float-up {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    15% { transform: translateY(-10px) scale(1.1); opacity: 1; }
    30% { transform: translateY(-15px) scale(1); opacity: 1; }
    100% { transform: translateY(-60px) scale(0.9); opacity: 0; }
}

.vf-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vf-btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 60, 90, 0.4);
    border: 1px solid rgba(60, 100, 150, 0.3);
    border-radius: 8px;
    color: rgba(180, 200, 230, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    line-height: 1;
}

.vf-btn-icon:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

/* Realtime Voice Toggle - Checkbox */
.vf-realtime-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 16px;
    background: rgba(30, 50, 80, 0.4);
    border: 1px solid rgba(100, 150, 200, 0.2);
    transition: all 0.2s ease;
    font-size: 0.75rem;
    color: rgba(200, 220, 255, 0.7);
    user-select: none;
}

.vf-realtime-toggle:hover {
    background: rgba(40, 70, 110, 0.5);
    border-color: rgba(100, 150, 200, 0.4);
}

.vf-realtime-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(100, 150, 200, 0.4);
    background: rgba(20, 40, 70, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.vf-realtime-toggle input[type="checkbox"]:checked {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.6), rgba(236, 72, 153, 0.6));
    border-color: rgba(168, 85, 247, 0.8);
}

.vf-realtime-toggle input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: white;
}

.vf-realtime-toggle:has(input:checked) {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    border-color: rgba(168, 85, 247, 0.4);
    color: rgba(220, 200, 255, 0.9);
}

.vf-toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(220, 230, 255, 0.9);
}

/* ===== Context Cards Area ===== */
.vf-context-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 5;
    flex-shrink: 0; /* Prevent squishing */
}

.vf-card {
    background: rgba(30, 50, 80, 0.5);
    border: 1px solid rgba(60, 100, 150, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.vf-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.vf-card.closing {
    opacity: 0;
    transform: translateX(20px);
}

.vf-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.vf-card-icon {
    font-size: 1rem;
}

.vf-card-title {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(180, 200, 230, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vf-card-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(180, 200, 230, 0.4);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.2s;
}

.vf-card-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

.vf-card-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(230, 240, 255, 0.9);
}

.vf-card-action {
    margin-top: 10px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.vf-card-action:hover {
    background: rgba(59, 130, 246, 0.3);
}

/* Card Type Variations */
.vf-card-discovery {
    border-color: rgba(16, 185, 129, 0.3);
}

.vf-card-reminder {
    border-color: rgba(245, 158, 11, 0.3);
}

/* ===== 3D Scene Container ===== */
.vf-3d-scene-container {
    position: relative;
    flex: 1 1 auto;
    min-height: 200px;
    z-index: 1;
    overflow: hidden;
}

.vf-3d-scene-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    cursor: pointer;
}

/* ===== Conversation History (auto-show when has messages) ===== */
.vf-conversation-wrapper {
    position: absolute;
    bottom: 80px; /* Reduced from 100px to give more space */
    left: 0;
    right: 0;
    max-height: 0;
    z-index: 20;
    transition: max-height 0.3s ease, background 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    background: transparent;
}

/* Show when has messages */
.vf-conversation-wrapper.has-messages {
    max-height: 55vh; /* Reduced from 65vh to prevent pushing suggestions out of window */
    background: linear-gradient(180deg, rgba(10, 20, 40, 0.4) 0%, rgba(10, 20, 40, 0.95) 15%);
    backdrop-filter: blur(20px);
    padding: 10px 0 5px 0;
    border-top: 1px solid rgba(100, 150, 255, 0.15);
}

.vf-conversation {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px;
    max-height: calc(55vh - 20px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Custom scrollbar for conversation */
.vf-conversation::-webkit-scrollbar {
    width: 4px;
}

.vf-conversation::-webkit-scrollbar-track {
    background: rgba(30, 50, 80, 0.3);
    border-radius: 2px;
}

.vf-conversation::-webkit-scrollbar-thumb {
    background: rgba(100, 150, 220, 0.4);
    border-radius: 2px;
}

.vf-conversation::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 150, 220, 0.6);
}

/* Message Bubbles */
.vf-message {
    max-width: 90%;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 1.05rem;
    line-height: 1.6;
    animation: vf-message-appear 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    word-wrap: break-word;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes vf-message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vf-message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.9));
    color: white;
    border-bottom-right-radius: 4px;
}

.vf-message-assistant {
    align-self: flex-start;
    background: rgba(40, 60, 90, 0.8);
    color: rgba(230, 240, 255, 0.95);
    border: 1px solid rgba(60, 100, 150, 0.3);
    border-bottom-left-radius: 4px;
}

.vf-message-assistant.streaming {
    border-color: rgba(59, 130, 246, 0.5);
}

.vf-message-assistant.streaming::after {
    content: '▋';
    animation: vf-blink 0.8s infinite;
    margin-left: 2px;
}

@keyframes vf-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Markdown-like styling in messages */
.vf-message-assistant strong {
    color: #93c5fd;
    font-weight: 600;
}

.vf-message-assistant em {
    font-style: italic;
    opacity: 0.8;
}

/* ===== Legacy Orb (kept for compatibility, hidden) ===== */
.vf-orb-container {
    display: none; /* Hidden - brain is now clickable */
}

.vf-orb {
    position: relative;
    width: 70px;
    height: 70px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Clickable orb overlay - transparent when 3D scene is active */
.vf-orb.vf-orb-clickable {
    z-index: 20;
}

.vf-orb:hover {
    transform: scale(1.05);
}

.vf-orb:active {
    transform: scale(0.98);
}

.vf-orb-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg,
        rgba(50, 80, 130, 0.8) 0%,
        rgba(30, 60, 100, 0.9) 100%
    );
    border-radius: 50%;
    border: 2px solid rgba(100, 150, 220, 0.4);
    box-shadow:
        0 0 30px rgba(59, 130, 246, 0.3),
        inset 0 -5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Transparent orb inner when 3D scene is active */
.vf-orb-inner.vf-orb-transparent {
    background: rgba(30, 60, 100, 0.1);
    border: 1px solid rgba(100, 150, 220, 0.2);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(2px);
}

.vf-orb-icon {
    font-size: 1.8rem;
    transition: transform 0.2s ease;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
}

/* Orb Rings - hidden when 3D scene is active */
.vf-orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(59, 130, 246, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.vf-ring-1 { inset: -10px; }
.vf-ring-2 { inset: -20px; }
.vf-ring-3 { inset: -30px; }

/* Orb States */
.vf-orb.idle .vf-orb-inner {
    background: linear-gradient(145deg,
        rgba(50, 80, 130, 0.8) 0%,
        rgba(30, 60, 100, 0.9) 100%
    );
}

.vf-orb.listening .vf-orb-inner {
    background: linear-gradient(145deg,
        rgba(59, 130, 246, 0.9) 0%,
        rgba(37, 99, 235, 1) 100%
    );
    border-color: rgba(147, 197, 253, 0.6);
    box-shadow:
        0 0 40px rgba(59, 130, 246, 0.5),
        0 0 80px rgba(59, 130, 246, 0.2),
        inset 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.vf-orb.listening .vf-orb-ring {
    opacity: 1;
    animation: vf-ring-pulse 1.5s ease-out infinite;
}

.vf-ring-1 { animation-delay: 0s; }
.vf-ring-2 { animation-delay: 0.3s; }
.vf-ring-3 { animation-delay: 0.6s; }

@keyframes vf-ring-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.vf-orb.speaking .vf-orb-inner {
    background: linear-gradient(145deg,
        rgba(16, 185, 129, 0.9) 0%,
        rgba(5, 150, 105, 1) 100%
    );
    border-color: rgba(110, 231, 183, 0.6);
    animation: vf-speaking-pulse 0.8s ease-in-out infinite;
}

@keyframes vf-speaking-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* User Speaking (voice input detected) */
.vf-orb.user-speaking .vf-orb-inner {
    background: linear-gradient(145deg,
        rgba(245, 158, 11, 0.9) 0%,
        rgba(217, 119, 6, 1) 100%
    );
    border-color: rgba(252, 211, 77, 0.6);
    animation: vf-user-speaking-pulse 0.4s ease-in-out infinite;
    box-shadow:
        0 0 40px rgba(245, 158, 11, 0.5),
        0 0 80px rgba(245, 158, 11, 0.2),
        inset 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.vf-orb.user-speaking .vf-orb-ring {
    opacity: 1;
    animation: vf-ring-pulse 0.8s ease-out infinite;
    border-color: rgba(245, 158, 11, 0.4);
}

@keyframes vf-user-speaking-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.vf-orb.processing .vf-orb-inner {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.9) 0%,
        rgba(109, 40, 217, 1) 100%
    );
    border-color: rgba(196, 181, 253, 0.6);
    animation: vf-processing-spin 2s linear infinite;
}

@keyframes vf-processing-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vf-orb.error .vf-orb-inner {
    background: linear-gradient(145deg,
        rgba(239, 68, 68, 0.9) 0%,
        rgba(185, 28, 28, 1) 100%
    );
    border-color: rgba(252, 165, 165, 0.6);
}

.vf-orb-status {
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: rgba(180, 200, 230, 0.6);
    text-align: center;
}

/* ===== Conversation Display ===== */
.vf-conversation {
    flex: 0 1 auto;
    max-height: 150px;
    overflow-y: auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.vf-conversation::-webkit-scrollbar {
    width: 4px;
}

.vf-conversation::-webkit-scrollbar-thumb {
    background: rgba(60, 100, 150, 0.3);
    border-radius: 2px;
}

.vf-message {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 85%;
    animation: vf-msg-appear 0.3s ease;
}

@keyframes vf-msg-appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.vf-message-user {
    align-self: flex-end;
    background: rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.vf-message-assistant {
    align-self: flex-start;
    background: rgba(40, 60, 90, 0.5);
    border: 1px solid rgba(60, 100, 150, 0.3);
    color: rgba(230, 240, 255, 0.9);
}

.vf-message.streaming::after {
    content: '▊';
    animation: vf-cursor-blink 0.8s infinite;
}

@keyframes vf-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== Status Bar - dezent am unteren Rand ===== */
.vf-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(15, 25, 45, 0.7);
    border-top: 1px solid rgba(60, 100, 150, 0.15);
    font-size: 0.75rem;
    color: rgba(180, 200, 230, 0.7);
    z-index: 20;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.vf-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(100, 150, 200, 0.5);
    transition: all 0.3s ease;
}

/* Status: Idle/Bereit */
.vf-status-bar.idle .vf-status-dot {
    background: rgba(100, 150, 200, 0.5);
}

/* Status: Realtime aktiviert */
.vf-status-bar.realtime .vf-status-dot {
    background: rgba(168, 85, 247, 0.9);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
    animation: status-pulse 2s ease-in-out infinite;
}
.vf-status-bar.realtime {
    color: rgba(200, 180, 255, 0.9);
}

/* Status: Learning/ExPi lernt Dich kennen */
.vf-status-bar.learning .vf-status-dot {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9) 0%, rgba(59, 130, 246, 0.9) 100%);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
    animation: status-pulse 1.5s ease-in-out infinite;
}
.vf-status-bar.learning {
    color: rgba(200, 180, 255, 0.95);
}

/* Status: Listening/Höre zu */
.vf-status-bar.listening .vf-status-dot {
    background: rgba(16, 185, 129, 0.9);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    animation: status-pulse 1s ease-in-out infinite;
}
.vf-status-bar.listening {
    color: rgba(16, 185, 129, 0.95);
}

/* Status: Speaking/ExPi spricht */
.vf-status-bar.speaking .vf-status-dot {
    background: rgba(139, 92, 246, 0.9);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
    animation: status-pulse 0.8s ease-in-out infinite;
}
.vf-status-bar.speaking {
    color: rgba(180, 160, 255, 0.95);
}

/* Status: Processing/Verarbeite */
.vf-status-bar.processing .vf-status-dot {
    background: rgba(251, 191, 36, 0.9);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    animation: status-spin 1s linear infinite;
}
.vf-status-bar.processing {
    color: rgba(251, 211, 141, 0.95);
}

/* Status: Error/Fehler */
.vf-status-bar.error .vf-status-dot {
    background: rgba(239, 68, 68, 0.9);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.vf-status-bar.error {
    color: rgba(255, 150, 150, 0.95);
}

@keyframes status-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

@keyframes status-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Waveform Container in Status Bar ===== */
#vf-waveform-container {
    display: flex;
    align-items: center;
    margin: 0 4px;
}

/* Hide waveform when idle, show when speaking/listening */
.vf-status-bar.idle #vf-waveform-container,
.vf-status-bar.realtime #vf-waveform-container,
.vf-status-bar.error #vf-waveform-container {
    display: none;
}

.vf-status-bar.speaking #vf-waveform-container,
.vf-status-bar.listening #vf-waveform-container,
.vf-status-bar.processing #vf-waveform-container,
.vf-status-bar.learning #vf-waveform-container {
    display: flex;
}

/* ===== Voice Recording Waveform ===== */
.vf-recording-waveform-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    height: 48px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vf-recording-waveform-wrapper[style*="flex"] {
    opacity: 1;
}

.voice-waveform-canvas {
    display: block;
    height: 48px;
    transition: opacity 0.3s ease;
}

/* Show waveform during listening */
.vf-status-bar.listening .vf-recording-waveform-wrapper {
    display: flex !important;
}

/* ===== Text Input Area ===== */
.vf-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(15, 25, 45, 0.85);
    border-top: 1px solid rgba(60, 100, 150, 0.2);
    z-index: 25;
    flex-shrink: 0;
    position: relative;
}

/* Dictation Button */
.vf-dictate-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 60, 90, 0.5);
    border: 1px solid rgba(60, 100, 150, 0.3);
    border-radius: 8px;
    color: rgba(180, 200, 230, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    flex-shrink: 0;
}

.vf-dictate-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.vf-dictate-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(5, 150, 105, 0.5));
    border-color: rgba(16, 185, 129, 0.7);
    color: white;
    animation: dictate-pulse 1.5s ease-in-out infinite;
}

@keyframes dictate-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.vf-text-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(10, 20, 40, 0.9);
    border: 1px solid rgba(60, 100, 150, 0.3);
    border-radius: 10px;
    color: #e8f0ff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.vf-text-input:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.vf-text-input::placeholder {
    color: rgba(140, 160, 190, 0.5);
}

.vf-send-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.vf-send-btn:hover {
    background: linear-gradient(135deg, #4f8ff7 0%, #3b82f6 100%);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

.vf-send-btn:active {
    transform: scale(0.98);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .vf-orb {
        width: 100px;
        height: 100px;
    }

    .vf-orb-icon {
        font-size: 2rem;
    }

    .vf-context-area {
        max-height: 140px;
    }

    .vf-conversation {
        max-height: 120px;
    }
}

/* ===== Empty State ===== */
.vf-conversation:empty::before {
    content: 'Tippe auf den Orb oder schreibe eine Nachricht...';
    display: block;
    text-align: center;
    color: rgba(140, 160, 190, 0.4);
    font-size: 0.85rem;
    padding: 20px;
}

/* ===== UI Mode Toggle in Settings ===== */
.igz-settings-ui-mode {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px !important;
    margin-bottom: 16px !important;
}

.igz-settings-mode-toggle {
    flex-direction: column;
    gap: 12px;
}

.igz-mode-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.igz-mode-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(60, 100, 150, 0.3);
    border-radius: 10px;
    background: rgba(20, 35, 60, 0.5);
    color: rgba(200, 210, 230, 0.8);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.igz-mode-btn:hover {
    background: rgba(40, 60, 100, 0.5);
    border-color: rgba(80, 130, 200, 0.4);
    color: #e8f0ff;
}

.igz-mode-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.6);
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2), inset 0 0 15px rgba(59, 130, 246, 0.1);
}

.igz-mode-btn.active::after {
    content: '✓';
    margin-left: 6px;
    font-size: 0.8rem;
}

/* ===== Floating Discovery Bubbles ===== */
.vf-floating-bubbles {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    z-index: 20;
    pointer-events: none;
}

.vf-bubble {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: rgba(30, 50, 80, 0.7);
    border: 1px solid var(--bubble-color, rgba(60, 100, 150, 0.4));
    border-radius: 16px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    animation: vf-bubble-float 3s ease-in-out infinite;
    animation-delay: var(--bubble-delay, 0s);
    backdrop-filter: blur(8px);
}

.vf-bubble:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(40, 70, 110, 0.8);
    border-color: var(--bubble-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px color-mix(in srgb, var(--bubble-color) 30%, transparent);
}

.vf-bubble.pulse {
    animation: vf-bubble-pulse 0.6s ease-out;
}

@keyframes vf-bubble-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes vf-bubble-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.vf-bubble-icon {
    font-size: 1.4rem;
}

.vf-bubble-label {
    font-size: 0.7rem;
    color: rgba(200, 215, 240, 0.8);
    font-weight: 500;
}

.vf-bubble-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.vf-bubble-badge.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== Quick Actions as Horizontal Bar ===== */
.vf-quick-actions {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 16px;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
    margin-bottom: 8px;
}

.vf-quick-action {
    position: relative;
    left: auto;
    top: auto;
    width: 50px;
    height: 50px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(30, 50, 80, 0.7);
    border: 1px solid rgba(80, 120, 180, 0.3);
    border-radius: 12px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    transform: none; /* Reset circular transform */
    backdrop-filter: blur(8px);
}

.vf-quick-action:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.8);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.vf-quick-action:active {
    transform: scale(0.95);
}

/* Special styling for ExPi lernt Dich kennen button */
.vf-quick-action[data-action="expi-learn"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(59, 130, 246, 0.6) 100%);
    border-color: rgba(139, 92, 246, 0.6);
    min-width: 70px;
    padding: 0 6px;
}

.vf-quick-action[data-action="expi-learn"]:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8) 0%, rgba(59, 130, 246, 0.8) 100%);
    border-color: rgba(139, 92, 246, 1);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
}

.vf-quick-action[data-action="expi-learn"] .vf-qa-label {
    color: rgba(200, 180, 255, 0.95);
}

.vf-qa-icon {
    font-size: 1.3rem;
}

.vf-qa-label {
    font-size: 0.6rem;
    color: rgba(180, 200, 230, 0.8);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* Hide quick actions when orb is active - longer transition to prevent flickering */
.vf-orb.listening ~ .vf-quick-actions,
.vf-orb.speaking ~ .vf-quick-actions {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease 0.2s; /* 0.2s delay prevents flicker on quick state changes */
}

/* Show quick actions when idle or processing (processing = thinking, user can still interact) */
.vf-orb.idle ~ .vf-quick-actions,
.vf-orb.processing ~ .vf-quick-actions {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease; /* Quick fade-in */
}

/* ===== Smart Suggestions Bar ===== */
.vf-suggestions {
    padding: 10px 12px 14px 12px;
    background: rgba(10, 15, 30, 0.4); /* More transparent to see 3D scene */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(100, 150, 255, 0.1);
    z-index: 20;
    flex-shrink: 0;
    position: relative;
    display: flex;
    justify-content: center;
}

.vf-suggestions-label {
    display: none; /* Hidden - not needed */
}

.vf-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding-bottom: 4px;
}

.vf-suggestions-list::-webkit-scrollbar {
    display: none;
}

.vf-suggestion {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(20, 30, 60, 0.95);
    border: 1px solid rgba(100, 150, 255, 0.4);
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vf-suggestion:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.vf-suggestion:active {
    transform: translateY(0);
}

.vf-sug-icon {
    font-size: 1rem;
}

.vf-sug-text {
    font-weight: 500;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 480px) {
    .vf-floating-bubbles {
        gap: 8px;
        padding: 8px 10px;
        top: 55px;
    }

    .vf-bubble {
        padding: 8px 10px;
    }

    .vf-bubble-icon {
        font-size: 1.2rem;
    }

    .vf-bubble-label {
        font-size: 0.6rem;
    }

    .vf-quick-actions {
        width: 240px;
        height: 240px;
    }

    .vf-quick-action {
        width: 50px;
        height: 50px;
        margin: -25px;
        transform: rotate(calc(var(--action-angle) * -1)) translateY(-90px) rotate(var(--action-angle));
    }

    .vf-quick-action:hover {
        transform: rotate(calc(var(--action-angle) * -1)) translateY(-95px) rotate(var(--action-angle)) scale(1.1);
    }

    .vf-qa-icon {
        font-size: 1.1rem;
    }

    .vf-qa-label {
        display: none;
    }

    .vf-suggestions {
        padding: 10px 12px;
    }

    .vf-suggestion {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ===== Save Confirmation Dialog ===== */
.vf-save-confirmation {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vf-save-confirmation.visible {
    opacity: 1;
}

.vf-save-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.vf-save-dialog {
    position: relative;
    width: 90%;
    max-width: 420px;
    background: linear-gradient(145deg, rgba(25, 35, 60, 0.95), rgba(15, 25, 45, 0.98));
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(100, 150, 255, 0.1);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.vf-save-confirmation.visible .vf-save-dialog {
    transform: scale(1) translateY(0);
}

.vf-save-header {
    padding: 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(60, 100, 180, 0.2), transparent);
    border-bottom: 1px solid rgba(100, 150, 255, 0.15);
}

.vf-save-title {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: #e8f0ff;
    margin-bottom: 8px;
}

.vf-save-subtitle {
    display: block;
    font-size: 0.95rem;
    color: rgba(180, 200, 255, 0.8);
}

.vf-save-summary {
    padding: 16px 20px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Select All Row */
.vf-save-select-all {
    padding: 8px 12px;
    background: rgba(60, 100, 180, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(100, 150, 255, 0.2);
    margin-bottom: 8px;
}

.vf-save-select-all label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: rgba(180, 200, 255, 0.9);
    font-size: 0.9rem;
}

.vf-save-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* Items List */
.vf-save-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Individual Item Row */
.vf-save-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(40, 60, 100, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(100, 150, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vf-save-item-row:hover {
    background: rgba(50, 75, 120, 0.4);
    border-color: rgba(100, 150, 255, 0.3);
}

.vf-save-item-row:has(input:not(:checked)) {
    opacity: 0.5;
    background: rgba(30, 45, 75, 0.2);
}

.vf-item-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #3b82f6;
}

.vf-save-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(40, 60, 100, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(100, 150, 255, 0.15);
}

.vf-save-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.vf-save-category {
    font-weight: 600;
    color: rgba(150, 180, 255, 0.9);
    text-transform: capitalize;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.vf-save-value {
    color: #e8f0ff;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
}

.vf-save-values {
    color: #e8f0ff;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* NEW / UPDATE Badge */
.vf-save-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vf-save-badge.new {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.3));
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.vf-save-badge.update {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.25));
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.vf-save-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: rgba(10, 18, 35, 0.5);
}

.vf-save-btn {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.vf-save-confirm {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.vf-save-confirm:hover:not(:disabled) {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.vf-save-confirm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.vf-save-cancel {
    background: rgba(60, 80, 120, 0.4);
    color: rgba(180, 200, 255, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.2);
}

.vf-save-cancel:hover {
    background: rgba(80, 100, 140, 0.5);
    color: #e8f0ff;
}

/* ===== Save Success Message ===== */
.vf-save-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 1001;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.vf-save-success.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.vf-success-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.95));
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.4), 0 0 60px rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vf-success-icon {
    font-size: 2rem;
    animation: successPulse 0.6s ease-out;
}

.vf-success-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes successPulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ===== Floating Collect Indicator ===== */
.igz-collect-indicator {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.85) 0%,
        rgba(99, 102, 241, 0.9) 100%
    );
    border-radius: 20px;
    box-shadow:
        0 4px 20px rgba(59, 130, 246, 0.4),
        0 0 40px rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.igz-collect-indicator.visible {
    transform: translateX(0);
    opacity: 1;
}

.igz-collect-indicator span {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Stack multiple indicators */
.igz-collect-indicator:nth-child(2) { bottom: 160px; }
.igz-collect-indicator:nth-child(3) { bottom: 220px; }
.igz-collect-indicator:nth-child(4) { bottom: 280px; }

/* Saved state - green accent for confirmed saves */
.igz-collect-indicator.saved {
    background: linear-gradient(135deg,
        rgba(34, 197, 94, 0.9) 0%,
        rgba(22, 163, 74, 0.95) 100%
    );
    box-shadow:
        0 4px 20px rgba(34, 197, 94, 0.4),
        0 0 40px rgba(34, 197, 94, 0.15);
}

/* ===== Upload Button (Knowledge Graph Import) ===== */
.vf-upload-btn {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.5), rgba(139, 92, 246, 0.6)) !important;
    border-color: rgba(168, 85, 247, 0.5) !important;
    position: relative;
}

.vf-upload-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.7), rgba(139, 92, 246, 0.8)) !important;
    border-color: rgba(168, 85, 247, 0.7) !important;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3) !important;
}

/* Subtle pulse animation to draw attention */
.vf-upload-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), transparent);
    z-index: -1;
    animation: upload-pulse 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes upload-pulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

/* ===== Import Preview Dialog ===== */
.vf-import-dialog-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.vf-import-dialog-overlay.visible {
    opacity: 1;
}

.vf-import-dialog {
    background: linear-gradient(180deg,
        rgba(20, 30, 50, 0.98) 0%,
        rgba(15, 25, 45, 0.98) 100%
    );
    border: 1px solid rgba(80, 130, 200, 0.3);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(59, 130, 246, 0.1);
    animation: dialog-slide-in 0.3s ease-out;
}

@keyframes dialog-slide-in {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.vf-import-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(80, 130, 200, 0.2);
    flex-shrink: 0;
}

.vf-import-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.vf-import-title-icon {
    font-size: 1.3rem;
}

.vf-import-subtitle {
    font-size: 0.85rem;
    color: rgba(180, 200, 230, 0.7);
    margin-top: 4px;
}

.vf-import-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px;
    min-height: 0;
    max-height: calc(70vh - 140px);
}

/* Custom scrollbar for import body */
.vf-import-body::-webkit-scrollbar {
    width: 8px;
}

.vf-import-body::-webkit-scrollbar-track {
    background: rgba(30, 50, 80, 0.3);
    border-radius: 4px;
}

.vf-import-body::-webkit-scrollbar-thumb {
    background: rgba(80, 130, 200, 0.4);
    border-radius: 4px;
}

.vf-import-body::-webkit-scrollbar-thumb:hover {
    background: rgba(80, 130, 200, 0.6);
}

.vf-import-select-all {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(80, 130, 200, 0.15);
}

.vf-import-select-all label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(180, 200, 230, 0.8);
}

.vf-import-select-all input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.vf-import-entities {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vf-import-category {
    background: rgba(30, 50, 80, 0.3);
    border: 1px solid rgba(80, 130, 200, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.vf-import-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(40, 70, 120, 0.3);
    border-bottom: 1px solid rgba(80, 130, 200, 0.15);
}

.vf-import-cat-icon {
    font-size: 1.1rem;
}

.vf-import-cat-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(220, 235, 255, 0.95);
}

.vf-import-cat-count {
    font-size: 0.75rem;
    color: rgba(150, 180, 220, 0.7);
}

.vf-import-items {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vf-import-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vf-import-item:hover {
    background: rgba(59, 130, 246, 0.15);
}

.vf-import-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #3b82f6;
}

.vf-import-value {
    flex: 1;
    font-size: 0.85rem;
    color: rgba(220, 235, 255, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vf-import-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
}

.vf-import-badge.new {
    background: rgba(34, 197, 94, 0.3);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.vf-import-badge.update {
    background: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.vf-import-badge.identical {
    background: rgba(100, 130, 170, 0.2);
    color: rgba(180, 200, 230, 0.6);
    border: 1px solid rgba(100, 130, 170, 0.3);
}

.vf-import-item.is-identical {
    opacity: 0.5;
}

.vf-import-item.is-identical .vf-import-value {
    text-decoration: line-through;
}

.vf-import-desc {
    font-size: 0.7rem;
    color: rgba(180, 200, 230, 0.6);
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vf-import-meta {
    font-size: 0.65rem;
    color: rgba(139, 92, 246, 0.8);
    background: rgba(139, 92, 246, 0.15);
    padding: 2px 5px;
    border-radius: 6px;
}

.vf-import-target {
    font-size: 0.75rem;
    color: rgba(150, 180, 220, 0.6);
}

/* Clarifications section */
.vf-import-clarifications {
    margin-top: 16px;
    padding: 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
}

.vf-import-clar-header {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fcd34d;
    margin-bottom: 12px;
}

.vf-import-question {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.vf-import-question:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.vf-import-q-text {
    display: block;
    font-size: 0.85rem;
    color: rgba(220, 235, 255, 0.9);
    margin-bottom: 8px;
}

.vf-import-q-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vf-import-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(40, 60, 90, 0.4);
    border: 1px solid rgba(80, 130, 200, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: rgba(200, 220, 255, 0.85);
    transition: all 0.2s ease;
}

.vf-import-option:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.vf-import-option input[type="radio"] {
    accent-color: #3b82f6;
}

/* Dialog Footer */
.vf-import-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(80, 130, 200, 0.2);
    flex-shrink: 0;
}

.vf-import-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vf-import-cancel {
    background: rgba(50, 60, 80, 0.6);
    border: 1px solid rgba(100, 120, 150, 0.3);
    color: rgba(200, 210, 230, 0.8);
}

.vf-import-cancel:hover {
    background: rgba(60, 70, 90, 0.8);
    border-color: rgba(120, 140, 170, 0.4);
}

.vf-import-save {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: white;
}

.vf-import-save:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 1));
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.vf-import-save:active {
    transform: translateY(0);
}

/* Import Error Toast */
.vf-import-error {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(239, 68, 68, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 200;
}

.vf-import-error.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.vf-error-icon {
    font-size: 1.2rem;
}

.vf-error-text {
    font-size: 0.9rem;
    color: #fca5a5;
}


/* ===== New Import Panel (Inline) ===== */

.vf-import-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg,
        rgba(8, 15, 30, 0.97) 0%,
        rgba(12, 22, 40, 0.95) 100%
    );
    backdrop-filter: blur(20px);
    z-index: 100;
    animation: vf-panel-slide-in 0.3s ease;
}

@keyframes vf-panel-slide-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Panel Header */
.vf-imp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(20, 35, 60, 0.6);
    border-bottom: 1px solid rgba(60, 100, 150, 0.2);
    flex-shrink: 0;
}

.vf-imp-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vf-imp-title h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #e8f0ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats badges */
.vf-imp-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.7rem;
}

.vf-imp-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(40, 60, 90, 0.4);
    color: rgba(180, 200, 230, 0.9);
}

.vf-imp-stat.new { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.vf-imp-stat.update { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.vf-imp-stat.identical { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }
.vf-imp-stat.uncertain { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }

.vf-imp-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.vf-imp-close:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Filter Buttons */
.vf-imp-filters {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(15, 25, 45, 0.4);
    border-bottom: 1px solid rgba(60, 100, 150, 0.15);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.vf-imp-filter {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid rgba(60, 100, 150, 0.3);
    background: rgba(30, 50, 80, 0.3);
    color: rgba(180, 200, 230, 0.8);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vf-imp-filter:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

.vf-imp-filter.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93c5fd;
}

/* Table Container */
.vf-imp-table-wrap {
    flex: 1;
    overflow: auto;
    padding: 8px 16px;
}

.vf-imp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.vf-imp-table th {
    text-align: left;
    padding: 8px 6px;
    font-weight: 500;
    color: rgba(150, 180, 220, 0.8);
    border-bottom: 1px solid rgba(60, 100, 150, 0.2);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    background: rgba(10, 18, 35, 0.95);
    z-index: 1;
}

.vf-imp-table th:first-child { width: 30px; }
.vf-imp-table th:nth-child(2) { width: 24px; }

/* Table Rows */
.vf-imp-row {
    transition: background 0.15s ease;
}

.vf-imp-row:hover {
    background: rgba(59, 130, 246, 0.08);
}

.vf-imp-row td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(60, 100, 150, 0.1);
    vertical-align: middle;
}

.vf-imp-row.type-new td:first-child { border-left: 3px solid #22c55e; }
.vf-imp-row.type-update td:first-child { border-left: 3px solid #3b82f6; }
.vf-imp-row.type-identical td:first-child { border-left: 3px solid #6b7280; opacity: 0.5; }
.vf-imp-row.type-uncertain td:first-child { border-left: 3px solid #fbbf24; }

/* Checkbox styling */
.vf-imp-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.vf-imp-row input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Icon column */
.vf-imp-icon {
    font-size: 1rem;
    text-align: center;
}

/* Name & target */
.vf-imp-name {
    font-weight: 500;
    color: #e8f0ff;
}

.vf-imp-target {
    font-size: 0.7rem;
    color: rgba(150, 180, 220, 0.6);
    margin-left: 6px;
}

/* Category badge */
.vf-imp-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    background: rgba(40, 60, 90, 0.4);
    color: rgba(180, 200, 230, 0.8);
}

/* Details column */
.vf-imp-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vf-imp-desc {
    font-size: 0.7rem;
    color: rgba(180, 200, 230, 0.7);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vf-imp-meta {
    display: flex;
    gap: 8px;
    font-size: 0.65rem;
    color: rgba(150, 180, 220, 0.6);
}

.vf-imp-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Clarification Section */
.vf-imp-clar {
    padding: 12px 16px;
    background: rgba(251, 191, 36, 0.08);
    border-top: 1px solid rgba(251, 191, 36, 0.2);
    flex-shrink: 0;
    max-height: 200px;
    overflow: auto;
}

.vf-imp-clar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fcd34d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vf-imp-question {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(30, 50, 80, 0.3);
    border-radius: 8px;
}

.vf-imp-q-text {
    font-size: 0.8rem;
    color: #e8f0ff;
    margin-bottom: 6px;
    display: block;
}

.vf-imp-q-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.vf-imp-q-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(180, 200, 230, 0.8);
    cursor: pointer;
}

.vf-imp-q-option input[type="radio"] {
    accent-color: #fbbf24;
    cursor: pointer;
}

/* Footer */
.vf-imp-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(15, 25, 45, 0.6);
    border-top: 1px solid rgba(60, 100, 150, 0.2);
    flex-shrink: 0;
}

.vf-imp-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vf-imp-btn.cancel {
    background: rgba(40, 60, 90, 0.4);
    border-color: rgba(60, 100, 150, 0.3);
    color: rgba(180, 200, 230, 0.8);
}

.vf-imp-btn.cancel:hover {
    background: rgba(40, 60, 90, 0.6);
    border-color: rgba(60, 100, 150, 0.5);
}

.vf-imp-btn.save {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.vf-imp-btn.save:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.vf-imp-btn.save:disabled {
    background: rgba(40, 60, 90, 0.4);
    color: rgba(150, 180, 220, 0.4);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Hidden rows */
.vf-imp-row.hidden {
    display: none;
}


/* ===== Import Help Dialog ===== */

.vf-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.vf-help-overlay.visible {
    opacity: 1;
}

.vf-help-dialog {
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    background: linear-gradient(180deg,
        rgba(15, 25, 50, 0.98) 0%,
        rgba(10, 20, 40, 0.98) 100%
    );
    border: 1px solid rgba(60, 100, 150, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.vf-help-overlay.visible .vf-help-dialog {
    transform: scale(1) translateY(0);
}

.vf-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(60, 100, 150, 0.2);
}

.vf-help-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #e8f0ff;
    font-weight: 600;
}

.vf-help-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.vf-help-close:hover {
    background: rgba(239, 68, 68, 0.25);
}

.vf-help-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.vf-help-section {
    margin-bottom: 20px;
}

.vf-help-section h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #93c5fd;
    font-weight: 600;
}

.vf-help-section p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(180, 200, 230, 0.9);
    line-height: 1.5;
}

.vf-help-section ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.8rem;
    color: rgba(180, 200, 230, 0.85);
    line-height: 1.8;
}

.vf-help-section li strong {
    color: #e8f0ff;
}

/* Template Buttons */
.vf-help-templates {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.vf-template-btn {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vf-template-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

/* Help Button in Suggestions */
.vf-import-help-btn {
    opacity: 0.7;
}

.vf-import-help-btn:hover {
    opacity: 1;
}

/* Footer */
.vf-help-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(60, 100, 150, 0.2);
    display: flex;
    justify-content: flex-end;
}

.vf-help-btn-close {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vf-help-btn-close:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

/* Window Overrides removed for Standard 2026 */
#intelligainzer-window {
}

