.chat {
font-size: .875rem;
container-type: inline-size;
container-name: chat;
--actions-wrapper-full-width: 11.75rem;
--actions-wrapper-shrunk-width: 2rem;
}
/* Enable user-select for text content of the chat-message */
.chat-message-actions {
user-select: none !important;
}
.chat-message__row {
user-select: text;
}
.chat-message__row * {
user-select: inherit;
}
.chat-message>*:not(.chat-message__text) {
user-select: none !important;
}
.chat-message__text {
user-select: text !important;
overflow: hidden;
}
.chat-bg {
position: absolute;
width: 100%;
height: 100%;
background: linear-gradient(0deg, #4AA6FF, #00FFCF);
mask-image: url(../images/chat-bg.svg);
mask-repeat: repeat;
mask-size: 32rem;
}
.chat-message__row {
display: flex;
position: relative;
padding: 0 1rem;
margin-bottom: 0.5rem;
transition: background-color 0.2s ease-in-out, opacity 1.5s ease-out;
}
.chat-message__row-highlighted {
background-color: rgba(6, 127, 160, 0.3);
}
.chat-message__avatar {
position: absolute;
top: 0;
left: -2.5rem
}
.chat-message {
position: relative;
display: flex;
flex-direction: column;
background: var(--color-grey-800);
border-radius: 0 1rem 1rem 1rem;
padding: .5rem;
width: fit-content;
margin: 0 0 0 2.375rem;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.chat-message__pinned-status-text {
display: inline;
}
.chat-pinned-message__text {
text-overflow: ellipsis;
overflow: hidden;
text-wrap: nowrap;
width: -webkit-fill-available;
width: fill-available;
white-space: normal;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.chat-pinned-message__text-deprecated > * {
text-overflow: ellipsis;
overflow: hidden;
text-wrap: nowrap;
width: -webkit-fill-available;
width: fill-available;
white-space: normal;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.chat-message__actions-wrapper {
min-width: var(--actions-wrapper-full-width);
height: 2rem;
margin: 0 0 0 .5rem;
}
.chat-message-actions>div:hover {
background: var(--color-grey-450);
}
.chat-message-actions button:focus {
outline: none;
}
.chat-message-menu {
display: none;
}
.chat-message:hover .chat-message-menu,
.chat-event__row:hover .chat-message-actions {
display: flex;
visibility: visible;
}
.chat-system-message__row {
display: flex;
justify-content: center;
position: relative;
margin: 0 1rem;
margin-bottom: 0.5rem;
}
.chat-system-message__row:hover .chat-message-actions {
display: flex;
visibility: visible;
}
.chat-message__body {
width: fit-content;
display: flex;
flex-wrap: wrap;
column-gap: 8px;
flex-direction: column;
align-items: flex-start;
}
.chat-message__head {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding-bottom: .25rem;
font-size: .875rem;
}
.chat-message__head-icon svg {
width: 1rem;
max-height: 1.5rem;
}
.chat-message__text {
width: fit-content;
}
.chat-message__text * {
user-select: text !important;
-webkit-user-select: text !important;
}
.chat-message__text>p:last-child {
margin-bottom: 0;
}
.chat-message__text-focused .msg-gapcursor {
display: block;
}
/* actions */
.chat-message-actions {
background: var(--color-grey-600);
border-radius: 1rem;
position: absolute;
bottom: 0;
overflow: hidden;
}
/* reactions */
.chat-message-reactions {
width: fit-content;
gap: .25rem;
}
.chat-message-reaction {
padding: .25rem .5rem;
background: var(--color-grey-600);
border-radius: .75rem;
cursor: pointer;
display: flex;
align-items: center;
}
.chat-message-reaction:hover,
.chat-message-reaction__my {
background: var(--color-indigo-700);
}
.chat-message__row-my .chat-message-reaction {
background: var(--color-blue-950);
}
.chat-message__row-my .chat-message-reaction:hover,
.chat-message__row-my .chat-message-reaction__my,
.chat-message-reaction:hover,
.chat-message-reaction__my {
background: var(--color-indigo-700);
}
/* my message */
.chat-message__row-my {
display: flex;
flex-direction: row-reverse;
}
.chat-message__row-my .chat-message__avatar {
left: unset;
right: -2.5rem;
}
.chat-message__row-my .chat-message__actions-wrapper {
display: flex;
align-items: flex-end;
justify-content: flex-end;
margin: 0 .5rem 0 1rem;
}
.chat-message__row-my .chat-message {
background: linear-gradient(135deg, #003329 0%, #0E2133 100%);
border-radius: 1rem 1rem 0 1rem;
margin: 0;
}
/* chat joined message */
.chat-system-message {
position: relative;
display: flex;
flex-direction: column;
background: var(--color-grey-900);
width: 100%;
}
.chat-joined-message {
position: relative;
display: flex;
flex-direction: column;
background: var(--color-grey-900);
padding: .5rem;
max-width: 80%;
border-radius: 1rem;
padding: .5rem;
}
.chat-joined-message__layout {
display: flex;
align-items: center;
width: 100%;
}
.chat-joined-message__actions-wrapper {
position: absolute;
min-width: var(--actions-wrapper-full-width);
height: 2rem;
top: 0.5rem;
right: calc(-0.5rem - var(--actions-wrapper-full-width));
}
.chat-joined-message__actions-wrapper>.chat-message-actions {
background: var(--color-grey-900);
}
/* time message */
.chat-time-message {
display: flex;
align-items: center;
justify-content: center;
margin: 1rem 0 .5rem;
}
.chat-time-message>div {
padding: .375rem 0.5rem;
font-weight: 400;
line-height: 135%;
font-size: .875rem;
color: var(--color-grey-200);
background: var(--color-grey-900);
border-radius: .5rem;
}
/* editing message */
.chat-message-row__editing .chat-message {
width: 100%;
}
.chat-message-row__editing .chat-message__body {
width: 100%;
padding: 0;
}
.chat-message-row__editing .chat-message-editor {
width: 100%;
border-radius: 1rem 1rem 0 1rem;
}
.chat-message-row__editing .chat-message-editor>div {
border-radius: 1rem 1rem 0 1rem;
}
.chat-unread--bottom-line {
border-bottom: 1px solid var(--color-grey-600);
transition: border-bottom 0s 2s;
position: absolute;
bottom: 0.25rem;
left: 0;
right: 0;
}
@container chat (width < 65rem) {
.chat-joined-message {
max-width: 60%;
}
}
@container chat (width < 50rem) {
.chat-message__actions-wrapper {
min-width: 4rem;
}
.chat-message-actions>div {
display: none;
}
.chat-message-actions>div:nth-child(5),
.chat-message-actions>div:nth-child(6) {
display: block;
}
.chat-joined-message__actions-wrapper {
min-width: var(--actions-wrapper-shrunk-width);
right: calc(0px - var(--actions-wrapper-shrunk-width));
}
.chat-joined-message {
max-width: 85%;
}
}
@container chat (width < 25rem) {
.chat-joined-message__actions-wrapper {
right: calc(0px - var(--actions-wrapper-shrunk-width) / 2);
}
.chat-event-message__other-member-name {
max-width: 65%;
}
.chat-message__pinned-status-text {
display: none;
}
}
/* chat input */
.ProseMirror {
border: transparent;
background: transparent;
border-radius: 0;
max-height: 300px;
min-height: 46px;
padding-left: 1rem;
padding-right: 1rem;
padding-top: 0.75rem;
padding-bottom: 0.75rem;
overflow-y: auto;
}
.chat-message__text>p:not(:last-child),
.chat-message__text>blockquote:not(:last-child),
.ProseMirror>p:not(:last-child),
.ProseMirror>blockquote:not(:last-child) {
margin-bottom: .5rem;
}
.ProseMirror>.node-link-preview:has(.link-preview-wrapper:empty) {
display: none !important;
}
.ProseMirror>:has(+ .node-link-preview) {
margin-bottom: 0 !important;
}
.ProseMirror:focus {
outline: none;
}
/* Placeholder (only at the top) */
.ProseMirror p.is-editor-empty:first-child::before {
content: attr(data-placeholder);
float: left;
color: #ffffff;
pointer-events: none;
height: 0;
opacity: 50%;
}
.ProseMirror .emoji {
font-size: 1.25rem;
vertical-align: middle;
line-height: 2px;
user-select: text;
}
.ProseMirror .renderer {
display: inline-block;
}
.ProseMirror a,
.chat-message__text a {
color: var(--color-blue-400);
text-decoration: underline;
padding: 0.5em 0;
/* line-height: 1.36rem; */
}
.ProseMirror em,
.chat-message__text em {
font-style: italic;
}
.ProseMirror img,
.chat-message__text img {
cursor: default;
}
.ProseMirror li,
.chat-message__text li {
position: relative;
padding-left: 3px;
}
.ProseMirror li p,
.chat-message__text li p {
margin-bottom: 0.5em;
}
.ProseMirror ul,
.ProseMirror ol,
.chat-message__text ul,
.chat-message__text ol {
padding-left: 10px;
margin-left: 10px;
/* margin-bottom: 1em; */
}
.ProseMirror ul li,
.chat-message__text ul li {
list-style-type: disc;
}
.ProseMirror ul>li>ul>li,
.chat-message__text ul>li>ul>li {
list-style-type: circle;
}
.ProseMirror ul>li>ul>li ul li,
.chat-message__text ul>li>ul>li ul li {
list-style-type: square;
}
.ProseMirror ol,
.chat-message__text ol {
list-style: none;
counter-reset: li
}
.ProseMirror ol>li::before,
.chat-message__text ol>li::before {
content: counter(li) '. ';
display: inline-block;
width: 2em;
margin-left: -1.5em;
position: absolute;
}
.ProseMirror ol>li,
.chat-message__text ol>li {
counter-increment: li;
}
.ProseMirror blockquote,
.chat-message__text blockquote,
.reply-container blockquote {
margin-left: 0;
margin-right: 0;
padding-left: 1em;
padding: .575em;
border-left: 4px solid #9887FF;
color: var(--color-text-maxcontrast);
background-color: #28253E;
}
.chat-message__text blockquote:not(:only-child) {
margin-bottom: 0.5rem;
}
.ProseMirror p,
.chat-message__text p {
line-height: 1.375rem;
}
.chat-pinned-messages {
container-type: inline-size;
container-name: chat-pinned-messages;
}
.chat-pinned-messages__preview {
padding-left: 1rem;
padding-right: 1rem;
}
.chat-pinned-messages__list-wrapper {
padding: 0.5rem 1.5rem;
}
.chat-pinned-message__member-name {
max-width: 80%;
}
@container chat-pinned-messages (width < 45rem) {
.chat-pinned-messages__preview {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
.chat-pinned-messages__list-wrapper {
padding: 0.5rem 0.5rem;
}
.chat-pinned-message__unpin-title {
display: none;
}
.chat-pinned-message__member-name {
max-width: 70%;
}
.chat-joined-message {
max-width: 70%;
}
}
.chat__pin-container {
height: 26px;
}
.chat__pinned-item {
&:hover {
.chat__unpin-button {
display: block;
}
.chat__pin-placholder {
display: none;
}
}
}
.chat-pinned-icon-primary {
fill: var(--color-blue-200);
}
.chat-pinned-icon-grey {
fill: var(--color-grey-200);
}