/* Auto-split from _42_wf_responsive.css - DO NOT EDIT MANUALLY */
/* See _42_wf_responsive.css.bak for original */

/* ============================================================================
 * ??LEU_V01 ???????????? ?? ?DUI?????CSS
 * ============================================================================
 * ???: css/wf_responsive.css
 * Phase 132s: ????? ?? ??????????????DOM???????????
 *
 * ?? ????????:
 *   ?? wf_block_responsive.js ?? .wf-block ??????????:
 *   data-responsive: compact | landscape | portrait | square
 *   data-density:    dense | normal
 *   CSS??: wf-r-compact / wf-r-landscape / wf-r-portrait / wf-r-square
 *          wf-r-dense / wf-r-narrow / wf-r-short
 * ============================================================================
 */

/* ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T
 *  1. ???????? ?? ?????????????????
 *  ?? ???: .wf-block-body ?? ResizeObserver ???
 *    ?????????transition?????contentRect??????(padding,gap??)
 *    ????: sizeClass?? ?? padding???? ?? contentRect???????? ?? ??????
 * ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T */
.wf-block .wf-block-body > * {
    transition: opacity 0.2s ease;
}

/* ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T
 *  2. COMPACT ?? ?? ????????????????????
 * ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T */

/* 2.1 ??y?????? */
.wf-r-compact .wf-block-body,
.wf-r-dense .wf-block-body {
    padding: 0.25rem !important;
    gap: 0.125rem;
}

/* 铁律25复刻LEUV01: 窄屏时侧边栏默认折叠, 但保留展开按钮可见 (用户点击后通过 .wf-sidebar-open 覆盖显示) */
.wf-r-compact .wf-tchat-sidebar,
.wf-r-dense .wf-tchat-sidebar {
    display: none !important;
}

/* Phase LEUCS-UI-FIX: 窄屏时侧边栏打开 → 上方弹出, 横排布局 */
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open,
.wf-r-dense .wf-tchat-sidebar.wf-sidebar-open {
    display: flex !important;
    width: 100% !important;
    min-width: unset !important;
    max-height: 16vh;
    overflow-y: auto;
    border-right: none;
    border-bottom: 1px solid var(--wf-border, var(--c-555));
    flex-shrink: 0;
}

