Files
sendou.ink/app/features/chat/components/Chat.module.css
2026-09-17 17:34:36 +03:00

183 lines
3.0 KiB
CSS

.container {
display: flex;
flex-direction: column;
}
.messages {
padding: var(--s-3) 0 0 0;
display: block;
height: 310px;
overflow-x: hidden;
overflow-y: auto;
}
.message {
list-style: none;
display: flex;
gap: var(--s-3);
&:focus-visible {
outline: none;
}
}
.messageInfo {
display: flex;
flex-direction: row;
gap: 0 var(--s-1-5);
align-items: center;
flex-wrap: wrap;
}
.avatarWrapper {
position: relative;
flex-shrink: 0;
}
.avatarWrapperStaff {
& img {
border: var(--border-style-accent);
border-radius: var(--radius-avatar);
}
}
.avatarBadge {
position: absolute;
top: 28px;
left: 50%;
transform: translateX(-50%);
background-color: var(--color-text-accent);
color: var(--color-text-inverse);
font-size: var(--font-2xs);
font-weight: var(--weight-bold);
padding: 1px 4px;
border-radius: var(--radius-full);
white-space: nowrap;
}
.pronounsTag {
background-color: var(--color-bg-higher);
color: var(--color-text-accent);
font-size: var(--font-2xs);
font-weight: var(--weight-semi);
padding: 1px 5px;
border-radius: var(--radius-full);
white-space: nowrap;
}
.messageUser {
font-weight: var(--weight-semi);
font-size: var(--font-sm);
color: oklch(from var(--color-text-accent) l c var(--chat-hue));
max-width: 110px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.messageTime {
font-size: var(--font-2xs);
color: var(--color-text-high);
}
.inputContainer {
margin-top: auto;
position: relative;
}
.sendButton.sendButton {
border-radius: var(--radius-full);
background-color: var(--color-text-accent);
color: var(--color-text-inverse);
flex-shrink: 0;
&:disabled {
opacity: 0.4;
}
}
.messageContents {
font-size: var(--font-sm);
word-break: break-word;
}
.messageContentsPending {
opacity: 0.7;
}
.roomLinkBlock {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: var(--s-1);
margin-block: var(--s-1);
}
.roomQrCode {
background-color: white;
padding: var(--s-2);
border-radius: var(--radius-field);
}
.roomLink {
color: var(--color-text-accent);
text-decoration: underline;
word-break: break-all;
}
.composer {
display: flex;
flex-direction: column;
gap: var(--s-1);
padding: var(--s-2);
border-top: 1.5px solid var(--color-border);
}
.composerRow {
display: flex;
align-items: center;
gap: var(--s-1);
/* an empty composer is a no-op, so its "required" error is only noise */
& [id$="-error"] {
display: none;
}
/* the contents field wrapper takes the row's free space */
& > div:first-child {
flex: 1;
min-width: 0;
}
}
.unseenMessages {
position: absolute;
font-size: var(--font-2xs);
font-weight: var(--weight-bold);
--button-bg: var(--color-bg-higher);
border-radius: var(--radius-field);
border: none;
color: var(--color-text);
bottom: 60px;
right: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: 25px;
width: max-content;
&:active {
transform: translate(-50%, -50%);
}
}
.messagesSizer {
position: relative;
}
.messageRow {
position: absolute;
top: 0;
left: 0;
right: 0;
}