/**
 * WorkFriend —— 对话框增强样式
 * 只做「最小改动叠加」：不覆盖既有视觉语言，仅补充任务入口/任务建议/任务状态。
 * 主题：通过 [data-theme="dark"] 适配深色。
 */

/* ---------- 「任务」入口：明确的开关，而不是一个图标 ---------- */
/* 心智统一为「关＝中性，开＝紫色」：
   - 白天模式：关 = 白底灰边深灰字；开 = 紫色实心 + 白字 + 紫色光晕（对比强烈）
   - 夜间模式：关 = 白色（白字白边）；开 = 紫色实心 + 白字
   必须一眼看出"点没点过"，所以两类状态连底色/字色/阴影一起换。 */
.oneclaw-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.18);
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.oneclaw-btn .oneclaw-text {
    color: inherit;
    transition: color 0.18s ease;
}

.oneclaw-btn:hover {
    background: #f7f7fd;
    border-color: rgba(124, 92, 255, 0.5);
    color: #6d4aff;
}

/* 已启用：紫色（白天 / 夜间同一套） */
.oneclaw-btn.is-active,
.oneclaw-btn.is-active:hover {
    background: #7c5cff;
    border-color: #7c5cff;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(124, 92, 255, 0.35);
}

.oneclaw-btn.is-active .oneclaw-text {
    color: #ffffff;
}

/* 夜间模式：未启用 = 白色 */
[data-theme="dark"] .oneclaw-btn {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
}

[data-theme="dark"] .oneclaw-btn .oneclaw-text {
    color: #ffffff;
}

[data-theme="dark"] .oneclaw-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    color: #ffffff;
}

/* 夜间模式：已启用 = 紫色 */
[data-theme="dark"] .oneclaw-btn.is-active,
[data-theme="dark"] .oneclaw-btn.is-active:hover {
    background: #7c5cff;
    border-color: #7c5cff;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(124, 92, 255, 0.45);
}

[data-theme="dark"] .oneclaw-btn.is-active .oneclaw-text {
    color: #ffffff;
}

/* ---------- 任务建议卡片 ---------- */
.wf-task-suggest {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(79, 133, 255, 0.08);
    border: 1px solid rgba(79, 133, 255, 0.22);
}

.wf-task-suggest[hidden] {
    display: none;
}

.wf-task-suggest-icon {
    font-size: 16px;
    line-height: 1;
}

.wf-task-suggest-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-primary, #1d1d1f);
}

.wf-task-suggest-text span {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
}

.wf-task-suggest-btn {
    flex: 0 0 auto;
    padding: 6px 14px;
    border: none;
    border-radius: 999px;
    background: var(--primary-color, #4f85ff);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.wf-task-suggest-btn:hover {
    filter: brightness(1.06);
}

.wf-task-suggest-dismiss {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: var(--text-secondary, #9aa0aa);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

[data-theme="dark"] .wf-task-suggest {
    background: rgba(79, 133, 255, 0.14);
    border-color: rgba(79, 133, 255, 0.3);
}

[data-theme="dark"] .wf-task-suggest-text {
    color: #e8eaed;
}

[data-theme="dark"] .wf-task-suggest-text span {
    color: #9aa0aa;
}

/* ---------- 任务执行状态条 ---------- */
.wf-task-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 0;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    background: rgba(255, 122, 69, 0.10);
    border: 1px solid rgba(255, 122, 69, 0.28);
    color: #d9480f;
}

.wf-task-status[hidden] {
    display: none;
}

.wf-task-status.is-done {
    background: rgba(34, 160, 96, 0.10);
    border-color: rgba(34, 160, 96, 0.28);
    color: #1f7a4d;
}

.wf-task-status.is-error {
    background: rgba(229, 57, 53, 0.10);
    border-color: rgba(229, 57, 53, 0.28);
    color: #c62828;
}

.wf-task-status .wf-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: wfPulse 1.2s ease-in-out infinite;
}

.wf-task-status.is-done .wf-dot,
.wf-task-status.is-error .wf-dot {
    animation: none;
}

@keyframes wfPulse {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

[data-theme="dark"] .wf-task-status {
    color: #ffb08a;
}

[data-theme="dark"] .wf-task-status.is-done {
    color: #6ee7a8;
}

[data-theme="dark"] .wf-task-status.is-error {
    color: #ff8a80;
}

/* ---------- 能力入口：与旧 Agent 卡片保持一致，仅收敛文案 ---------- */
.agent-entries-foot a {
    font-size: 13px;
}
