692 lines
10 KiB
CSS
692 lines
10 KiB
CSS
:root {
|
|
--bg: #f6f8f5;
|
|
--panel: #ffffff;
|
|
--soft: #edf3ee;
|
|
--line: #d8dfd8;
|
|
--text: #1c2421;
|
|
--muted: #66736d;
|
|
--green: #197653;
|
|
--green-strong: #11593e;
|
|
--green-soft: #ddefe6;
|
|
--orange: #a26016;
|
|
--danger: #a33a35;
|
|
--shadow: 0 18px 42px rgba(20, 32, 27, 0.16);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
height: 100%;
|
|
margin: 0;
|
|
}
|
|
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
}
|
|
|
|
button,
|
|
input,
|
|
textarea {
|
|
font: inherit;
|
|
}
|
|
|
|
button {
|
|
border: 0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
input,
|
|
textarea {
|
|
min-width: 0;
|
|
border: 1px solid var(--line);
|
|
border-radius: 6px;
|
|
background: #fff;
|
|
color: var(--text);
|
|
outline: none;
|
|
}
|
|
|
|
input:focus,
|
|
textarea:focus {
|
|
border-color: var(--green);
|
|
box-shadow: 0 0 0 3px var(--green-soft);
|
|
}
|
|
|
|
.shell {
|
|
display: grid;
|
|
grid-template-columns: 330px minmax(0, 1fr);
|
|
min-height: 100dvh;
|
|
}
|
|
|
|
.sidebar {
|
|
display: grid;
|
|
grid-template-rows: auto auto auto auto minmax(0, 1fr);
|
|
min-height: 100dvh;
|
|
border-right: 1px solid var(--line);
|
|
background: var(--panel);
|
|
}
|
|
|
|
.side-head,
|
|
.chat-head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.side-head {
|
|
justify-content: space-between;
|
|
padding: 16px;
|
|
}
|
|
|
|
.side-head h1,
|
|
.chat-title h2 {
|
|
margin: 0;
|
|
font-size: 18px;
|
|
letter-spacing: 0;
|
|
}
|
|
|
|
.side-head p,
|
|
.chat-title p {
|
|
margin: 2px 0 0;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.icon-btn {
|
|
display: inline-grid;
|
|
place-items: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 6px;
|
|
background: var(--soft);
|
|
color: var(--text);
|
|
}
|
|
|
|
.open-form,
|
|
.side-tools {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
gap: 8px;
|
|
padding: 12px;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.open-form input,
|
|
.side-tools input {
|
|
height: 36px;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.open-form button,
|
|
.side-tools button,
|
|
#sendButton,
|
|
.url-row button {
|
|
min-height: 36px;
|
|
border-radius: 6px;
|
|
background: var(--green);
|
|
color: #fff;
|
|
padding: 0 14px;
|
|
}
|
|
|
|
.side-tools label {
|
|
display: grid;
|
|
grid-template-columns: auto minmax(0, 1fr);
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.tabs {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 6px;
|
|
padding: 10px;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.tabs button {
|
|
height: 34px;
|
|
border-radius: 6px;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.tabs button.is-active {
|
|
background: var(--green-soft);
|
|
color: var(--green-strong);
|
|
}
|
|
|
|
.panel {
|
|
display: none;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
padding: 8px;
|
|
}
|
|
|
|
.panel.is-active {
|
|
display: block;
|
|
}
|
|
|
|
.list-item {
|
|
display: grid;
|
|
grid-template-columns: 40px minmax(0, 1fr);
|
|
gap: 10px;
|
|
width: 100%;
|
|
margin-bottom: 4px;
|
|
padding: 9px;
|
|
border-radius: 8px;
|
|
background: transparent;
|
|
color: var(--text);
|
|
text-align: left;
|
|
}
|
|
|
|
.list-item:hover,
|
|
.list-item.is-active {
|
|
background: var(--soft);
|
|
}
|
|
|
|
.avatar {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 40px;
|
|
height: 40px;
|
|
overflow: hidden;
|
|
border-radius: 8px;
|
|
background: var(--green-soft);
|
|
color: var(--green-strong);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.avatar img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.item-body {
|
|
min-width: 0;
|
|
}
|
|
|
|
.item-top {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.item-name,
|
|
.item-preview,
|
|
.item-meta,
|
|
.chat-title h2,
|
|
.chat-title p {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.item-name {
|
|
min-width: 0;
|
|
font-weight: 650;
|
|
}
|
|
|
|
.item-preview,
|
|
.item-meta,
|
|
.item-time {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.item-time {
|
|
margin-left: auto;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.presence {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: #aeb8b2;
|
|
}
|
|
|
|
.presence.is-online {
|
|
background: var(--green);
|
|
}
|
|
|
|
.chat {
|
|
display: grid;
|
|
grid-template-rows: 64px minmax(0, 1fr) auto;
|
|
min-height: 100dvh;
|
|
min-width: 0;
|
|
}
|
|
|
|
.chat-head {
|
|
padding: 0 18px;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
backdrop-filter: blur(12px);
|
|
}
|
|
|
|
.menu-btn {
|
|
display: none;
|
|
}
|
|
|
|
.chat-title {
|
|
min-width: 0;
|
|
}
|
|
|
|
.feedback {
|
|
margin-left: auto;
|
|
color: var(--muted);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.messages {
|
|
min-height: 0;
|
|
overflow: auto;
|
|
padding: 18px 22px 24px;
|
|
}
|
|
|
|
.empty {
|
|
padding: 18px;
|
|
color: var(--muted);
|
|
text-align: center;
|
|
}
|
|
|
|
.separator {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin: 18px 0;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.separator::before,
|
|
.separator::after {
|
|
content: "";
|
|
flex: 1;
|
|
height: 1px;
|
|
background: var(--line);
|
|
}
|
|
|
|
.msg-row {
|
|
display: grid;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.msg-row.is-self {
|
|
justify-items: end;
|
|
}
|
|
|
|
.bubble {
|
|
max-width: min(720px, 78%);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
background: var(--panel);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.msg-row.is-self .bubble {
|
|
border-color: #c4ddce;
|
|
background: #effaf4;
|
|
}
|
|
|
|
.bubble.is-visual {
|
|
max-width: min(480px, 86%);
|
|
}
|
|
|
|
.meta {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 8px 10px 0;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.content {
|
|
padding: 8px 10px 10px;
|
|
white-space: pre-wrap;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.content a {
|
|
color: var(--green-strong);
|
|
}
|
|
|
|
.emoticon {
|
|
width: 28px;
|
|
height: 28px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.sticker {
|
|
width: 128px;
|
|
height: 128px;
|
|
object-fit: contain;
|
|
cursor: zoom-in;
|
|
}
|
|
|
|
.image-shell {
|
|
min-width: 220px;
|
|
padding: 28px 18px;
|
|
border-radius: 6px;
|
|
background: var(--soft);
|
|
color: var(--muted);
|
|
text-align: center;
|
|
}
|
|
|
|
.message-image {
|
|
display: block;
|
|
max-width: min(420px, 100%);
|
|
border-radius: 6px;
|
|
cursor: zoom-in;
|
|
}
|
|
|
|
.og-card {
|
|
display: grid;
|
|
grid-template-columns: 90px minmax(0, 1fr);
|
|
gap: 10px;
|
|
margin-top: 8px;
|
|
padding: 8px;
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
background: #fff;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.og-card strong,
|
|
.og-card span {
|
|
display: block;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.og-card span {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.composer {
|
|
position: relative;
|
|
border-top: 1px solid var(--line);
|
|
background: rgba(255, 255, 255, 0.96);
|
|
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
|
}
|
|
|
|
.compose-row {
|
|
display: grid;
|
|
grid-template-columns: auto auto minmax(0, 1fr) auto;
|
|
gap: 8px;
|
|
align-items: end;
|
|
}
|
|
|
|
textarea {
|
|
width: 100%;
|
|
min-height: 38px;
|
|
max-height: 160px;
|
|
resize: none;
|
|
padding: 9px 10px;
|
|
}
|
|
|
|
.url-row {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.url-row input {
|
|
height: 36px;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.upload-tray {
|
|
display: grid;
|
|
gap: 6px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.upload-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
border-radius: 6px;
|
|
background: var(--soft);
|
|
padding: 7px 9px;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.picker,
|
|
.autocomplete {
|
|
position: absolute;
|
|
z-index: 8;
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
background: var(--panel);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.picker {
|
|
left: 16px;
|
|
bottom: calc(100% - 6px);
|
|
width: min(480px, calc(100vw - 32px));
|
|
overflow: hidden;
|
|
}
|
|
|
|
.picker-head {
|
|
display: grid;
|
|
grid-template-columns: auto auto minmax(0, 1fr);
|
|
gap: 6px;
|
|
padding: 8px;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.picker-head button,
|
|
.picker-grid button,
|
|
.autocomplete button {
|
|
border-radius: 6px;
|
|
background: var(--soft);
|
|
color: var(--text);
|
|
}
|
|
|
|
.picker-head button {
|
|
padding: 7px 10px;
|
|
}
|
|
|
|
.picker-head button.is-active {
|
|
background: var(--green-soft);
|
|
color: var(--green-strong);
|
|
}
|
|
|
|
.picker-head input {
|
|
padding: 0 9px;
|
|
}
|
|
|
|
.picker-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
|
|
gap: 6px;
|
|
max-height: 280px;
|
|
overflow: auto;
|
|
padding: 8px;
|
|
}
|
|
|
|
.picker-grid button {
|
|
display: grid;
|
|
justify-items: center;
|
|
gap: 4px;
|
|
min-width: 0;
|
|
padding: 8px;
|
|
}
|
|
|
|
.picker-grid img {
|
|
width: 34px;
|
|
height: 34px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.picker-grid span {
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.autocomplete {
|
|
left: 104px;
|
|
bottom: calc(100% + 8px);
|
|
width: 240px;
|
|
max-height: 220px;
|
|
overflow: auto;
|
|
}
|
|
|
|
.autocomplete button {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
width: 100%;
|
|
padding: 8px 10px;
|
|
background: transparent;
|
|
text-align: left;
|
|
}
|
|
|
|
.autocomplete button.is-active,
|
|
.autocomplete button:hover {
|
|
background: var(--soft);
|
|
}
|
|
|
|
.drop-overlay {
|
|
position: fixed;
|
|
inset: 18px;
|
|
display: none;
|
|
place-items: center;
|
|
z-index: 30;
|
|
border: 2px dashed var(--green);
|
|
border-radius: 8px;
|
|
background: rgba(246, 248, 245, 0.9);
|
|
color: var(--green-strong);
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.drop-overlay.is-visible {
|
|
display: grid;
|
|
}
|
|
|
|
.lightbox {
|
|
position: fixed;
|
|
inset: 0;
|
|
display: grid;
|
|
place-items: center;
|
|
z-index: 40;
|
|
background: rgba(12, 18, 15, 0.88);
|
|
}
|
|
|
|
.lightbox[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
.lightbox img {
|
|
max-width: 92vw;
|
|
max-height: 88vh;
|
|
transform-origin: center;
|
|
cursor: grab;
|
|
user-select: none;
|
|
}
|
|
|
|
.lightbox-close,
|
|
.lightbox-tools {
|
|
position: fixed;
|
|
}
|
|
|
|
.lightbox-close {
|
|
top: 18px;
|
|
right: 18px;
|
|
background: rgba(255, 255, 255, 0.18);
|
|
color: #fff;
|
|
}
|
|
|
|
.lightbox-tools {
|
|
right: 18px;
|
|
bottom: 24px;
|
|
display: flex;
|
|
gap: 6px;
|
|
}
|
|
|
|
.lightbox-tools button {
|
|
height: 34px;
|
|
border-radius: 6px;
|
|
background: rgba(255, 255, 255, 0.18);
|
|
color: #fff;
|
|
padding: 0 12px;
|
|
}
|
|
|
|
.backdrop {
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.shell {
|
|
display: block;
|
|
}
|
|
|
|
.sidebar {
|
|
position: fixed;
|
|
inset: 0 auto 0 0;
|
|
width: min(88vw, 340px);
|
|
z-index: 20;
|
|
transform: translateX(-102%);
|
|
transition: transform 160ms ease;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
body.sidebar-open .sidebar {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 19;
|
|
background: rgba(13, 19, 16, 0.32);
|
|
}
|
|
|
|
body.sidebar-open .backdrop {
|
|
display: block;
|
|
}
|
|
|
|
.menu-btn {
|
|
display: inline-grid;
|
|
}
|
|
|
|
.chat-head {
|
|
padding: 0 12px;
|
|
}
|
|
|
|
.messages {
|
|
padding: 14px 12px 18px;
|
|
}
|
|
|
|
.bubble {
|
|
max-width: 92%;
|
|
}
|
|
|
|
.composer {
|
|
padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
|
|
}
|
|
|
|
textarea {
|
|
max-height: 108px;
|
|
}
|
|
|
|
.url-row {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|