/* 1.3.0 rc3 Blood FX builder (bloodfx-builder.js): one column, pinned head + footer, one scroll area */

/* splitter: preview | builder, builder width remembered (30-55 %, default 40 %) */
body.bfx-on .main{grid-template-columns:minmax(480px,1fr) 16px minmax(380px,var(--bfx-w,40%));gap:0}
.bfx-split{cursor:col-resize;position:relative;touch-action:none}
.bfx-split::after{content:"";position:absolute;left:7px;top:30%;bottom:30%;width:2px;border-radius:1px;background:var(--edge);transition:background .15s}
.bfx-split:hover::after,.bfx-split.drag::after,.bfx-split:focus-visible::after{background:var(--accent-edge)}

/* the 1.2.5 stepper chrome is replaced on the Blood FX tab */
body.bfx-on .stp-prog,body.bfx-on .stp-nav,body.bfx-on #panel-scroll>.stp,body.bfx-on #stp-look,body.bfx-on #sec-headshot-layers{display:none!important}
/* Smoke's Single / Gradient group is moved out of the hidden step into the builder card. */
body.bfx-on #bfx #smoke-colour{display:flex!important;flex-direction:column;gap:8px}
/* The Smoke look's custom colour is the same swatch row the other effects use. */
body.bfx-on #bfx #colour-smoke{display:flex;align-items:center;gap:12px;margin-top:4px}
body.bfx-on:not(.bfx-tab) #bfx,body.bfx-on:not(.bfx-tab) #bfx-head,body.bfx-on:not(.bfx-tab) #bfx-nav{display:none!important}
body.bfx-on.bfx-tab:not(.bfx-at-build) #export-bar{display:none!important}
body.bfx-on.bfx-tab.bfx-at-build #export-bar{display:flex!important}
body.bfx-on.bfx-tab #preview-label{display:none}
body.bfx-on.bfx-tab #preview-timeline .labels>span:not(#preview-duration){display:none}
body.bfx-busy #bfx .bfx-card,body.bfx-busy #bfx [data-ans]{pointer-events:none}
body.bfx-wait #bfx{cursor:progress}
body.bfx-wait #bfx .bfx-card,body.bfx-wait #bfx [data-ans]{opacity:.7}

/* pinned head */
.bfx-head{flex:none;display:flex;align-items:center;gap:10px;padding:12px 14px 10px;border-bottom:1px solid var(--edge)}
.bfx-head .sp,.bfx-nav .sp{flex:1}
.bfx-meter{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text-2)}
.bfx-meter b{font-weight:700;font-variant-numeric:tabular-nums}
.bfx-meter .c{display:inline-flex;gap:3px}
.bfx-meter .c i{width:9px;height:14px;border-radius:3px;background:rgba(255,255,255,.08);box-shadow:inset 0 0 0 1px var(--edge)}
.bfx-meter .c i.u{background:var(--accent)}
.bfx-meter.full .c i.u{background:var(--warn)}
.bfx-meter.over b,.bfx-meter.over .c i.u{color:var(--danger);background:var(--danger)}
#bfx-adv-btn.on{color:var(--accent);border-color:var(--accent-edge);background:var(--accent-soft)}

/* pinned footer */
.bfx-nav{flex:none;display:flex;align-items:center;gap:10px;padding:10px 14px 12px;border-top:1px solid var(--edge);background:var(--panel)}
.bfx-nav[hidden],.bfx-nav [hidden]{display:none!important}
#bfx-return{margin:8px 14px 0;align-self:flex-start}
#bfx-return[hidden]{display:none}

/* tracers are the builder's last step (On / Off) and go in the one Build pack: no Tracers tab, no separate tracer build */
body.bfx-on #modtype-tabs [data-mod="tracers"]{display:none!important}
body.bfx-on[data-mod="tracers"] #export-bar{display:none!important}
#bfx #btn-tracers-build,#bfx .tr-note#tr-scope{display:none!important}
.bfx-trb .bfx-slot>#tracers-body{display:block;margin:0 -4px}
.bfx-incl{font-size:13px;font-weight:600;color:var(--text);padding:2px 2px 8px}

/* the column */
.bfx{display:flex;flex-direction:column;gap:8px;padding:8px 8px 16px}
.bfx-step{border-radius:var(--r-row);background:var(--raise);box-shadow:inset 0 0 0 1px var(--edge)}
.bfx-step.open{background:rgba(255,255,255,.05);box-shadow:inset 0 0 0 1px var(--edge-hi)}
.bfx-step.bfx-over,.bfx-sumr.bfx-over{box-shadow:inset 0 0 0 1px var(--danger)}
.bfx-sh{display:flex;align-items:center;gap:10px;padding:11px 12px;cursor:pointer;border-radius:var(--r-row)}
.bfx-sh:hover{background:var(--raise-hi)}
.bfx-sh b{font-weight:700;white-space:nowrap}
.bfx-sh small{color:var(--dim);font-size:11.5px}
.bfx-nb{flex:none;width:22px;height:22px;border-radius:50%;display:inline-grid;place-items:center;font-size:11.5px;font-weight:700;background:rgba(255,255,255,.08);color:var(--text-2)}
.bfx-step.open .bfx-nb{background:var(--accent);color:var(--ink)}
.bfx-chip{flex:1;min-width:0;min-height:28px;display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;text-align:right;color:var(--text-2);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bfx-ed{color:var(--accent);font-weight:650;font-size:12px}
.bfx-sb{padding:2px 12px 14px;display:flex;flex-direction:column;gap:12px}

.bfx-sec{display:flex;flex-direction:column;gap:10px}
.bfx-sec.sub{padding-left:10px;border-left:2px solid var(--edge)}
.bfx-st{font-size:13px;font-weight:700;letter-spacing:.06em;line-height:1.35;text-transform:uppercase;color:var(--dim)}
.bfx-st.sub{margin-top:4px}
.bfx-cap{font-size:11.5px;color:var(--dim)}
.bfx-why{font-size:11.5px;color:var(--muted);line-height:1.4}
.bfx-note{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--warn);padding:6px 8px}

