All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
617 lines
12 KiB
CSS
617 lines
12 KiB
CSS
/* ═══════════════════════════════════════════
|
|
Chat Surface — Styles (v0.2.0)
|
|
Uses variables.css theme tokens:
|
|
--bg, --bg-surface, --bg-raised, --bg-hover, --bg-secondary
|
|
--text, --text-2, --text-3
|
|
--accent, --accent-dim, --border, --border-light
|
|
--input-bg, --danger, --danger-bg, --success
|
|
═══════════════════════════════════════════ */
|
|
|
|
/* ── Layout ─────────────────────────────── */
|
|
|
|
.ext-chat-app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.ext-chat-loading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
}
|
|
|
|
.ext-chat-body {
|
|
display: flex;
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
|
|
.ext-chat-main {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* ── Topbar extras ──────────────────────── */
|
|
|
|
.ext-chat-topbar__thread-title {
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
margin-right: 8px;
|
|
color: var(--text-2);
|
|
}
|
|
|
|
/* ── Sidebar ────────────────────────────── */
|
|
|
|
.ext-chat-sidebar {
|
|
width: 280px;
|
|
min-width: 280px;
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.ext-chat-sidebar__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.ext-chat-sidebar__title {
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.ext-chat-sidebar__list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.ext-chat-sidebar__empty {
|
|
padding: 24px 16px;
|
|
text-align: center;
|
|
color: var(--text-3);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.ext-chat-sidebar__item {
|
|
padding: 10px 16px;
|
|
cursor: pointer;
|
|
border-bottom: 1px solid var(--border-light);
|
|
transition: background 0.1s;
|
|
}
|
|
|
|
.ext-chat-sidebar__item:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.ext-chat-sidebar__item--active {
|
|
background: var(--accent-dim);
|
|
}
|
|
|
|
.ext-chat-sidebar__item-top {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: baseline;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.ext-chat-sidebar__item-title {
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
flex: 1;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.ext-chat-sidebar__item-time {
|
|
font-size: 11px;
|
|
color: var(--text-3);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ext-chat-sidebar__item-bottom {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.ext-chat-sidebar__item-preview {
|
|
font-size: 12px;
|
|
color: var(--text-2);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
flex: 1;
|
|
}
|
|
|
|
.ext-chat-sidebar__badge {
|
|
background: var(--accent);
|
|
color: var(--text-on-color);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
border-radius: 9px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0 5px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* ── Sidebar Search ────────────────────── */
|
|
|
|
.ext-chat-sidebar__search {
|
|
position: relative;
|
|
padding: 8px 16px;
|
|
border-bottom: 1px solid var(--border-light);
|
|
}
|
|
|
|
.ext-chat-sidebar__search-input {
|
|
width: 100%;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: 6px 28px 6px 10px;
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
background: var(--input-bg);
|
|
color: var(--text);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.ext-chat-sidebar__search-input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.ext-chat-sidebar__search-clear {
|
|
position: absolute;
|
|
right: 22px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-3);
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.ext-chat-sidebar__search-clear:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
.ext-chat-sidebar__search-results {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.ext-chat-sidebar__search-section {
|
|
padding: 8px 16px 4px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
color: var(--text-3);
|
|
}
|
|
|
|
.ext-chat-sidebar__search-loading {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 16px;
|
|
}
|
|
|
|
.ext-chat-sidebar__item--search-msg .ext-chat-sidebar__item-preview {
|
|
font-size: 13px;
|
|
white-space: normal;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── Message Thread ─────────────────────── */
|
|
|
|
.ext-chat-thread {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
}
|
|
|
|
.ext-chat-thread--empty {
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text-3);
|
|
}
|
|
|
|
.ext-chat-thread__messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.ext-chat-thread__loading {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 24px;
|
|
}
|
|
|
|
.ext-chat-thread__loading-more {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 8px;
|
|
}
|
|
|
|
.ext-chat-thread__load-more {
|
|
align-self: center;
|
|
background: none;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 4px 12px;
|
|
font-size: 12px;
|
|
color: var(--text-2);
|
|
cursor: pointer;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.ext-chat-thread__load-more:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.ext-chat-thread__typing {
|
|
padding: 4px 16px 8px;
|
|
font-size: 12px;
|
|
color: var(--text-3);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* ── Message Bubble ─────────────────────── */
|
|
|
|
.ext-chat-msg {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
padding: 4px 0;
|
|
position: relative;
|
|
}
|
|
|
|
.ext-chat-msg--own {
|
|
flex-direction: row-reverse;
|
|
}
|
|
|
|
.ext-chat-msg--system {
|
|
justify-content: center;
|
|
padding: 2px 0;
|
|
}
|
|
|
|
.ext-chat-msg--system span {
|
|
font-size: 12px;
|
|
color: var(--text-3);
|
|
font-style: italic;
|
|
}
|
|
|
|
.ext-chat-msg--deleted {
|
|
justify-content: center;
|
|
padding: 2px 0;
|
|
}
|
|
|
|
.ext-chat-msg--deleted em {
|
|
font-size: 12px;
|
|
color: var(--text-3);
|
|
}
|
|
|
|
.ext-chat-msg__body {
|
|
max-width: 65%;
|
|
background: var(--bg-raised);
|
|
border-radius: 12px;
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
.ext-chat-msg--own .ext-chat-msg__body {
|
|
background: var(--accent);
|
|
color: var(--text-on-color);
|
|
}
|
|
|
|
.ext-chat-msg__name {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-2);
|
|
display: block;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.ext-chat-msg__content {
|
|
font-size: 14px;
|
|
line-height: 1.4;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.ext-chat-msg__meta {
|
|
display: flex;
|
|
gap: 6px;
|
|
align-items: center;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.ext-chat-msg__time {
|
|
font-size: 10px;
|
|
color: var(--text-3);
|
|
}
|
|
|
|
.ext-chat-msg--own .ext-chat-msg__time {
|
|
color: rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.ext-chat-msg__edited {
|
|
font-size: 10px;
|
|
color: var(--text-3);
|
|
font-style: italic;
|
|
}
|
|
|
|
.ext-chat-msg--own .ext-chat-msg__edited {
|
|
color: rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
/* ── Message Actions ────────────────────── */
|
|
|
|
.ext-chat-msg__actions {
|
|
display: flex;
|
|
gap: 2px;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
box-shadow: var(--shadow-lg);
|
|
padding: 2px;
|
|
}
|
|
|
|
.ext-chat-msg--own .ext-chat-msg__actions {
|
|
right: auto;
|
|
left: 0;
|
|
}
|
|
|
|
.ext-chat-msg__action {
|
|
background: none;
|
|
border: none;
|
|
padding: 4px 6px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
color: var(--text-2);
|
|
}
|
|
|
|
.ext-chat-msg__action:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.ext-chat-msg__action--danger:hover {
|
|
background: var(--danger-bg);
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* ── Message Edit ───────────────────────── */
|
|
|
|
.ext-chat-msg__edit {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.ext-chat-msg__edit-input {
|
|
width: 100%;
|
|
min-width: 200px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: 6px 8px;
|
|
font-size: 14px;
|
|
font-family: inherit;
|
|
resize: vertical;
|
|
background: var(--input-bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.ext-chat-msg__edit-actions {
|
|
display: flex;
|
|
gap: 6px;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* ── Compose Bar ────────────────────────── */
|
|
|
|
.ext-chat-compose {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--border);
|
|
background: var(--bg);
|
|
}
|
|
|
|
.ext-chat-compose__input {
|
|
flex: 1;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 8px 12px;
|
|
font-size: 14px;
|
|
font-family: inherit;
|
|
resize: none;
|
|
line-height: 1.4;
|
|
max-height: 160px;
|
|
background: var(--input-bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.ext-chat-compose__input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 2px var(--accent-dim);
|
|
}
|
|
|
|
/* ── Participant Sidebar ────────────────── */
|
|
|
|
.ext-chat-participants {
|
|
width: 240px;
|
|
min-width: 240px;
|
|
border-left: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.ext-chat-participants__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.ext-chat-participants__list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 8px 0;
|
|
}
|
|
|
|
.ext-chat-participants__item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 16px;
|
|
}
|
|
|
|
.ext-chat-participants__name {
|
|
flex: 1;
|
|
font-size: 13px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.ext-chat-participants__badge {
|
|
font-size: 10px;
|
|
color: var(--accent);
|
|
font-weight: 600;
|
|
margin-left: 4px;
|
|
}
|
|
|
|
.ext-chat-participants__status {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--text-3);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.ext-chat-participants__status--online {
|
|
background: var(--success);
|
|
}
|
|
|
|
.ext-chat-participants__remove {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-3);
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.ext-chat-participants__remove:hover {
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* ── New Conversation Dialog ────────────── */
|
|
|
|
.ext-chat-new {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
min-width: 320px;
|
|
}
|
|
|
|
.ext-chat-new__type {
|
|
display: flex;
|
|
gap: 16px;
|
|
}
|
|
|
|
.ext-chat-new__type label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ext-chat-new__title {
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: 8px 10px;
|
|
font-size: 14px;
|
|
font-family: inherit;
|
|
background: var(--input-bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.ext-chat-new__selected {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
}
|
|
|
|
.ext-chat-new__chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
background: var(--accent-dim);
|
|
color: var(--accent);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
padding: 3px 8px;
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.ext-chat-new__chip button {
|
|
background: none;
|
|
border: none;
|
|
color: inherit;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
padding: 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* ── Dialog UserPicker overflow fix ─────── */
|
|
/* Allow the autocomplete dropdown to overflow the dialog body.
|
|
Applies to both New Conversation and Add Participant dialogs. */
|
|
|
|
[data-ext="chat"] .sw-dialog__body:has(.sw-user-picker) {
|
|
overflow: visible;
|
|
}
|
|
|
|
[data-ext="chat"] .sw-dialog:has(.sw-user-picker) {
|
|
overflow: visible;
|
|
}
|