/* vesika.css (W2, photo_id): the passport-photo editor in the chosen-file state (a fixed frame over the photo, the
   guides, zoom / fine-turn sliders), the size list and options on the side, and the result box. Builds on tool.css +
   local.css; the editor block follows idcopy.css (same borders, buttons and stage background). */
.ves { border: 1px solid var(--ink); background: var(--paper); min-width: 0; }
.ves__h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--ink); }
[dir="rtl"] .ves__h { padding: 8px 14px 8px 8px; }
.ves__k { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ves__k b { font: 600 12.5px/1.2 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; flex: none; }
html[lang="ar"] .ves__k b, html[lang="ja"] .ves__k b { text-transform: none; letter-spacing: 0; }
.ves__fn { font-size: var(--t-meta); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ves__x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r-1); }
.ves__x:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ves__x .ico { width: 16px; height: 16px; }
.ves__x span:empty { display: none; }
.ves__stage { position: relative; min-width: 0; min-height: 260px; background: var(--paper-3);
  background-image: linear-gradient(45deg, var(--paper-2) 25%, transparent 25%, transparent 75%, var(--paper-2) 75%), linear-gradient(45deg, var(--paper-2) 25%, transparent 25%, transparent 75%, var(--paper-2) 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.ves__cv { display: block; width: 100%; touch-action: none; cursor: grab; }
.ves__cv:active { cursor: grabbing; }
.ves__cv:focus-visible { outline: 2px solid var(--signal-strong); outline-offset: -2px; }
.ves__st { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-size: 15px; font-weight: 560; background: var(--paper-2); }
.ves[data-st="busy"] .ves__st { color: var(--ink-2); }
.motion .ves[data-st="busy"] .ves__st { animation: vesPulse 1.2s var(--e-io) infinite alternate; }
@keyframes vesPulse { to { background: var(--paper-3); } }
.ves[data-st="err"] .ves__st { color: var(--signal-ink); }
.ves[data-st="err"] .ves__st a { color: var(--ink); font-weight: 600; }
.ves:not([data-st="ok"]) .ves__ctl, .ves:not([data-st="ok"]) .ves__lg { opacity: .35; pointer-events: none; }
/* the guide legend: one short swatch per line kind, the same colours as on the canvas */
.ves__lg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 10px 14px; list-style: none; border-top: 1px solid var(--rule); font-size: var(--t-meta); color: var(--ink-2); }
.ves__lg li { display: inline-flex; align-items: center; gap: 7px; }
.ves__lg li::before { content: ""; width: 18px; height: 0; border-top: 2px solid #E53A24; }
.ves__lg li[data-g="eye"]::before { height: 8px; border: 0; border-block: 1.5px dashed #0B7A4E; background: rgba(11, 122, 78, .16); }
.ves__lg li[data-g="oval"]::before { width: 12px; height: 15px; border: 1.5px dashed var(--ink-2); border-radius: 50%; }
.ves.is-noguide .ves__lg { opacity: .45; }
.ves__ctl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 18px; padding: 12px 14px 14px; border-top: 1px solid var(--rule); }
.ves__rng { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; min-width: 0; }
.ves__rng .lfield__l { grid-column: 1 / -1; }
.ves__rng input { width: 100%; min-height: 32px; accent-color: var(--ink); }
.ves__rng output { font-size: 14px; min-width: 5ch; text-align: end; }
.ves__acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.ves__b { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--ink); border-radius: var(--r-1); font-size: 14px; font-weight: 560; background: var(--paper); transition: background-color .3s var(--e-out), color .3s var(--e-out); }
.ves__b:hover { background: var(--ink); color: var(--paper); }
.ves__b[aria-pressed="false"] { border-style: dashed; color: var(--ink-2); }
.ves__warn { margin: 0; padding: 10px 14px; border-top: 1px solid var(--ink); border-inline-start: 4px solid var(--signal); font-size: 14px; line-height: 1.45; background: var(--paper-2); }
.ves__hint { margin-top: -4px; }

/* side: the size list (one radio row per size: name + its measures), custom fields, tips, outputs */
.ves__ps, .ves__out { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 10px; }
.ves__pl { display: grid; border-top: 1px solid var(--ink); }
.ves__po { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; align-items: baseline; padding: 10px 6px 10px 2px; border-bottom: 1px solid var(--rule); cursor: pointer; transition: background-color .25s var(--e-out), padding .35s var(--e-out); }
.ves__po input { grid-row: 1 / span 2; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); align-self: start; }
.ves__pn { font-size: 15px; font-weight: 600; line-height: 1.3; }
.ves__pd { grid-column: 2; font: 12.5px/1.4 var(--f-code); color: var(--ink-2); }
.ves__po:hover { background: var(--paper-2); padding-inline-start: 6px; }
.ves__po:has(input:checked) { background: var(--paper-2); box-shadow: inset 3px 0 0 var(--ink); }
[dir="rtl"] .ves__po:has(input:checked) { box-shadow: inset -3px 0 0 var(--ink); }
.ves__po:has(input:focus-visible) { outline: 2px solid var(--signal-strong); outline-offset: -2px; }
.ves__spec { margin: 0; min-height: 1.4em; }
.ves__custom { display: grid; gap: 12px; }
.ves__custom[hidden] { display: none; }
.ves__cg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ves__cg .lfield:nth-child(4), .ves__cg .lfield:nth-child(5) { grid-column: span 1; }
.ves__tips { display: grid; gap: 8px; }
.ves__tips[hidden] { display: none; }
.ves__tl { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.ves__tl li { position: relative; padding-inline-start: 16px; }
.ves__tl li::before { content: ""; position: absolute; inset-inline-start: 0; top: .6em; width: 7px; height: 7px; background: var(--ink); }
.ves__src { margin: 0; font-style: italic; }
.ves__osym { margin: 0; padding: 8px 10px; border: 1px dashed var(--rule); }
.ves__osym b { font: 600 12px/1 var(--f-mono); letter-spacing: .04em; margin-inline-end: 4px; }
.ves__osym a { color: var(--ink); font-weight: 600; }
.ves__print { display: grid; gap: 10px; }
.ves__print[hidden] { display: none; }
.ves__legal { margin: 4px 0 0; border-inline-start-color: var(--ink); }

/* result: the photo as saved (on its own paper, like a print), the facts, notes, what next */
.ves__res { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.ves__fig { margin: 0; width: 132px; background: #fff; box-shadow: 5px 5px 0 var(--ink); }
[dir="rtl"] .ves__fig { box-shadow: -5px 5px 0 var(--ink); }
.ves__fig img { display: block; width: 100%; height: auto; }
.ves__notes { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.ves__notes li { padding: 8px 10px; border-inline-start: 3px solid var(--rule); background: var(--paper-2); }
.ves__notes li.is-warn { border-inline-start-color: var(--signal); }
.ves__next { margin-top: 14px; }
.ves__next ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ves__next a { font-size: 15px; }

/* e-Okul batch (2026-10-03): the class list in the chosen state, the contact sheet of 133 × 171 photos in the result */
.ves__po:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.ves__po:has(input:disabled):hover { background: none; padding-inline-start: 2px; }
.vesb { border: 1px solid var(--ink); background: var(--paper); min-width: 0; }
.vesb__h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 12px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--ink); }
[dir="rtl"] .vesb__h { padding: 8px 14px 8px 8px; }
.vesb__k { display: flex; align-items: baseline; gap: 10px; font-size: 15px; font-weight: 600; }
.vesb__k b { font: 600 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 7px; background: var(--ink); color: var(--paper); }
html[lang="ar"] .vesb__k b, html[lang="ja"] .vesb__k b { text-transform: none; letter-spacing: 0; }
.vesb__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.vesb__acts .ves__b span:empty { display: none; }
.vesb__acts .ico { width: 14px; height: 14px; }
.vesb__spec { margin: 0; padding: 9px 14px; border-bottom: 1px solid var(--rule); font-size: var(--t-meta); color: var(--ink-2); background: var(--paper-2); }
.vesb__l { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.vesb__i { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto 40px; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 14px; border-bottom: 1px solid var(--rule); transition: background-color .25s var(--e-out); }
[dir="rtl"] .vesb__i { padding: 0 14px 0 6px; }
.vesb__i:hover { background: var(--paper-2); }
.vesb__n { font: 500 12px/1 var(--f-mono); color: var(--ink-3); }
.vesb__fn { font-size: 14.5px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vesb__sz { font: 12px/1 var(--f-code); color: var(--ink-3); white-space: nowrap; }
.vesb__x { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--r-1); color: var(--ink-2); }
.vesb__x span:empty { display: none; }
.vesb__x .ico { width: 14px; height: 14px; }
.vesb__i:hover .vesb__x { border-color: var(--rule); }
.vesb__x:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.vesb__how { margin-top: -6px; }
.vesb__gk { margin-top: 16px; }
.vesb__g { margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 14px; }
.vesb__t { display: grid; align-content: start; gap: 3px; min-width: 0; }
.vesb__im { display: block; aspect-ratio: 133 / 171; background: #fff; border: 1px solid var(--ink); transition: transform .3s var(--e-out), box-shadow .3s var(--e-out); }
.vesb__im img { display: block; width: 100%; height: 100%; object-fit: cover; }
a.vesb__im:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
[dir="rtl"] a.vesb__im:hover { transform: translate(2px, -2px); box-shadow: -4px 4px 0 var(--ink); }
a.vesb__im:focus-visible { outline: 2px solid var(--signal-strong); outline-offset: 2px; }
.vesb__im--err { display: grid; place-items: center; border-style: dashed; background: var(--paper-2); font: 600 22px/1 var(--f-mono); color: var(--signal-ink); }
.vesb__t[data-st="low"] .vesb__im { border-color: var(--signal); box-shadow: inset 0 -4px 0 var(--signal); }
.vesb__tn { margin: 4px 0 0; font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vesb__kb { margin: 0; font: 12px/1.35 var(--f-code); color: var(--ink-2); }
.vesb__t[data-st="low"] .vesb__kb, .vesb__t[data-st="err"] .vesb__kb { color: var(--signal-ink); }
.vesb__t[data-st="err"] .vesb__kb { font-family: inherit; }
.vesb__fix { justify-self: start; margin-top: 2px; padding: 4px 0; font-size: 13px; font-weight: 560; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.vesb__fix:hover { color: var(--ink); text-decoration-color: var(--ink); }
.vesb__fix span:empty { display: none; }
.vesb__g + .vesb__how { margin-top: 14px; }
@media (hover: hover) {
  .vesb__fix { opacity: .55; transition: opacity .25s var(--e-out); }
  .vesb__t:hover .vesb__fix, .vesb__fix:focus-visible { opacity: 1; }
}

@media (max-width: 719.98px) {
  .ves__h { padding-inline-start: 10px; }
  .vesb__h { padding-inline-start: 10px; }
  .vesb__g { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .vesb__i { padding-inline-start: 10px; }
  .ves__ctl { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .ves__cg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ves__res { grid-template-columns: minmax(0, 1fr); }
  .ves__fig { width: 120px; }
}
