Files
WechatExplorer/examples/extensions/group-chat-bot/ui/style.css
T

652 lines
10 KiB
CSS

:root {
color-scheme: light dark;
--bg: #f6f7f9;
--surface: #ffffff;
--surface-subtle: #f1f5f9;
--border: #e2e8f0;
--text: #0f172a;
--muted: #64748b;
--accent: #059669;
--accent-hover: #047857;
--accent-soft: rgba(5, 150, 105, 0.12);
--warn: #d97706;
--danger: #dc2626;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0b0f17;
--surface: #131b26;
--surface-subtle: #1c2636;
--border: #263244;
--text: #f1f5f9;
--muted: #94a3b8;
--accent: #10b981;
--accent-hover: #059669;
--accent-soft: rgba(16, 185, 129, 0.16);
--warn: #f59e0b;
--danger: #f87171;
}
}
* {
box-sizing: border-box;
}
[hidden] {
display: none !important;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font: 14px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.page {
max-width: 900px;
margin: 0 auto;
padding: 20px 24px 48px;
}
.hero {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
margin-bottom: 14px;
}
.eyebrow {
margin: 0 0 4px;
color: var(--muted);
font-size: 12px;
}
h1 {
margin: 0 0 6px;
font-size: 22px;
font-weight: 700;
}
h2 {
margin: 0;
font-size: 16px;
font-weight: 600;
}
.subtitle,
.hint,
.meta-line {
margin: 4px 0 0;
color: var(--muted);
font-size: 13px;
}
.hero-stats {
display: flex;
gap: 10px;
flex-shrink: 0;
}
.stat-pill {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 8px 14px;
min-width: 100px;
text-align: right;
}
.stat-pill span {
display: block;
font-size: 11px;
color: var(--muted);
}
.stat-pill strong {
font-size: 16px;
font-weight: 700;
}
.capability-bar {
display: flex;
flex-wrap: wrap;
gap: 16px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 10px 14px;
margin-bottom: 14px;
font-size: 13px;
}
.cap-item {
display: inline-flex;
align-items: center;
gap: 7px;
}
.cap-dot {
width: 8px;
height: 8px;
border-radius: 999px;
background: var(--muted);
}
.cap-dot.ok {
background: var(--accent);
}
.cap-dot.warn {
background: var(--warn);
}
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 16px 18px;
margin-bottom: 14px;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
white-space: normal;
margin-bottom: 12px;
}
.voice-showcase {
display: flex;
align-items: center;
gap: 14px;
background: var(--surface-subtle);
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px 14px;
margin-bottom: 14px;
}
.voice-avatar {
width: 46px;
height: 46px;
border-radius: 10px;
background: var(--accent-soft);
color: var(--accent);
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-weight: 700;
flex-shrink: 0;
overflow: hidden;
}
.voice-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.voice-info {
flex: 1;
min-width: 0;
}
.voice-title-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
}
.voice-desc {
margin: 4px 0 6px;
color: var(--muted);
font-size: 12px;
}
.voice-meta-row {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.badge {
display: inline-flex;
align-items: center;
padding: 2px 8px;
border-radius: 999px;
font-size: 11px;
font-weight: 600;
background: var(--accent-soft);
color: var(--accent);
}
.badge.muted {
background: var(--surface);
border: 1px solid var(--border);
color: var(--muted);
font-weight: 500;
}
.badge.warn {
background: rgba(217, 119, 6, 0.14);
color: var(--warn);
}
.grid.two {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.grid.three {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 12px;
}
@media (max-width: 680px) {
.grid.two,
.grid.three {
grid-template-columns: 1fr;
}
.hero,
.card-header {
flex-direction: column;
}
}
.field {
display: flex;
flex-direction: column;
gap: 5px;
margin-top: 10px;
}
.field > span {
font-size: 12px;
font-weight: 500;
color: var(--muted);
}
input[type="text"],
input[type="number"],
select,
textarea {
width: 100%;
border: 1px solid var(--border);
border-radius: 8px;
padding: 8px 10px;
background: var(--bg);
color: var(--text);
font: inherit;
}
textarea {
resize: vertical;
}
.check {
display: inline-flex;
align-items: center;
gap: 8px;
margin-top: 12px;
cursor: pointer;
font-size: 13px;
}
.check-row {
display: flex;
flex-wrap: wrap;
gap: 18px;
}
.inline-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
margin-top: 10px;
}
.card-header .inline-actions {
margin-top: 0;
}
button {
border-radius: 8px;
padding: 7px 13px;
font: inherit;
font-weight: 600;
cursor: pointer;
border: 1px solid transparent;
transition: opacity 0.15s ease;
}
button:disabled {
opacity: 0.55;
cursor: not-allowed;
}
button.primary {
background: var(--accent);
color: #ffffff;
}
button.primary:hover:not(:disabled) {
background: var(--accent-hover);
}
.card-header > button {
flex: 0 0 auto;
white-space: nowrap;
}
.ghost {
background: transparent;
border-color: var(--border);
color: var(--text);
}
button.ghost.danger {
color: var(--danger);
}
.roster-picker {
position: relative;
}
/* 下拉开关:外观对齐同排 select,右侧给个箭头。 */
.roster-toggle {
width: 100%;
padding: 9px 12px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
color: var(--text);
font-size: 13px;
text-align: left;
cursor: pointer;
}
.roster-toggle::after {
content: '▾';
float: right;
color: var(--muted);
}
.roster-options {
margin-top: 4px;
max-height: 240px;
overflow-y: auto;
}
.roster-menu {
position: absolute;
z-index: 20;
left: 0;
right: 0;
top: calc(100% + 4px);
max-height: 230px;
overflow-y: auto;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 6px;
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.roster-option {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 8px;
border-radius: 6px;
cursor: pointer;
font-size: 13px;
}
.roster-option:hover {
background: var(--surface-subtle);
}
.roster-empty {
padding: 10px;
color: var(--muted);
font-size: 13px;
}
.group-table-header {
display: grid;
grid-template-columns: minmax(140px, 1.4fr) 64px minmax(120px, 1fr) minmax(130px, 1fr) 80px 88px;
gap: 8px;
margin-top: 14px;
padding: 0 8px 6px;
border-bottom: 1px solid var(--border);
color: var(--muted);
font-size: 12px;
}
.group-list {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 8px;
}
.group-row {
display: grid;
grid-template-columns: minmax(140px, 1.4fr) 64px minmax(120px, 1fr) minmax(130px, 1fr) 80px 88px;
gap: 8px;
align-items: center;
padding: 8px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface-subtle);
}
/* 未勾选生效的群:整行降透明,但仍可编辑人格/回复形式。 */
.group-row.is-off {
opacity: 0.62;
}
.group-row.is-off:hover {
opacity: 0.85;
}
.group-title {
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.group-title small {
display: block;
color: var(--muted);
font-size: 11px;
font-weight: 400;
}
@media (max-width: 720px) {
.group-table-header {
display: none;
}
.group-row {
grid-template-columns: 1fr;
}
}
.empty-hint {
margin: 12px 0 0;
color: var(--muted);
font-size: 13px;
}
.preview-box {
margin: 12px 0 0;
padding: 12px;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--surface-subtle);
white-space: pre-wrap;
word-break: break-word;
font-size: 13px;
}
.footer-bar {
position: sticky;
bottom: 0;
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.footer-buttons {
display: flex;
gap: 8px;
}
.status-banner {
font-size: 13px;
color: var(--muted);
}
.status-banner[data-tone="ok"] {
color: var(--accent);
}
.status-banner[data-tone="error"] {
color: var(--danger);
}
.hero-title-row {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.send-warn-badge {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 3px 10px;
border-radius: 999px;
background: rgba(220, 38, 38, 0.12);
border: 1px solid rgba(220, 38, 38, 0.3);
color: #dc2626;
font-size: 12px;
font-weight: 700;
}
.send-warn-bang {
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
border-radius: 50%;
background: #dc2626;
color: #ffffff;
font-size: 11px;
font-weight: 800;
}
.send-unavailable-mask {
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
background: rgba(15, 23, 42, 0.38);
backdrop-filter: blur(4px);
}
.send-unavailable-mask[hidden] {
display: none !important;
}
.send-unavailable-dialog {
position: relative;
max-width: 440px;
width: 100%;
padding: 26px 28px;
border-radius: 14px;
border: 1px solid rgba(220, 38, 38, 0.28);
background: var(--surface);
box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2);
text-align: center;
}
.send-unavailable-close {
position: absolute;
top: 10px;
right: 10px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border: 1px solid transparent;
border-radius: 8px;
background: transparent;
color: var(--muted);
font-size: 18px;
line-height: 1;
cursor: pointer;
}
.send-unavailable-close:hover {
background: var(--surface-subtle);
color: var(--text);
}
.send-unavailable-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
border-radius: 50%;
background: #dc2626;
color: #ffffff;
font-size: 24px;
font-weight: 800;
box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}
.send-unavailable-dialog h2 {
margin: 12px 0 8px;
color: #dc2626;
font-size: 18px;
}
.send-unavailable-dialog p {
margin: 0 0 18px;
color: var(--muted);
font-size: 13px;
line-height: 1.65;
}
.send-unavailable-actions {
display: flex;
justify-content: center;
gap: 10px;
}