/* AgentTimeline — Linear/Multica-style activity log
 * Palette accessible on dark theme; tones picked for ~5:1 contrast vs #0f0f10.
 */

/* Kanban TaskCard: pulsing dot when an agent currently holds the claim.
 * The card gets a faint border glow so it stands out at a glance across
 * the whole board, even before you spot the dot. */
.ate-card-active {
    border-color: rgba(34, 197, 94, 0.4) !important;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.ate-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: ate-card-pulse 1.4s ease-out infinite;
    flex-shrink: 0;
}

@keyframes ate-card-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); transform: scale(1); }
    70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); transform: scale(1); }
}

.agent-timeline {
    font-family: ui-monospace, "JetBrains Mono", Consolas, monospace;
    padding: 0.5rem 0;
}

.agent-timeline .ate-title {
    font-size: 0.875rem;
    color: #71717a;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-timeline .ate-running {
    color: #22c55e;
    font-weight: 600;
    animation: ate-pulse 1.5s ease-in-out infinite;
    font-size: 0.75rem;
}

@keyframes ate-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* Bar (Task 6.2) */
.ate-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #1f1f23;
    border: 1px solid #2a2a2e;
}

.ate-bar-segment {
    transition: opacity 150ms;
    cursor: pointer;
    min-width: 2px;
}

.ate-bar-segment:hover {
    opacity: 0.85;
}

.ate-bar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.7rem;
    color: #71717a;
}

.ate-bar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ate-bar-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* List rows */
.ate-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ate-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    align-items: baseline;
    line-height: 1.4;
}

.ate-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.ate-icon {
    flex: 0 0 1.25rem;
    font-size: 0.875rem;
}

.ate-summary {
    flex: 1;
    font-size: 0.8125rem;
    color: #d4d4d8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ate-toggle {
    background: none;
    border: none;
    color: #71717a;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    flex: 0 0 auto;
}

.ate-toggle:hover {
    color: #d4d4d8;
}

.ate-detail {
    background: #0d0d10;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin: 0.25rem 0 0.25rem 1.75rem;
    font-size: 0.7rem;
    max-height: 240px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    color: #a1a1aa;
}

.ate-empty {
    color: rgba(212, 212, 216, 0.4);
    font-style: italic;
    font-size: 0.8125rem;
}

/* Cores por tipo de evento (data-tool) — both list rows and bar segments. */

.ate-row[data-tool="session_start"],
.ate-row[data-tool="session_end"] { color: #71717a; }

.ate-row[data-tool="thinking"]     { color: #a1a1aa; font-style: italic; }
.ate-row[data-tool="message"]      { color: #fafafa; }

.ate-row[data-tool="Read"]         { color: #3b82f6; }
.ate-row[data-tool="Glob"],
.ate-row[data-tool="Grep"]         { color: #22c55e; }
.ate-row[data-tool="Edit"],
.ate-row[data-tool="Write"]        { color: #f97316; }
.ate-row[data-tool="Bash"]         { color: #a855f7; }
.ate-row[data-tool="Task"]         { color: #ec4899; }

.ate-bar-segment[data-tool="session_start"],
.ate-bar-segment[data-tool="session_end"] { background: #71717a; }

.ate-bar-segment[data-tool="thinking"] { background: #a1a1aa; }
.ate-bar-segment[data-tool="message"]  { background: #fafafa; }

.ate-bar-segment[data-tool="Read"]     { background: #3b82f6; }
.ate-bar-segment[data-tool="Glob"],
.ate-bar-segment[data-tool="Grep"]     { background: #22c55e; }
.ate-bar-segment[data-tool="Edit"],
.ate-bar-segment[data-tool="Write"]    { background: #f97316; }
.ate-bar-segment[data-tool="Bash"]     { background: #a855f7; }
.ate-bar-segment[data-tool="Task"]     { background: #ec4899; }
.ate-bar-segment[data-tool="Others"]   { background: #6b7280; }
