/* ============================================================
   modbus-platform —— 多语言布局修复层 v1.0.3（全局，增量）
   删本文件 + 撤销 functions.php enqueue 即回滚。

   背景（实测基线，390px 视口）：
     站点名/导航由输出缓冲翻译层（MBI_Templates）替换成英文/德文后变长
     （德文 "Modbus Chinesisches Netzwerk" 比中文长约 2 倍）。
     原始 style.css 移动端：
       .official-branding      { min-width: 220px }
       .official-header-actions{ min-width: 220px }
       .site-branding__title   { overflow:hidden; text-overflow:ellipsis }
     → 220 + 40(汉堡) + 220 = 480px > 390px，header 横向溢出 **192px**，
       且站点名被 ellipsis 截成 "Modbus Chinesisches Netzwer…"。

   修复原则：
     ★ 桌面端一行都不动 —— style.css 原本就是对的，v1.0.2 曾把全局
       flex:1 1 auto 用到桌面，导致 de 站点名容器从 220px 被压到 170px。
     ★ 只在 ≤900px 生效：放开 branding/actions 的 min-width 让两者都能收缩，
       站点名在 branding 内部自然换行（不再 ellipsis 截断）。
     ★ 绝不放开 .official-site-header__inner 的 flex-wrap ——
       那会让 actions（会员/搜索/购物车/登录）掉到第二行（v1.0.0 已踩坑）。
     ★ 不用 word-break:break-word —— 它会把 min-content 降到单字符宽，
       让 branding 被压成 28px 竖条（v1.0.1 已踩坑）。只用 overflow-wrap。
   ============================================================ */

/* ---- 桌面端：完全不干预（保持 style.css 原样） ---- */

/* ---- 移动端 ≤900px：放开两侧 min-width，站点名内部换行 ---- */
@media (max-width: 900px) {

    /* branding：能吃掉剩余空间，但保留下限，避免被压成竖条 */
    .official-branding,
    .site-branding {
        min-width: 100px !important;
        flex: 1 1 auto !important;
    }

    /* actions：允许收缩（原 min-width:220px 在 390px 屏上吃光了空间） */
    .official-header-actions {
        min-width: 0 !important;
        flex: 0 1 auto !important;
    }

    /* 站点名：不截断，在 branding 内部换行 */
    .site-branding__title,
    .official-branding .site-branding__title {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        overflow-wrap: break-word !important;   /* 不用 word-break，见顶部说明 */
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
        max-width: 100% !important;
    }

    /* badge 让位给站点名 */
    .official-branding__badge {
        display: none !important;
    }
}

/* ---- 极窄屏 ≤420px：再压一档 ---- */
@media (max-width: 420px) {
    .site-branding__title,
    .official-branding .site-branding__title {
        font-size: 0.88rem !important;
    }
}

/* ---- 协议帧 / 教程小字：德文长词（Funktionscode、Zerlegen…）
        默认不可断词，被父级 flex 压扁后会溢出 ---- */
.pf-cell,
.pf-cell * {
    min-width: 0;
    overflow-wrap: break-word;
}
.frame-learning-entry,
.frame-learning-entry * {
    min-width: 0;
    overflow-wrap: break-word;
}