/* Styly jen pro obrázky Peekless (společné styly převzaté z PDF editoru jsou v landing.css – hlídá je tools/shared-check.py). */

/* ------------------------------------------------------------- úvod: plocha pro soubory */
.hero-drop .drop-note b { color: var(--text-2); font-weight: 600; }

/* ------------------------------------------------------------- plocha zpracování (ui/workspace.js) */
.work { padding: var(--sp-6) 0 var(--sp-12); }
.work-in { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--sp-6); align-items: start; }
.work-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.work-title { font-size: 20px; margin: 0; }
.work-head-acts { display: flex; gap: var(--sp-2); }
.work-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-3); }
.work-note { display: flex; align-items: center; gap: 6px; margin-top: var(--sp-4); }
/* karta editoru pod seznamem (ui/workspace.js) */
.work-edit { display: flex; align-items: center; gap: 12px; margin-top: var(--sp-4); padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); border-radius: var(--r-lg); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.work-edit-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent-text); }
.work-edit-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.work-edit-text b { color: var(--text); font-size: 14px; }
.work-edit-btn { flex: none; }
@media (max-width: 560px) {
  .work-edit { flex-wrap: wrap; }
  .work-edit-btn { width: 100%; }
}

.tile { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; outline: none; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tile:focus-visible { box-shadow: var(--focus-ring); }
.tile[data-state="done"] { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.tile[data-state="error"] { border-color: color-mix(in srgb, var(--danger) 55%, var(--border)); }
.tile-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.tile-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tile-ph { display: grid; justify-items: center; gap: 4px; color: var(--text-3); }
.tile-ph small { font-weight: 600; font-size: 12px; }
/* štítky vlevo nahoře (vpravo nahoře jsou Stáhnout a Odebrat); neprůhledné – i v tmavém režimu přes fotku čitelné */
.tile-badges { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: calc(100% - 84px); pointer-events: none; }
.tile-badge { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--warning) 16%, var(--surface)); color: var(--warning); font-size: 12px; font-weight: 700; box-shadow: var(--shadow-xs); }
.tile-badge.is-gone { background: color-mix(in srgb, var(--success) 16%, var(--surface)); color: var(--success); }
.tile-badge-edit { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent-text); }
.tile-badge-edit[hidden] { display: none; }
/* Upravit: otevře editor obrázku (editor/editor.js) */
.tile-edit {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px 0 11px; border: 0; border-radius: var(--r-pill);
  background: var(--btn-primary-bg); color: #fff; font: inherit; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: background var(--dur) var(--ease);
}
.tile-edit:hover { background: var(--btn-primary-hover); }
.tile-edit:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.tile-body { padding: 8px 10px 10px; display: grid; gap: 4px; min-width: 0; }
.tile-name { margin: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-info { margin: 0; font-size: 12px; color: var(--text-2); line-height: 1.45; }
.tile-info b { color: var(--text); }
.tile-old { color: var(--text-3); }
.tile-save { color: var(--success); font-weight: 700; }
.tile-more { color: var(--warning); font-weight: 700; }
.tile[data-state="error"] .tile-info { color: var(--danger); }
.tile-notes { margin: 0; font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.tile-notes:empty { display: none; }
.tile-progress { height: 4px; }
.tile-acts { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.tile-acts .btn { background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow-xs); }

.work-side { position: sticky; top: 80px; display: grid; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.work-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; row-gap: 2px; }
.work-tabs > button { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 8px 2px; font-size: 12px; min-width: 0; height: auto; min-height: 52px; }
.work-tabs > button > span { max-width: 100%; line-height: 1.15; hyphens: auto; overflow-wrap: break-word; }
.work-panel .field { margin-bottom: var(--sp-3); }
.work-panel > :last-child { margin-bottom: 0; }
.work-q-label { display: flex; justify-content: space-between; }
.work-q { font-weight: 700; color: var(--text); }
.range { width: 100%; accent-color: var(--accent); }
.work-kb-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.work-kb-wrap .input { width: 110px; }
.work-target { grid-template-columns: auto auto; justify-content: start; align-items: center; column-gap: var(--sp-3); }
.work-target .hint { grid-column: 1 / -1; }
.work-formats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.work-explain { margin: 0 0 var(--sp-2); font-size: 14px; line-height: 1.55; }
.work-more { font-size: 14px; }
.work-more summary { cursor: pointer; font-weight: 600; color: var(--text-2); padding: 4px 0; }
.work-more[open] summary { margin-bottom: var(--sp-2); }
.work-more .check { margin-bottom: var(--sp-3); align-items: flex-start; }
.work-run { margin-top: var(--sp-1); }
.work-status { margin: 0; font-size: 13px; color: var(--text-2); min-height: 1.2em; }

@media (max-width: 900px) {
  .work-in { grid-template-columns: 1fr; }
  .work-side { position: static; order: -1; }
  /* jeden nebo dva obrázky: nejdřív obrázek s tlačítkem Upravit, pod ním hromadné úpravy */
  .work.is-few .work-side { order: 0; }
}
@media (max-width: 560px) {
  .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .tile-body { padding: 6px 8px 8px; }
}

/* obnovení stránky s otevřeným editorem: místo úvodu jen načítání, editor se otevře sám (layout.php, app.js) */
html.pki-resume .site { visibility: hidden; }
html.pki-resume:not(.has-editor) body::after { content: ''; position: fixed; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* úkol Pozadí: barvy a náhled výřezu na šachovnici */
.work-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.work-swatch { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid rgb(15 23 42 / 0.25); cursor: pointer; color: var(--text-2); }
.work-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.work-swatch-custom { border-style: dashed; background: var(--surface); }
.work-swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tile-canvas.is-cutout { background: repeating-conic-gradient(#e2e8f0 0% 25%, #ffffff 0% 50%) 50% / 16px 16px; }

/* koláž (1.7, ui/collage.js) */
.clg-dlg { width: min(1100px, calc(100vw - 32px)); max-width: none; }
.clg-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.clg-stage { display: grid; place-items: center; min-height: 240px; background: var(--surface-2, #f1f5f9); border-radius: 12px; padding: 8px; }
.clg-canvas { max-width: 100%; height: auto; touch-action: none; cursor: grab; border-radius: 4px; box-shadow: 0 1px 6px rgb(15 23 42 / 0.15); }
.clg-canvas:active { cursor: grabbing; }
.clg-controls { display: grid; gap: 12px; }
.clg-controls .seg { flex-wrap: wrap; }
@media (max-width: 760px) { .clg-wrap { grid-template-columns: 1fr; } }

.clg-controls .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.clg-controls .seg > button { white-space: normal; line-height: 1.2; min-height: 40px; padding: 4px 6px; font-size: 13px; }
.clg-controls .frm-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.clg-controls .ie-pal { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border, #cbd5e1); cursor: pointer; padding: 0; }
.clg-controls .ie-pal[aria-pressed="true"] { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.clg-controls input[type="color"] { width: 36px; height: 28px; padding: 0; border: 1px solid var(--border, #cbd5e1); border-radius: 6px; background: none; }
