Files
2026-07-13 12:30:20 +08:00

607 lines
12 KiB
CSS

#chat {
flex: 1;
overflow-y: auto;
padding: 24px;
display: flex;
flex-direction: column;
position: relative;
}
#chat-container {
display: flex;
flex-direction: column;
height: 100%;
background: var(--col-bg);
}
#chat-container.modal {
position: fixed;
bottom: 20px;
right: 20px;
width: 500px !important;
max-height: 500px !important;
height: auto !important;
min-height: 310px;
border: 1px solid var(--col-border);
padding-top: 35px;
border-radius: 15px;
z-index: 10;
}
#chat::before {
content: '';
flex-grow: 1;
}
.message {
background: var(--col-bg-alt);
padding: 4px 8px 4px 36px;
position: relative;
animation: slideIn 0.3s ease-out;
cursor: pointer;
transition: background-color 0.2s;
width: min(720px, 100%);
margin-left: auto;
margin-right: auto;
box-sizing: border-box;
}
.complete-btn {
position: absolute;
left: 5px;
top: 5px;
bottom: 5px;
width: 30px;
padding: 0;
border: none;
background: transparent;
color: var(--col-tx-alt);
opacity: 0.35;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.complete-btn svg {
width: 20px;
height: 20px;
}
.complete-btn svg path {
stroke-width: 3;
}
.complete-btn:hover,
.message.completed .complete-btn:hover {
opacity: 1;
color: var(--color-neo-orange);
}
.message.completed .message-content {
text-decoration: line-through;
text-decoration-thickness: 2px;
opacity: 0.5;
}
.message.completed .complete-btn {
opacity: 1;
color: var(--color-neo-orange);
}
.message.completed .complete-btn svg path {
stroke-width: 4;
}
.message:first-child {
border-radius: 6px 6px 0 0;
}
.message:last-child {
border-radius: 0 0 6px 6px;
}
.message:only-child {
border-radius: 6px;
}
.message:hover:not(:has(.complete-btn:hover)) {
background: var(--col-bg-active);
z-index: 1;
}
.message:hover:not(:has(.complete-btn:hover)) .message-content {
background: var(--color-neo-orange) !important;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.message-content {
/*white-space: pre-wrap;*/
/*line-height: 1.5;*/
/*!*margin-bottom: 6px;*!*/
/*cursor: text;*/
/*padding: 4px;*/
/*border-radius: 4px;*/
/*transition: background 0.2s;*/
/*white-space: pre-wrap;*/
line-height: 1.5;
cursor: text;
padding: 4px;
border-radius: 4px;
transition: background 0.2s;
font-size: 15px;
color: var(--col-tx);
/*margin-bottom: 4px;*/
/*word-wrap: break-word;*/
}
.message-content:hover {
background: rgba(255, 255, 255, 0.05);
}
.message-content.editing {
background: rgba(99, 102, 241, 0.1);
border: 1px solid var(--col-bg);
outline: none;
}
.message-content[contenteditable]:focus {
outline: none;
}
.message-footer {
display: flex;
justify-content: space-between;
align-items: center;
/*margin-top: 12px;*/
position: relative;
}
.message-actions {
padding: 3px;
border-radius: 5px 5px 0 5px;
display: flex;
gap: 3px;
opacity: 0;
transition: opacity 0.2s;
position: absolute;
z-index: 1;
left: 50%;
transform: translateX(-50%);
bottom: -4px;
}
.message:hover:not(:has(.complete-btn:hover)) .message-actions,
.message.actions-pinned .message-actions,
.message.actions-shown .message-actions {
opacity: 1;
transition-delay: 0.17s;
}
.message-time {
position: absolute;
right: 8px;
bottom: 4px;
font-size: 12px;
color: #8e8e93;
font-weight: 400;
opacity: 0;
transition: opacity 0.2s;
pointer-events: none;
}
.message:hover .message-time {
opacity: 1;
}
.action-btn {
background: var(--col-bg);
padding: 8px;
border-radius: 6px;
cursor: pointer;
font-size: 12px;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
position: relative;
width: 32px;
height: 32px;
border: 1px solid var(--col-border);
white-space: nowrap;
}
.action-btn svg {
stroke: var(--col-link);
}
.btn-wrapper {
/*display: block;*/
/*width: auto;*/
/*max-width: 300px;*/
}
.to-recent-btn {
width: auto;
/*max-width: 300px;*/
display: block;
}
#chat-container.modal .to-recent-btn {
max-width: 50px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: left;
display: block;
position: relative;
}
#chat-container.modal .to-recent-btn {
max-width: 50px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: left;
display: block;
position: relative;
}
#chat-container.modal .to-recent-btn:hover {
overflow: visible;
}
.btn-wrapper {
position: relative;
display: inline-block;
}
#chat-container.modal .btn-wrapper .to-recent-btn {
max-width: 50px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: left;
display: block;
}
/*.btn-wrapper .btn-label {*/
/* position: absolute;*/
/* bottom: 100%;*/
/* left: 50%;*/
/* transform: translateX(-50%);*/
/* background: var(--color-bg);*/
/* padding: 4px 8px;*/
/* border-radius: 4px;*/
/* font-size: 11px;*/
/* white-space: nowrap;*/
/* opacity: 0;*/
/* transition: opacity 0.2s;*/
/* margin-bottom: 8px;*/
/* z-index: 1000;*/
/* border: 1px solid var(--color-border);*/
/* color: var(--color-tx);*/
/*}*/
.action-btn:hover {
background: var(--col-bg-active);
}
.btn-label {
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
margin-bottom: 6px;
padding: 5px 11px;
background: var(--col-accent);
border: none;
border-radius: 4px;
color: var(--col-bg);
font-size: 12px;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.15s;
z-index: 10;
}
/* Small downward triangle pointing at the button — matches the label
background so it reads as part of the same shape. */
.btn-label::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 0;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid var(--col-accent);
}
.btn-wrapper:hover .btn-label {
opacity: 1;
transition-delay: 0.25s;
}
.empty-state {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
.empty-icon {
width: 96px;
height: 96px;
}
.empty-title {
font-size: 26px;
font-weight: 500;
margin-bottom: 20px;
}
#chat-input-wrap {
width: min(720px, calc(100% - 48px));
margin: 0 auto 24px auto;
}
/* Empty chat: the composer sits right below the logo block, the whole
group vertically centered. With messages it docks back to the bottom. */
#chat-container:not(.modal):has(.empty-state) {
justify-content: center;
}
#chat-container:not(.modal):has(.empty-state) #chat {
flex: 0 0 auto;
}
#chat-container:not(.modal):has(.empty-state) .empty-state {
position: static;
}
#chat-container:not(.modal):has(.empty-state) #chat-input-wrap {
margin-top: 16px;
}
#chat-input {
background: var(--col-bg-alt);
border: 1px solid color-mix(in srgb, var(--col-tx), transparent 96%);
border-radius: 25px !important;
padding: 14px 64px 14px 22px;
font-size: 16px;
resize: none;
min-height: 42px;
max-height: 250px;
width: 100%;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.4;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
#chat-input:focus {
outline: none;
border-color: color-mix(in srgb, var(--col-tx), transparent 92%);
}
#send-chat {
position: absolute;
right: 14px;
top: 50%;
transform: translateY(-50%);
width: 32px;
height: 32px;
padding: 0;
background: var(--color-neo-orange);
color: var(--col-bg);
border: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.15s, opacity 0.15s;
animation: chat-btn-pop 0.18s ease-out;
}
#send-chat:hover {
background: color-mix(in srgb, var(--color-neo-orange), #000 12%);
}
#send-chat svg {
width: 18px;
height: 18px;
}
#mic-chat {
position: absolute;
right: 14px;
top: 50%;
transform: translateY(-50%);
width: 32px;
height: 32px;
padding: 0;
background: transparent;
color: var(--col-tx-alt);
border: none;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.15s, color 0.15s;
animation: chat-btn-pop 0.18s ease-out;
}
@keyframes chat-btn-pop {
0% { transform: translateY(-50%) scale(0.3); opacity: 0; }
70% { transform: translateY(-50%) scale(1.1); opacity: 1; }
100% { transform: translateY(-50%) scale(1); }
}
#mic-chat:hover {
background: color-mix(in srgb, var(--color-neo-orange), transparent 80%);
color: var(--color-neo-orange);
}
#mic-chat.recording {
background: var(--color-neo-orange);
color: var(--col-bg);
animation: mic-pulse 1.5s ease-in-out infinite;
}
@keyframes mic-pulse {
0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-neo-orange), transparent 50%); }
50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-neo-orange), transparent 90%); }
}
#mic-chat svg {
width: 18px;
height: 18px;
}
.message.selected {
background: var(--col-msg-sel);
border-color: var(--col-link);
}
.message-content {
white-space: pre-wrap;
line-height: 1.5;
/*margin-bottom: 8px;*/
cursor: text;
border-radius: 4px;
transition: background 0.2s;
/*pointer-events: none; !* Prevent interference with message selection *!*/
}
.message-content.editing {
pointer-events: auto; /* Re-enable when editing */
user-select: text;
}
.message.removing {
animation: slideOutRight 0.3s ease-in forwards;
}
@keyframes slideOutRight {
0% {
opacity: 1;
transform: translateX(0);
}
100% {
opacity: 0;
transform: translateX(100%);
}
}
#chat.block-selecting {
user-select: none;
}
#chat.block-selecting .message-content {
user-select: none;
}
/* Rubber-band rectangle drawn while drag-selecting chat messages. */
.chat-marquee {
position: fixed;
z-index: 50;
pointer-events: none;
border: 1px solid var(--color-neo-orange);
background: color-mix(in srgb, var(--color-neo-orange), transparent 90%);
}
#open-chat-modal {
position: fixed;
bottom: 20px;
right: 20px;
background: transparent;
border: none;
}
#open-chat-modal:hover svg {
cursor: pointer;
border-radius: 50%;
}
#open-chat-modal:not(.hidden) {
display: block;
}
#open-chat-modal:not(.hidden) svg {
display: block !important;
}
#chat-container.modal #close-chat {
position: absolute;
top: 3px;
right: 5px;
background: none;
border: none;
font-size: 28px;
cursor: pointer;
color: var(--col-link);
z-index: 1001;
width: 30px;
height: 30px;
display: flex !important;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s;
}
#chat-container.modal #fullscreen-chat {
position: absolute;
top: 6px;
right: 28px;
background: none;
border: none;
font-size: 20px;
font-weight: bold;
cursor: pointer;
color: var(--col-link);
z-index: 1001;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s;
}
.modal-reversed {
display: flex;
flex-direction: column-reverse !important;
}
.modal-reversed #search-input, .modal-reversed #move-input {
margin-top: 8px;
margin-bottom: 0 !important;
}