/* ============================================================ DOCUMENT DETAILS PAGE Dark Theme Aesthetic with Animated Orbs ============================================================ */ .doc-page { position: relative; min-height: 100vh; width: 100%; background: var(--background-color, #0f172a); color: var(--text-primary, #f8fafc); overflow-x: hidden; font-family: 'Inter', sans-serif; } /* ── Animated Background ── */ .doc-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; overflow: hidden; pointer-events: none; } .doc-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4; animation: docFloat 20s ease-in-out infinite alternate; } .doc-orb-1 { top: -10%; right: -5%; width: 500px; height: 500px; background: rgba(99, 102, 241, 0.4); /* Indigo */ } .doc-orb-2 { bottom: -20%; left: -10%; width: 600px; height: 600px; background: rgba(168, 85, 247, 0.3); /* Purple */ animation-delay: -5s; } .doc-orb-3 { top: 40%; left: 30%; width: 400px; height: 400px; background: rgba(6, 182, 212, 0.2); /* Cyan */ animation-delay: -10s; } @keyframes docFloat { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, 50px) scale(1.05); } 100% { transform: translate(40px, -20px) scale(0.95); } } .doc-grid-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px); background-size: 32px 32px; opacity: 0.6; } /* ── Content Wrapper ── */ .doc-content-wrapper { position: relative; z-index: 1; width: 100%; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; } /* ── Header ── */ .doc-header { display: flex; align-items: center; margin-bottom: 1rem; } .doc-back-btn { display: flex; align-items: center; gap: 0.5rem; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1)); color: var(--text-secondary, #94a3b8); padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all 0.2s ease; backdrop-filter: blur(10px); } .doc-back-btn:hover { color: var(--text-primary, #f8fafc); background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); transform: translateX(-2px); } /* ── Loading & Errors ── */ .doc-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem; color: var(--text-muted, #64748b); gap: 1rem; } .doc-spinner { width: 30px; height: 30px; border: 3px solid rgba(99, 102, 241, 0.2); border-top-color: var(--primary-color, #6366f1); border-radius: 50%; animation: docSpin 1s linear infinite; } @keyframes docSpin { to { transform: rotate(360deg); } } .doc-error-card { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 12px; padding: 2rem; text-align: center; color: #fca5a5; display: flex; flex-direction: column; align-items: center; gap: 1rem; } .doc-retry-btn { background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.4); color: #fecaca; padding: 0.5rem 1.5rem; border-radius: 6px; cursor: pointer; transition: all 0.2s; } .doc-retry-btn:hover { background: rgba(239, 68, 68, 0.3); } /* ── Layout Skeleton ── */ .doc-metadata-panel { background: var(--surface-color, rgba(30, 41, 59, 0.7)); border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1)); border-radius: 16px; padding: 1.5rem; backdrop-filter: blur(12px); } .doc-title { font-size: 1.5rem; font-weight: 700; margin: 0; color: var(--text-primary, #f8fafc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 400px; } .doc-metadata-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; } .doc-title-group { display: flex; align-items: center; gap: 0.75rem; } .doc-edit-btn { background: transparent; border: none; color: var(--text-muted, #64748b); cursor: pointer; padding: 0.4rem; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; } .doc-edit-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary, #f8fafc); } .doc-name-input { background: rgba(15, 23, 42, 0.6); border: 1px solid var(--primary-color, #6366f1); color: var(--text-primary, #f8fafc); font-size: 1.5rem; font-weight: 700; font-family: inherit; padding: 0.25rem 0.5rem; border-radius: 6px; width: 400px; outline: none; box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); } /* ── Status Pills ── */ .doc-pills { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; } .doc-pill { display: flex; align-items: center; gap: 0.4rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary, #94a3b8); } .doc-pill.status-completed { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.2); color: #86efac; } .doc-pill.status-processing { background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.2); color: #7dd3fc; } .doc-pill.status-failed { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); color: #fca5a5; } /* ── Warning Banner (Unparsed CTA) ── */ .doc-warning-banner { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%); border: 1px solid rgba(245, 158, 11, 0.3); padding: 1.5rem; border-radius: 12px; box-shadow: 0 4px 20px rgba(245, 158, 11, 0.05); margin-top: 1rem; } .doc-warning-content { display: flex; align-items: flex-start; gap: 1rem; } .doc-warning-icon { color: #fbbf24; margin-top: 0.2rem; } .doc-warning-content h3 { margin: 0 0 0.25rem 0; font-size: 1.1rem; color: #fcd34d; } .doc-warning-content p { margin: 0; font-size: 0.9rem; color: rgba(252, 211, 77, 0.8); } .doc-btn-primary { display: flex; align-items: center; gap: 0.5rem; background: var(--primary-color, #6366f1); color: white; border: none; padding: 0.6rem 1.25rem; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); } .doc-btn-primary:hover:not(:disabled) { background: var(--primary-hover, #4f46e5); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4); } .doc-btn-primary:disabled { opacity: 0.7; cursor: not-allowed; } .doc-spinner-small { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: white; border-radius: 50%; animation: docSpin 1s linear infinite; } /* ── Split Layout & Viewer ── */ .doc-split-layout { display: flex; gap: 1.5rem; margin-top: 1.5rem; align-items: stretch; height: calc(100vh - 250px); /* Locks the layout height to the viewport */ min-height: 600px; } .doc-left-panel { flex: 1; min-width: 0; /* Prevents flexbox from stretching beyond 50% due to wide content */ width: 50%; background: var(--surface-color, rgba(30, 41, 59, 0.7)); border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1)); border-radius: 16px; backdrop-filter: blur(12px); display: flex; flex-direction: column; overflow: hidden; /* Crucial to prevent child bleed */ } .doc-right-panel { flex: 1; min-width: 0; width: 50%; background: var(--surface-color, rgba(30, 41, 59, 0.7)); border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1)); border-radius: 16px; backdrop-filter: blur(12px); display: flex; flex-direction: column; overflow: hidden; } .doc-panel-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; color: var(--text-muted, #64748b); padding: 3rem; text-align: center; } .placeholder-icon { opacity: 0.3; margin-bottom: 1rem; } .doc-viewer-header { padding: 1rem 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); background: rgba(15, 23, 42, 0.4); } .doc-viewer-header h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--text-secondary, #94a3b8); } .doc-viewer-body { flex: 1; display: flex; flex-direction: column; background: #0f172a; position: relative; min-height: 0; /* Forces flex child to respect container height and enables inner scrolling */ overflow: hidden; } .doc-pdf-viewer { width: 100%; height: 100%; border: none; background: #fff; } .doc-text-viewer { margin: 0; padding: 1.5rem; overflow: auto; font-family: 'Fira Code', monospace; font-size: 0.9rem; color: #e2e8f0; white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; height: 100%; } .doc-unsupported { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; color: var(--text-muted, #64748b); gap: 1rem; padding: 3rem; } /* ── Chunks List ── */ .doc-chunks-list { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; overflow-y: auto; height: 100%; } .doc-chunk-card { flex-shrink: 0; /* Prevents cards from squishing to fit container height */ background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; overflow: hidden; transition: all 0.2s ease; } .doc-chunk-card:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(99, 102, 241, 0.3); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } .doc-chunk-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; background: rgba(0, 0, 0, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.05); } .doc-chunk-num { font-weight: 600; color: var(--text-primary, #f8fafc); font-size: 0.9rem; } .doc-chunk-meta { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted, #64748b); } .doc-chunk-id { font-family: 'Fira Code', monospace; background: rgba(255, 255, 255, 0.05); padding: 0.2rem 0.5rem; border-radius: 4px; } .doc-chunk-size { display: flex; align-items: center; } .doc-chunk-content { padding: 1rem; font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary, #94a3b8); white-space: pre-wrap; word-wrap: break-word; max-height: 300px; overflow-y: auto; } /* ── Add Chunk Form ── */ .doc-add-chunk-form { padding: 1.5rem; background: rgba(255, 255, 255, 0.015); border-bottom: 1px solid rgba(255, 255, 255, 0.05); box-shadow: inset 0 -10px 20px -10px rgba(0, 0, 0, 0.2); } .doc-add-chunk-form h4 { margin: 0 0 1rem 0; font-size: 0.95rem; font-weight: 600; color: var(--text-primary, #f8fafc); } .doc-textarea { width: 100%; background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-primary, #f8fafc); font-family: inherit; font-size: 0.9rem; padding: 0.75rem; border-radius: 8px; resize: vertical; min-height: 100px; outline: none; transition: all 0.2s ease; line-height: 1.5; } .doc-textarea:focus { border-color: var(--primary-color, #6366f1); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); } .doc-textarea::placeholder { color: var(--text-muted, #64748b); } /* ── Left Panel Tabs ── */ .doc-panel-tabs { display: flex; background: rgba(0, 0, 0, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.05); } .doc-panel-tab { flex: 1; background: transparent; border: none; color: var(--text-muted, #64748b); padding: 1rem; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s; border-bottom: 2px solid transparent; } .doc-panel-tab:hover { color: var(--text-primary, #f8fafc); background: rgba(255, 255, 255, 0.02); } .doc-panel-tab.active { color: var(--primary-color, #818cf8); border-bottom-color: var(--primary-color, #6366f1); background: rgba(99, 102, 241, 0.05); } /* ── Testing Container ── */ .doc-testing-container { display: flex; flex-direction: column; flex: 1; height: 100%; } .doc-testing-controls { padding: 1.5rem; background: rgba(255, 255, 255, 0.015); } .doc-testing-search-bar { display: flex; gap: 0.75rem; align-items: center; } .doc-test-input { flex: 1; background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-primary, #f8fafc); font-family: inherit; font-size: 0.9rem; padding: 0.6rem 1rem; border-radius: 8px; outline: none; transition: all 0.2s ease; } .doc-test-input:focus { border-color: var(--primary-color, #6366f1); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); } .doc-test-select { background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-primary, #f8fafc); font-family: inherit; font-size: 0.9rem; padding: 0.6rem 1rem; border-radius: 8px; outline: none; cursor: pointer; } .doc-test-select option { background: #0f172a; color: #f8fafc; } /* ── Responsive Layout Breakpoints ── */ /* For smaller desktop/laptops and tablets */ @media (max-width: 1400px) { .doc-split-layout { flex-direction: column; height: auto; min-height: auto; } .doc-left-panel, .doc-right-panel { flex: none; /* Crucial: stops flex-basis: 0 from collapsing vertical height */ width: 100%; height: 600px; min-height: 600px; } .doc-metadata-header { flex-direction: column; align-items: flex-start; gap: 1rem; } .doc-name-input { width: 100%; max-width: 100%; } .doc-title { max-width: 100%; white-space: normal; } } /* For mobile devices */ @media (max-width: 768px) { .doc-content-wrapper { padding: 1rem; } .doc-testing-search-bar { flex-direction: column; align-items: stretch; } .doc-left-panel, .doc-right-panel { height: 500px; min-height: 500px; } }