/**
 * OVRSi - Custom Styles
 * 
 * Brand: Lexend Deca font, ice blue accent (#CAE3F7)
 */

/* ============================================================================
   FONT FACE - Lexend Deca
   ============================================================================ */
@font-face {
    font-family: 'Lexend Deca';
    src: url('../fonts/LexendDeca-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ============================================================================
   CSS CUSTOM PROPERTIES - Brand Colors
   ============================================================================ */
:root {
    /* Brand ice blue palette */
    --brand-50: #f0f7fc;
    --brand-100: #e1f0fa;
    --brand-200: #cae3f7;  /* Primary brand color from logo */
    --brand-300: #a3d0f2;
    --brand-400: #6ab4e8;
    --brand-500: #3d94db;
    --brand-600: #2a76c2;
    --brand-700: #235f9e;
    --brand-800: #214f82;
    --brand-900: #20436c;
    
    /* Dark slate backgrounds */
    --slate-850: #172033;
    --slate-925: #0d1424;
    --slate-950: #080c14;
}

/* ============================================================================
   ALPINE.JS CLOAK
   Hide elements until Alpine initializes
   ============================================================================ */
[x-cloak] {
    display: none !important;
}

/* ============================================================================
   CUSTOM SCROLLBAR
   Dark theme scrollbar for consistency
   ============================================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* ============================================================================
   VIS-NETWORK OVERRIDES
   Style the graph canvas container
   ============================================================================ */
#graph-container,
#graph-container-modal {
    background: #0f172a;
}

.vis-network {
    outline: none;
}

.vis-tooltip {
    position: absolute;
    background: #1e293b;
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    z-index: 1000;
}

/* ============================================================================
   TEXTAREA IMPROVEMENTS
   Better textarea styling for dark theme
   ============================================================================ */
textarea {
    field-sizing: content;
    min-height: 80px;
    max-height: 200px;
}

textarea::placeholder {
    color: #64748b;
}

/* ============================================================================
   ANIMATIONS
   Smooth transitions and effects
   ============================================================================ */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Smooth fade for messages */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

/* ============================================================================
   HIGHLIGHT MARKS - Red for triggered chunks
   Chunk highlighting in messages
   ============================================================================ */
mark {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 1px 4px;
    border-radius: 3px;
    border-bottom: 1px solid rgba(239, 68, 68, 0.5);
}

/* ============================================================================
   CONVERSATION ITEM HOVER ACTIONS
   Show edit/clone/delete buttons on hover
   ============================================================================ */
.conversation-item .conversation-actions {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.conversation-item:hover .conversation-actions,
.conversation-item.active .conversation-actions {
    opacity: 1;
}

/* ============================================================================
   HEADER BAR - Consistent height across all columns
   ============================================================================ */
.header-bar {
    height: 56px;
    min-height: 56px;
    max-height: 56px;
}

/* ============================================================================
   RESPONSIVE UTILITIES
   ============================================================================ */
@media (max-width: 1280px) {
    /* Hide analysis column on smaller screens */
    .analysis-column-responsive {
        display: none;
    }
}

@media (max-width: 1024px) {
    /* Make sidebar a slide-over on tablet */
    aside.sidebar-responsive {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    aside.sidebar-responsive.open {
        transform: translateX(0);
    }
}

/* ============================================================================
   CUSTOM SELECT DROPDOWNS
   Fix arrow positioning and styling
   ============================================================================ */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.25rem !important;
    cursor: pointer;
}

select:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%23cae3f7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ============================================================================
   FOCUS STATES
   Accessible focus indicators - brand color
   ============================================================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #cae3f7;
    outline-offset: 2px;
}

/* ============================================================================
   SELECTION
   Custom text selection colors - brand
   ============================================================================ */
::selection {
    background: rgba(202, 227, 247, 0.35);
    color: #fff;
}

::-moz-selection {
    background: rgba(202, 227, 247, 0.35);
    color: #fff;
}

/* ============================================================================
   BRAND LOGO
   ============================================================================ */
.brand-logo {
    height: 24px;
    width: auto;
}

.brand-wordmark {
    height: 20px;
    width: auto;
}

/* ============================================================================
   ADMIN MODE STYLES
   ============================================================================ */

/* Admin mode indicator glow */
.admin-active {
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.2);
}

/* Chunk editor table rows */
.chunk-editor-row:hover {
    background: rgba(51, 65, 85, 0.3);
}

