/* local.css (W1 local kit): the instrument of the tools that run ONLY in the browser (partials/_local.html,
   js/local/local-tool.js). Builds on tool.css (.inst, .pane, .drop, .chip, .side, .res, .trust …); only the local extras
   live here: the honest "on your device" marks, the form stage, the short processing pane, the result box and the Blob
   downloads. */

/* the honest mark: head line (always green: there is no upload), the line inside the drop zone, the result stamp */
.inst__sec--local { color: var(--ink); }
.inst--local .inst__led { background: var(--ok); }
.drop__dev { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 5px 10px; border: 1px solid var(--rule); font: 500 12.5px/1.2 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); background: var(--paper); }
.drop__dev .inst__led { width: 7px; height: 7px; }
.motion .drop__dev .inst__led { animation: lcBlink 2.4s steps(2, jump-none) infinite; }
@keyframes lcBlink { 50% { opacity: .35; } }
html[lang="ar"] .drop__dev, html[lang="ja"] .drop__dev { text-transform: none; letter-spacing: 0; }

/* 1 · the page's own form as the idle stage (barcode) */
.pane--form { flex-direction: column; padding: 24px clamp(18px, 3vw, 40px) 28px; gap: 22px; min-width: 0; }

/* 2 · selected: the page's own editor, or a plain file list */
.lsel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.inst--local .pane--sel:has(.lsel:not([hidden])) { justify-content: flex-start; padding-block: 24px; }
.lflist { border-top: 1px solid var(--ink); }
.lflist .fi { grid-template-columns: 8px minmax(0, 1fr) auto; }
.lflist__x { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r-1); }
.lflist__x:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lflist__x .ico { width: 16px; height: 16px; }

/* 3 · processing: a sheet under a scanning line (the job runs in a worker on this device) */
.pane--lproc { align-items: stretch; }
.lproc { position: relative; flex: 0 0 38%; min-height: 260px; display: grid; place-items: center; border-inline-end: 1px solid var(--rule); overflow: hidden;
  background-image: linear-gradient(var(--rule-2) 1px, transparent 1px), linear-gradient(90deg, var(--rule-2) 1px, transparent 1px); background-size: 24px 24px; }
.lproc__sheet { --s: 108px; position: relative; overflow: hidden; }
.lproc__scan { position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--ok); box-shadow: 0 0 0 1px var(--paper), 0 6px 18px rgba(11, 122, 78, .45); }
.motion .lproc__scan { animation: lcScan 1.1s var(--e-io) infinite alternate; }
@keyframes lcScan { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, calc(var(--s) * 1.3), 0); } }

