/* ==================== REASONING BLOCK ==================== */
.reasoning-block {
    margin: 4px 0 2px 0;
    padding: 0;  /* align the toggle with the message text edge */
}

.reasoning-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 6px 3px 0;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.reasoning-toggle:hover {
    background: rgba(241, 245, 249, 0.8);
}

.reasoning-toggle:hover .reasoning-title,
.reasoning-toggle:hover .reasoning-chevron {
    color: #475569;
}

/* Muted derived sentence — the web app's settled segment header */
.reasoning-title {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
    text-align: left;
    transition: color 0.15s ease;
}

.reasoning-chevron {
    width: 13px;
    height: 13px;
    color: #cbd5e1;
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
}

.reasoning-block.expanded .reasoning-chevron {
    transform: rotate(90deg);
}

.reasoning-steps {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin: 2px 0 0 7px;
    padding-left: 12px;
}

.reasoning-block.expanded .reasoning-steps {
    max-height: 1400px;
    overflow-y: auto;
}

.reasoning-step {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 3px 0;
}

.reasoning-step-icon {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
    margin-top: 1px;
}

.reasoning-step-icon.tool {
    color: #94a3b8;
}

.reasoning-step-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.reasoning-step-text strong {
    font-weight: 600;
    color: #475569;
}

/* ==================== LIVE STREAMING TIMELINE ==================== */
.live-timeline {
    margin: 4px 0 2px 0;
    padding: 0 12px 0 16px;
}

.lt-step {
    display: flex;
    align-items: stretch;
    gap: 10px;
    min-height: 28px;
}

.lt-dot-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 14px;
    flex-shrink: 0;
    padding-top: 6px;
}

.lt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lt-dot-pulse {
    background: #64748b;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.lt-dot-pulse.lt-dot-tool {
    background: #3b82f6;
}

.lt-dot-check {
    width: 12px;
    height: 12px;
    background: #cbd5e1;  /* light slate — settled steps recede (web app weight) */
    border-radius: 50%;
}

.lt-dot-check svg {
    width: 8px;
    height: 8px;
    stroke: #fff;
}

.lt-dot-check.lt-dot-tool {
    background: #cbd5e1;
}

.lt-line {
    flex: 1;
    width: 2px;
    background: #e2e8f0;
    min-height: 8px;
    margin: 3px 0;
}

.lt-content {
    flex: 1;
    padding: 3px 0 6px 0;
    min-width: 0;
}

.lt-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

.lt-text strong {
    font-weight: 600;
    color: #475569;
}

.lt-sub {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
    margin: 1px 0 0 0;
    transition: opacity 0.2s ease;
}

.lt-step-done .lt-text {
    color: #94a3b8;
}

.lt-step-done .lt-sub {
    color: #cbd5e1;
}

/* ==================== V2 ADDITIONS ==================== */

/* Tool step that ended with status=error */
.lt-dot-error {
    background: #cbd5e1 !important;  /* muted — the product never uses red for tool errors */
    color: #fff;
}

/* Source-verification checklist inside a thinking step (TECH-1147) */
.vc-item {
    display: inline;
    font-size: 11px;
    line-height: 1.5;
}

.vc-item.vc-done {
    color: #64748b;
    text-decoration: line-through;
    text-decoration-color: #cbd5e1;
}

.vc-item.vc-pending {
    color: #94a3b8;
}

/* Live thinking: full streamed text in a bottom-anchored window that
   follows the newest lines (scrolled programmatically, scrollbar hidden) */
.lt-sub.lt-thinking-full {
    max-height: 108px;
    overflow-y: auto;
    white-space: pre-wrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.lt-sub.lt-thinking-full::-webkit-scrollbar {
    display: none;
}

/* Settled thinking text rendered from history (content_blocks) */
.hist-thinking-text {
    font-size: 11px;
    line-height: 1.5;
    color: #64748b;
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 2px;
}

.hist-thinking-text.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hist-thinking-toggle {
    background: none;
    border: none;
    padding: 2px 0 0 0;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
}
.hist-thinking-toggle:hover {
    color: #475569;
}