/* Test type badges */
.test-badge-tp {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.test-badge-fp {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Edit Chunks button in messages */
.edit-chunks-btn {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.message-bubble:hover .edit-chunks-btn {
    opacity: 1;
}

/* Subtlety dots */
.subtlety-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.subtlety-dot-filled {
    background: #fbbf24;
}

.subtlety-dot-empty {
    background: #334155;
}

/* Custom checkbox for node matching */
input[type="checkbox"].node-match-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #475569;
    border-radius: 4px;
    background: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
}

input[type="checkbox"].node-match-checkbox:checked {
    background: #d97706;
    border-color: #d97706;
}

input[type="checkbox"].node-match-checkbox:checked::after {
    content: '✓';
    display: block;
    text-align: center;
    color: white;
    font-size: 12px;
    line-height: 14px;
}

input[type="checkbox"].node-match-checkbox:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================================================
   TEST EDITOR CHUNK PREVIEW
   ============================================================================ */

/* Chunk spans in test editor */
.chunk-preview-span {
    display: inline;
    padding: 2px 6px;
    margin: 2px;
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.chunk-preview-span.chunk-normal {
    background: rgba(71, 85, 105, 0.4);
    border: 1px solid rgba(71, 85, 105, 0.6);
    color: #cbd5e1;
}

.chunk-preview-span.chunk-last {
    background: rgba(217, 119, 6, 0.25);
    border: 1px solid rgba(217, 119, 6, 0.5);
    color: #fcd34d;
    font-weight: 500;
}

/* Test editor message card with tested chunk indicator */
.test-message-card.contains-tested-chunk {
    border-color: rgba(217, 119, 6, 0.5);
}

/* Transition for chunk preview appearance */
.chunk-preview-container {
    transition: opacity 0.2s ease;
}

/* ============================================================================
   CUSTOM MODAL DIALOGS
   On-brand replacements for native confirm(), alert(), prompt()
   ============================================================================ */

/* Modal card base */
.modal-card {
    background: linear-gradient(145deg, #1e293b 0%, #172033 100%);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(202, 227, 247, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Modal icon container */
.modal-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Icon variants with glow effects */
.modal-icon.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.modal-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.modal-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.modal-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.modal-icon.info {
    background: rgba(202, 227, 247, 0.15);
    color: #cae3f7;
    box-shadow: 0 0 20px rgba(202, 227, 247, 0.15);
}

.modal-icon.loading {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

/* Loading spinner animation */
@keyframes modal-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.modal-icon.loading svg,
.modal-icon.loading i {
    animation: modal-spinner 1s linear infinite;
}

/* Disable pulse animation for loading icons */
.modal-icon.loading {
    animation: none !important;
}

/* Subtle pulse animation for icons */
@keyframes modal-icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.modal-icon {
    animation: modal-icon-pulse 2s ease-in-out infinite;
}

/* Modal button hover effects */
.modal-card button {
    position: relative;
    overflow: hidden;
}

.modal-card button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.modal-card button:hover::before {
    left: 100%;
}

/* ============================================================================
   MODAL SCROLL FIX
   Prevent body scrolling when modals are open
   ============================================================================ */

/* When any modal is open, prevent body scroll */
body:has([x-show="testAdminOpen"][style*="display: block"]),
body:has([x-show="testEditOpen"][style*="display: block"]),
body:has([x-show="graphAdminOpen"][style*="display: block"]),
body:has([x-show="nodeEditorOpen"][style*="display: block"]),
body:has([x-show="chunkEditorOpen"][style*="display: block"]) {
    overflow: hidden !important;
}

/* Ensure modal overlays allow scrolling within them */
[x-show="testAdminOpen"],
[x-show="testEditOpen"],
[x-show="graphAdminOpen"],
[x-show="nodeEditorOpen"],
[x-show="chunkEditorOpen"] {
    overflow-y: auto !important;
}

/* Ensure modal content containers have proper overflow */
[x-show="testAdminOpen"] > div,
[x-show="testEditOpen"] > div,
[x-show="graphAdminOpen"] > div,
[x-show="nodeEditorOpen"] > div,
[x-show="chunkEditorOpen"] > div {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Ensure scrollable areas within modals work properly */
[x-show="testAdminOpen"] .overflow-y-auto,
[x-show="testEditOpen"] .overflow-y-auto,
[x-show="graphAdminOpen"] .overflow-y-auto,
[x-show="nodeEditorOpen"] .overflow-y-auto,
[x-show="chunkEditorOpen"] .overflow-y-auto {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* =============================================================================
   ADMIN MODE: CLICKABLE CHUNKS
   ============================================================================= */

/* Base chunk styling in admin mode */
.admin-chunk {
    cursor: pointer;
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    margin: -0.125rem -0.25rem;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    display: inline;
}

/* Hover effect - light blue highlight */
.admin-chunk:hover {
    background-color: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

/* Chunks that have node matches - subtle underline indicator */
.admin-chunk.has-matches {
    text-decoration: underline;
    text-decoration-color: rgba(251, 191, 36, 0.4);
    text-underline-offset: 3px;
}

.admin-chunk.has-matches:hover {
    background-color: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

/* Graph-node-click highlighting - stacks with admin chunk styling */
.admin-chunk.graph-highlighted {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.admin-chunk.graph-highlighted:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* Disable hover/click effects when analysis is loading */
.chunks-loading .admin-chunk {
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

.chunks-loading .admin-chunk:hover {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Node reasoning expandable section */
.node-reasoning-toggle {
    cursor: pointer;
    transition: color 0.15s ease;
}

.node-reasoning-toggle:hover {
    color: var(--color-brand-400);
}

.node-reasoning-content {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   LIGHT MODE THEME
   Fresh, clean light theme with soft shadows and crisp contrast
   ============================================================================ */

/* Light mode color palette */
.light-mode {
    --lm-bg-primary: #f0f4f8;
    --lm-bg-secondary: #ffffff;
    --lm-bg-tertiary: #e8eef4;
    --lm-bg-elevated: #ffffff;
    --lm-border: #d0dae6;
    --lm-border-subtle: #e2eaf3;
    --lm-text-primary: #1a2b3c;
    --lm-text-secondary: #3d5a73;
    --lm-text-tertiary: #5a7a94;
    --lm-text-muted: #8ba3b8;
    --lm-accent: #3b82f6;
    --lm-accent-hover: #2563eb;
    --lm-accent-soft: #dbeafe;
    --lm-accent-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --lm-warm-accent: #f59e0b;
    --lm-sidebar-bg: linear-gradient(180deg, #f8fafc 0%, #eef4fa 100%);
    --lm-card-shadow: 0 1px 3px rgba(59, 130, 246, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Body background - clean solid */
.light-mode body {
    background: #f4f7fb !important;
    color: var(--lm-text-primary) !important;
}

/* Sidebar - clean white */
.light-mode aside {
    background: #ffffff !important;
    border-color: #e5e9f0 !important;
}

.light-mode aside .border-b,
.light-mode aside .border-t {
    border-color: #e5e9f0 !important;
}

/* Main content area - unified light gray */
.light-mode main,
.light-mode .bg-slate-900,
.light-mode .bg-slate-925 {
    background: #f4f7fb !important;
}

.light-mode .bg-slate-850,
.light-mode .bg-slate-850\/50 {
    background: #ffffff !important;
}

.light-mode .bg-slate-800,
.light-mode .bg-slate-800\/50,
.light-mode .bg-slate-800\/70,
.light-mode .bg-slate-800\/30 {
    background: #f0f3f8 !important;
}

.light-mode .bg-slate-700,
.light-mode .bg-slate-700\/50 {
    background: #e5e9f0 !important;
}

/* Text colors */
.light-mode .text-slate-100,
.light-mode .text-slate-200 {
    color: var(--lm-text-primary) !important;
}

.light-mode .text-slate-300,
.light-mode .text-slate-400 {
    color: var(--lm-text-secondary) !important;
}

.light-mode .text-slate-500 {
    color: var(--lm-text-tertiary) !important;
}

.light-mode .text-slate-600 {
    color: var(--lm-text-muted) !important;
}

/* Borders */
.light-mode .border-slate-700,
.light-mode .border-slate-700\/50,
.light-mode .border-slate-600 {
    border-color: var(--lm-border) !important;
}

/* Headers - clean white */
.light-mode .header-bar {
    background: #ffffff !important;
    border-color: #e5e9f0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.light-mode .backdrop-blur {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px);
}

/* Buttons - primary with gradient */
.light-mode .bg-brand-600 {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3), 0 1px 2px rgba(99, 102, 241, 0.2) !important;
}

.light-mode .bg-brand-600:hover,
.light-mode .hover\:bg-brand-500:hover {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4), 0 2px 4px rgba(99, 102, 241, 0.25) !important;
}

/* Buttons - secondary/ghost with subtle blue hover */
.light-mode .hover\:bg-slate-800:hover,
.light-mode .hover\:bg-slate-700:hover,
.light-mode .hover\:bg-slate-700\/50:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

/* Conversation list items */
.light-mode .conversation-item button:hover {
    background: #f0f3f8 !important;
}

.light-mode .conversation-item .bg-slate-800\/70 {
    background: #eef4ff !important;
}

.light-mode .border-l-brand-200 {
    border-left-color: var(--lm-accent) !important;
    border-left-width: 3px !important;
}

/* Message bubbles */
.light-mode .message-bubble {
    background: #ffffff !important;
    border-color: #e5e9f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* User message bubble - soft neutral gray instead of blue */
.light-mode .message-bubble.user-message,
.light-mode [class*="bg-brand-600\/10"] {
    background: #e8ecf2 !important;
    border-color: #d0d8e2 !important;
}

/* User message with brand-700 class - softer gray-blue */
.light-mode .bg-brand-700 {
    background: #5a7a94 !important;
}

.light-mode .bg-brand-700 .text-brand-200 {
    color: #e8f0f8 !important;
}

.light-mode .bg-brand-700 .text-brand-300\/70 {
    color: rgba(200, 215, 230, 0.85) !important;
}

/* Input fields - clean with blue focus */
.light-mode input,
.light-mode textarea,
.light-mode select {
    background: var(--lm-bg-secondary) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: var(--lm-text-primary) !important;
    transition: all 0.2s ease;
}

.light-mode input::placeholder,
.light-mode textarea::placeholder {
    color: var(--lm-text-muted) !important;
}

.light-mode input:focus,
.light-mode textarea:focus,
.light-mode select:focus {
    border-color: var(--lm-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12), 0 2px 8px rgba(59, 130, 246, 0.08) !important;
}

/* Scrollbar */
.light-mode ::-webkit-scrollbar-thumb {
    background: #c7d4e4;
}

.light-mode ::-webkit-scrollbar-thumb:hover {
    background: #a8bdd4;
}

.light-mode * {
    scrollbar-color: #c7d4e4 transparent;
}

/* Cards and panels */
.light-mode .rounded-lg,
.light-mode .rounded-xl,
.light-mode .rounded-2xl {
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.06);
}

/* Analysis panel */
.light-mode .analysis-column,
.light-mode [class*="border-r"][class*="border-slate"] {
    border-color: var(--lm-border) !important;
}

/* Marks/highlights */
.light-mode mark {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border-bottom: 1px solid rgba(239, 68, 68, 0.35);
}

/* Graph container */
.light-mode #graph-container,
.light-mode #graph-container-modal {
    background: #f4f7fb !important;
    border-color: #e5e9f0 !important;
}

/* Tooltips */
.light-mode .vis-tooltip {
    background: #ffffff;
    color: var(--lm-text-primary);
    border: 1px solid #e5e9f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Modals */
.light-mode .bg-black\/70 {
    background: rgba(15, 30, 60, 0.4) !important;
    backdrop-filter: blur(4px);
}

.light-mode .modal-card {
    background: #ffffff;
    border: 1px solid #e5e9f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Admin mode chunks */
.light-mode .admin-chunk:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.12);
}

.light-mode .admin-chunk.has-matches {
    text-decoration-color: rgba(245, 158, 11, 0.6);
}

.light-mode .admin-chunk.has-matches:hover {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

/* Toggle switches */
.light-mode .bg-slate-700 {
    background: #c7d4e4 !important;
}

/* Status badges */
.light-mode .test-badge-tp {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.light-mode .test-badge-fp {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Admin buttons */
.light-mode .bg-amber-600\/20 {
    background: rgba(251, 191, 36, 0.15) !important;
}

.light-mode .bg-amber-600\/20:hover,
.light-mode .hover\:bg-amber-600\/30:hover {
    background: rgba(251, 191, 36, 0.25) !important;
}

.light-mode .bg-purple-600\/20 {
    background: rgba(168, 85, 247, 0.12) !important;
}

.light-mode .bg-purple-600\/20:hover,
.light-mode .hover\:bg-purple-600\/30:hover {
    background: rgba(168, 85, 247, 0.2) !important;
}

/* Selection - blue/purple gradient feel */
.light-mode ::selection {
    background: rgba(99, 102, 241, 0.25);
    color: var(--lm-text-primary);
}

.light-mode ::-moz-selection {
    background: rgba(99, 102, 241, 0.25);
    color: var(--lm-text-primary);
}

/* Focus states */
.light-mode button:focus-visible,
.light-mode a:focus-visible,
.light-mode input:focus-visible,
.light-mode textarea:focus-visible,
.light-mode select:focus-visible {
    outline-color: var(--lm-accent);
}

/* Select dropdown arrow - light version */
.light-mode select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
}

.light-mode select:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%232563eb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
}

/* Chunk preview spans */
.light-mode .chunk-preview-span.chunk-normal {
    background: rgba(226, 232, 240, 0.8);
    border-color: #cbd5e1;
    color: var(--lm-text-secondary);
}

.light-mode .chunk-preview-span.chunk-last {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(217, 119, 6, 0.4);
    color: #b45309;
}

/* Checkbox */
.light-mode input[type="checkbox"].node-match-checkbox {
    border-color: #cbd5e1;
    background: var(--lm-bg-secondary);
}

/* Logo swap for light mode - invert the light logo */
.light-mode img[src*="Light.svg"] {
    filter: brightness(0.2) saturate(0.8);
}

/* Legend - inactive node color for light mode */
.light-mode .bg-slate-600 {
    background: #94a3b8 !important;
}

/* Graph legend border fix for light mode */
.light-mode .border-slate-500 {
    border-color: #64748b !important;
}
