Translucent_Relief/CSS/controls.css

420 lines
14 KiB
CSS
Raw Permalink Normal View History

2026-08-18 16:06:28 +08:00
 /* === SEGMENTED === */
.segmented {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 3px;
padding: 2px;
border-radius: var(--radius-sm);
background: var(--bg-input);
}
.segmented button {
border: 0;
border-radius: 3px;
padding: 6px 4px;
background: transparent;
color: var(--text-2);
font-size: 13px;
cursor: pointer;
transition: background 0.15s, color 0.15s;
}
.segmented button.active {
background: var(--accent-lo);
color: #fff;
}
.image-mode { margin-bottom: 6px; }
/* === IMAGE QUICK ACTIONS === */
.image-quick-actions {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 3px;
margin-bottom: 8px;
}
.image-quick-actions button {
min-height: 28px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-elevated);
color: var(--text-2);
font-size: 13px;
cursor: pointer;
transition: border-color 0.15s, color 0.15s;
}
.image-quick-actions button:hover { border-color: var(--accent); color: var(--accent); }
/* === EDITOR BOX === */
.editor-box {
margin-top: 8px;
padding: 8px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-input);
}
.editor-tools {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 3px;
}
.editor-shape-tools { margin-top: 4px; }
.editor-tool-divider-label {
display: flex;
align-items: center;
gap: 6px;
margin: 6px 0 3px;
color: var(--text-3);
font-size: 12px;
}
.editor-tool-divider-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.editor-tool {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 2px;
min-height: 30px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-elevated);
color: var(--text-2);
font-size: 12px;
cursor: pointer;
transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.editor-tool:hover { border-color: var(--border-hover); color: var(--text); }
.editor-tool.active {
border-color: var(--accent);
background: rgba(0, 180, 216, 0.12);
color: var(--accent);
}
.editor-tool-symbol { font-family: "Cascadia Code", monospace; font-size: 15px; }
/* === SELECTION STRIP === */
.selection-strip {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
margin-top: 6px;
padding: 6px;
border: 1px solid rgba(232, 112, 74, 0.3);
border-radius: 4px;
background: rgba(232, 112, 74, 0.08);
color: var(--warn);
font-size: 12px;
}
.selection-strip[hidden] { display: none !important; }
.selection-strip button {
min-height: 24px;
padding: 0 8px;
border: 1px solid rgba(232, 112, 74, 0.3);
border-radius: 3px;
background: transparent;
color: var(--warn);
font-size: 12px;
cursor: pointer;
}
.selection-strip button:hover { background: rgba(232, 112, 74, 0.15); }
/* === EDITOR CONTEXT === */
.editor-context {
margin-top: 6px;
padding: 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-elevated);
}
.editor-context[hidden], .editor-color-row[hidden] { display: none !important; }
.editor-context .control:first-child { margin-top: 0; }
/* === SHAPE RATIO === */
.shape-ratio-control {
padding: 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-elevated);
}
.shape-ratio-control[hidden] { display: none !important; }
.shape-ratio-head { display: flex; justify-content: space-between; color: var(--text-3); font-size: 12px; }
.shape-ratio-head strong { color: var(--accent); font-size: 12px; }
.shape-ratio-toggle {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3px;
margin-top: 4px;
}
.shape-ratio-toggle button {
min-height: 28px;
border: 1px solid var(--border);
border-radius: 3px;
background: var(--bg-input);
color: var(--text-2);
font-size: 12px;
cursor: pointer;
transition: all 0.15s;
}
.shape-ratio-toggle button.active {
border-color: var(--accent);
background: rgba(0, 180, 216, 0.12);
color: var(--accent);
}
/* === TEXT INPUT & FONTS === */
.text-input-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 72px;
gap: 4px;
}
.text-input-row input, .text-input-row select {
height: 28px;
padding: 0 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-input);
color: var(--text);
font-size: 13px;
}
.text-input-row input:focus, .text-input-row select:focus { border-color: var(--accent); outline: none; }
.font-chip-label {
display: flex;
justify-content: space-between;
margin-top: 6px;
color: var(--text-3);
font-size: 12px;
}
.font-chip-grid {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 3px;
margin-top: 4px;
}
.font-chip {
min-height: 38px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-elevated);
color: var(--text);
font-size: 16px;
cursor: pointer;
transition: border-color 0.15s, background 0.15s;
}
.font-chip::after {
content: attr(data-font-kind);
display: block;
margin-top: 1px;
color: var(--text-3);
font-size: 10px;
}
.font-chip:hover { border-color: var(--border-hover); }
.font-chip.active { border-color: var(--accent); background: rgba(0, 180, 216, 0.1); color: var(--accent); }
/* === COLOR ROW === */
.editor-color-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 6px;
margin-top: 6px;
padding: 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-elevated);
color: var(--text-3);
font-size: 12px;
}
.editor-color-row input[type="color"] {
width: 44px;
height: 26px;
border: 1px solid var(--border);
border-radius: 3px;
background: transparent;
cursor: pointer;
}
.editor-options {
display: grid;
grid-template-columns: minmax(0, 1fr) 44px;
gap: 4px;
margin-top: 6px;
}
.editor-options input[type="text"] {
height: 28px;
padding: 0 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-input);
color: var(--text);
font-size: 13px;
}
.editor-options input[type="color"] {
width: 44px;
height: 28px;
border: 1px solid var(--border);
border-radius: 4px;
background: transparent;
cursor: pointer;
}
/* === EDITOR ACTIONS === */
.editor-actions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4px;
margin-top: 6px;
}
.editor-hint {
margin: 5px 0 0;
color: var(--text-3);
font-size: 12px;
line-height: 1.4;
}
/* === CONTROL (slider rows) === */
.control {
display: grid;
grid-template-columns: 60px 1fr 40px;
gap: 6px;
align-items: center;
margin: 5px 0;
}
.control label {
color: var(--text-2);
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.value {
color: var(--accent);
font-family: "Cascadia Code", monospace;
font-size: 12px;
text-align: right;
}
/* === ROW TWO & MINI BUTTON === */
.row-two {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4px;
margin-top: 6px;
}
.mini-button, select {
width: 100%;
min-height: 28px;
padding: 0 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-elevated);
color: var(--text);
font-size: 13px;
}
.mini-button {
cursor: pointer;
transition: border-color 0.15s, color 0.15s;
}
.mini-button:hover { border-color: var(--accent); color: var(--accent); }
/* === PRECISION GUIDE === */
.precision-guide {
display: flex;
justify-content: space-between;
gap: 6px;
margin-top: 6px;
padding: 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-input);
color: var(--text-3);
font-size: 12px;
}
.precision-guide strong { color: var(--accent); font-family: "Cascadia Code", monospace; font-size: 12px; }
/* === STRUCTURE FIELD === */
.structure-field {
display: grid;
grid-template-columns: minmax(0, 1fr) 120px;
gap: 8px;
align-items: center;
margin-top: 6px;
padding: 6px;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg-elevated);
}
.structure-copy { min-width: 0; }
.structure-copy strong, .structure-copy small { display: block; }
.structure-copy strong { color: var(--text); font-size: 13px; font-weight: 600; }
.structure-copy small { color: var(--text-3); font-size: 12px; }
.structure-field select { min-height: 28px; padding: 0 4px; font-size: 12px; }
/* === TOGGLE ROW & SWITCH === */
.toggle-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
margin-top: 6px;
color: var(--text-2);
font-size: 13px;
line-height: 1.3;
}
.switch {
position: relative;
flex: 0 0 auto;
width: 34px;
height: 18px;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span {
position: absolute;
inset: 0;
border-radius: 999px;
background: var(--bg-hover);
transition: background 0.15s;
}
.switch span::after {
content: '';
position: absolute;
top: 2px; left: 2px;
width: 14px; height: 14px;
border-radius: 50%;
background: var(--text-2);
transition: transform 0.15s, background 0.15s;
}
.switch input:checked + span { background: var(--accent-lo); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--accent-hi); }