/* questions */
.bfx-q{display:flex;flex-direction:column;gap:8px}
.bfx-qt{font-weight:650}
.bfx-qb{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.bfx-qa{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text-2)}
.bfx-qa b{margin-left:auto;color:var(--text);font-weight:650}

/* cards */
.bfx-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:6px}
.bfx-card{position:relative;display:flex;flex-direction:column;gap:3px;padding:9px 10px;border-radius:10px;background:var(--field);box-shadow:inset 0 0 0 1px var(--edge);min-height:52px}
.bfx-card:hover{box-shadow:inset 0 0 0 1px var(--edge-hi)}
.bfx-card.on{background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.bfx-card b{font-weight:650;font-size:13px}
.bfx-card small{font-size:11px;color:var(--dim);line-height:1.3}
.bfx-card[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
.bfx-card .bfx-li{color:var(--text-2)}
.bfx-cost{position:absolute;top:8px;right:9px;font-size:11px;font-weight:700;color:var(--muted)}
.bfx-badge{font-style:normal;font-size:10.5px;font-weight:650;color:#9fe3b0}
.bfx-grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr))}
.bfx-motions .lm-th{width:100%;height:34px;border-radius:6px}
.bfx-mc{align-items:flex-start}
.bfx-more{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-weight:650;font-size:12.5px;align-self:flex-start}
.bfx-fold{display:block;margin-top:8px}
.bfx-fold summary{cursor:pointer;font-size:12.5px;font-weight:650}
.bfx-grp{display:flex;flex-direction:column;gap:6px}
.bfx-gt{font-size:11.5px;color:var(--muted);font-weight:650}
.bfx-grad{display:block;height:10px;border-radius:5px}
.bfx-card[style*="--sw"]::before{content:"";display:block;height:8px;border-radius:4px;background:var(--sw);margin-bottom:4px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.3)}
.bfx-dot{display:inline-block;width:14px;height:14px;border-radius:50%}
.bfx-tr .bfx-card{flex-direction:row;align-items:center;gap:8px;min-height:40px}

/* locked effect row + undo */
.bfx-locked{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;background:var(--field)}
.bfx-locked>span:nth-child(2){flex:1;display:flex;flex-direction:column}
.bfx-locked small{color:var(--dim);font-size:11.5px}
.bfx-undo{font-size:13px;color:var(--text-2);display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.bfx-lock{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:var(--danger);background:var(--danger-soft);border-radius:10px;padding:8px 10px}
.link.dim{color:var(--muted)}
/* Change effect, Remove, Undo, and any other text button in the column were
   only the glyph line (about 15px). The button box is the hit area. */
#bfx button{min-height:28px;box-sizing:border-box}
#bfx button.link{display:inline-flex;align-items:center;padding:4px 10px;line-height:1.2}

/* Adjust / Advanced */
.bfx-adj{border-radius:10px;box-shadow:inset 0 0 0 1px var(--edge)}
.bfx-adj-h,.bfx-adv-h{display:flex;align-items:center;gap:6px;width:100%;padding:8px 10px;font-weight:650;font-size:12.5px;color:var(--text-2)}
.bfx-adj-b{display:flex;flex-direction:column;gap:12px;padding:4px 10px 12px}
.bfx-adv{border-top:1px solid var(--edge);margin:0 -10px}
.bfx-adv-h{color:var(--muted)}
.bfx-adv-b{display:flex;flex-direction:column;gap:12px;padding:4px 10px 4px}
.bfx-adj-b[hidden],.bfx-adv-b[hidden]{display:none}
.bfx-slot{display:contents}
.bfx-slot>*{margin:0!important}
.bfx-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bfx-lab{font-size:13px;color:var(--text-2);font-weight:550}
.bfx-row>.bfx-lab:first-child{flex:1}
.bfx-seg{display:inline-flex;flex-wrap:wrap;gap:4px;max-width:100%;padding:2px;border-radius:9px;background:var(--field);box-shadow:inset 0 0 0 1px var(--edge)}
.bfx-seg button{min-height:28px;padding:6px 12px;border-radius:7px;font-size:13px;font-weight:600;color:var(--text-2)}
.bfx-seg button.on{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-edge)}
.bfx-sw{display:inline-flex;gap:6px;align-items:center}
/* The colour box is the button (class bfx-sw). A descendant selector missed it,
   so the dot collapsed to the text line. */
