/* Wolfer customer accounts (assets/wolfer-account.js), 2026-11-10; order page 2026-11-11
   沃孚尔用户系统：索取框、工具条按钮、注册 / 登录 / 索取 / 账户对话框（2026-11-12 起 STL 也是索取，不再直接下载）。
   The dialog carries .cad-dialog as well, so the viewer's own resets (fonts, buttons, focus rings — cad-viewer.css)
   apply to it; everything here is prefixed wfa- and touches nothing else on the page. */

/* ---------- on a page without the viewer's stylesheet (the order page) ----------
   The dialog gets .wfa-solo there; this block is what it would otherwise take from cad-viewer.css. It comes first and
   is written with :where() so that, exactly as on the 3D library pages, every wfa- rule below wins over it. */
.wfa-solo, .wfa-toast {
  --cad-ink: #163449; --cad-ink-2: #37586f; --cad-muted: #698294; --cad-faint: #8da3b2; --cad-blue: #1673b1; --cad-blue-dark: #0d5d94;
  --cad-blue-soft: #eaf4fb; --cad-line: #dce7ef; --cad-line-2: #e7eef4; --wf-ink: var(--cad-ink);
  color: var(--cad-ink); line-height: normal; font-synthesis: none; -webkit-font-smoothing: antialiased;
}
dialog.wfa-solo { margin: auto; padding: 0; border: 1px solid #d3e2ec; border-radius: 14px; background: #fff; box-shadow: 0 30px 80px #0d2a3f40; }
dialog.wfa-solo::backdrop { background: #0f2a3d59; backdrop-filter: blur(2px); }
:where(.wfa-solo) *, :where(.wfa-solo) *::before, :where(.wfa-solo) *::after { box-sizing: border-box; }
:where(.wfa-solo) a { color: inherit; text-decoration: none; }
:where(.wfa-solo) :is(button, input, textarea) { font: inherit; }
:where(.wfa-solo) :is(button, a, input) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:where(.wfa-solo) button { margin: 0; color: inherit; cursor: pointer; border: 0; background: none; }
:where(.wfa-solo) button:disabled { cursor: not-allowed; opacity: .45; pointer-events: none; }
:where(.wfa-solo) :is(button, a, input, textarea, summary):focus-visible { outline: 3px solid #1684c9; outline-offset: 2px; }
:where(.wfa-solo) svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:where(.wfa-solo) .cad-dialog-inner { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; }
:where(.wfa-solo) .cad-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
:where(.wfa-solo) .cad-dialog-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0; }
:where(.wfa-solo) .cad-dialog-lead { margin: 0; color: var(--cad-muted); font-size: 13px; line-height: 1.7; }
:where(.wfa-solo) .cad-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 15px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
:where(.wfa-solo) .cad-button-primary { color: #fff; background: var(--cad-blue); border-color: var(--cad-blue); }
:where(.wfa-solo) .cad-button-primary:hover { background: var(--cad-blue-dark); border-color: var(--cad-blue-dark); }
:where(.wfa-solo) .cad-button-secondary { color: #557489; background: #fff; border-color: #dce6ed; }
:where(.wfa-solo) .cad-button-secondary:hover { background: #f4f9fc; color: var(--cad-blue); border-color: #bad3e4; }
:where(.wfa-solo) .cad-icon-button { width: 38px; height: 38px; display: grid; place-items: center; background: #ffffffd0; color: #5c7e96; border: 1px solid #cfdee9; border-radius: 8px; transition: color .15s, background .15s, border-color .15s; }
:where(.wfa-solo) .cad-icon-button svg { width: 17px; height: 17px; }
:where(.wfa-solo) .cad-icon-button:hover { background: #fff; border-color: #93b8d2; color: var(--cad-blue); }
.wfa-toast { position: fixed; z-index: 90; left: 50%; bottom: 30px; max-width: calc(100% - 32px); padding: 10px 16px; transform: translateX(-50%); border-radius: 9px; background: #163449eb; color: #fff; font-size: 13px; box-shadow: 0 10px 30px #0d2a3f40; }
.wfa-toast[hidden] { display: none; }

/* ---------- the box above the quote button ---------- */
.wfa-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--cad-line, #dce7ef); border-radius: 10px; background: linear-gradient(180deg, #f6fafd, #fff); }
.wfa-box[hidden], .wfa-tool[hidden] { display: none !important; }
.wfa-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.wfa-box-head strong { font-size: 13px; font-weight: 600; color: var(--cad-ink, #163449); }
.wfa-who { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: var(--cad-muted, #698294); font-size: 12px; }
.wfa-who svg { width: 14px; height: 14px; flex: none; }
.wfa-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.wfa-box-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wfa-box-row .cad-button { padding-inline: 8px; white-space: normal; text-align: center; }
.wfa-box-row .cad-button svg { flex: none; }
.cad-button.wfa-strong { color: var(--cad-blue, #1673b1); border-color: #bad3e4; background: var(--cad-blue-soft, #eaf4fb); font-weight: 600; }
.cad-button.wfa-strong:hover { background: #dfeef8; border-color: #93b8d2; }
.wfa-box-note { margin: 0; color: var(--cad-muted, #698294); font-size: 11.5px; line-height: 1.6; }
.wfa-box-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--cad-faint, #8da3b2); }
.wfa-box-links button, .wfa-box-links a, .wfa-link { padding: 0; color: var(--cad-blue, #1673b1); font-size: 12px; font-weight: 500; text-decoration: underline; text-decoration-color: #1673b155; text-underline-offset: 3px; }
.wfa-box-links button:hover, .wfa-box-links a:hover, .wfa-link:hover { color: var(--cad-blue-dark, #0d5d94); text-decoration-color: currentColor; }

/* ---------- the dialog ---------- */
.cad-dialog.wfa-dialog { width: min(500px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; }
.wfa-inner { gap: 14px; }
.wfa-inner .cad-dialog-head h2 { display: flex; align-items: center; gap: 6px; color: var(--cad-ink, #163449); line-height: 1.3; }
.wfa-back { width: 26px; height: 26px; border-radius: 6px; font-size: 22px; line-height: 1; color: var(--cad-muted, #698294); }
.wfa-back:hover { background: #f1f6fa; color: var(--cad-blue, #1673b1); }
.wfa-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: #eef4f8; }
.wfa-tabs button { min-height: 34px; border-radius: 7px; color: var(--cad-muted, #698294); font-size: 13px; font-weight: 500; }
.wfa-tabs button[aria-selected="true"] { background: #fff; color: var(--cad-ink, #163449); box-shadow: 0 1px 3px #0d2a3f1f; }
.wfa-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.wfa-form[hidden] { display: none; }
.wfa-form h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--cad-ink, #163449); }
.wfa-form > .cad-button { width: 100%; min-height: 42px; }
.wfa-form.is-working { cursor: progress; }
.wfa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wfa-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
.wfa-field > span { color: var(--cad-ink-2, #37586f); font-size: 12px; font-weight: 500; line-height: 1.4; }
.wfa-field > span i { margin-left: 4px; color: var(--cad-faint, #8da3b2); font-style: normal; font-weight: 400; }
.wfa-dialog .wfa-input { width: 100%; min-height: 40px; margin: 0; padding: 8px 11px; border: 1px solid #cfdee9; border-radius: 8px; background: #fff; color: var(--cad-ink, #163449); font-size: 14px; line-height: 1.4; box-shadow: none; appearance: none; }
.wfa-dialog textarea.wfa-input { min-height: 84px; resize: vertical; font-family: inherit; }
.wfa-dialog .wfa-input:hover { border-color: #b3cbdb; }
.wfa-dialog .wfa-input:focus { border-color: var(--cad-blue, #1673b1); outline: 3px solid #1684c933; outline-offset: 0; }
.wfa-dialog .wfa-input::placeholder { color: #a5b6c2; }
.wfa-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wfa-check { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--cad-ink-2, #37586f); font-size: 12.5px; line-height: 1.55; cursor: pointer; }
.wfa-check input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--cad-blue, #1673b1); }
.wfa-check .wfa-link { font-size: inherit; }
.wfa-center { align-self: center; }
.wfa-msg { margin: 0; padding: 9px 12px; border-radius: 8px; background: #fdf1ef; color: #a23a2c; font-size: 12.5px; line-height: 1.6; }
.wfa-msg.is-ok { background: #edf7f1; color: #1f6b46; }
.wfa-msg[hidden] { display: none; }
.wfa-model { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 10px 12px; border-radius: 8px; background: #f3f8fb; }
.wfa-model strong { font-size: 14px; font-weight: 600; color: var(--cad-ink, #163449); overflow-wrap: anywhere; }
.wfa-model span { color: var(--cad-muted, #698294); font-size: 12px; line-height: 1.5; }
/* the request dialog: which files (2026-11-12) */
.wfa-formats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: 0; }
.wfa-formats > span { flex-basis: 100%; color: var(--cad-ink-2, #37586f); font-size: 12px; font-weight: 500; line-height: 1.4; }
.wfa-formats .wfa-check { align-items: center; color: var(--cad-ink, #163449); font-size: 13.5px; font-weight: 600; }
.wfa-formats .wfa-check input { margin: 0; }
.wfa-dialog .wfa-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #bad3e4; border-radius: 8px; background: var(--cad-blue-soft, #eaf4fb); color: var(--cad-blue, #1673b1); font-size: 13.5px; font-weight: 600; }
.wfa-dialog .wfa-go:hover { background: #dfeef8; border-color: #93b8d2; color: var(--cad-blue-dark, #0d5d94); }
.wfa-privacy { display: flex; flex-direction: column; gap: 10px; max-height: min(56vh, 460px); overflow: auto; padding-right: 4px; }
.wfa-privacy p { margin: 0; color: var(--cad-ink-2, #37586f); font-size: 12.5px; line-height: 1.75; }
.wfa-more { border-top: 1px solid var(--cad-line-2, #e7eef4); padding-top: 10px; }
.wfa-more > summary { cursor: pointer; color: var(--cad-ink, #163449); font-size: 13px; font-weight: 600; list-style-position: inside; }
.wfa-more > summary:hover { color: var(--cad-blue, #1673b1); }
.wfa-more[open] > summary { margin-bottom: 10px; }
.wfa-history p { margin: 0; color: var(--cad-muted, #698294); font-size: 12.5px; }
.wfa-history ul { display: flex; flex-direction: column; gap: 6px; max-height: 220px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.wfa-history li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; font-size: 12.5px; }
.wfa-history li span { color: var(--cad-faint, #8da3b2); font-variant-numeric: tabular-nums; }
.wfa-history li b { font-weight: 500; color: var(--cad-ink, #163449); overflow-wrap: anywhere; }
.wfa-history li b a { color: var(--cad-blue, #1673b1); text-decoration: underline; text-underline-offset: 3px; }
.wfa-history li i { color: var(--cad-muted, #698294); font-style: normal; font-size: 11.5px; }
.cad-button.wfa-danger { color: #a23a2c; background: #fff; border-color: #ecc9c3; }
.cad-button.wfa-danger:hover { background: #fdf1ef; border-color: #d9a59c; }
.wfa-foot { justify-content: center; padding-top: 4px; }

@media (max-width: 560px) {
  .wfa-grid { grid-template-columns: 1fr; }
  .cad-dialog.wfa-dialog { width: calc(100% - 16px); }
  .wfa-dialog .wfa-input { font-size: 16px; } /* iOS zooms the page on smaller text fields */
}
/* phones: the box under the viewer already offers the request; the stage tools keep their two rows.
   Embedded viewers (product pages) have no box, so the button stays. */
@media (max-width: 599px) {
  html:not(.cad-embed) .wfa-tool { display: none; }
}
html.cad-embed--hero .wfa-tool { display: none !important; }
