botui/ui/suite/docs/docs.css

1254 lines
23 KiB
CSS
Raw Normal View History

/* =============================================================================
GB DOCS - Word-like Document Editor Styles
General Bots Suite Component
============================================================================= */
/* Container Layout */
.docs-container {
display: flex;
height: 100vh;
background: var(--bg-primary, #0f172a);
color: var(--text-primary, #f1f5f9);
font-family: var(
--font-family,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
sans-serif
);
overflow: hidden;
}
/* Sidebar - hidden by default for clean Word-like experience */
.docs-sidebar {
display: none;
width: 280px;
background: var(--bg-secondary, #1e293b);
border-right: 1px solid var(--border-color, #334155);
flex-direction: column;
flex-shrink: 0;
overflow: hidden;
}
.docs-sidebar.open {
display: flex;
}
.sidebar-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
border-bottom: 1px solid var(--border-color, #334155);
}
.sidebar-header h2 {
font-size: 18px;
font-weight: 600;
margin: 0;
color: var(--text-primary, #f1f5f9);
}
.sidebar-search {
padding: 12px 16px;
position: relative;
}
.sidebar-search input {
width: 100%;
padding: 10px 12px 10px 36px;
background: var(--bg-tertiary, #0f172a);
border: 1px solid var(--border-color, #334155);
border-radius: 8px;
color: var(--text-primary, #f1f5f9);
font-size: 14px;
outline: none;
box-sizing: border-box;
}
.sidebar-search input:focus {
border-color: var(--accent-color, #3b82f6);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.sidebar-search input::placeholder {
color: var(--text-secondary, #64748b);
}
.sidebar-search .search-icon {
position: absolute;
left: 28px;
top: 50%;
transform: translateY(-50%);
color: var(--text-secondary, #64748b);
pointer-events: none;
}
.docs-list {
flex: 1;
overflow-y: auto;
padding: 8px;
}
.doc-item {
display: flex;
flex-direction: column;
padding: 12px;
border-radius: 8px;
cursor: pointer;
transition: background 0.2s;
margin-bottom: 4px;
}
.doc-item:hover {
background: var(--bg-hover, rgba(255, 255, 255, 0.05));
}
.doc-item.active {
background: var(--accent-color, #3b82f6);
}
.doc-item-title {
font-size: 14px;
font-weight: 500;
color: var(--text-primary, #f1f5f9);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 4px;
}
.doc-item-preview {
font-size: 12px;
color: var(--text-secondary, #94a3b8);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.doc-item.active .doc-item-preview {
color: rgba(255, 255, 255, 0.7);
}
.doc-item-date {
font-size: 11px;
color: var(--text-tertiary, #64748b);
margin-top: 4px;
}
.sidebar-section {
padding: 16px;
border-top: 1px solid var(--border-color, #334155);
}
.sidebar-section h3 {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-secondary, #94a3b8);
margin: 0 0 12px 0;
}
.template-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
}
.template-btn {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
padding: 12px;
background: var(--bg-tertiary, #0f172a);
border: 1px solid var(--border-color, #334155);
border-radius: 8px;
color: var(--text-primary, #f1f5f9);
font-size: 12px;
cursor: pointer;
transition: all 0.2s;
}
.template-btn:hover {
border-color: var(--accent-color, #3b82f6);
background: rgba(59, 130, 246, 0.1);
}
.template-icon {
font-size: 20px;
}
.sidebar-actions {
padding: 16px;
border-top: 1px solid var(--border-color, #334155);
}
.btn-new-doc {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 12px 16px;
background: var(--accent-color, #3b82f6);
color: white;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition:
background 0.2s,
transform 0.1s;
}
.btn-new-doc:hover {
background: var(--accent-hover, #2563eb);
transform: translateY(-1px);
}
.btn-new-doc:active {
transform: translateY(0);
}
/* Main Content Area */
.docs-main {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
background: var(--bg-primary, #0f172a);
}
/* Toolbar */
.editor-toolbar {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: var(--bg-secondary, #1e293b);
border-bottom: 1px solid var(--border-color, #334155);
flex-wrap: wrap;
}
.toolbar-left,
.toolbar-center,
.toolbar-right {
display: flex;
align-items: center;
gap: 8px;
}
.toolbar-left {
flex-shrink: 0;
}
.toolbar-center {
flex: 1;
flex-wrap: wrap;
}
.toolbar-right {
flex-shrink: 0;
}
.toolbar-group {
display: flex;
align-items: center;
gap: 4px;
}
.toolbar-divider {
width: 1px;
height: 24px;
background: var(--border-color, #334155);
margin: 0 8px;
}
.doc-title-input {
background: transparent;
border: 1px solid transparent;
border-radius: 6px;
color: var(--text-primary, #f1f5f9);
font-size: 16px;
font-weight: 500;
padding: 6px 12px;
outline: none;
min-width: 200px;
}
.doc-title-input:hover {
border-color: var(--border-color, #334155);
}
.doc-title-input:focus {
border-color: var(--accent-color, #3b82f6);
background: var(--bg-tertiary, #0f172a);
}
.btn-icon {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: transparent;
border: none;
border-radius: 6px;
color: var(--text-secondary, #94a3b8);
cursor: pointer;
transition: all 0.2s;
}
.btn-icon:hover {
background: var(--bg-hover, rgba(255, 255, 255, 0.1));
color: var(--text-primary, #f1f5f9);
}
.btn-icon.active {
background: var(--accent-color, #3b82f6);
color: white;
}
.btn-icon svg {
width: 18px;
height: 18px;
}
.toolbar-select {
padding: 6px 10px;
background: var(--bg-tertiary, #0f172a);
border: 1px solid var(--border-color, #334155);
border-radius: 6px;
color: var(--text-primary, #f1f5f9);
font-size: 13px;
cursor: pointer;
outline: none;
}
.toolbar-select:focus {
border-color: var(--accent-color, #3b82f6);
}
.btn-primary {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: var(--accent-color, #3b82f6);
color: white;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: background 0.2s;
}
.btn-primary:hover {
background: var(--accent-hover, #2563eb);
}
.btn-ai {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
background: linear-gradient(135deg, #8b5cf6, #6366f1);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.btn-ai:hover {
background: linear-gradient(135deg, #7c3aed, #4f46e5);
transform: translateY(-1px);
}
.color-picker {
position: relative;
display: flex;
align-items: center;
}
.color-input {
position: absolute;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
.color-indicator {
width: 18px;
height: 3px;
border-radius: 1px;
margin-top: 2px;
}
/* Editor Canvas */
.editor-canvas {
flex: 1;
overflow-y: auto;
padding: 40px;
display: flex;
justify-content: center;
background: var(--bg-tertiary, #0f172a);
}
.editor-page {
width: 100%;
max-width: 816px;
min-height: 1056px;
background: white;
color: #1e293b;
padding: 60px 72px;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
border-radius: 4px;
box-sizing: border-box;
}
.editor-title {
font-size: 32px;
font-weight: 700;
color: #0f172a;
border: none;
outline: none;
margin-bottom: 24px;
width: 100%;
line-height: 1.3;
}
.editor-title:empty:before {
content: attr(data-placeholder);
color: #94a3b8;
}
.editor-content {
min-height: 400px;
font-size: 16px;
line-height: 1.75;
color: #334155;
outline: none;
}
.editor-content:empty:before {
content: attr(data-placeholder);
color: #94a3b8;
}
/* Editor Content Styles */
.editor-content h1 {
font-size: 28px;
font-weight: 700;
margin: 24px 0 16px;
color: #0f172a;
}
.editor-content h2 {
font-size: 24px;
font-weight: 600;
margin: 20px 0 12px;
color: #1e293b;
}
.editor-content h3 {
font-size: 20px;
font-weight: 600;
margin: 16px 0 10px;
color: #334155;
}
.editor-content p {
margin: 0 0 16px 0;
}
.editor-content ul,
.editor-content ol {
margin: 0 0 16px 0;
padding-left: 24px;
}
.editor-content li {
margin-bottom: 8px;
}
.editor-content blockquote {
margin: 16px 0;
padding: 12px 20px;
border-left: 4px solid #3b82f6;
background: #f1f5f9;
color: #475569;
font-style: italic;
}
.editor-content code {
font-family: "Fira Code", "Monaco", monospace;
font-size: 14px;
background: #f1f5f9;
padding: 2px 6px;
border-radius: 4px;
color: #e11d48;
}
.editor-content pre {
margin: 16px 0;
padding: 16px;
background: #1e293b;
border-radius: 8px;
overflow-x: auto;
}
.editor-content pre code {
background: transparent;
color: #e2e8f0;
padding: 0;
}
.editor-content mark {
background: #fef08a;
padding: 2px 4px;
border-radius: 2px;
}
.editor-content a {
color: #3b82f6;
text-decoration: underline;
}
.editor-content hr {
margin: 24px 0;
border: none;
border-top: 2px solid #e2e8f0;
}
.editor-content .callout {
margin: 16px 0;
padding: 16px;
background: #eff6ff;
border: 1px solid #bfdbfe;
border-radius: 8px;
}
.editor-content .todo-item {
display: flex;
align-items: flex-start;
gap: 12px;
margin-bottom: 8px;
}
.editor-content .todo-checkbox {
margin-top: 4px;
}
.editor-content img {
max-width: 100%;
height: auto;
border-radius: 8px;
margin: 16px 0;
}
.editor-content table {
width: 100%;
border-collapse: collapse;
margin: 16px 0;
}
.editor-content th,
.editor-content td {
border: 1px solid #e2e8f0;
padding: 12px;
text-align: left;
}
.editor-content th {
background: #f8fafc;
font-weight: 600;
}
/* Slash Command Menu */
.slash-menu {
position: absolute;
width: 320px;
max-height: 400px;
background: var(--bg-secondary, #1e293b);
border: 1px solid var(--border-color, #334155);
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
overflow: hidden;
z-index: 1000;
}
.slash-menu.hidden {
display: none;
}
.slash-menu-header {
padding: 12px 16px;
background: var(--bg-tertiary, #0f172a);
border-bottom: 1px solid var(--border-color, #334155);
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-secondary, #94a3b8);
}
.slash-menu-items {
max-height: 340px;
overflow-y: auto;
}
.slash-menu-divider {
height: 1px;
background: var(--border-color, #334155);
margin: 8px 0;
}
.slash-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 16px;
cursor: pointer;
transition: background 0.15s;
}
.slash-item:hover,
.slash-item.selected {
background: var(--bg-hover, rgba(255, 255, 255, 0.05));
}
.slash-item.ai-item {
background: linear-gradient(
135deg,
rgba(139, 92, 246, 0.1),
rgba(99, 102, 241, 0.1)
);
}
.slash-item.ai-item:hover {
background: linear-gradient(
135deg,
rgba(139, 92, 246, 0.2),
rgba(99, 102, 241, 0.2)
);
}
.slash-icon {
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-tertiary, #0f172a);
border-radius: 8px;
font-size: 16px;
flex-shrink: 0;
}
.slash-text {
flex: 1;
min-width: 0;
}
.slash-label {
font-size: 14px;
font-weight: 500;
color: var(--text-primary, #f1f5f9);
}
.slash-desc {
font-size: 12px;
color: var(--text-secondary, #94a3b8);
margin-top: 2px;
}
/* AI Panel */
.ai-panel {
width: 360px;
background: var(--bg-secondary, #1e293b);
border-left: 1px solid var(--border-color, #334155);
display: flex;
flex-direction: column;
transition:
transform 0.3s ease,
width 0.3s ease;
flex-shrink: 0;
}
.ai-panel.hidden {
width: 0;
transform: translateX(100%);
overflow: hidden;
}
.ai-panel-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
border-bottom: 1px solid var(--border-color, #334155);
}
.ai-panel-header h3 {
font-size: 16px;
font-weight: 600;
color: var(--text-primary, #f1f5f9);
margin: 0;
}
.ai-panel-content {
flex: 1;
overflow-y: auto;
padding: 16px;
display: flex;
flex-direction: column;
gap: 16px;
}
.ai-quick-actions {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
}
.ai-action-btn {
display: flex;
align-items: center;
gap: 8px;
padding: 12px;
background: var(--bg-tertiary, #0f172a);
border: 1px solid var(--border-color, #334155);
border-radius: 8px;
color: var(--text-primary, #f1f5f9);
font-size: 13px;
cursor: pointer;
transition: all 0.2s;
}
.ai-action-btn:hover {
border-color: var(--accent-color, #3b82f6);
background: rgba(59, 130, 246, 0.1);
}
.ai-section {
background: var(--bg-tertiary, #0f172a);
border-radius: 8px;
padding: 16px;
}
.ai-section-label {
display: block;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-secondary, #94a3b8);
margin-bottom: 12px;
}
.tone-buttons {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.tone-btn {
padding: 8px 12px;
background: var(--bg-secondary, #1e293b);
border: 1px solid var(--border-color, #334155);
border-radius: 6px;
color: var(--text-primary, #f1f5f9);
font-size: 12px;
cursor: pointer;
transition: all 0.2s;
}
.tone-btn:hover,
.tone-btn.active {
border-color: var(--accent-color, #3b82f6);
background: rgba(59, 130, 246, 0.1);
color: var(--accent-color, #3b82f6);
}
.ai-select {
width: 100%;
padding: 10px 12px;
background: var(--bg-secondary, #1e293b);
border: 1px solid var(--border-color, #334155);
border-radius: 6px;
color: var(--text-primary, #f1f5f9);
font-size: 13px;
cursor: pointer;
}
.ai-textarea {
width: 100%;
min-height: 80px;
padding: 12px;
background: var(--bg-secondary, #1e293b);
border: 1px solid var(--border-color, #334155);
border-radius: 6px;
color: var(--text-primary, #f1f5f9);
font-size: 13px;
resize: vertical;
font-family: inherit;
box-sizing: border-box;
}
.ai-textarea::placeholder {
color: var(--text-secondary, #64748b);
}
.ai-response {
background: var(--bg-tertiary, #0f172a);
border-radius: 8px;
overflow: hidden;
}
.ai-response.hidden {
display: none;
}
.ai-response-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
background: linear-gradient(
135deg,
rgba(139, 92, 246, 0.1),
rgba(99, 102, 241, 0.1)
);
border-bottom: 1px solid var(--border-color, #334155);
}
.ai-response-header span {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #a78bfa;
}
.ai-response-actions {
display: flex;
gap: 8px;
}
.ai-response-content {
padding: 16px;
font-size: 14px;
line-height: 1.6;
color: var(--text-primary, #f1f5f9);
max-height: 300px;
overflow-y: auto;
}
/* Status Bar */
.docs-status-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
background: var(--bg-secondary, #1e293b);
border-top: 1px solid var(--border-color, #334155);
font-size: 12px;
color: var(--text-secondary, #94a3b8);
}
.status-left,
.status-center,
.status-right {
display: flex;
align-items: center;
gap: 16px;
}
.status-item {
display: flex;
align-items: center;
gap: 6px;
}
.save-status.saving {
color: #fbbf24;
}
.save-status.saved {
color: #22c55e;
}
.save-status.error {
color: #ef4444;
}
/* Modals */
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
backdrop-filter: blur(4px);
}
.modal.hidden {
display: none;
}
.modal-content {
background: var(--bg-secondary, #1e293b);
border: 1px solid var(--border-color, #334155);
border-radius: 16px;
padding: 24px;
min-width: 400px;
max-width: 90vw;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.modal-header h3 {
font-size: 18px;
font-weight: 600;
color: var(--text-primary, #f1f5f9);
margin: 0;
}
.modal-body {
margin-bottom: 20px;
}
.btn-close {
padding: 8px;
background: transparent;
border: none;
border-radius: 8px;
color: var(--text-secondary, #94a3b8);
cursor: pointer;
font-size: 20px;
line-height: 1;
transition: all 0.2s;
}
.btn-close:hover {
background: var(--bg-hover, rgba(255, 255, 255, 0.1));
color: var(--text-primary, #f1f5f9);
}
/* Export Options */
.export-options {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}
.export-option {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 20px;
background: var(--bg-tertiary, #0f172a);
border: 2px solid var(--border-color, #334155);
border-radius: 12px;
cursor: pointer;
transition: all 0.2s;
}
.export-option:hover {
border-color: var(--accent-color, #3b82f6);
background: rgba(59, 130, 246, 0.1);
}
.export-icon {
font-size: 32px;
}
.export-label {
font-size: 14px;
font-weight: 500;
color: var(--text-primary, #f1f5f9);
}
/* Focus Mode */
.docs-container.focus-mode .docs-sidebar,
.docs-container.focus-mode .ai-panel {
display: none;
}
.docs-container.focus-mode .editor-toolbar {
opacity: 0;
transition: opacity 0.3s;
}
.docs-container.focus-mode:hover .editor-toolbar {
opacity: 1;
}
.docs-container.focus-mode .editor-page {
max-width: 720px;
}
/* Loading State */
.loading-placeholder {
padding: 40px;
text-align: center;
color: var(--text-secondary, #94a3b8);
font-size: 14px;
}
.loading-spinner {
width: 32px;
height: 32px;
border: 3px solid var(--border-color, #334155);
border-top-color: var(--accent-color, #3b82f6);
border-radius: 50%;
margin: 0 auto 16px;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Responsive Design */
@media (max-width: 1200px) {
.ai-panel {
width: 320px;
}
}
@media (max-width: 1024px) {
.docs-sidebar {
display: none;
width: 240px;
}
.docs-sidebar.open {
display: flex;
}
.ai-panel {
position: fixed;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
width: 320px;
}
.ai-panel.hidden {
transform: translateX(100%);
}
.toolbar-center {
display: none;
}
.editor-toolbar.expanded .toolbar-center {
display: flex;
width: 100%;
order: 3;
margin-top: 8px;
}
}
@media (max-width: 768px) {
.docs-sidebar {
display: none;
position: fixed;
left: 0;
top: 0;
bottom: 0;
z-index: 100;
width: 280px;
}
.docs-sidebar.open {
display: flex;
}
.docs-sidebar-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 99;
display: none;
}
.docs-sidebar-overlay.visible {
display: block;
}
.editor-canvas {
padding: 20px;
}
.editor-page {
padding: 40px 24px;
min-height: auto;
}
.doc-title-input {
min-width: 120px;
font-size: 14px;
}
.modal-content {
min-width: auto;
width: calc(100vw - 32px);
max-height: calc(100vh - 32px);
overflow-y: auto;
}
.export-options {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.editor-toolbar {
padding: 8px;
}
.editor-page {
padding: 24px 16px;
}
.editor-title {
font-size: 24px;
}
.editor-content {
font-size: 15px;
}
.toolbar-group {
gap: 2px;
}
.btn-icon {
width: 28px;
height: 28px;
}
.toolbar-divider {
margin: 0 4px;
}
.slash-menu {
width: calc(100vw - 32px);
max-width: 320px;
}
}
/* Print Styles */
@media print {
.docs-sidebar,
.editor-toolbar,
.ai-panel,
.docs-status-bar,
.slash-menu,
.modal {
display: none !important;
}
.docs-container {
display: block;
height: auto;
background: white;
color: black;
}
.docs-main {
display: block;
}
.editor-canvas {
padding: 0;
background: white;
overflow: visible;
}
.editor-page {
width: 100%;
max-width: none;
min-height: auto;
padding: 0;
box-shadow: none;
border-radius: 0;
}
.editor-content {
color: black;
}
.editor-content a {
color: black;
text-decoration: underline;
}
.editor-content pre {
background: #f0f0f0;
color: black;
}
}
/* High Contrast Mode */
@media (prefers-contrast: high) {
.btn-icon:focus,
.btn-primary:focus,
.toolbar-select:focus {
outline: 2px solid var(--accent-color, #3b82f6);
outline-offset: 2px;
}
.editor-content:focus {
outline: 2px solid var(--accent-color, #3b82f6);
}
}
/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
.docs-sidebar,
.ai-panel,
.btn-icon,
.btn-primary,
.btn-ai,
.btn-new-doc,
.doc-item,
.template-btn,
.slash-item,
.ai-action-btn,
.tone-btn,
.export-option,
.loading-spinner {
transition: none;
animation: none;
}
}