/* =====================================================================
   wlk-ui.css — shared components of the creator (WP-B; SPEC §4, IMPL-PLAN §3.8).
   Tokens come from nk-base (body.nk-skin). Every selector starts with .wlk.
   The editor (WP-C) may use these classes, never redefine them.
   Markup patterns:
   switch  <button type="button" class="wlk-switch" role="switch" aria-checked="true">
             <span class="wlk-switch__tr" aria-hidden="true"><span class="wlk-switch__kn"></span></span>Linie pomocnicze</button>
   slider  <span class="wlk-slider" style="--p:30%"><span class="wlk-slider__track"></span>
             <span class="wlk-slider__fill"></span><input type="range" aria-label="…"></span>  (JS keeps --p in sync)
   pill    <span class="wlk-pill wlk-pill--success">{icon 12}<span>Bez uwag</span></span>
   check   <li class="wlk-chk wlk-chk--warn">{icon 20}<div class="wlk-chk__b"><p class="wlk-chk__t">…</p>
             <span class="wlk-meter"><span class="is-on"></span>…</span><div class="wlk-chk__acts">…</div></div></li>
   ===================================================================== */
.wlk{--sh-drawer:-14px 0 34px -14px rgba(22,21,19,.22);--scrim:rgba(22,21,19,.45);--wlk-k4h:104px}
.wlk [hidden]{display:none!important}

