.mlg-plc-chat-panel {
position: absolute; top: 8px; right: 8px; bottom: 8px; z-index: 20;
width: min(360px, calc(100% - 16px));
display: flex; flex-direction: column;
background: var(--mlg-plc-bg, #16181d); color: #e8eaed;
border: 1px solid rgba(148, 163, 184, .26);
border-radius: 16px;
box-shadow: 0 16px 48px rgba(2, 6, 23, .5);
overflow: hidden; font-size: 13px;
}
.mlg-plc-chat-panel[hidden] { display: none !important; }
.mlg-plc-chat-head {
display: flex; align-items: center; justify-content: space-between;
padding: 10px 14px;
background: linear-gradient(180deg, rgba(56, 189, 248, .18), rgba(56, 189, 248, .03));
border-bottom: 1px solid rgba(148, 163, 184, .14);
}
.mlg-plc-chat-head strong { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.mlg-plc-chat-head strong::before {
content: ''; width: 8px; height: 8px; border-radius: 50%;
background: #3ddc84; box-shadow: 0 0 10px #3ddc84;
}
.mlg-plc-chat-head button {
background: transparent; color: inherit; border: 0; font-size: 18px; cursor: pointer;
width: 28px; height: 28px; border-radius: 8px; line-height: 1;
}
.mlg-plc-chat-head button:hover { background: rgba(148, 163, 184, .2); }
.mlg-plc-chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mlg-plc-chat-log::-webkit-scrollbar { width: 8px; }
.mlg-plc-chat-log::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .3); border-radius: 8px; }
.mlg-plc-chat-msg {
max-width: 88%; border-radius: 14px; padding: 8px 12px; font-size: 13px; line-height: 1.45;
white-space: pre-wrap; word-wrap: break-word;
box-shadow: 0 2px 8px rgba(2, 6, 23, .25);
}
.mlg-plc-chat-msg--user {
align-self: flex-end; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
border-bottom-right-radius: 4px;
}
.mlg-plc-chat-msg--assistant {
align-self: flex-start; background: rgba(148, 163, 184, .16); color: inherit;
border-bottom-left-radius: 4px;
}
.mlg-plc-chat-msg--system { align-self: center; background: rgba(239, 68, 68, .18); color: #fca5a5; font-size: 11px; border-radius: 999px; padding: 4px 12px; }
.mlg-plc-chat-tool {
margin-top: 6px; padding: 6px 8px; border-radius: 10px; background: rgba(56, 189, 248, .1);
border: 1px solid rgba(56, 189, 248, .28); font-size: 12px;
}
.mlg-plc-chat-tool button {
margin-top: 4px; background: rgba(56, 189, 248, .12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, .4);
padding: 3px 8px; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 600;
}
.mlg-plc-chat-tool button:hover { background: rgba(56, 189, 248, .22); }
.mlg-plc-chat-quick {
display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px;
border-top: 1px solid rgba(148, 163, 184, .12);
}
.mlg-plc-chat-quick button {
font-size: 11px; padding: 5px 10px; border-radius: 999px;
border: 1px solid rgba(148, 163, 184, .3); background: transparent; color: inherit; cursor: pointer;
transition: background .15s ease, border-color .15s ease;
}
.mlg-plc-chat-quick button:hover { background: rgba(56, 189, 248, .12); border-color: rgba(56, 189, 248, .45); }
.mlg-plc-chat-form {
display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 12px;
border-top: 1px solid rgba(148, 163, 184, .12);
background: rgba(148, 163, 184, .04);
}
.mlg-plc-chat-form textarea {
flex: 1; resize: none; min-height: 38px; max-height: 120px;
background: rgba(15, 23, 42, .35); color: inherit;
border: 1px solid rgba(148, 163, 184, .28); border-radius: 12px; padding: 8px 12px; font: inherit;
outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.mlg-plc-chat-form textarea:focus { border-color: var(--mlg-plc-accent, #38bdf8); box-shadow: 0 0 0 3px rgba(56, 189, 248, .15); }
.mlg-plc-chat-form button {
background: var(--mlg-plc-accent, #38bdf8); color: #062033; border: 0; height: 38px;
padding: 0 16px; border-radius: 12px; cursor: pointer; font-weight: 700; font-size: 13px;
transition: filter .15s ease;
}
.mlg-plc-chat-form button:hover { filter: brightness(1.1); }
.mlg-plc-chat-disclaimer { margin: 0; padding: 0 14px 10px; color: var(--mlg-plc-muted, #94a3b8); font-size: 10.5px; text-align: center; } .mlg-plc-shell--light .mlg-plc-chat-panel { background: #f7f8fa; color: #1d2126; border-color: rgba(15, 23, 42, .14); box-shadow: 0 16px 40px rgba(15, 23, 42, .18); }
.mlg-plc-shell--light .mlg-plc-chat-head { border-bottom-color: rgba(15, 23, 42, .12); }
.mlg-plc-shell--light .mlg-plc-chat-msg--assistant { background: rgba(15, 23, 42, .07); }
.mlg-plc-shell--light .mlg-plc-chat-form { border-top-color: rgba(15, 23, 42, .12); }
.mlg-plc-shell--light .mlg-plc-chat-form textarea { background: #fff; border-color: rgba(15, 23, 42, .2); }
.mlg-plc-shell--light .mlg-plc-chat-quick { border-top-color: rgba(15, 23, 42, .1); }
@media (max-width: 640px) {
.mlg-plc-chat-panel { top: 4px; right: 4px; left: 4px; bottom: 4px; width: auto; }
} .mlg-plc-chat-msg--assistant.mlg-plc-chat-streaming .mlg-plc-chat-body::after { content: '▍'; animation: mlgPlcBlink 1s steps(2) infinite; color: var(--mlg-plc-accent, #2f7bff); }
@keyframes mlgPlcBlink { 50% { opacity: 0; } }
.mlg-plc-chat-stop { margin-left: 8px; padding: 2px 10px; border: 1px solid rgba(128, 128, 128, .45); border-radius: 20px; background: transparent; color: inherit; cursor: pointer; font-size: 12px; }
.mlg-plc-chat-stop:hover { background: rgba(128, 128, 128, .16); }
.mlg-plc-chat-live { opacity: .55; font-style: italic; }
.mlg-plc-chat-meta { opacity: .6; font-size: 11px; }