/** * Monaco Editor Component Styles * Mobile-first responsive design */ /* === Monaco Editor Container === */ .monaco-editor-container { display: flex; flex-direction: column; height: 100%; background: #1e1e1e; color: #d4d4d4; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; overflow: hidden; } /* === Editor Header (Tabs + Actions) === */ .editor-tabs-wrapper { display: flex; align-items: center; background: #252526; border-bottom: 1px solid #3c3c3c; min-height: 35px; } .editor-tabs { display: flex; align-items: center; flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #5a5a5a #252526; } .editor-tabs::-webkit-scrollbar { height: 8px; } .editor-tabs::-webkit-scrollbar-track { background: #252526; } .editor-tabs::-webkit-scrollbar-thumb { background: #5a5a5a; border-radius: 4px; } .editor-tabs::-webkit-scrollbar-thumb:hover { background: #6e6e6e; } .editor-tabs-actions { display: flex; align-items: center; padding: 0 8px; gap: 4px; border-left: 1px solid #3c3c3c; } /* === Monaco Editor Tabs === */ .editor-tab { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: transparent; border: none; border-right: 1px solid #3c3c3c; cursor: pointer; font-size: 13px; color: #969696; transition: background 0.15s ease, color 0.15s ease; white-space: nowrap; user-select: none; min-width: fit-content; } .editor-tab:hover { background: #2a2d2e; color: #d4d4d4; } .editor-tab.active { background: #1e1e1e; color: #ffffff; border-top: 1px solid #007acc; } .editor-tab.dirty .tab-name { color: #e3b341; } .editor-tab.dirty .tab-dirty-indicator { color: #e3b341; } .tab-name { flex: 1; overflow: hidden; text-overflow: ellipsis; max-width: 200px; } .tab-dirty-indicator { font-size: 10px; animation: pulse 2s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .tab-close { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; background: transparent; border: none; color: #969696; cursor: pointer; border-radius: 3px; font-size: 16px; line-height: 1; transition: all 0.15s ease; } .tab-close:hover { background: #3c3c3c; color: #ffffff; } /* === Editor Content Area === */ .editor-content-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; } .editor-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; } .monaco-editor-instance { height: 100%; width: 100%; overflow: hidden; } /* === Editor Placeholder === */ .editor-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #6e6e6e; text-align: center; padding: 2rem; } .placeholder-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; } .editor-placeholder h2 { font-size: 1.5rem; font-weight: 500; margin-bottom: 0.5rem; color: #858585; } .editor-placeholder p { font-size: 1rem; color: #6e6e6e; } /* === Mobile File View (Fallback) === */ .mobile-file-view { height: 100%; overflow-y: auto; padding: 1rem; } .mobile-file-view .file-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: #252526; border-radius: 6px; margin-bottom: 1rem; } .mobile-file-view h3 { font-size: 1rem; margin: 0; } .language-badge { padding: 4px 8px; background: #007acc; color: white; border-radius: 4px; font-size: 0.75rem; } .mobile-file-view .code-content { background: #1e1e1e; border-radius: 6px; padding: 1rem; overflow-x: auto; } .mobile-file-view code { font-family: 'Fira Code', 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace; font-size: 0.875rem; line-height: 1.6; color: #d4d4d4; } /* === Editor Statusbar === */ .editor-statusbar { display: flex; align-items: center; gap: 1rem; padding: 4px 12px; background: #007acc; color: #ffffff; font-size: 12px; min-height: 22px; } .statusbar-item { white-space: nowrap; } /* === Action Buttons === */ .btn-icon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; background: transparent; border: none; color: #969696; cursor: pointer; border-radius: 4px; font-size: 14px; transition: all 0.15s ease; } .btn-icon:hover { background: #3c3c3c; color: #ffffff; } .btn-icon:active { transform: scale(0.95); } /* === Mobile Responsive === */ @media (max-width: 640px) { .editor-tabs-wrapper { flex-direction: column; align-items: stretch; } .editor-tabs { border-right: none; border-bottom: 1px solid #3c3c3c; } .editor-tabs-actions { border-left: none; border-top: 1px solid #3c3c3c; padding: 4px; justify-content: center; } .editor-tab { padding: 10px 8px; font-size: 12px; } .tab-name { max-width: 120px; } .tab-close { width: 28px; height: 28px; } .btn-icon { width: 32px; height: 32px; } .editor-placeholder h2 { font-size: 1.25rem; } .editor-placeholder p { font-size: 0.875rem; } .editor-statusbar { flex-wrap: wrap; gap: 0.5rem; } } /* === Tablet Responsive === */ @media (min-width: 641px) and (max-width: 1024px) { .tab-name { max-width: 150px; } } /* === Touch Targets (Mobile) === */ @media (hover: none) and (pointer: coarse) { .editor-tab { padding: 12px; min-height: 44px; } .tab-close { width: 44px; height: 44px; } .btn-icon { width: 44px; height: 44px; } } /* === File Error State === */ .file-error { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 2rem; color: #f85149; text-align: center; } .file-error h2 { font-size: 1.5rem; margin-bottom: 0.5rem; } .file-error p { color: #f85149; } /* === Loading Spinner === */ .loading { width: 40px; height: 40px; border: 3px solid #3c3c3c; border-top-color: #007acc; border-radius: 50%; animation: spin 0.8s linear infinite; margin: 2rem auto; } @keyframes spin { to { transform: rotate(360deg); } } /* === Focus Styles for Accessibility === */ .editor-tab:focus-visible, .tab-close:focus-visible, .btn-icon:focus-visible { outline: 2px solid #007acc; outline-offset: 2px; } /* === Dark Mode Scrollbar === */ .monaco-editor-instance ::-webkit-scrollbar { width: 14px; height: 14px; } .monaco-editor-instance ::-webkit-scrollbar-track { background: #1e1e1e; } .monaco-editor-instance ::-webkit-scrollbar-thumb { background: #424242; border-radius: 7px; border: 3px solid #1e1e1e; } .monaco-editor-instance ::-webkit-scrollbar-thumb:hover { background: #4f4f4f; } .monaco-editor-instance ::-webkit-scrollbar-corner { background: #1e1e1e; } /* === Print Styles === */ @media print { .editor-tabs-wrapper, .editor-statusbar { display: none; } .editor-content { height: auto; overflow: visible; } }