/* 4 · done: result box next to the big number, stamp, Blob downloads */
.res__stamp--local { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 3px var(--ok); font-size: 22px; padding: 9px 12px 8px; top: 6px; }
html[lang="ar"] .res__stamp--local, html[lang="ja"] .res__stamp--local { letter-spacing: 0; }
.res--local .res__num { grid-column: 1; grid-row: 3; }
.lbox { grid-column: 2; grid-row: 3; align-self: end; min-width: 0; }
.lbox:empty { display: none; }
.res--local:has([data-res-num-box][hidden]) .lbox { grid-column: 1 / -1; }
.ldl { display: grid; gap: 8px; }
.ldl__name { font-size: var(--t-meta); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldl__k { margin-top: 10px; }
.ldl__l { border-top: 1px solid var(--rule); }
.ldl__a { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 15px; transition: padding .4s var(--e-out); }
.ldl__a b { font: 600 12.5px/1 var(--f-mono); letter-spacing: .04em; padding: 5px 0; text-align: center; border: 1px solid var(--ink); }
.ldl__a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.ldl__a:hover { padding-inline: 6px; }
.ldl__a:hover b { background: var(--ink); color: var(--paper); }

/* P3 (2026-09-29): "0 bayt" rozeti (partials/_local.html; YALNIZ connect-src 'none' sayfalarda): sonuç kartının altında,
   ekran görüntüsüne girecek yerde mono etiket. Ayrıntı satırı (neden 0: CSP) ince işaretçide üstüne gelince açılır; ekran
   okuyucu onu her zaman okur (yalnız yüksekliği 0, display: none değil). */
.zb { grid-column: 1 / -1; justify-self: start; display: grid; grid-template-columns: auto minmax(0, auto); max-width: 100%; margin-top: 14px; border: 1px solid var(--ink); border-radius: var(--r-1); font: 500 12px/1.3 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); background: var(--paper); }
.zb__n { display: flex; align-items: center; padding: 6px 9px; background: var(--ok); color: #fff; font-weight: 700; letter-spacing: 0; border-start-start-radius: 1px; border-end-start-radius: 1px; }
.zb__t { display: flex; align-items: center; min-width: 0; padding: 6px 10px; }
.zb__d { grid-column: 1 / -1; width: 0; min-width: 100%; max-height: 0;   /* the detail never widens the badge */ overflow: hidden; opacity: 0; padding-inline: 10px; text-transform: none; letter-spacing: 0; color: var(--ink-2); transition: max-height .45s var(--e-out), opacity .3s var(--e-out), padding .45s var(--e-out); }
@media (hover: hover) and (pointer: fine) {
  .zb:hover .zb__d { max-height: 4.5em; opacity: 1; padding-block: 6px 7px; border-top: 1px solid var(--rule); }
}
.zb__c { display: inline-block; max-width: 100%; font: inherit; color: var(--ink); }   /* one isolated LTR box: bidi never splits it */
.is-reduced .zb__d { transition: none; }
html[lang="ar"] .zb, html[lang="ja"] .zb { text-transform: none; letter-spacing: 0; }

/* trust row: "no upload" = the upload arrow struck through */
.trust__no { position: relative; display: inline-flex; }
.trust__no::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 1.5px; background: var(--ink); transform: rotate(-45deg); }

/* shared bits the local pages use for their own editors */
.lnote { font-size: var(--t-meta); line-height: 1.45; color: var(--ink-2); }
.lfield { display: grid; gap: 6px; min-width: 0; }
.lfield__l { font: 500 12.5px/1.4 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
html[lang="ar"] .lfield__l, html[lang="ja"] .lfield__l { text-transform: none; letter-spacing: 0; }
.lfield__i { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--ink); border-radius: var(--r-1); background: var(--paper); font: inherit; font-size: 17px; color: var(--ink); }
.lfield__i:focus-visible { outline: 2px solid var(--signal-strong); outline-offset: 2px; }
.lfield__i[aria-invalid="true"] { border-color: var(--signal-strong); box-shadow: inset 0 0 0 1px var(--signal-strong); }
.lcheck { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.35; cursor: pointer; }
.lcheck input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); }
/* numbers and sizes in the code face, without the caps of .mono; result facts as a two-column list */
.lcode { font-family: var(--f-code); font-size: 13px; letter-spacing: .02em; }
.lfacts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: var(--t-meta); border-top: 1px solid var(--rule); padding-top: 10px; }
.lfacts dt { color: var(--ink-2); }
.lfacts dd { margin: 0; overflow-wrap: anywhere; font-weight: 560; }

@media (max-width: 1023.98px) {
  .lproc { flex-basis: 34%; }
}
@media (max-width: 719.98px) {
  .pane--form { padding: 16px var(--g) 20px; gap: 18px; }
  .pane--lproc { flex-direction: column; }
  .lproc { flex: none; min-height: 170px; border-inline-end: 0; border-bottom: 1px solid var(--rule); }
  .lproc__sheet { --s: 84px; }
  .lbox { grid-column: 1; grid-row: auto; margin-top: 14px; }
  .res__stamp--local { font-size: 17px; padding: 7px 9px 6px; }
  /* the page's own form on a phone: the Go bar stays reachable, like the chosen-file state of the upload tools */
  .inst--local[data-form][data-state="idle"] .side__go { position: sticky; bottom: 0; z-index: 5; margin-inline: calc(var(--g) * -1); padding: 12px var(--g); background: var(--paper); border-top: 1px solid var(--ink); }
  .inst--local[data-state="selected"] .lsel ~ .sel__re { display: none; }
}
