/* WindFire module switcher (js/modsw.js), shared by the NC Viewer, Design and CAM headers (Claude; Windfire Admin) */
.wf-modsw {
  --ms-line: var(--line, #2f3540); --ms-bg: var(--panel2, var(--pan2, #232831)); --ms-fg: var(--fg, var(--tx, #dfe4ea));
  --ms-mut: var(--muted, var(--mut, #8b95a3)); --ms-acc: var(--acc, #ff7a1a); --ms-pop: var(--panel, var(--pan, #1c2027));
  display: inline-flex; align-items: center; flex: 0 0 auto; position: relative; min-width: 0; font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wf-modsw:empty { display: none; }
.wf-modsw .ms-btn:focus-visible, .wf-modsw .ms-mi:focus-visible { outline: 2px solid var(--ms-acc); outline-offset: 1px; }
.wf-modsw .ms-compact { display: inline-flex; position: relative; }
.wf-modsw .ms-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--ms-acc); border-radius: 8px; background: color-mix(in srgb, var(--ms-acc) 14%, var(--ms-pop)); color: var(--ms-fg); font: inherit; cursor: pointer; white-space: nowrap; }
.wf-modsw .ms-btn svg { color: var(--ms-acc); }
.wf-modsw .ms-bt { display: inline-flex; align-items: baseline; gap: 4px; }
.wf-modsw .ms-bl { font-weight: 500; color: var(--ms-mut); }
.wf-modsw .ms-bl::after { content: ":"; }
.wf-modsw .ms-car { font-size: 10px; opacity: .8; }
.wf-modsw .ms-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 80; min-width: 250px; display: flex; flex-direction: column; gap: 2px; padding: 4px; background: var(--ms-pop); border: 1px solid var(--ms-line); border-radius: 9px; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.wf-modsw .ms-menu[hidden] { display: none; }
.wf-modsw .ms-mi { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 7px; color: var(--ms-fg); text-decoration: none; }
.wf-modsw .ms-mi svg { margin-top: 1px; color: var(--ms-mut); }
.wf-modsw .ms-mi b { display: block; font-weight: 600; white-space: pre; }
.wf-modsw .ms-mi small { display: block; margin-top: 3px; font-weight: 400; color: var(--ms-mut); line-height: 1.3; }
.wf-modsw .ms-mi:hover { background: color-mix(in srgb, var(--ms-fg) 9%, transparent); }
.wf-modsw .ms-mi.cur { background: color-mix(in srgb, var(--ms-acc) 18%, var(--ms-pop)); }
.wf-modsw .ms-mi.cur svg { color: var(--ms-acc); }
@media (max-width: 640px) { .wf-modsw .ms-btn { padding: 5px 8px; } }
/* phones: Design / CAM show the switcher in place of their brand menu (same module entries, nothing is lost),
   and the button stacks its label ("MODULES" over the current module) to stay narrow */
@media (max-width: 640px) { #top > #appSw { display: none; } }
@media (max-width: 480px) {
  .wf-modsw .ms-btn { gap: 5px; padding: 3px 8px; }
  .wf-modsw .ms-bt { flex-direction: column; align-items: flex-start; gap: 1px; }
  .wf-modsw .ms-bl { font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; }
  .wf-modsw .ms-bl::after { content: none; }
  .wf-modsw .ms-bc { font-size: 12.5px; }
}
/* first-run hint */
.wf-ms-hint { position: fixed; z-index: 10000; width: min(300px, calc(100vw - 16px)); padding: 12px 34px 10px 14px; border-radius: 10px; background: var(--acc, #ff7a1a); color: #1a1205; font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.wf-ms-hint .arr { position: absolute; top: -7px; width: 14px; height: 14px; margin-left: -7px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.wf-ms-hint b { display: block; font-size: 14px; }
.wf-ms-hint p { margin: 4px 0 8px; }
.wf-ms-hint .row { display: flex; justify-content: flex-end; }
.wf-ms-hint .ok { padding: 5px 14px; border: 0; border-radius: 7px; background: #1a1205; color: #fff; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.wf-ms-hint .x { position: absolute; top: 4px; right: 6px; width: 26px; height: 26px; border: 0; background: none; color: #1a1205; font-size: 18px; line-height: 1; cursor: pointer; border-radius: 6px; }
.wf-ms-hint .x:hover { background: rgba(0,0,0,.12); }
/* unsaved-work dialog */
.wf-ms-dlg { max-width: 420px; padding: 18px 20px; border: 1px solid var(--line, #2f3540); border-radius: 12px; background: var(--panel, var(--pan, #1c2027)); color: var(--fg, var(--tx, #dfe4ea)); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wf-ms-dlg::backdrop { background: rgba(0,0,0,.45); }
.wf-ms-dlg h3 { margin: 0 0 8px; font-size: 17px; }
.wf-ms-dlg p { margin: 0 0 8px; }
.wf-ms-dlg .m2 { color: var(--muted, var(--mut, #8b95a3)); }
.wf-ms-dlg .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.wf-ms-dlg button { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line, #2f3540); background: transparent; color: inherit; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.wf-ms-dlg button.stay { background: var(--acc, #ff7a1a); border-color: var(--acc, #ff7a1a); color: #111; }

/* owner 2026-11-22: one navigation only - the WindFire <module> dropdown; the older brand app switchers are hidden
   (their markup stays for scripts that still reference it) */
#top #appSw, #top .appsw { display: none !important; }
.wf-modsw .ms-bl::after { content: none !important; }
.wf-modsw .ms-bl { margin-right: 4px; font-weight: 700; color: var(--ms-tx, inherit); text-transform: none !important; letter-spacing: 0 !important; }
/* owner 2026-11-22: small Beta flag on Surfaces */
.ms-beta { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 8px; background: #ff7a1a; color: #17100a; font-size: 9px; font-weight: 700; line-height: 15px; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
