/*
 * 下载前人机验证的对话框（mx-download-gate.js 建的 <dialog class="mx-gate">）。
 * 官网 BIOS 页与软件下载站共用；样子照下载站的密码框（download.css .dialog），颜色、按钮都用两站 mx.css 里的令牌和 .btn。
 * 两站 mx/ 下各一份，逐字节相同：改这里要整份拷到另一站。
 */
.mx-gate { width: min(440px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: var(--text); }
/* 去油（11-11）：对话框不加投影，靠 --line-2 细边和压暗模糊的遮罩与页面分层；本文件两站逐字节相同，下载站整份同步此版 */
.mx-gate::backdrop { background: rgba(6, 6, 7, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mx-gate-title { margin: 0 0 6px; font: 500 20px/1.4 var(--sans); }
/* 文件名原样、等宽，一行放不下就在任意处折行 */
.mx-gate-file { margin: 0 0 20px; font: 400 13px/1.6 var(--mono); color: var(--text-3); overflow-wrap: anywhere; }
/* 给 widget 预留高度（flexible 65px、compact 140px），widget 出来时对话框不跳 */
.mx-gate-widget { min-height: 65px; }
.mx-gate-widget.is-compact { min-height: 140px; }
/* 已经报错而 widget 不在（映射找不到、widget 没加载出来或出错）：收起预留的空白，不留一块空槽 */
.mx-gate-widget:empty:has(+ .mx-gate-status.is-error) { display: none; }
.mx-gate-status { min-height: 1.6em; margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.mx-gate-status.is-error { color: var(--warn); }
.mx-gate-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.mx-gate-actions .btn { height: 40px; min-width: 88px; padding: 0 18px; font-size: 14px; }
/*
 * 实心按钮的颜色在这里写全：下载站 download.css 的 .btn { color: var(--text) } 排在 mx.css 之后、优先级相同，
 * 会把 .btn-solid 的深色字盖成浅色，浅底浅字看不见（11-06 离线截图发现）。禁用态两站写法不同，这里统一。
 */
.mx-gate-actions .btn-solid { border-color: transparent; background: var(--text); color: #101012; }
.mx-gate-actions .btn-solid:hover { background: #fff; }
.mx-gate-actions .btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 480px) {
  .mx-gate { padding: 24px 20px; }
}
