/* ============================================================
   祐达 · 界面语言样式（三段胶囊 + 首次提示气泡）
   单独成文件：新 URL 不受 style.css 缓存影响，改这里不用动主样式表
   由 includes/header.php 在 style.css 之后引入
   ============================================================ */
/* ============================================================
   界面语言：三段胶囊 + 首次提示气泡（v20261118）
   - 胶囊在顶栏搜索框之后，选中项橙底白字
   - 未见过 ud_lang_hint 时胶囊脉冲高亮，并弹一次气泡
   - 登录用户窄屏收起胶囊，入口落在用户下拉「界面语言」行
   ============================================================ */
.lang-pill{display:inline-flex;align-items:center;gap:2px;height:34px;padding:2px;border:1px solid var(--line);border-radius:999px;background:#fff;flex:0 0 auto}
.lang-pill a{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:30px;padding:0 10px;border-radius:999px;font-size:var(--fs-sm);line-height:1;color:var(--text-muted);text-decoration:none;transition:background .18s,color .18s}
.lang-pill a:hover{background:var(--bg-hover);color:var(--brand)}
.lang-pill a.is-on{background:var(--accent);color:#fff}
.lang-pill a.is-on:hover{background:var(--accent-dark);color:#fff}
.lang-pill-dot{width:1px;height:13px;background:var(--line);flex:0 0 auto}
.lang-pill.mini{height:24px;padding:1px;margin-left:auto}
.lang-pill.mini a{height:20px;min-width:22px;padding:0 6px;font-size:var(--fs-xs)}
.lang-pill.is-hint{box-shadow:0 0 0 3px rgba(249,115,22,.16);animation:langPillPulse 1.7s ease-in-out infinite}
@keyframes langPillPulse{0%,100%{box-shadow:0 0 0 2px rgba(249,115,22,.14)}50%{box-shadow:0 0 0 5px rgba(249,115,22,.22)}}
@media (prefers-reduced-motion:reduce){.lang-pill.is-hint{animation:none}}

/* 用户下拉里的语言行 */
.um-lang-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 14px;border-bottom:1px solid var(--line);font-size:var(--fs-xs);color:var(--text-muted)}
.um-lang-row>span{flex:0 0 auto}

/* 首次语言提示气泡：挂 body 顶层，避开顶栏容器裁切 */
.lang-hint-pop{position:fixed;top:74px;right:24px;z-index:60;width:352px;max-width:calc(100vw - 32px);padding:14px 14px 10px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 18px 46px rgba(13,37,64,.16);animation:lhIn .32s ease-out}
.lang-hint-pop.is-off{display:none}
@keyframes lhIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.lang-hint-pop{animation:none}}
.lh-head{display:flex;align-items:flex-start;gap:10px}
.lh-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;background:var(--accent-soft);color:var(--accent-dark);flex:0 0 auto}
.lh-copy{flex:1 1 auto;min-width:0}
.lh-copy b{display:block;font-size:var(--fs-h3);color:var(--brand);line-height:1.35}
.lh-copy span{display:block;margin-top:2px;font-size:var(--fs-xs);color:var(--text-muted);line-height:1.5}
.lh-close{flex:0 0 auto;width:22px;height:22px;border:0;border-radius:6px;background:transparent;color:var(--text-muted);font-size:16px;line-height:1;cursor:pointer}
.lh-close:hover{background:var(--bg-hover);color:var(--brand)}
.lh-actions{display:flex;gap:8px;margin-top:12px}
.lh-btn{flex:1 1 0;height:34px;border:1px solid var(--line-strong);border-radius:9px;background:#fff;color:var(--text);font-size:var(--fs-sm);cursor:pointer;transition:border-color .18s,background .18s,color .18s}
.lh-btn:hover{border-color:var(--accent);color:var(--accent-dark);background:var(--accent-soft)}
.lh-btn.is-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.lh-btn.is-primary:hover{background:var(--brand-dark);border-color:var(--brand-dark);color:#fff}
.lh-foot{margin-top:9px;font-size:var(--fs-xs);color:var(--text-faint);text-align:center}

/* 窄屏：登录用户的顶栏胶囊收起，改由用户下拉进入 */
@media (max-width:1279px){
  body.lang-fold .header-tools>.lang-pill{display:none}
}
@media (max-width:900px){
  .lang-hint-pop{top:auto;bottom:16px;left:12px;right:12px;width:auto}
  .lh-actions{flex-wrap:wrap}
  .lh-btn{flex:1 1 30%}
}
