/* dx_topicadmin_fix_v26112122 — 主题管理弹窗交互修复（真机复现版，取代 v26112120/21）
 *
 * 【真机诊断结论】管理员登录后真机点开高亮弹窗实测：
 *  1) 有效期下拉菜单 id=calendarexp_*_menu(class=p_pop)，内含 5 个 <a>(一天/一周/一个月/三个月/自定义)。
 *     dx_c16_v26112001.css 的 `.p_pop a{display:inline-flex!important;min-height:30px!important}` 把这些
 *     <a> 从 Discuz 原生的 display:block(竖排下拉) 改成了 inline-flex，导致 5 项横排成一行、朝右显示。
 *     这才是用户说的"有效期朝右、不在下方"的真正根因 —— 与 z-index / position:fixed 无关。
 *  2) 颜色面板 #highlight_color_ctrl_menu(cmen) 与背景色 #chighlight_bgcolor_ctrl_menu(iframe) 原本正常。
 *  3) 日历 #calendar(点"自定义"后 showcalendar 弹出) 本身会显示，但层级可能被弹窗压住。
 *
 * 【修复】
 *  A) 把 .p_pop/.p_pof/.sllt 下的 <a> 恢复 display:block 竖排（Discuz 原生行为），
 *     保留颜色/垂直居中(ISOLATION)等玻璃观感，只改布局相关属性。仅作用于下拉菜单链接。
 *  B) 日历 #calendar 提 z-index，确保在管理弹窗之上可选日期。
 *  C) 沿用 v26112121 已生效的：菜单 z-index 提升 + .m_c/.flb/.o.pns 去 blur(高特异 body:is)。
 *     注意：不再干预菜单 position —— Discuz 原生用 inline style 设 absolute/fixed，由 showMenu 计算，勿覆盖。
 * 仅作用于 forumdisplay/viewthread，不影响其它页面。
 */

/* A) .p_pop 下拉项恢复竖排（真机验证：改 block 后 5 项 y 依次递增，向下弹出） */
html:root .p_pop a,
html:root .p_pof a,
html:root .sllt a,
html:root [id^="calendarexp_"] a{
  display:block!important;
  width:auto!important;
  min-height:0!important;
  padding:6px 12px!important;
  line-height:1.5!important;
  white-space:nowrap!important;
}

/* B) 日期选择器提层，确保可选 */
html:root #calendar{z-index:2147483646!important}

/* C1) 去模糊：匹配 c19 高特异 body:is(...)，实测 computed backdrop-filter: none */
html:root body:is(.pg_forumdisplay,.pg_viewthread) #fwin_mods.dx-topicadmin-fwin .m_c,
html:root body:is(.pg_forumdisplay,.pg_viewthread) #fwin_mods.dx-topicadmin-fwin .flb,
html:root body:is(.pg_forumdisplay,.pg_viewthread) #fwin_mods.dx-topicadmin-fwin .o.pns{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* C2) 弹出菜单提层（不设 position，保留 Discuz 原生定位） */
html:root body.pg_viewthread #highlight_color_ctrl_menu,
html:root body.pg_forumdisplay #highlight_color_ctrl_menu,
html:root body.pg_viewthread [id^="calendarexp_"],
html:root body.pg_forumdisplay [id^="calendarexp_"],
html:root body.pg_viewthread [id^="expiration"][id$="_menu"],
html:root body.pg_forumdisplay [id^="expiration"][id$="_menu"],
html:root body.pg_viewthread #reasonselect,
html:root body.pg_forumdisplay #reasonselect,
html:root body.pg_viewthread [id*="highlight_bgcolor"][id$="_menu"],
html:root body.pg_forumdisplay [id*="highlight_bgcolor"][id$="_menu"],
html:root body.pg_viewthread [id*="highlight_bgcolor"].p_pop,
html:root body.pg_forumdisplay [id*="highlight_bgcolor"].p_pop,
html:root body.pg_viewthread [id*="highlight_bgcolor"].cmen,
html:root body.pg_forumdisplay [id*="highlight_bgcolor"].cmen,
html:root body.pg_viewthread #moveto_ctrl_menu,
html:root body.pg_forumdisplay #moveto_ctrl_menu,
html:root body.pg_viewthread #threadtypeid_ctrl_menu,
html:root body.pg_forumdisplay #threadtypeid_ctrl_menu{
  z-index:2147483647!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
