Files
textDB/src/index.css

842 lines
14 KiB
CSS
Raw Normal View History

2026-01-30 23:14:06 +01:00
:root {
color-scheme: dark;
font-family: "SF Pro Text", "Segoe UI", "Helvetica Neue", "Noto Sans", sans-serif;
font-size: var(--base-font-size, 16px);
2026-01-30 23:14:06 +01:00
line-height: 1.5;
font-weight: 400;
--bg: #141414;
--bg-elevated: #1b1b1b;
--panel: #1b1b1b;
--ink: #e5e5e5;
--muted: #a0a0a0;
--accent: #3a3a3a;
--accent-strong: #5a5a5a;
--accent-warm: #5a5a5a;
--border: #2a2a2a;
--shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
--radius: 16px;
--bg-input: #151515;
--bg-contrast: #1f1f1f;
--bg-contrast-strong: #242424;
--bg-active: #202020;
--border-strong: #555;
--danger-hover: #4f4f4f;
}
body[data-theme="light"] {
color-scheme: light;
--bg: #f4f4f4;
--bg-elevated: #ffffff;
--panel: #f2f2f2;
--ink: #1b1b1b;
--muted: #5f5f5f;
--border: #d3d3d3;
--accent: #e1e1e1;
--accent-strong: #c1c1c1;
--accent-warm: #d0d0d0;
--shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
--bg-input: #ffffff;
--bg-contrast: #f5f5f5;
--bg-contrast-strong: #ececec;
--bg-active: #e6e6e6;
--border-strong: #b5b5b5;
--danger-hover: #d6d6d6;
2026-01-30 23:14:06 +01:00
}
2026-01-30 23:14:06 +01:00
* {
box-sizing: border-box;
}
body {
margin: 0;
height: 100vh;
overflow: hidden;
min-height: 100vh;
background: var(--bg);
color: var(--ink);
}
#root {
height: 100vh;
min-height: 100vh;
}
.app {
display: grid;
grid-template-columns: 300px 1fr;
height: 100vh;
min-height: 100vh;
}
.app--sidebar-collapsed {
grid-template-columns: 1fr;
}
2026-01-30 23:14:06 +01:00
.sidebar {
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px 0;
background: var(--panel);
border-right: 1px solid var(--border);
height: 100vh;
overflow: hidden;
}
.sidebar__header {
display: flex;
flex-direction: column;
gap: 12px;
padding-left: 24px;
padding-right: 24px;
}
.sidebar__title-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.sidebar__actions {
display: flex;
align-items: center;
gap: 6px;
}
2026-01-30 23:14:06 +01:00
.sidebar__footer {
display: flex;
flex-direction: column;
gap: 12px;
2026-01-30 23:14:06 +01:00
margin-top: auto;
padding-left: 24px;
padding-right: 24px;
}
.sidebar__footer .button {
width: 100%;
}
.app-title {
font-size: 1.4rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--ink);
}
.search {
padding: 10px 12px;
border-radius: 10px;
border: 1px solid var(--border);
background: var(--bg-elevated);
color: var(--ink);
font-size: 0.95rem;
}
.button {
border-radius: 12px;
border: 1px solid var(--border);
padding: 10px 16px;
background: var(--bg-elevated);
color: var(--ink);
font-size: 0.95rem;
cursor: pointer;
transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.button:hover {
box-shadow: var(--shadow);
border-color: rgba(255, 255, 255, 0.12);
}
.button:disabled {
cursor: not-allowed;
opacity: 0.6;
box-shadow: none;
}
.button--primary {
background: var(--accent);
border-color: var(--accent);
color: var(--ink);
}
.button--primary:hover {
border-color: var(--accent-strong);
}
.button--danger {
background: var(--accent-warm);
border-color: var(--accent-warm);
color: var(--ink);
}
.button--danger:hover {
border-color: var(--accent-strong);
background: var(--danger-hover);
2026-01-30 23:14:06 +01:00
}
.button--save {
margin-left: auto;
}
.prompt-list {
flex: 1;
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
padding: 0;
min-height: 0;
}
.prompt-list__inner {
display: flex;
flex-direction: column;
gap: 10px;
padding: 0 16px 16px 16px;
}
.prompt-item {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 12px;
text-align: left;
position: relative;
border-radius: 14px;
border: 1px solid transparent;
background: var(--bg-elevated);
padding: 12px 48px 12px 14px;
cursor: pointer;
transition: border-color 0.15s ease;
}
.prompt-item:hover {
border-color: rgba(255, 255, 255, 0.12);
}
.prompt-item.is-active {
border-color: var(--border-strong);
background: var(--bg-active);
2026-01-30 23:14:06 +01:00
}
.prompt-item__content {
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.prompt-item__delete {
width: 34px;
height: 34px;
border-radius: 10px;
border: 1px solid transparent;
background: transparent;
color: var(--muted);
font-size: 1.1rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
position: absolute;
top: 8px;
right: 8px;
transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.prompt-item__delete:hover {
border-color: transparent;
background: transparent;
color: var(--ink);
}
.prompt-item__title {
font-weight: 600;
overflow-wrap: anywhere;
word-break: break-word;
}
.prompt-item__meta {
font-size: 0.8rem;
color: var(--muted);
}
.workspace {
padding: 28px 32px;
height: 100%;
overflow: hidden;
position: relative;
2026-01-30 23:14:06 +01:00
}
.workspace__topbar {
position: absolute;
top: 24px;
left: 8px;
display: flex;
align-items: center;
gap: 12px;
z-index: 5;
}
.workspace__topbar .icon-button {
width: 24px;
height: 24px;
border-radius: 8px;
font-size: 0.9rem;
}
2026-01-30 23:14:06 +01:00
.workspace__content {
display: grid;
grid-template-columns: 1fr;
gap: 24px;
height: 100%;
min-height: 0;
}
.workspace__content--history {
grid-template-columns: minmax(0, 1fr) 260px;
}
.editor {
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px;
border-radius: var(--radius);
background: var(--bg-elevated);
box-shadow: var(--shadow);
min-height: 0;
height: 100%;
}
.editor__header {
display: flex;
flex-direction: column;
gap: 8px;
}
.editor__status-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.title-input {
font-size: 1.6rem;
border: none;
border-bottom: 2px solid var(--border);
padding: 6px 2px 8px;
background: transparent;
color: var(--ink);
}
.title-input:focus {
outline: none;
border-bottom-color: var(--accent-strong);
2026-01-30 23:14:06 +01:00
}
.status-line {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
color: var(--muted);
}
.icon-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
border-radius: 10px;
border: 1px solid var(--border);
background: var(--bg-elevated);
color: var(--muted);
cursor: pointer;
transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.icon-button--ghost {
border-color: transparent;
background: transparent;
}
.icon-button--ghost:hover {
border-color: rgba(255, 255, 255, 0.12);
background: var(--bg-elevated);
color: var(--ink);
}
2026-01-30 23:14:06 +01:00
.icon-button__img {
width: 18px;
height: 18px;
display: block;
}
2026-01-31 12:45:38 +01:00
.icon-button__glyph {
font-size: 1rem;
line-height: 1;
}
.icon-button__glyph--large {
font-size: 1.1rem;
}
2026-01-30 23:14:06 +01:00
.icon-button:hover {
border-color: rgba(255, 255, 255, 0.2);
color: var(--ink);
}
.icon-button.is-active {
border-color: var(--accent-strong);
2026-01-30 23:14:06 +01:00
color: var(--ink);
background: var(--bg-active);
2026-01-30 23:14:06 +01:00
}
.status {
width: 10px;
height: 10px;
border-radius: 999px;
background: #3c3c3c;
}
.status--saved {
background: #b3b3b3;
}
.status--draft {
background: #8f8f8f;
}
.status--unsaved {
background: #d0d0d0;
}
.status--history {
background: #707070;
}
2026-01-31 12:59:03 +01:00
.editor__textarea-wrap {
flex: 1;
display: flex;
border-radius: 12px;
border: 1px solid var(--border);
background: var(--bg-input);
overflow: hidden;
}
.editor__textarea-wrap:focus-within {
border-color: rgba(255, 255, 255, 0.18);
}
.line-numbers {
padding: 14px 10px;
min-width: 3ch;
text-align: right;
font-family: "SF Mono", "Menlo", "Consolas", monospace;
font-size: 0.95rem;
line-height: 1.5;
color: var(--muted);
background: var(--bg-contrast);
border-right: 1px solid var(--border);
user-select: none;
overflow: hidden;
}
.line-numbers__line {
height: 1.5em;
2026-01-31 13:05:08 +01:00
display: flex;
align-items: flex-start;
}
.line-measure {
position: absolute;
top: 0;
left: 0;
visibility: hidden;
pointer-events: none;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
font-family: "SF Mono", "Menlo", "Consolas", monospace;
font-size: 0.95rem;
line-height: 1.5;
padding: 14px;
}
.line-measure__line {
white-space: pre-wrap;
2026-01-31 12:59:03 +01:00
}
2026-01-30 23:14:06 +01:00
.editor__textarea {
flex: 1;
width: 100%;
resize: none;
2026-01-31 12:59:03 +01:00
border: none;
2026-01-30 23:14:06 +01:00
padding: 14px;
font-family: "SF Mono", "Menlo", "Consolas", monospace;
font-size: 0.95rem;
2026-01-31 12:59:03 +01:00
line-height: 1.5;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
2026-01-31 12:59:03 +01:00
background: transparent;
2026-01-30 23:14:06 +01:00
color: var(--ink);
}
.editor__textarea:focus {
outline: none;
}
.editor__footer {
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: center;
}
.banner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 14px;
border-radius: 12px;
border: 1px solid var(--border);
background: var(--bg-contrast);
2026-01-30 23:14:06 +01:00
}
.banner__actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.banner--draft {
border-color: #3a3a3a;
background: var(--bg-contrast);
2026-01-30 23:14:06 +01:00
}
.banner--history {
border-color: #3a3a3a;
background: var(--bg-contrast);
2026-01-30 23:14:06 +01:00
}
.history {
display: flex;
flex-direction: column;
gap: 12px;
padding: 20px;
background: var(--panel);
border-radius: var(--radius);
border: 1px solid var(--border);
height: 100%;
min-height: 0;
}
.history__header {
display: flex;
align-items: center;
justify-content: space-between;
text-transform: uppercase;
letter-spacing: 0.08em;
font-size: 0.95rem;
}
.history__close {
width: 28px;
height: 28px;
border-radius: 8px;
border: 1px solid transparent;
background: transparent;
color: var(--muted);
font-size: 1rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: color 0.15s ease;
}
.history__close:hover {
color: var(--ink);
}
.history__list {
display: flex;
flex-direction: column;
gap: 10px;
flex: 1;
min-height: 0;
overflow-y: auto;
}
.history__item {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 10px;
text-align: left;
position: relative;
border: 1px solid transparent;
border-radius: 12px;
background: var(--bg-contrast);
2026-01-30 23:14:06 +01:00
padding: 10px 42px 10px 12px;
cursor: pointer;
transition: border-color 0.15s ease;
}
.history__item.is-active {
border-color: var(--border-strong);
background: var(--bg-contrast-strong);
2026-01-30 23:14:06 +01:00
}
.history__item-content {
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.history__item-delete {
width: 32px;
height: 32px;
border-radius: 10px;
border: 1px solid transparent;
background: transparent;
color: var(--muted);
font-size: 1rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
position: absolute;
top: 6px;
right: 6px;
transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.history__item-delete:hover {
border-color: transparent;
background: transparent;
color: var(--ink);
}
.modal {
position: fixed;
inset: 0;
display: grid;
place-items: center;
z-index: 20;
}
.modal__overlay {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.6);
}
.modal__card {
position: relative;
z-index: 1;
width: min(420px, 92vw);
padding: 22px;
border-radius: 16px;
background: var(--bg-elevated);
border: 1px solid var(--border);
box-shadow: var(--shadow);
display: flex;
flex-direction: column;
gap: 12px;
}
.modal__title {
font-size: 1.2rem;
}
.modal__message {
color: var(--muted);
}
.modal__actions {
display: flex;
justify-content: flex-end;
gap: 12px;
flex-wrap: wrap;
}
.history__item-title {
font-weight: 600;
}
.history__item-meta {
font-size: 0.8rem;
color: var(--muted);
}
.empty {
color: var(--muted);
font-size: 0.9rem;
}
.empty-state {
display: flex;
flex-direction: column;
gap: 16px;
align-items: flex-start;
padding: 32px;
border-radius: var(--radius);
background: var(--bg-elevated);
box-shadow: var(--shadow);
max-width: 520px;
}
.empty-state__title {
font-size: 1.6rem;
}
.empty-state__subtitle {
color: var(--muted);
}
@media (max-width: 900px) {
body {
height: auto;
overflow: auto;
}
#root {
height: auto;
}
.app {
grid-template-columns: 1fr;
height: auto;
}
.sidebar {
border-right: none;
border-bottom: 1px solid var(--border);
height: auto;
}
.workspace {
padding: 20px;
height: auto;
overflow: visible;
}
.workspace__content {
height: auto;
}
.workspace__content--history {
grid-template-columns: 1fr;
}
.editor {
height: auto;
}
.history {
height: auto;
}
}
.settings-overlay {
position: fixed;
inset: 0;
display: grid;
place-items: center;
z-index: 30;
}
.settings-overlay__backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.45);
}
.settings-panel {
position: relative;
z-index: 1;
width: min(420px, 92vw);
padding: 20px;
border-radius: 16px;
background: var(--bg-elevated);
border: 1px solid var(--border);
box-shadow: var(--shadow);
display: flex;
flex-direction: column;
gap: 16px;
}
.settings-panel__header {
display: flex;
align-items: center;
justify-content: space-between;
}
.settings-panel__title {
font-size: 1.1rem;
}
.settings-panel__section {
display: flex;
flex-direction: column;
gap: 8px;
}
.settings-panel__label {
font-size: 0.9rem;
color: var(--muted);
}
.settings-panel__select {
border-radius: 10px;
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--ink);
padding: 8px 10px;
font-size: 0.95rem;
}
.settings-panel__slider-row {
display: flex;
align-items: center;
gap: 12px;
}
.settings-panel__range {
flex: 1;
}
.settings-panel__value {
min-width: 44px;
text-align: right;
color: var(--muted);
font-size: 0.9rem;
}
2026-01-31 12:59:03 +01:00
body[data-theme="light"] .editor__textarea-wrap:focus-within {
border-color: var(--accent-strong);
}
2026-01-31 12:59:03 +01:00
.settings-panel__section--row {
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.settings-panel__section--row .settings-panel__label {
margin: 0;
}