267 lines
5.9 KiB
CSS
267 lines
5.9 KiB
CSS
.date-separator {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 12px 0 8px;
|
|
}
|
|
|
|
.date-separator span {
|
|
background: rgba(0,0,0,0.06);
|
|
padding: 4px 12px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.message-wrapper {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
padding: 1px 0;
|
|
position: relative;
|
|
}
|
|
|
|
.message-wrapper.own { flex-direction: row-reverse; }
|
|
.message-wrapper.grouped { margin-top: 1px; }
|
|
.message-wrapper:not(.grouped) { margin-top: 8px; }
|
|
|
|
.msg-avatar { flex-shrink: 0; }
|
|
|
|
.message-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-width: 65%;
|
|
min-width: 0;
|
|
}
|
|
|
|
.own .message-body { align-items: flex-end; }
|
|
|
|
.msg-name {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 3px;
|
|
padding: 0 12px;
|
|
}
|
|
|
|
/* Reply preview */
|
|
.reply-preview {
|
|
display: flex;
|
|
gap: 8px;
|
|
background: rgba(0,0,0,0.05);
|
|
border-radius: 8px 8px 0 0;
|
|
padding: 6px 10px;
|
|
margin-bottom: -4px;
|
|
max-width: 280px;
|
|
}
|
|
|
|
.reply-bar { width: 3px; background: var(--primary); border-radius: 2px; flex-shrink: 0; }
|
|
|
|
.reply-name { font-size: 11px; font-weight: 600; color: var(--primary); }
|
|
.reply-text { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
|
|
|
|
/* Bubble row */
|
|
.msg-bubble-wrap {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 6px;
|
|
}
|
|
|
|
.own .msg-bubble-wrap { flex-direction: row-reverse; }
|
|
|
|
/* Wrapper that holds the actions toolbar + bubble together */
|
|
.msg-bubble-with-actions {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Actions toolbar — floats above the bubble */
|
|
.msg-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 4px 6px;
|
|
box-shadow: var(--shadow-md);
|
|
position: absolute;
|
|
top: -36px;
|
|
z-index: 20;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Own messages: toolbar anchors to the right edge of bubble */
|
|
.msg-actions.actions-left { right: 0; }
|
|
/* Other messages: toolbar anchors to the left edge of bubble */
|
|
.msg-actions.actions-right { left: 0; }
|
|
|
|
.quick-emoji {
|
|
font-size: 16px;
|
|
padding: 4px;
|
|
border-radius: 50%;
|
|
transition: var(--transition);
|
|
cursor: pointer;
|
|
line-height: 1;
|
|
}
|
|
.quick-emoji:hover { background: var(--background); transform: scale(1.2); }
|
|
|
|
.action-btn {
|
|
width: 28px;
|
|
height: 28px;
|
|
color: var(--text-secondary);
|
|
}
|
|
.action-btn:hover { color: var(--text-primary); }
|
|
.action-btn.danger:hover { color: var(--error); }
|
|
|
|
/* Emoji picker — anchored relative to the toolbar */
|
|
.emoji-picker-wrap {
|
|
position: absolute;
|
|
top: -360px; /* above the toolbar by default */
|
|
z-index: 100;
|
|
}
|
|
.emoji-picker-wrap.picker-right { left: 0; }
|
|
.emoji-picker-wrap.picker-left { right: 0; }
|
|
/* When message is near top of window, open picker downward instead */
|
|
.emoji-picker-wrap.picker-down {
|
|
top: 36px;
|
|
}
|
|
|
|
/* Bubble */
|
|
.msg-bubble {
|
|
padding: 8px 12px;
|
|
border-radius: 18px;
|
|
max-width: 100%;
|
|
word-break: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.msg-bubble.out {
|
|
background: var(--primary);
|
|
color: white;
|
|
border-bottom-right-radius: 4px;
|
|
}
|
|
|
|
.msg-bubble.in {
|
|
background: white;
|
|
color: var(--text-primary);
|
|
border-bottom-left-radius: 4px;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.msg-bubble.deleted {
|
|
background: transparent !important;
|
|
border: 1px dashed var(--border);
|
|
}
|
|
|
|
.deleted-text { font-size: 13px; color: var(--text-tertiary); font-style: italic; }
|
|
|
|
.msg-text {
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.mention {
|
|
color: #1a5ca8;
|
|
font-weight: 600;
|
|
background: rgba(26,92,168,0.1);
|
|
border-radius: 3px;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
.out .mention { color: #afd0ff; background: rgba(255,255,255,0.15); }
|
|
|
|
.msg-image {
|
|
max-width: 240px;
|
|
max-height: 240px;
|
|
border-radius: 12px;
|
|
display: block;
|
|
cursor: pointer;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.msg-time {
|
|
font-size: 11px;
|
|
color: var(--text-tertiary);
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
padding-bottom: 4px;
|
|
}
|
|
|
|
/* Reactions */
|
|
.reactions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
margin-top: 4px;
|
|
padding: 0 4px;
|
|
}
|
|
|
|
.reaction-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
padding: 3px 8px;
|
|
border-radius: 12px;
|
|
background: white;
|
|
border: 1px solid var(--border);
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
transition: var(--transition);
|
|
}
|
|
.reaction-count { font-size: 12px; color: var(--text-secondary); }
|
|
.reaction-btn.active { background: var(--primary-light); border-color: var(--primary); }
|
|
.reaction-btn.active .reaction-count { color: var(--primary); }
|
|
.reaction-btn:hover { background: var(--primary-light); }
|
|
.reaction-remove {
|
|
font-size: 13px;
|
|
color: var(--primary);
|
|
font-weight: 700;
|
|
margin-left: 1px;
|
|
line-height: 1;
|
|
opacity: 0;
|
|
transition: opacity 0.15s;
|
|
}
|
|
.reaction-btn:hover .reaction-remove { opacity: 1; }
|
|
|
|
/* Link preview */
|
|
.link-preview {
|
|
display: flex;
|
|
gap: 10px;
|
|
background: rgba(0,0,0,0.06);
|
|
border-radius: 10px;
|
|
padding: 10px;
|
|
margin-top: 6px;
|
|
text-decoration: none;
|
|
max-width: 280px;
|
|
overflow: hidden;
|
|
transition: var(--transition);
|
|
}
|
|
.link-preview:hover { background: rgba(0,0,0,0.1); }
|
|
|
|
.link-preview-img {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 6px;
|
|
object-fit: cover;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.link-preview-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.link-site { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }
|
|
.link-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
.link-desc { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
|
|
.out .link-preview { background: rgba(255,255,255,0.15); }
|
|
.out .link-title { color: white; }
|
|
.out .link-desc { color: rgba(255,255,255,0.8); }
|