/* ---------- icons ---------- */
.wlk .wlk-i{flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.wlk .wlk-i15,.wlk .wlk-i--shape{stroke-width:1.5}
.wlk .wlk-i--fill{fill:currentColor;stroke:none}
.wlk .wlk-if{flex:none;fill:currentColor;stroke:none}
.wlk .wlk-i--star,.wlk .wlk-i--star4{fill:currentColor;stroke:none}
.wlk .wlk-defs{position:absolute;left:0;top:0;width:0;height:0;overflow:hidden;pointer-events:none}
.wlk .wlk-ok{color:var(--success)}

/* ---------- disabled look (Builder rule 10) ---------- */
.wlk .btn[aria-disabled="true"],.wlk .btn[aria-disabled="true"]:hover{background:var(--paper-2);color:var(--ink-3);box-shadow:none;cursor:not-allowed}
.wlk .btn[aria-disabled="true"] .btn__dot{background:var(--rule);color:var(--ink-3)}
.wlk .btn[aria-busy="true"]{cursor:progress}
.wlk .stepbtn[aria-disabled="true"]{color:var(--control);background:var(--paper-2);cursor:not-allowed}
.wlk .icon-btn[aria-disabled="true"]{color:var(--control);cursor:not-allowed}
.wlk .seg>button[aria-disabled="true"]{color:var(--control);cursor:not-allowed}
.wlk .link[aria-disabled="true"]{color:var(--ink-3);cursor:not-allowed}

/* ---------- small buttons ---------- */
.wlk .wlk-btnsm{position:relative;flex:none;display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;border-radius:var(--r-pill);background:transparent;box-shadow:inset 0 0 0 1.5px var(--ink);font:600 13px/20px var(--f-ui);color:var(--ink);white-space:nowrap;cursor:pointer}
.wlk .wlk-btnsm::before{content:"";position:absolute;left:0;right:0;top:-4px;bottom:-4px}
.wlk .wlk-btnsm .wlk-i{width:16px;height:16px;margin-left:-2px}
.wlk .wlk-btnsm:hover{background:var(--ink);color:#fff}
.wlk .wlk-textbtn{display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 2px;font:600 13px/20px var(--f-ui);color:var(--ink-2);white-space:nowrap;cursor:pointer}
.wlk .wlk-textbtn .wlk-i{width:18px;height:18px}
.wlk .wlk-textbtn:hover{color:var(--ink)}
.wlk .wlk-textbtn[aria-disabled="true"]{color:var(--control);cursor:not-allowed}
.wlk .wlk-kbd{display:inline-flex;align-items:center;height:24px;padding:0 8px;border-radius:var(--r-tag);background:#fff;box-shadow:inset 0 0 0 1.5px var(--control);font:600 12px/16px var(--f-ui);color:var(--ink);white-space:nowrap}
.wlk .wlk-ib{background:transparent;box-shadow:none;color:var(--ink-2)}
.wlk .wlk-ib:hover{box-shadow:inset 0 0 0 1.5px var(--rule);color:var(--ink)}
.wlk .wlk-hit{position:relative}
.wlk .wlk-hit::before{content:"";position:absolute;left:0;right:0;top:50%;height:44px;margin-top:-22px}
.wlk .wlk-l13{font-size:13px}
.wlk .wlk-l12{font:600 12px/18px var(--f-ui)}

/* ---------- switch ---------- */
.wlk .wlk-switch{position:relative;display:inline-flex;align-items:center;gap:10px;min-height:44px;font:600 13px/20px var(--f-ui);color:var(--ink);cursor:pointer}
.wlk .wlk-switch__tr{position:relative;flex:none;width:40px;height:24px;border-radius:12px;background:#fff;box-shadow:inset 0 0 0 1.5px var(--control);transition:background .15s ease}
.wlk .wlk-switch__kn{position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:var(--ink-3);transition:transform .15s ease}
.wlk .wlk-switch[aria-checked="true"] .wlk-switch__tr{background:var(--ink);box-shadow:none}
.wlk .wlk-switch[aria-checked="true"] .wlk-switch__kn{background:#fff;transform:translateX(16px)}

/* ---------- tool button ---------- */
.wlk .wlk-toolbtn{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 14px;border-radius:var(--r-pill);background:#fff;box-shadow:inset 0 0 0 1.5px var(--control);font:600 13px/20px var(--f-ui);color:var(--ink);white-space:nowrap;cursor:pointer}
.wlk .wlk-toolbtn .wlk-i{width:18px;height:18px}
.wlk .wlk-toolbtn:hover{box-shadow:inset 0 0 0 1.5px var(--ink)}
.wlk .wlk-toolbtn[aria-disabled="true"],.wlk .wlk-toolbtn[aria-disabled="true"]:hover{background:var(--paper-2);color:var(--ink-3);box-shadow:none;cursor:not-allowed}

/* ---------- zoom ---------- */
.wlk .wlk-zoom{display:inline-flex;align-items:center;height:52px;padding:4px;border-radius:var(--r-pill);background:#fff;box-shadow:inset 0 0 0 1px var(--rule),var(--sh-1)}
.wlk .wlk-zoom .icon-btn{background:transparent;box-shadow:none;color:var(--ink)}
.wlk .wlk-zoom__pct{min-width:60px;height:44px;padding:0 4px;font:600 13px/20px var(--f-ui);color:var(--ink);text-align:center;font-variant-numeric:tabular-nums;cursor:pointer}
.wlk .wlk-zoom--bar{height:48px;padding:0 2px;box-shadow:inset 0 0 0 1.5px var(--control)}

/* ---------- slider (input type=range; fill width via --p on the wrapper) ---------- */
.wlk .wlk-slider{position:relative;display:block;height:44px}
.wlk .wlk-slider__track{position:absolute;left:0;right:0;top:20px;height:4px;border-radius:2px;background:var(--rule);pointer-events:none}
.wlk .wlk-slider__fill{position:absolute;left:0;top:20px;width:var(--p,0%);height:4px;border-radius:2px;background:var(--ink);pointer-events:none}
.wlk .wlk-slider input[type="range"]{position:relative;z-index:1;width:100%;height:44px;margin:0;background:transparent;-webkit-appearance:none;appearance:none;cursor:pointer}
.wlk .wlk-slider input[type="range"]::-webkit-slider-runnable-track{height:4px;background:transparent}
.wlk .wlk-slider input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;margin-top:-8px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1.5px var(--ink),var(--sh-1)}
.wlk .wlk-slider input[type="range"]::-moz-range-track{height:4px;background:transparent}
.wlk .wlk-slider input[type="range"]::-moz-range-thumb{width:20px;height:20px;border:0;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1.5px var(--ink),var(--sh-1)}

/* ---------- file-check rows + resolution meter (§4.9) ---------- */
.wlk .wlk-chks{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.wlk .wlk-chk{display:flex;align-items:flex-start;flex-wrap:wrap;gap:12px;padding:10px 12px;border-radius:var(--r-sm)}
.wlk .wlk-chk>.wlk-i{width:20px;height:20px}
.wlk .wlk-chk--ok>.wlk-i{color:var(--success)}
.wlk .wlk-chk--info>.wlk-i{color:var(--ink-2)}
.wlk .wlk-chk--warn{padding:14px 16px;background:var(--paper);box-shadow:inset 3px 0 0 var(--ink),inset 0 0 0 1px var(--rule)}
.wlk .wlk-chk--warn>.wlk-i{color:var(--ink)}
.wlk .wlk-chk--block{padding:14px 16px;background:var(--danger-tint)}
.wlk .wlk-chk--block>.wlk-i{color:var(--danger)}
.wlk .wlk-chk__b{flex:1;min-width:0}
.wlk .wlk-chk__t{font:500 13px/20px var(--f-ui);color:var(--ink)}
.wlk .wlk-chk--warn .wlk-chk__t,.wlk .wlk-chk--block .wlk-chk__t{font-weight:600}
.wlk .wlk-chk--block .wlk-chk__t{color:var(--danger)}
.wlk .wlk-chk--info .wlk-chk__t{font:400 12px/18px var(--f-ui);color:var(--ink-2)}
.wlk .wlk-chk__s{margin-top:4px;font:400 12px/18px var(--f-ui);color:var(--ink-2)}
.wlk .wlk-chk__acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:12px}
.wlk .wlk-chk__full{flex:0 0 100%;display:flex;flex-direction:column;gap:10px}
.wlk .wlk-chk__full .wlk-chk__acts{margin-top:0;gap:8px}
.wlk .wlk-chk .check-box{padding:10px 12px;background:#fff;box-shadow:inset 0 0 0 1px var(--rule)}
.wlk .wlk-ack__l{font:500 13px/20px var(--f-ui);color:var(--ink)}
.wlk .wlk-meter{display:flex;gap:4px;margin-top:8px}
.wlk .wlk-meter>span{width:36px;height:6px;border-radius:3px;background:var(--rule)}
.wlk .wlk-meter>span.is-on{background:var(--ink)}

/* ---------- status pills (§4.13) ---------- */
.wlk .wlk-pill{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 10px;border-radius:var(--r-pill);font:600 12px/16px var(--f-ui);white-space:nowrap}
.wlk .wlk-pill .wlk-i{width:12px;height:12px}
.wlk .wlk-pill--success{background:var(--success-tint);color:var(--success)}
.wlk .wlk-pill--success .wlk-i{stroke-width:2.25}
.wlk .wlk-pill--warn{background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--ink)}
.wlk .wlk-pill--outline{background:#fff;color:var(--ink-2);box-shadow:inset 0 0 0 1px var(--ink-3)}
.wlk .wlk-pill--danger{background:var(--danger-tint);color:var(--danger)}

/* ---------- progress (§4.14) ---------- */
.wlk .wlk-progress{display:block;height:6px;border-radius:var(--r-pill);background:var(--rule);overflow:hidden}
.wlk .wlk-progress>span{display:block;width:0;height:100%;border-radius:var(--r-pill);background:var(--accent);transition:width .2s linear}

/* ---------- banners (§4.31) ---------- */
.wlk .wlk-banner{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 12px 10px 16px;border-radius:var(--r-card)}
.wlk .wlk-banner>.wlk-i{width:20px;height:20px;color:var(--ink)}
.wlk .wlk-banner--info{background:#fff;box-shadow:inset 0 0 0 1px var(--rule),var(--sh-1)}
.wlk .wlk-banner--warn{background:var(--paper);box-shadow:inset 3px 0 0 var(--ink),inset 0 0 0 1px var(--rule)}
.wlk .wlk-banner--danger{background:var(--danger-tint)}
.wlk .wlk-banner--danger>.wlk-i,.wlk .wlk-banner--danger .wlk-banner__t{color:var(--danger)}
.wlk .wlk-banner__t{flex:1;min-width:0;font:500 13px/20px var(--f-ui);color:var(--ink)}
.wlk .wlk-banner__a{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px 16px;margin-left:auto;padding-left:8px}

/* ---------- toasts (§4.32) ---------- */
.wlk .wlk-toasts{position:fixed;left:50%;bottom:calc(var(--wlk-k4h) + 16px);z-index:100020;display:flex;flex-direction:column;align-items:center;gap:8px;width:max-content;max-width:calc(100vw - 32px);transform:translateX(-50%);pointer-events:none}
.wlk .wlk-toast{pointer-events:auto;display:inline-flex;align-items:center;gap:10px;min-height:44px;max-width:100%;padding:10px 16px;border-radius:var(--r-pill);background:var(--ink);color:var(--on-ink);font:500 13px/20px var(--f-ui);box-shadow:var(--sh-2)}
.wlk .wlk-toast>.wlk-i{width:18px;height:18px;color:var(--on-ink)}
.wlk .wlk-toast--act{gap:0;padding:0 8px 0 16px}
.wlk .wlk-toast__btn{height:44px;margin-left:8px;padding:0 8px;font:600 13px/20px var(--f-ui);color:var(--on-ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.wlk .wlk-toast__x{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:var(--on-ink);cursor:pointer}
.wlk .wlk-toast__x .wlk-i{width:18px;height:18px}
.wlk .wlk-toast :focus-visible{outline-color:var(--on-ink)}

/* ---------- overlays: dialog, drawer, sheet, scrim (§4.30) ---------- */
.wlk .wlk-scrim{position:fixed;inset:0;z-index:100010;background:var(--scrim)}
.wlk .wlk-dlg{position:fixed;left:50%;top:50%;z-index:100011;display:flex;flex-direction:column;width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);overflow:auto;overscroll-behavior:contain;padding:28px;border-radius:var(--r-md);background:#fff;box-shadow:var(--sh-2),inset 0 0 0 1px var(--rule);transform:translate(-50%,-50%);outline:0}
.wlk .wlk-dlg--sm{width:min(460px,calc(100vw - 32px))}
.wlk .wlk-dlg>*{flex:none}
.wlk .wlk-dlg__x{position:absolute;right:16px;top:16px}
.wlk .wlk-dlg__tb{display:none}
.wlk .wlk-h2{font:400 28px/32px var(--f-display);letter-spacing:-.01em;color:var(--ink)}
.wlk .wlk-dlg__p{margin-top:12px;font:400 15px/24px var(--f-ui);color:var(--ink-2)}
.wlk .wlk-dlg__btns{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin-top:28px}
.wlk .wlk-drawer{position:fixed;top:0;right:0;bottom:0;z-index:100011;display:flex;flex-direction:column;width:min(440px,100vw);padding:28px;border-radius:20px 0 0 20px;background:#fff;box-shadow:var(--sh-drawer);overflow:auto;overscroll-behavior:contain;outline:0;transform:translateX(0);transition:transform .25s ease}
.wlk .wlk-drawer>*{flex:none}
.wlk .wlk-sheet{position:fixed;left:0;right:0;bottom:0;z-index:100011;display:flex;flex-direction:column;max-height:90vh;max-height:90dvh;border-radius:20px 20px 0 0;background:#fff;box-shadow:var(--sh-up);outline:0;overflow:hidden}
.wlk .wlk-sheet--90{height:90vh;height:90dvh}
.wlk .wlk-sheet--45{height:45vh;height:45dvh}
.wlk .wlk-sheet__handle{display:block;flex:none;width:36px;height:4px;margin:8px auto 0;border-radius:2px;background:var(--control)}
.wlk .wlk-sheet__hd{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 8px}
.wlk .wlk-sheet__bd{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 16px 24px}
@media (prefers-reduced-motion:reduce){.wlk .wlk-drawer,.wlk .wlk-progress>span,.wlk .wlk-switch__tr,.wlk .wlk-switch__kn{transition:none}}

/* Digic's template.css sets button:focus{box-shadow:unset!important}: a just-clicked (focused) creator control kept its
   state but lost the inset ring that draws its border (owner screenshots 01.10.2026). The rings come back here;
   option tiles (.size) draw theirs with ::after (wlk-app.css). */
.wlk .chip:focus{box-shadow:inset 0 0 0 1.5px var(--control)!important}
.wlk .chip[aria-checked="true"]:focus,.wlk .chip[aria-pressed="true"]:focus{box-shadow:inset 0 0 0 2px var(--ink)!important}
.wlk .btn--ghost:not([aria-disabled="true"]):focus,.wlk .wlk-btnsm:focus{box-shadow:inset 0 0 0 1.5px var(--ink)!important}
.wlk .wlk-toolbtn:not([aria-disabled="true"]):focus{box-shadow:inset 0 0 0 1.5px var(--control)!important}
