/* ============================================
   思考块样式（Thinking Block）
   从 message.css 拆分
   ============================================ */

.msg-thinking {
    position: relative;
    margin: 4px 0 6px;
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0 0 6px;
    font-size:  var(--fs-md);
    color: var(--thinking-color);
}
.msg-thinking ol,
.msg-thinking ul {
    list-style-position: outside;
    padding-left: 0;
    margin-left: 1.2em;
}
.thinking-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    font-weight: 500;
    color: var(--thinking-color);
    background: none;
    padding: 2px 30px 2px 0;
    margin: 0;
    transition: color .15s;
    border-radius: 4px;
}
.thinking-toggle:hover {
    background: none;
    color: var(--thinking-toggle-hover);
}
.msg-thinking.collapsed .toggle-arrow::before {
    content: "▶";
}
.thinking-label {
    font-weight: 500;
}
.thinking-content {
    margin-left: 3px;
    border-left: none;
    padding: 12px 0 12px 20px;
    font-style: italic;
    color: var(--thinking-color);
    line-height: 1.65;
    position: relative;
    font-size:  var(--fs-md-lg);
    /* 平滑展开/折叠过渡（替代原来的 display:none 硬切换）
       展开态不设 max-height + overflow 限制，确保任意长度的思考内容完整显示。
       折叠态通过 .collapsed 中的 max-height: 0 + overflow: hidden 隐藏。 */
    max-height: none;
    overflow: visible;
    opacity: 1;
    transition: max-height .35s ease, opacity .3s ease, padding-top .3s ease, padding-bottom .3s ease, margin-top .3s ease, margin-bottom .3s ease;
}
.thinking-content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 1;
    z-index: var(--z-hover-ctrl);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
    transition: background .3s, box-shadow .3s;
}
.thinking-content::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 32px;
    bottom: 12px;
    width: 1.5px;
    background: linear-gradient(to bottom, var(--accent-soft), transparent);
    z-index: var(--z-decorative);
    border-radius: 1px;
}
.thinking-content.streaming::before {
    animation: dotBlink 1s ease-in-out infinite;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.thinking-content.dimmed::before {
    background: var(--text-muted);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 10%, transparent);
    animation: none;
}
/* collapsed 态：max-height + opacity 过渡，替代 display:none */
.msg-thinking.collapsed .thinking-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}
