nordabiz/static/css/conversations.css
Maciej Pienczyn 7402f3dc52
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
fix(messages): add modal styling for new message dialog
The modal had no CSS — it was rendering as unstyled HTML. Added proper
overlay, card layout, input styling, suggestion list, and footer buttons
matching the NordaBiz design system.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:18:42 +02:00

1658 lines
35 KiB
CSS

/* ============================================================
* CONVERSATIONS CSS
* Conversation-based messaging UI for NordaBiznes
* Uses NordaBiz design tokens from fluent-nordabiz.css
* ============================================================ */
/* --- Design tokens alias (map task spec to existing vars) --- */
:root {
--conv-primary: var(--fluent-primary, #2E4872);
--conv-primary-hover: var(--fluent-primary-hover, #1e3050);
--conv-primary-light: var(--fluent-primary-light, #EDF0F5);
--conv-surface: var(--fluent-surface-primary, #ffffff);
--conv-surface-secondary: var(--fluent-bg-secondary, #f3f2f1);
--conv-text-primary: var(--fluent-text-primary, #323130);
--conv-text-secondary: var(--fluent-text-secondary, #605e5c);
--conv-text-muted: var(--fluent-text-tertiary, #8a8886);
--conv-border: var(--fluent-surface-stroke, #e1dfdd);
--conv-radius: var(--fluent-border-radius-xl, 8px);
--conv-radius-lg: 16px;
--conv-shadow-sm: var(--fluent-shadow-2);
--conv-shadow-md: var(--fluent-shadow-8);
--conv-shadow-lg: var(--fluent-shadow-16);
--conv-transition: var(--fluent-duration-fast, 150ms) ease;
/* Accent for own messages */
--conv-accent: var(--fluent-primary, #2E4872);
--conv-accent-hover: var(--fluent-primary-hover, #1e3050);
/* Avatar palette */
--conv-avatar-green: #107c10;
--conv-avatar-blue: #0078d4;
--conv-avatar-purple: #8764b8;
--conv-avatar-orange: #ca5010;
--conv-avatar-teal: #038387;
}
/* ============================================================
* 1. MAIN CONTAINER
* ============================================================ */
/* Override base .container constraints for full-width messaging */
.container.conversations-page {
max-width: 100%;
padding: 0;
}
/* Hide footer when conversations are active */
.conversations-page ~ footer,
.conversations-page ~ .footer {
display: none;
}
.conversations-container {
display: flex;
height: calc(100vh - 220px); /* topbar + admin bar + announcement bar + padding */
background: var(--conv-surface);
overflow: hidden;
}
/* ============================================================
* 2. LEFT PANEL — Conversation list
* ============================================================ */
.conversations-panel {
width: 380px;
min-width: 320px;
max-width: 420px;
background: var(--conv-surface);
border-right: 1px solid var(--conv-border);
display: flex;
flex-direction: column;
flex-shrink: 0;
}
/* --- Header --- */
.conversations-header {
padding: 16px;
border-bottom: 1px solid var(--conv-border);
flex-shrink: 0;
}
.conversations-header h2 {
margin: 0 0 12px 0;
font-size: 20px;
font-weight: 600;
color: var(--conv-text-primary);
}
.conversations-header-actions {
display: flex;
gap: 8px;
align-items: center;
}
.conversations-search-row {
display: flex;
align-items: center;
gap: 8px;
}
.conversations-search {
flex: 1;
position: relative;
}
.conversations-search input {
width: 100%;
padding: 8px 12px 8px 36px;
border: 1px solid var(--conv-border);
border-radius: var(--conv-radius);
font-size: 14px;
font-family: inherit;
background: var(--conv-surface-secondary);
color: var(--conv-text-primary);
transition: border-color var(--conv-transition), box-shadow var(--conv-transition);
box-sizing: border-box;
}
.conversations-search input:focus {
outline: none;
border-color: var(--conv-primary);
box-shadow: 0 0 0 2px rgba(46, 72, 114, 0.15);
background: var(--conv-surface);
}
.conversations-search input::placeholder {
color: var(--conv-text-muted);
}
.conversations-search .search-icon {
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
color: var(--conv-text-muted);
pointer-events: none;
width: 16px;
height: 16px;
}
.btn-new-conversation {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
height: 36px;
padding: 0 14px;
border: none;
border-radius: var(--conv-radius);
background: var(--conv-primary);
color: #fff;
cursor: pointer;
transition: background var(--conv-transition);
flex-shrink: 0;
font-size: 13px;
font-weight: 500;
white-space: nowrap;
}
.btn-new-conversation:hover {
background: var(--conv-primary-hover);
}
@media (max-width: 768px) {
.btn-new-text { display: none; }
.btn-new-conversation { width: 36px; padding: 0; }
}
/* --- Conversation list (scrollable) --- */
.conversation-list {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
}
/* --- Conversation item --- */
.conversation-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
cursor: pointer;
transition: background var(--conv-transition);
border-left: 3px solid transparent;
position: relative;
}
.conversation-item:hover {
background: var(--conv-surface-secondary);
}
.conversation-item.active {
background: #dce3ef;
border-left: 4px solid var(--conv-primary, #2E4872);
padding-left: 8px;
}
.conversation-item.unread .conv-name {
font-weight: 600;
}
.conversation-item.unread .conv-preview {
color: var(--conv-text-primary);
font-weight: 500;
}
/* --- Avatar --- */
.conv-avatar {
width: 46px;
height: 46px;
min-width: 46px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: 600;
color: #fff;
position: relative;
flex-shrink: 0;
}
.conv-avatar.green { background: var(--conv-avatar-green); }
.conv-avatar.blue { background: var(--conv-avatar-blue); }
.conv-avatar.purple { background: var(--conv-avatar-purple); }
.conv-avatar.orange { background: var(--conv-avatar-orange); }
.conv-avatar.teal { background: var(--conv-avatar-teal); }
.conv-avatar.group-icon {
background: var(--conv-surface-secondary);
color: var(--conv-text-secondary);
font-size: 20px;
}
/* --- Content area --- */
.conv-content {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.conv-top-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.conv-name {
font-size: 14px;
font-weight: 500;
color: var(--conv-text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.conv-time {
font-size: 12px;
color: var(--conv-text-muted);
white-space: nowrap;
flex-shrink: 0;
}
.conv-bottom-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.conv-preview {
font-size: 13px;
color: var(--conv-text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
min-width: 0;
}
/* --- Unread badge --- */
.unread-badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 20px;
height: 20px;
padding: 0 6px;
border-radius: 10px;
background: var(--conv-accent);
color: #fff;
font-size: 11px;
font-weight: 600;
flex-shrink: 0;
}
/* --- Muted indicator --- */
.muted-icon {
color: var(--conv-text-muted);
font-size: 14px;
flex-shrink: 0;
margin-left: 4px;
}
/* ============================================================
* 3. RIGHT PANEL — Chat
* ============================================================ */
.chat-panel {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
background: var(--conv-surface);
}
/* --- Empty state --- */
.chat-empty {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: var(--conv-text-muted);
gap: 12px;
padding: 24px;
text-align: center;
}
.chat-empty .empty-icon {
font-size: 48px;
opacity: 0.4;
}
.chat-empty h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: var(--conv-text-secondary);
}
.chat-empty p {
margin: 0;
font-size: 14px;
max-width: 320px;
}
/* --- Chat header --- */
.chat-header {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: var(--conv-surface);
border-bottom: 1px solid var(--conv-border);
flex-shrink: 0;
}
.chat-header .conv-avatar {
width: 40px;
height: 40px;
min-width: 40px;
font-size: 14px;
}
.chat-header-info {
flex: 1;
min-width: 0;
}
.chat-header-name {
font-size: 15px;
font-weight: 600;
color: var(--conv-text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-header-subtitle {
font-size: 12px;
color: var(--conv-text-secondary);
display: flex;
align-items: center;
gap: 6px;
}
.chat-header-actions {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.chat-header-actions button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: none;
border-radius: var(--conv-radius);
background: transparent;
color: var(--conv-text-secondary);
cursor: pointer;
transition: background var(--conv-transition), color var(--conv-transition);
}
.chat-header-actions button:hover {
background: var(--conv-surface-secondary);
color: var(--conv-text-primary);
}
/* --- Online dot --- */
.online-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: #107c10;
border: 2px solid var(--conv-surface);
position: absolute;
bottom: 0;
right: 0;
}
/* --- Typing indicator --- */
.typing-indicator {
font-size: 12px;
color: var(--conv-text-muted);
font-style: italic;
display: flex;
align-items: center;
gap: 4px;
}
.typing-indicator .dots {
display: inline-flex;
gap: 2px;
}
.typing-indicator .dots span {
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--conv-text-muted);
animation: typing-bounce 1.2s infinite;
}
.typing-indicator .dots span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator .dots span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes typing-bounce {
0%, 60%, 100% {
transform: translateY(0);
opacity: 0.4;
}
30% {
transform: translateY(-4px);
opacity: 1;
}
}
/* ============================================================
* 4. MESSAGES AREA
* ============================================================ */
.chat-messages {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 16px;
display: flex;
flex-direction: column;
gap: 4px;
}
/* --- Date separator --- */
.date-separator {
display: flex;
align-items: center;
gap: 12px;
margin: 16px 0;
color: var(--conv-text-muted);
font-size: 12px;
font-weight: 500;
user-select: none;
}
.date-separator::before,
.date-separator::after {
content: '';
flex: 1;
height: 1px;
background: var(--conv-border);
}
/* --- Message row --- */
.message-row {
display: flex;
margin-bottom: 2px;
}
.message-row.mine {
justify-content: flex-end;
}
.message-row.theirs {
justify-content: flex-start;
}
/* --- Message bubble --- */
.message-bubble {
max-width: 520px;
padding: 10px 14px;
font-size: 14px;
line-height: 1.45;
word-wrap: break-word;
overflow-wrap: break-word;
position: relative;
}
.message-row.mine .message-bubble {
background: var(--conv-accent);
color: #fff;
border-radius: var(--conv-radius-lg) var(--conv-radius-lg) 4px var(--conv-radius-lg);
}
.message-row.theirs .message-bubble {
background: var(--conv-surface-secondary);
color: var(--conv-text-primary);
border-radius: var(--conv-radius-lg) var(--conv-radius-lg) var(--conv-radius-lg) 4px;
}
/* Consecutive same-sender — flatten connecting corners */
.message-row.mine + .message-row.mine .message-bubble {
border-top-right-radius: 4px;
}
.message-row.theirs + .message-row.theirs .message-bubble {
border-top-left-radius: 4px;
}
/* --- Message time --- */
.message-time {
font-size: 11px;
margin-top: 4px;
display: flex;
align-items: center;
gap: 4px;
}
.message-row.mine .message-time {
color: rgba(255, 255, 255, 0.7);
justify-content: flex-end;
}
.message-row.theirs .message-time {
color: var(--conv-text-muted);
}
/* --- Message subject (migrated messages) --- */
.message-subject {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 600;
margin-bottom: 4px;
opacity: 0.7;
}
.message-row.mine .message-subject {
color: rgba(255, 255, 255, 0.8);
}
.message-row.theirs .message-subject {
color: var(--conv-text-muted);
}
/* --- Read status labels --- */
.read-status {
display: inline-block;
font-size: 11px;
font-weight: 500;
margin-left: 6px;
letter-spacing: 0.1px;
}
.read-status.read {
color: #16a34a;
}
.read-status.unread {
color: #eab308;
}
.message-row.mine .read-status.read {
color: #86efac;
}
.message-row.mine .read-status.unread {
color: #fde68a;
}
/* Group read status — vertical list */
.group-read-status {
display: flex;
flex-direction: column;
gap: 1px;
margin-left: 0;
margin-top: 4px;
}
.read-status-line {
display: block;
font-size: 10.5px;
font-weight: 500;
}
.read-status-line.read {
color: #16a34a;
}
.read-status-line.unread {
color: #eab308;
}
.message-row.mine .read-status-line.read {
color: #86efac;
}
.message-row.mine .read-status-line.unread {
color: #fde68a;
}
/* --- Legacy read checks (keep for compat) --- */
.read-check {
width: 14px;
height: 14px;
display: inline-flex;
opacity: 0.6;
}
.read-check.read {
opacity: 1;
color: #60a5fa;
}
.message-row.mine .read-check.read {
color: rgba(255, 255, 255, 0.9);
}
/* --- Reply quote --- */
.message-reply-quote {
padding: 6px 10px;
margin-bottom: 6px;
border-radius: 6px;
font-size: 12px;
line-height: 1.35;
cursor: pointer;
max-height: 48px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.message-row.mine .message-reply-quote {
background: rgba(255, 255, 255, 0.15);
border-left: 3px solid rgba(255, 255, 255, 0.5);
color: rgba(255, 255, 255, 0.85);
}
.message-row.theirs .message-reply-quote {
background: rgba(0, 0, 0, 0.05);
border-left: 3px solid var(--conv-primary);
color: var(--conv-text-secondary);
}
.message-reply-quote .reply-author {
font-weight: 600;
display: block;
margin-bottom: 2px;
font-size: 11px;
}
/* --- Reactions --- */
.message-reactions {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 4px;
}
.reaction-pill {
display: inline-flex;
align-items: center;
gap: 3px;
padding: 2px 8px;
border-radius: 12px;
font-size: 13px;
cursor: pointer;
border: 1px solid var(--conv-border);
background: var(--conv-surface);
color: var(--conv-text-primary);
transition: background var(--conv-transition), border-color var(--conv-transition);
user-select: none;
}
.reaction-pill:hover {
background: var(--conv-surface-secondary);
border-color: var(--conv-text-muted);
}
.reaction-pill.mine {
border-color: var(--conv-primary);
background: var(--conv-primary-light);
}
.reaction-pill .reaction-count {
font-size: 11px;
font-weight: 500;
color: var(--conv-text-secondary);
}
/* --- Link preview --- */
.link-preview-card {
display: flex;
gap: 10px;
border: 1px solid var(--conv-border);
border-radius: var(--conv-radius);
overflow: hidden;
margin-top: 8px;
background: var(--conv-surface);
text-decoration: none;
color: inherit;
transition: box-shadow var(--conv-transition);
}
.link-preview-card:hover {
box-shadow: var(--conv-shadow-sm);
}
.link-preview-card .lp-image {
width: 80px;
min-height: 60px;
object-fit: cover;
flex-shrink: 0;
}
.link-preview-card .lp-content {
padding: 8px 10px;
min-width: 0;
}
.link-preview-card .lp-title {
font-size: 13px;
font-weight: 600;
color: var(--conv-text-primary);
margin: 0 0 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.link-preview-card .lp-description {
font-size: 12px;
color: var(--conv-text-secondary);
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Inside own bubble — adjust colors */
.message-row.mine .link-preview-card {
border-color: rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.1);
}
.message-row.mine .link-preview-card .lp-title {
color: #fff;
}
.message-row.mine .link-preview-card .lp-description {
color: rgba(255, 255, 255, 0.8);
}
/* --- Edited / deleted --- */
.message-edited {
font-size: 11px;
font-style: italic;
opacity: 0.6;
margin-left: 4px;
}
.message-deleted {
font-style: italic;
color: var(--conv-text-muted);
opacity: 0.7;
}
/* ============================================================
* 5. CONTEXT MENU
* ============================================================ */
.message-context-menu {
position: absolute;
display: none;
flex-direction: row;
gap: 2px;
padding: 4px;
background: var(--conv-surface);
border: 1px solid var(--conv-border);
border-radius: var(--conv-radius);
box-shadow: var(--conv-shadow-md);
z-index: 100;
}
.message-context-menu.visible {
display: flex;
}
.message-context-menu button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: none;
border-radius: 6px;
background: transparent;
color: var(--conv-text-secondary);
cursor: pointer;
font-size: 15px;
transition: background var(--conv-transition), color var(--conv-transition);
}
.message-context-menu button:hover {
background: var(--conv-surface-secondary);
color: var(--conv-text-primary);
}
.message-context-menu button.danger:hover {
background: #fef2f2;
color: #d13438;
}
/* Position context menu relative to message row */
.message-row {
position: relative;
}
.message-row .message-context-menu {
top: -4px;
}
.message-row.mine .message-context-menu {
right: 100%;
margin-right: 4px;
}
.message-row.theirs .message-context-menu {
left: 100%;
margin-left: 4px;
}
/* ============================================================
* 6. EMOJI PICKER
* ============================================================ */
.emoji-picker {
position: absolute;
display: none;
flex-direction: row;
gap: 2px;
padding: 6px;
background: var(--conv-surface);
border: 1px solid var(--conv-border);
border-radius: var(--conv-radius);
box-shadow: var(--conv-shadow-md);
z-index: 110;
bottom: calc(100% + 4px);
left: 0;
}
.emoji-picker.visible {
display: flex;
}
.emoji-picker button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: none;
border-radius: 6px;
background: transparent;
font-size: 18px;
cursor: pointer;
transition: background var(--conv-transition), transform var(--conv-transition);
}
.emoji-picker button:hover {
background: var(--conv-surface-secondary);
transform: scale(1.15);
}
/* ============================================================
* 7. PINNED BAR
* ============================================================ */
.pinned-bar {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: var(--conv-primary-light);
border-bottom: 1px solid var(--conv-border);
font-size: 13px;
color: var(--conv-text-secondary);
cursor: pointer;
transition: background var(--conv-transition);
flex-shrink: 0;
}
.pinned-bar:hover {
background: #e3e8ef;
}
.pinned-bar .pin-icon {
color: var(--conv-primary);
font-size: 14px;
}
.pinned-bar .pin-count {
font-weight: 600;
}
.pinned-bar .pin-toggle {
margin-left: auto;
color: var(--conv-text-muted);
font-size: 12px;
}
/* ============================================================
* 8. INPUT AREA
* ============================================================ */
.chat-input-area {
padding: 12px 16px;
background: var(--conv-surface);
border-top: 1px solid var(--conv-border);
flex-shrink: 0;
}
.chat-input-wrapper {
display: flex;
align-items: flex-end;
gap: 8px;
border: 1px solid var(--conv-border);
border-radius: var(--conv-radius-lg);
padding: 8px 12px;
background: var(--conv-surface);
transition: border-color var(--conv-transition), box-shadow var(--conv-transition);
}
.chat-input-wrapper:focus-within {
border-color: var(--conv-primary);
box-shadow: 0 0 0 2px rgba(46, 72, 114, 0.15);
}
.chat-input-wrapper textarea {
flex: 1;
border: none;
outline: none;
resize: none;
font-family: inherit;
font-size: 14px;
line-height: 1.45;
color: var(--conv-text-primary);
background: transparent;
max-height: 120px;
min-height: 20px;
padding: 0;
}
.chat-input-wrapper textarea::placeholder {
color: var(--conv-text-muted);
}
.btn-attachment {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: none;
border-radius: 50%;
background: transparent;
color: var(--conv-text-secondary);
cursor: pointer;
transition: background var(--conv-transition), color var(--conv-transition);
flex-shrink: 0;
}
.btn-attachment:hover {
background: var(--conv-surface-secondary);
color: var(--conv-text-primary);
}
.btn-send {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border: none;
border-radius: 50%;
background: var(--conv-accent);
color: #fff;
cursor: pointer;
transition: background var(--conv-transition), transform var(--conv-transition);
flex-shrink: 0;
}
.btn-send:hover {
background: var(--conv-accent-hover);
transform: scale(1.05);
}
.btn-send:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
/* --- Pin indicator on message --- */
.pin-indicator {
display: inline-block;
cursor: pointer;
font-size: 13px;
opacity: 0.5;
margin-top: 2px;
transition: opacity 0.15s;
}
.pin-indicator:hover {
opacity: 1;
}
/* --- Search results section --- */
.search-results-section {
border-top: 2px solid var(--conv-accent, #2E4872);
margin-top: 8px;
padding-top: 4px;
}
.search-results-header {
padding: 8px 16px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--conv-accent, #2E4872);
}
.search-result-item {
padding: 10px 16px;
cursor: pointer;
border-bottom: 1px solid var(--conv-border, #e1dfdd);
transition: background 0.12s;
}
.search-result-item:hover {
background: var(--conv-primary-light, #EDF0F5);
}
.search-result-name {
font-size: 13px;
font-weight: 600;
color: var(--conv-text-primary);
margin-bottom: 2px;
}
.search-result-preview {
font-size: 12px;
color: var(--conv-text-secondary);
line-height: 1.4;
}
.search-result-preview mark {
background: #fef08a;
color: inherit;
padding: 0 2px;
border-radius: 2px;
}
/* --- Search highlight in messages --- */
mark.search-highlight {
background: #fef08a;
color: inherit;
padding: 1px 3px;
border-radius: 3px;
box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.4);
}
.message-row.mine mark.search-highlight {
background: rgba(254, 240, 138, 0.35);
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.search-highlight-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
background: #fefce8;
border-bottom: 1px solid #fde68a;
font-size: 13px;
color: #854d0e;
}
.search-highlight-clear {
border: 1px solid #fde68a;
background: #fff;
color: #854d0e;
padding: 4px 12px;
border-radius: 6px;
font-size: 12px;
cursor: pointer;
font-family: inherit;
transition: background 0.12s;
}
.search-highlight-clear:hover {
background: #fef9c3;
}
.search-result-date {
font-size: 11px;
color: var(--conv-text-muted);
margin-top: 2px;
}
.input-hint {
font-size: 12px;
color: var(--conv-text-secondary, #605e5c);
text-align: right;
padding: 6px 8px 2px;
letter-spacing: 0.2px;
}
.input-hint kbd {
display: inline-block;
padding: 1px 5px;
font-size: 11px;
font-family: inherit;
background: var(--conv-surface-secondary, #f3f2f1);
border: 1px solid var(--conv-border, #e1dfdd);
border-radius: 4px;
box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
/* --- Quill editor inside input wrapper --- */
.chat-input-wrapper .ql-toolbar {
border: none;
border-bottom: 1px solid var(--conv-border);
padding: 4px 0;
font-family: inherit;
}
.chat-input-wrapper .ql-container {
border: none;
font-family: inherit;
font-size: 14px;
}
.chat-input-wrapper .ql-editor {
padding: 6px 0;
min-height: 24px;
max-height: 120px;
overflow-y: auto;
line-height: 1.45;
color: var(--conv-text-primary);
}
.chat-input-wrapper .ql-editor.ql-blank::before {
color: var(--conv-text-muted);
font-style: normal;
left: 0;
}
.chat-input-wrapper .ql-editor p {
margin: 0;
}
.chat-input-wrapper #quillEditor {
flex: 1;
min-width: 0;
}
.input-actions {
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
padding-bottom: 2px;
}
/* --- Message bubble: ensure content doesn't clip --- */
.message-bubble p,
.message-bubble ol,
.message-bubble ul {
margin: 0 0 4px 0;
}
.message-bubble ol,
.message-bubble ul {
padding-left: 20px;
}
.message-bubble strong {
font-weight: 700;
}
/* Links in messages */
.message-row.mine .message-bubble a {
color: #93c5fd;
text-decoration: underline;
}
.message-row.theirs .message-bubble a {
color: var(--conv-accent, #2E4872);
text-decoration: underline;
}
/* --- Unread badge in conversation list --- */
.unread-badge {
background: var(--conv-accent);
color: #fff;
font-size: 10px;
font-weight: 700;
min-width: 18px;
height: 18px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 5px;
flex-shrink: 0;
}
/* --- Avatar with photo --- */
.conv-avatar.has-photo {
background: transparent;
overflow: hidden;
}
.conv-avatar.has-photo img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
/* --- Group avatar color --- */
.conv-avatar.group,
.conv-avatar.group-icon {
background: var(--conv-avatar-teal);
color: #fff;
}
/* --- Online indicator dot --- */
.conv-avatar .online-dot {
position: absolute;
bottom: 1px;
right: 1px;
width: 12px;
height: 12px;
background: #22c55e;
border: 2px solid var(--conv-surface, #fff);
border-radius: 50%;
z-index: 1;
}
/* Position relative for dot */
.conv-avatar {
position: relative;
}
/* Online status in subtitle */
.subtitle.is-online {
color: #16a34a;
font-weight: 600;
}
.online-status-dot {
display: inline-block;
width: 8px;
height: 8px;
background: #22c55e;
border-radius: 50%;
margin-right: 4px;
vertical-align: middle;
}
/* ============================================================
* 9. MOBILE RESPONSIVE
* ============================================================ */
@media (max-width: 768px) {
.conversations-container {
height: calc(100vh - 56px);
}
/* Single-panel mode */
.conversations-panel {
width: 100%;
max-width: 100%;
min-width: 0;
border-right: none;
}
.chat-panel {
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 50;
background: var(--conv-surface);
}
/* Hide panels based on state */
.conversations-container.show-chat .conversations-panel {
display: none;
}
.conversations-container:not(.show-chat) .chat-panel {
display: none;
}
/* Back button (visible on mobile only) */
.chat-header .btn-back {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border: none;
border-radius: var(--conv-radius);
background: transparent;
color: var(--conv-text-secondary);
cursor: pointer;
margin-right: 4px;
}
/* Message bubbles — wider on mobile */
.message-bubble {
max-width: 85vw;
}
/* Context menu → bottom sheet */
.message-context-menu {
position: fixed;
bottom: 0;
left: 0;
right: 0;
top: auto;
border-radius: var(--conv-radius-lg) var(--conv-radius-lg) 0 0;
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
padding: 12px;
gap: 4px;
justify-content: center;
z-index: 200;
margin: 0;
}
.message-row.mine .message-context-menu,
.message-row.theirs .message-context-menu {
right: 0;
left: 0;
margin: 0;
}
.message-context-menu button {
width: 44px;
height: 44px;
font-size: 18px;
}
.emoji-picker {
position: fixed;
bottom: 60px;
left: 50%;
transform: translateX(-50%);
z-index: 210;
}
.emoji-picker button {
width: 44px;
height: 44px;
font-size: 22px;
}
/* Larger touch targets */
.conversation-item {
padding: 14px 16px;
}
.chat-header-actions button {
width: 40px;
height: 40px;
}
}
/* Hide back button on desktop */
@media (min-width: 769px) {
.chat-header .btn-back {
display: none;
}
}
/* ============================================================
* 10. CUSTOM SCROLLBAR
* ============================================================ */
.conversation-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
width: 6px;
}
.conversation-list::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
background: transparent;
}
.conversation-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.15);
border-radius: 3px;
}
.conversation-list::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.25);
}
/* Firefox */
.conversation-list,
.chat-messages {
scrollbar-width: thin;
scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}
/* ============================================================
* 11. ANIMATIONS
* ============================================================ */
/* Conversation item hover */
.conversation-item {
transition: background var(--conv-transition), border-color var(--conv-transition);
}
/* New message fade-in */
@keyframes message-fade-in {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.message-row.new-message {
animation: message-fade-in 0.2s ease-out;
}
/* Bottom sheet slide-up (mobile context menu) */
@keyframes slide-up {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
@media (max-width: 768px) {
.message-context-menu.visible {
animation: slide-up 0.2s ease-out;
}
}
/* ============================================================
* NEW MESSAGE MODAL
* ============================================================ */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: center;
justify-content: center;
z-index: 1100;
}
.modal-overlay .modal-content {
background: var(--conv-surface);
border-radius: var(--conv-radius-lg);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
width: 90%;
max-width: 520px;
max-height: 80vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
.modal-overlay .modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid var(--conv-border);
}
.modal-overlay .modal-header h3 {
margin: 0;
font-size: 17px;
font-weight: 600;
color: var(--conv-text-primary);
}
.modal-overlay .modal-close {
background: none;
border: none;
font-size: 22px;
color: var(--conv-text-muted);
cursor: pointer;
padding: 0 4px;
line-height: 1;
}
.modal-overlay .modal-close:hover {
color: var(--conv-text-primary);
}
.modal-overlay .modal-body {
padding: 16px 20px;
flex: 1;
overflow-y: auto;
}
.modal-overlay .recipient-input {
margin-bottom: 12px;
}
.modal-overlay .recipient-input label {
font-size: 14px;
font-weight: 500;
color: var(--conv-text-secondary);
margin-right: 8px;
}
.modal-overlay .recipient-input input[type="text"] {
width: 100%;
padding: 10px 12px;
border: 1px solid var(--conv-border);
border-radius: var(--conv-radius);
font-size: 14px;
margin-top: 6px;
outline: none;
transition: border-color 0.15s;
box-sizing: border-box;
}
.modal-overlay .recipient-input input[type="text"]:focus {
border-color: var(--conv-primary);
}
.modal-overlay .recipient-suggestions {
border: 1px solid var(--conv-border);
border-radius: var(--conv-radius);
margin-top: 4px;
max-height: 200px;
overflow-y: auto;
background: var(--conv-surface);
}
.modal-overlay .recipient-suggestions:empty {
display: none;
}
.modal-overlay .selected-recipients {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 8px;
}
.modal-overlay #newMessageEditor {
min-height: 120px;
border: 1px solid var(--conv-border);
border-radius: var(--conv-radius);
}
.modal-overlay .ql-toolbar.ql-snow {
border: none;
border-bottom: 1px solid var(--conv-border);
padding: 6px 8px;
}
.modal-overlay .ql-container.ql-snow {
border: none;
font-size: 14px;
}
.modal-overlay .modal-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
padding: 12px 20px;
border-top: 1px solid var(--conv-border);
}
.modal-overlay .modal-footer button {
padding: 8px 20px;
border-radius: var(--conv-radius);
font-size: 14px;
font-weight: 500;
cursor: pointer;
border: none;
transition: background 0.15s;
}
.modal-overlay .btn-secondary {
background: var(--conv-surface-secondary);
color: var(--conv-text-primary);
}
.modal-overlay .btn-secondary:hover {
background: var(--conv-border);
}
.modal-overlay .btn-primary {
background: var(--conv-primary);
color: #fff;
}
.modal-overlay .btn-primary:hover {
background: var(--conv-primary-hover);
}
@media (max-width: 768px) {
.modal-overlay .modal-content {
width: 95%;
max-height: 90vh;
border-radius: var(--conv-radius);
}
}