/* ★ compact 模式 sidebar-open 时, JS 添加 wf-wrap-column 让 wrap 纵排 */
.wf-tchat-wrap.wf-wrap-column {
    flex-direction: column !important;
}
/* ★ 头部: 标题行保留, toolbar 内搜索+按钮均分 */
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-sidebar-hdr {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.375rem;
    min-height: auto;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-sidebar-toolbar {
    padding: 0.1rem 0.375rem;
    gap: 0.2rem;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-new-btn {
    font-size: var(--font-canvas-xxs);
    padding: 0.15rem 0.4rem;
    white-space: nowrap;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open #leucs-conv-search-input {
    width: 100%;
    box-sizing: border-box;
}

/* ★ 侧边栏打开 → 对话列表横排 + 固定高度卡片 + 截断 */
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-y: hidden;
    overflow-x: auto;
    padding: 0.125rem 0.25rem;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-item {
    min-width: 7.5rem;
    flex: 0 0 auto;
    min-height: 2.8rem;
    overflow: hidden;
    padding: 0.2rem 0.35rem;
    border-left: none;
    border-bottom: 2px solid transparent;
    gap: 0.25rem;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-item.active {
    border-left: none;
    border-bottom-color: var(--accent-authority, var(--navy-mid));
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-badge {
    display: none;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-main {
    gap: 0.0625rem;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-title {
    font-size: var(--font-canvas-xxs);
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-title-text {
    font-size: var(--font-canvas-xxs);
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-inforow {
    font-size: var(--font-canvas-xxs);
    /* 紧凑模式每张卡片只显示1行信息 */
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-inforow + .wf-tchat-conv-inforow {
    display: none;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .wf-tchat-conv-actions {
    display: none;
}
.wf-r-compact .wf-tchat-sidebar.wf-sidebar-open .leucs-sel-dot {
    display: none;
}

/* 展开按钮在窄屏时必须可见 (否则用户无法点击展开历史面板) */
/* 原规则 display:none!important 已移除 — 铁律25: 按钮始终可见 */

/* ?????? ?? ????????????? */
.wf-r-compact .wf-tchat-main,
.wf-r-dense .wf-tchat-main {
    flex: 1;
    width: 100%;
}

/* 2.3 ?????? ?? ?????????? + ?????????????? */
.wf-r-compact .wf-tchat-input-area {
    padding: 0.1875rem;
    flex-shrink: 0 !important;
    max-height: none !important;
}

.wf-r-compact .wf-tchat-input-area textarea {
    min-height: 3vh !important;
    max-height: 4.5vh !important;
    font-size: var(--font-canvas-xxs);
    padding: 0.25rem 0.375rem;
}

/* ?? compact??chat????: ???????????? */
.wf-r-compact .wf-tchat-wrap {
    min-height: 0 !important;
}

.wf-r-compact .wf-tchat-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.wf-r-compact .wf-chat-messages {
    flex: 1;
    min-height: 3.75vh;
    overflow-y: auto;
}

/* compactAPI״̬+  Ⱦֻռһ */
.wf-r-compact .wf-tchat-api-status {
    max-height: 3vh;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
    scrollbar-width: thin;
}

/* dense??? */
.wf-r-dense .wf-tchat-wrap {
    min-height: 0 !important;
}

.wf-r-dense .wf-tchat-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.wf-r-dense .wf-chat-messages {
    flex: 1;
    min-height: 3.75vh;
    overflow-y: auto;
}

/* 2.4 发送栏 — compact模式下缩小按钮间距，依赖zoom缩放保持单行 */
/* Phase 135d: 移除space-between，与新的三分组布局兼容 */
.wf-r-compact .wf-tchat-input-controls {
    gap: 0.125rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
}
/* Phase 135d: compact模式下分组容器间距更紧凑 */
.wf-r-compact .wf-tchat-controls-left,
.wf-r-compact .wf-tchat-controls-center,
.wf-r-compact .wf-tchat-controls-right {
    gap: 0.125rem;
}

.wf-r-compact .wf-tchat-input-controls button {
    padding: 0.125rem 0.375rem;
    font-size: var(--font-canvas-mini);
}

/* compact/dense 模式: 不隐藏元素，依赖ResizeObserver zoom等比缩小保持完整显示 */

/* 2.5 ?????? ?? API???????? */
.wf-r-compact .wf-tchat-api-status {
    padding: 0.0625rem 0.1875rem;
    font-size: var(--font-canvas-micro);
    gap: 0.0625rem;
    flex-wrap: nowrap;
    /* ?? ?????? overflow:hidden ?? ?????????????????? */
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 3vh;
    flex-shrink: 0;
    scrollbar-width: thin;
}

/* compact??API????: ????LED+???? */
.wf-r-compact .wf-tchat-api-row {
    gap: 0.125rem;
    min-height: 0;
    line-height: 1.1;
}

.wf-r-compact .wf-tchat-api-label {
    font-size: var(--font-canvas-tiny);
    padding: 0 0.125rem;
}

.wf-r-compact .wf-tchat-api-name {
    font-size: var(--font-canvas-micro);
    max-width: 6vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* API??????compact?????? */
.wf-r-compact .wf-tchat-api-detail {
    display: none;
}

.wf-r-compact .wf-tchat-api-right {
    display: none;
}

/* Agent????????compact?????LED???????? */
.wf-r-compact .wf-agent-monitor {
    gap: 0.1875rem;
    font-size: var(--font-canvas-micro);
    min-height: 0;
    line-height: 1.1;
}

.wf-r-compact .wf-monitor-timer {
    display: none;
}

/* dense?? ?? API????? */
.wf-r-dense .wf-tchat-api-status {
    padding: 0.0625rem 0.1875rem;
    font-size: var(--font-canvas-micro);
    gap: 0.0625rem;
    max-height: 3vh;
    flex-shrink: 0;
    /* ?? ?????? overflow:hidden ?? ?????????????????? */
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.wf-r-dense .wf-tchat-api-detail,
.wf-r-dense .wf-tchat-api-right {
    display: none;
}

/* 2.6 ?????? ?? ???????????? */
.wf-r-compact [data-responsive-priority="low"] {
    display: none !important;
}

/* medium?????: ??????????????????(API???????????????) */
.wf-r-compact [data-responsive-priority="medium"] {
    max-height: 1.125rem;
    overflow: hidden;
    padding: 0 0.125rem !important;
    margin: 0 !important;
    opacity: 0.7;
    flex-shrink: 0;
}

/* dense????compact: medium???????????? */
.wf-r-dense:not(.wf-r-compact) [data-responsive-priority="medium"] {
    max-height: 20vh;
    opacity: 0.85;
}

/* 2.7 极窄模式 → Block标题栏自适应缩放 */
/* Phase 434 反硬编码: 字体全部走 CSS 变量, 零硬编码 */
.wf-r-narrow .wf-block-title .wf-block-label {
    font-size: var(--font-canvas-2xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 8vw;
}

/* Phase 434+619v2: 三按钮统一 — narrow 模式同步缩小至 1rem */
.wf-r-narrow .wf-block-title .wf-block-toggle,
.wf-r-narrow .wf-block-title .wf-block-replace-btn,
.wf-r-narrow .wf-block-title .wf-block-expand-btn {
    width: 1rem;
    height: 1rem;
    box-sizing: border-box;
    padding: 0.0625rem;
    font-size: var(--font-canvas-2xs);
    margin-left: 0.1875rem;
}

/* compact模式下Block标题栏进一步压缩 */
/* Phase 434 反硬编码: 字体走 CSS 变量 */
.wf-r-compact .wf-block-title {
    min-height: 2.75vh;
    padding: 0.125rem 0.375rem;
    font-size: var(--font-canvas-xs);
    gap: 0.25rem;
}
.wf-r-compact .wf-block-title .wf-block-priority {
    /* Phase 434-FIX: 勋章大小不再随 compact 模式变化, 保持统一字体变量 */
    font-size: var(--font-xs);
    padding: 0.0625rem 0.3125rem;
    border-width: 1px;
    /* letter-spacing 与基础样式统一, 不再使用 compact 特化值 */
}
.wf-r-compact .wf-block-title .wf-block-led {
    width: 0.375rem;
    height: 0.375rem;
}
/* Phase 618+619v3: compact 模式三按钮同步缩小，字体留安全边距防溢出 */
.wf-r-compact .wf-block-title .wf-block-toggle,
.wf-r-compact .wf-block-title .wf-block-replace-btn,
.wf-r-compact .wf-block-title .wf-block-expand-btn {
    width: 1rem;
    height: 1rem;
    font-size: var(--font-canvas-2xs);
    box-sizing: border-box;
}

/* 2.8 极矮模式 → 最小化标题 */
.wf-r-short .wf-block-title {
    min-height: 1.125rem;
    padding: 0.0625rem 0.25rem;
}

.wf-r-short .wf-block-body {
    padding: 0.125rem !important;
}

/* ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T
 *  3. LANDSCAPE ?? ?? ???????????
 * ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T */

/* 3.1 ????wrap???????????????????????? */
.wf-r-landscape .wf-tchat-wrap {
    flex-direction: row;
}

/* landscape 侧边栏 — 百分比宽度, 宽屏缩小 */
.wf-r-landscape .wf-tchat-sidebar {
    width: clamp(10rem, 15vw, 17.5rem);
    min-width: 10rem;
    max-width: 17.5rem;
}

/* 3.2 ?????? ?? ????????? */
.wf-r-landscape .wf-chat-messages {
    flex: 1;
    min-height: 0;
}

/* 3.3 ?????? ?? ??????????????(??????! ???????????) */
.wf-r-landscape .wf-tchat-input-area {
    flex-shrink: 0;
}

.wf-r-landscape .wf-tchat-input-area textarea {
    min-height: 3vh;
    max-height: 6vh;
}

/* 3.4 landscape??API???????? */
.wf-r-landscape .wf-tchat-api-status {
    flex-wrap: nowrap;
    gap: 0.375rem;
}

/* ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T
 *  4. PORTRAIT ?? ?? ???????????
 * ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T */

/* 4.1 上方弹出时 wrap 改为纵向排列 */
.wf-r-portrait .wf-tchat-wrap {
    flex-direction: column;
}

.wf-r-portrait .wf-tchat-sidebar {
    width: 100% !important;
    min-width: unset !important;
    max-height: 10vh;
    overflow-y: auto;
    border-right: none;
    border-bottom: 1px solid var(--wf-border, var(--c-555));
    flex-shrink: 0;
}

/* Phase 142e: portrait模式下隐藏水平拖拽手柄 */
.wf-r-portrait .wf-sidebar-resize-handle {
    display: none;
}

/* ★ Phase LEUCS-UI-FIX: 上方弹出时头部横排 — 按钮并排而非堆叠 */
.wf-r-portrait .wf-tchat-sidebar-hdr {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.375rem;
    min-height: auto;
}

.wf-r-portrait .wf-tchat-sidebar-title {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Portrait 新建对话按钮 — 紧凑内联 (不再占满宽) */
.wf-r-portrait .wf-tchat-new-btn {
    display: inline-flex;
    width: auto;
    margin: 0;
    padding: 0.125rem 0.5rem;
    font-size: var(--font-canvas-xxs);
    flex-shrink: 0;
}

/* Portrait 搜索框 — 灵活伸缩 */
.wf-r-portrait #leucs-conv-search-input {
    flex: 1 1 auto;
    min-width: 6rem;
    max-width: 16rem;
    width: auto;
}

/* 4.2 上方弹出时对话列表横排 */
.wf-r-portrait .wf-tchat-conv-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-y: hidden;
    overflow-x: auto;
}

/* ★ 卡片固定高度 + 截断 — 挤压宽度不改变高度 */
.wf-r-portrait .wf-tchat-conv-item {
    min-width: clamp(8rem, 22vw, 16rem);
    max-width: clamp(10rem, 30vw, 20rem);
    flex-shrink: 0;
    height: 3.2rem;
    min-height: 3.2rem;
    max-height: 3.2rem;
    overflow: hidden;
    flex-direction: column;
    gap: 0.0625rem;
    padding: 0.1875rem 0.5rem;
    border-left: none;
    border-bottom: 2px solid transparent;
}

.wf-r-portrait .wf-tchat-conv-item.active {
    border-left: none;
    border-bottom-color: var(--accent-color, var(--blue-info-dim));
}

/* 标题单行截断 */
.wf-r-portrait .wf-tchat-conv-title {
    font-size: var(--font-canvas-xxs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* 元信息单行截断 */
.wf-r-portrait .wf-tchat-conv-meta {
    font-size: calc(var(--font-canvas-xxs) - 0.0625rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    gap: 0.25rem;
}

/* Portrait 操作按钮隐藏 (hover 才展示太麻烦, 上方极窄时直接不显示) */
.wf-r-portrait .wf-tchat-conv-actions {
    display: none;
}

/* Portrait 运行中点阵保持最小 */
.wf-r-portrait .leucs-conv-running-mark {
    margin-inline-start: 0.15rem;
}

/* ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T
 *  5. SQUARE ?? ?? ???????????????
 * ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T */

.wf-r-square .wf-block-body {
    padding: 0.375rem;
}

/* square 模式侧边栏 — 百分比宽度 */
.wf-r-square .wf-tchat-sidebar {
    width: clamp(10rem, 18vw, 17.5rem);
    min-width: 10rem;
}

/* square???????????????????? */
.wf-r-square .wf-chat-messages {
    flex: 1;
    min-height: 10vh;
}

/* ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T
 *  6. ??????????? ?? TNO+CAD??????
 *
 *  ???: ???????????? (Chrome-like)
 *  - ???????: ??????? + ??????? + ?3???
 *  - ??????:   ????????????????? + ????????
 *  - ?????????? + ???????
 *  - ??????? TNO bunker??? + CAD cyan????
 * ?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T?T */

/* Tab?? ?? ?????????????? */
.wf-responsive-tab-bar {
    display: flex;
    gap: 0.0625rem;
    margin-left: auto;
    flex-shrink: 0;
    align-items: flex-end;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 65%;
    padding-left: 0.375rem;
    /* Phase 356d:防止拥挤模式下 tabs 上边沿被 overflow:hidden 裁切 2-0.1875rem */
    padding-top: 0.125rem;
}

/* ???????? ?? ?????Tab??? */
.wf-rtab {
    display: flex;
    align-items: center;
    padding: 0.1875rem 0.625rem 0.25rem;
    font-size: var(--font-canvas-xxs, 0.5625rem);
    font-family: var(--tno-font-mono, 'Consolas', monospace);
    color: var(--text-secondary, var(--c-5c5c5c));
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-primary, var(--line-dark));
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    user-select: none;
    /* ???????????3? */
    margin-bottom: -0.0625rem;
    z-index: 0;
}

/* ?????????? ?? ??Tab????????? */
.wf-rtab::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -0.1vw;
    height: 0.0625rem;
    background: var(--border-primary, var(--line-dark));
}

/* ??? */
.wf-rtab:hover {
    color: var(--text-primary, var(--c-c0c0c0));
    background: rgba(255,255,255,0.06);
}

/* ?? ?????? ?? ?????Tab??????? */
