216 lines
4.1 KiB
CSS
216 lines
4.1 KiB
CSS
/* === Spec Editor === */
|
|
.spec-editor {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
min-height: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Double-click to edit cursor - only when not readOnly */
|
|
.spec-editor:not(.spec-editor-readonly) .markdown-body {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Toolbar - fixed at top */
|
|
.spec-editor-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.spec-editor-mode-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.spec-editor-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
/* Actions row for Save/Cancel in Definition tab edit mode */
|
|
.spec-editor-actions-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: var(--space-sm);
|
|
margin-top: var(--space-sm);
|
|
}
|
|
|
|
/* Edit mode container in Definition tab */
|
|
.spec-editor-edit-mode {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
/* Content area - flexible and scrollable */
|
|
.spec-editor-content {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 12px 0;
|
|
}
|
|
|
|
/* Textarea - fills available space in edit mode */
|
|
.spec-editor-textarea {
|
|
width: 100%;
|
|
min-height: 200px;
|
|
height: 100%;
|
|
flex: 1;
|
|
padding: var(--space-md);
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
color: var(--text);
|
|
font-family: var(--font-mono);
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
resize: none;
|
|
outline: none;
|
|
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.spec-editor-textarea:focus {
|
|
border-color: var(--todo);
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.spec-editor-textarea:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* Empty state */
|
|
.spec-editor-empty {
|
|
padding: var(--space-xl);
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
font-size: 13px;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Keyboard hint - stays above revision section */
|
|
.spec-editor-hint {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
padding: 8px 0;
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
border-top: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.spec-editor-hint kbd {
|
|
display: inline-block;
|
|
padding: 2px 6px;
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 11px;
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
/* AI Revision section - fixed at bottom */
|
|
.spec-editor-revision {
|
|
padding: 16px 0;
|
|
border-top: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.spec-editor-revision h4 {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
margin: 0 0 4px 0;
|
|
color: var(--text);
|
|
}
|
|
|
|
.spec-editor-revision-help {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
margin: 0 0 8px 0;
|
|
}
|
|
|
|
.spec-editor-feedback {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
color: var(--text);
|
|
font-family: inherit;
|
|
font-size: 13px;
|
|
line-height: 1.5;
|
|
resize: vertical;
|
|
outline: none;
|
|
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.spec-editor-feedback:focus {
|
|
border-color: var(--todo);
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.spec-editor-feedback:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.spec-editor-revision-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-top: var(--space-sm);
|
|
}
|
|
|
|
.spec-editor-char-count {
|
|
font-size: calc(var(--space-sm) + var(--space-xs) * 0.75);
|
|
color: var(--text-muted);
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
/* Mobile responsive */
|
|
@media (max-width: 768px) {
|
|
.spec-editor-content {
|
|
padding: 8px 0;
|
|
}
|
|
|
|
.spec-editor-textarea {
|
|
min-height: 150px;
|
|
padding: 10px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.spec-editor-toolbar {
|
|
padding: 6px 0;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.spec-editor-hint {
|
|
padding: 6px 0;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.spec-editor-revision {
|
|
padding: 12px 0;
|
|
}
|
|
|
|
.spec-editor-revision h4 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.spec-editor-revision-help {
|
|
font-size: 11px;
|
|
}
|
|
}
|
|
|