.bfx-sw button,
#bfx button.bfx-sw{width:28px;height:28px;min-width:28px;min-height:28px;padding:0;flex:0 0 28px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.35)}
.bfx-sw button[aria-checked="true"],
#bfx button.bfx-sw[aria-pressed="true"]{box-shadow:0 0 0 2px var(--accent)}
.bfx-cin input{width:30px;height:24px;border:0;background:none;padding:0;cursor:pointer}
.bfx-hex{width:78px;height:24px;margin-left:6px;border:0;border-radius:6px;background:var(--field);color:var(--text);font:600 12px ui-monospace,monospace;padding:0 6px}
.bfx-range{display:flex;flex-direction:column;gap:4px}
.bfx-range output{font-size:12.5px;color:var(--text-2);font-variant-numeric:tabular-nums}
.bfx-rt{position:relative}
/* The builder column is a fixed share of the window, so a 4px track and a
   16px thumb stayed hard to grab at 1080p and 1440p. The input box is the
   hit area. The thumb style is left to the page so it stays visible. */
#bfx input[type=range]{width:100%;height:28px;margin:0;position:relative;z-index:1;cursor:pointer;accent-color:var(--accent,#d4d7dd)}
#bfx input[type=range]::-webkit-slider-thumb{width:22px;height:22px}
#bfx input[type=range]::-moz-range-thumb{width:22px;height:22px}

.bfx-range + .bfx-range,.bfx-range + .bfx-row,.bfx-row + .bfx-range{margin-top:8px}
/* filmed values inside the slider's (studied) range: a shaded band on the track */
.bfx-rt .bfx-band{position:absolute;top:50%;height:10px;margin-top:-5px;border-radius:5px;background:rgba(159,227,176,.16);box-shadow:inset 0 0 0 1px rgba(159,227,176,.28);pointer-events:none}
.bfx-rt .bfx-band.pt{width:4px!important;margin-left:-2px}
/* the builder draws its own spin-speed range (90-270) under the borrowed spin direction buttons */
#bfx #sign-spin-wrap #sign-spin-speed{display:none}
.bfx-dark{display:flex;gap:6px;align-items:flex-start;color:var(--warn,#f2b45a)}

/* Build pack */
.bfx-sum{display:flex;flex-direction:column;gap:4px}
.bfx-sumr{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;background:var(--field);font-size:12.5px}
.bfx-sumr>span{color:var(--muted);min-width:96px}
.bfx-sumr>b{flex:1;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bfx-sumr.dim{opacity:.85}
.bfx-budget{display:flex;flex-direction:column;gap:6px}
.bfx-brow{display:grid;grid-template-columns:118px 1fr auto;gap:10px;align-items:center;font-size:12px;color:var(--text-2)}
.bfx-brow b{font-variant-numeric:tabular-nums;font-weight:650}
.bfx-bar{height:6px;border-radius:3px;background:rgba(255,255,255,.07);overflow:hidden}
.bfx-bar i{display:block;height:100%;background:var(--accent)}
.bfx-brow.bad{color:var(--danger)} .bfx-brow.bad .bfx-bar i{background:var(--danger)}
.bfx-brow.pend b{color:var(--dim);font-weight:500}
.bfx-recipe{font-family:var(--mono);font-size:11.5px;line-height:1.5;white-space:pre-wrap;user-select:text;background:var(--field);border-radius:10px;padding:10px;color:var(--text-2);max-height:220px;overflow:auto}

/* preview: options popover + timeline markers */
.bfx-pvo-btn{font-size:16px;font-weight:700;letter-spacing:.05em}
.bfx-pvo{padding:10px 12px;min-width:280px;display:flex;flex-direction:column;gap:8px}
.bfx-pvo .mh{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.bfx-pvo-b{display:flex;flex-direction:column;gap:10px}
.bfx-pvo-row{display:flex;align-items:center;gap:8px}
.bfx-marks{position:absolute;left:0;right:0;top:0;height:14px;font-size:10.5px;color:var(--dim);font-weight:600}
.bfx-marks span{position:absolute;transform:translateX(-2px);white-space:nowrap;padding-left:5px;border-left:1px solid var(--edge-hi)}
.bfx-marks span.cur{color:var(--accent);border-left-color:var(--accent)}
.bfx-start{padding:6px;min-width:260px;max-height:70vh;overflow:auto}
#bfx #sign-cutout-group:has(#sign-bg-action[hidden]){display:none}
.bfx-val{display:inline-flex;align-items:center;gap:3px}
.bfx-num{width:5.2em;min-height:28px;padding:4px 6px;font:inherit;font-size:13px;font-variant-numeric:tabular-nums;text-align:right;color:var(--text);background:transparent;border:1px solid var(--border,rgba(255,255,255,.14));border-radius:5px}
.bfx-num:focus{outline:none;border-color:var(--accent,#9fe3b0)}
.bfx-unit{font-size:12.5px;color:var(--text-2)}
.bfx-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
