/* ============================================
   OpenClaw Architecture Site — Components
   ============================================ */

/* Chat component extended styles */
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.activity-log::-webkit-scrollbar { width: 4px; }
.activity-log::-webkit-scrollbar-track { background: transparent; }
.activity-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Tool badge within messages */
.msg-tool {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--purple);
    white-space: nowrap;
}

/* Code blocks within messages */
.msg code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 1px 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}
.msg-user code { background: rgba(0, 0, 0, 0.1); color: #1a5c00; }

/* Scenario panel */
.scenario-panel {
    display: none;
}
.scenario-panel.active {
    display: grid;
}

/* Tab icon */
.tab-icon { margin-right: 6px; }

/* Activity status indicators */
.log-success { border-left: 2px solid var(--green); }
.log-process { border-left: 2px solid var(--blue); }
.log-tool { border-left: 2px solid var(--purple); }
.log-warn { border-left: 2px solid var(--accent); }

/* Timeline dots for logs */
.log-entry::before {
    content: '';
    display: none;
}

/* Message timestamp */
.msg-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}
.msg-bot .msg-time { text-align: left; }

/* Typing indicator */
.typing-indicator {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #fff;
    border: none;
    border-radius: 14px 14px 14px 4px;
}
.typing-dot {
    width: 6px; height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Tooltip */
.tooltip {
    position: relative;
}
.tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.tooltip:hover::after { opacity: 1; }

/* Progress bar (for sequence diagram) */
.progress-inline {
    height: 3px;
    background: var(--bg-primary);
    border-radius: 2px;
    overflow: hidden;
    margin: 4px 0;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* Badge pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}
.pill-green { background: rgba(34, 197, 94, 0.1); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.2); }
.pill-blue { background: rgba(59, 130, 246, 0.1); color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.2); }
.pill-purple { background: rgba(168, 85, 247, 0.1); color: var(--purple); border: 1px solid rgba(168, 85, 247, 0.2); }
.pill-orange { background: rgba(249, 115, 22, 0.1); color: var(--accent); border: 1px solid rgba(249, 115, 22, 0.2); }

/* Inline highlight */
.highlight {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}
.hl-orange { background: rgba(249, 115, 22, 0.1); color: var(--accent); }
.hl-purple { background: rgba(168, 85, 247, 0.1); color: var(--purple); }
.hl-green { background: rgba(34, 197, 94, 0.1); color: var(--green); }

/* Separator */
.sep {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    border-radius: 2px;
    margin: 16px auto;
}

/* Detail panel code */
.loop-detail-panel .code-block {
    margin-top: 16px;
}
.loop-detail-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.7;
}
.loop-detail-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

/* Tags within detail panel */
.detail-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.detail-tag {
    padding: 3px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Diagram connectors */
.connector-v {
    width: 2px;
    background: var(--border-light);
    margin: 0 auto;
}
.connector-h {
    height: 2px;
    background: var(--border-light);
}

/* Icon badges in cards */
.icon-badge {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.3rem;
    margin-bottom: 16px;
}
.icon-badge-orange { background: rgba(249, 115, 22, 0.1); }
.icon-badge-purple { background: rgba(168, 85, 247, 0.1); }
.icon-badge-blue { background: rgba(59, 130, 246, 0.1); }
.icon-badge-green { background: rgba(34, 197, 94, 0.1); }

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.empty-icon { font-size: 2rem; opacity: 0.5; }
