211 lines
4.9 KiB
CSS
211 lines
4.9 KiB
CSS
/* ==========================================
|
|
Channel Models — v0.20.0 Phase 2
|
|
Model pills, @mention autocomplete, add dialog
|
|
========================================== */
|
|
|
|
/* ── Model Pills (chat header) ───────────── */
|
|
|
|
.ch-model-pills {
|
|
display: none; /* shown by JS when roster > 1 */
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 0 8px;
|
|
flex-shrink: 1;
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
}
|
|
.ch-model-pills::-webkit-scrollbar { display: none; }
|
|
|
|
.ch-model-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
background: var(--bg-secondary, #f0f0f0);
|
|
border: 1px solid var(--border-color, #ddd);
|
|
font-size: 0.75rem;
|
|
white-space: nowrap;
|
|
cursor: default;
|
|
transition: background 0.15s;
|
|
}
|
|
.ch-model-pill.ch-model-default {
|
|
background: var(--accent-bg, #e8f0fe);
|
|
border-color: var(--accent-color, #4a8af4);
|
|
}
|
|
.ch-model-pill-name {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
.ch-model-pill-name:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.ch-model-pill-remove {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 0.65rem;
|
|
color: var(--text-secondary, #888);
|
|
padding: 0 2px;
|
|
line-height: 1;
|
|
opacity: 0.6;
|
|
transition: opacity 0.15s;
|
|
}
|
|
.ch-model-pill-remove:hover {
|
|
opacity: 1;
|
|
color: var(--error-color, #d32f2f);
|
|
}
|
|
|
|
.ch-model-add-btn {
|
|
background: none;
|
|
border: 1px dashed var(--border-color, #ccc);
|
|
border-radius: 12px;
|
|
padding: 2px 8px;
|
|
font-size: 0.75rem;
|
|
cursor: pointer;
|
|
color: var(--text-secondary, #888);
|
|
white-space: nowrap;
|
|
transition: color 0.15s, border-color 0.15s;
|
|
}
|
|
.ch-model-add-btn:hover {
|
|
color: var(--text-primary, #333);
|
|
border-color: var(--text-primary, #333);
|
|
}
|
|
|
|
/* ── Add Model Dialog ────────────────────── */
|
|
|
|
.ch-model-add-dialog {
|
|
position: fixed;
|
|
inset: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: rgba(0,0,0,0.4);
|
|
z-index: 1100;
|
|
}
|
|
.ch-model-add-inner {
|
|
background: var(--bg-primary, #fff);
|
|
border-radius: 12px;
|
|
padding: 24px;
|
|
min-width: 320px;
|
|
max-width: 420px;
|
|
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
|
|
}
|
|
.ch-model-add-inner h3 {
|
|
margin: 0 0 16px;
|
|
font-size: 1rem;
|
|
}
|
|
.ch-model-add-inner label {
|
|
display: block;
|
|
margin-bottom: 12px;
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary, #666);
|
|
}
|
|
.ch-model-add-inner select,
|
|
.ch-model-add-inner input[type="text"] {
|
|
display: block;
|
|
width: 100%;
|
|
margin-top: 4px;
|
|
padding: 8px;
|
|
border: 1px solid var(--border-color, #ddd);
|
|
border-radius: 6px;
|
|
font-size: 0.9rem;
|
|
background: var(--bg-primary, #fff);
|
|
color: var(--text-primary, #333);
|
|
box-sizing: border-box;
|
|
}
|
|
.ch-model-add-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
justify-content: flex-end;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
/* ── @mention Autocomplete ───────────────── */
|
|
|
|
.mention-ac {
|
|
position: fixed;
|
|
z-index: 1050;
|
|
background: var(--bg-primary, #fff);
|
|
border: 1px solid var(--border-color, #ddd);
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 16px rgba(0,0,0,0.15);
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
padding: 4px 0;
|
|
}
|
|
.mention-ac-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 12px;
|
|
cursor: pointer;
|
|
gap: 12px;
|
|
transition: background 0.1s;
|
|
}
|
|
.mention-ac-item:hover,
|
|
.mention-ac-item.mention-ac-active {
|
|
background: var(--bg-secondary, #f5f5f5);
|
|
}
|
|
.mention-ac-name {
|
|
font-weight: 500;
|
|
font-size: 0.85rem;
|
|
}
|
|
.mention-ac-model {
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary, #999);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
max-width: 160px;
|
|
}
|
|
|
|
/* ── Model Attribution (multi-model messages) ─ */
|
|
|
|
.msg-model-label {
|
|
display: inline-block;
|
|
font-size: 0.7rem;
|
|
font-weight: 600;
|
|
padding: 1px 6px;
|
|
border-radius: 4px;
|
|
background: var(--bg-secondary, #f0f0f0);
|
|
color: var(--text-secondary, #666);
|
|
margin-left: 6px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
/* Model separator in multi-model stream */
|
|
.model-stream-divider {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 12px 0 4px;
|
|
font-size: 0.8rem;
|
|
color: var(--text-secondary, #888);
|
|
font-weight: 500;
|
|
}
|
|
.model-stream-divider::before,
|
|
.model-stream-divider::after {
|
|
content: '';
|
|
flex: 1;
|
|
height: 1px;
|
|
background: var(--border-color, #eee);
|
|
}
|
|
|
|
/* ── Mobile ──────────────────────────────── */
|
|
|
|
@media (max-width: 768px) {
|
|
.ch-model-pills {
|
|
max-width: 50vw;
|
|
}
|
|
.ch-model-add-inner {
|
|
min-width: auto;
|
|
margin: 0 16px;
|
|
}
|
|
.mention-ac {
|
|
left: 8px !important;
|
|
right: 8px;
|
|
min-width: auto !important;
|
|
}
|
|
}
|