/* ═══════════════════════════════════════════════════════════════════════════
   ATELIÉR — STRIH a FILM (web/js/atelier-strih.js), spoločné pre oba enginy.
   Jedna neutrálna čierna, tyrkys len na akciách a výbere (Michal, 2026-10-22).
   ═══════════════════════════════════════════════════════════════════════════ */
.strih { --st-bg: #0d0d0e; --st-panel: #151517; --st-raised: #202023; --st-line: rgba(255,255,255,0.08);
         --st-text: rgba(255,255,255,0.86); --st-dim: rgba(255,255,255,0.5); --st-teal: #00d4aa;
         display: flex; flex-direction: column; gap: 10px; color: var(--st-text); min-height: calc(100vh - 150px); }
.strih-top { display: grid; grid-template-columns: 250px minmax(0, 1fr) 236px; gap: 10px; min-height: 0; }
.strih-lib, .strih-props { background: var(--st-panel); border: 1px solid var(--st-line); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.strih-preview { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* náhľad */
.strih-screen { position: relative; width: 100%; max-height: 52vh; margin: 0 auto; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--st-line); }
.strih[data-aspect="9:16"] .strih-screen { width: auto; height: 52vh; max-height: none; }
.strih-screen video.strih-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; background: #000; }
.strih-screen audio { display: none; }
.strih-dip { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 4; }
.strih-screen-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--st-dim); font-size: 13.5px; text-align: center; padding: 20px; z-index: 0; }
.strih-screen-empty .pi-icon { width: 34px; height: 34px; color: rgba(255,255,255,0.25); }
.strih-screen-empty[hidden] { display: none; }
.strih-transport { display: flex; align-items: center; gap: 6px; padding: 2px 4px; }
.strih-tbtn, .strih-bbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 8px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--st-text); cursor: pointer; font: inherit; font-size: 12.5px; }
.strih-tbtn:hover, .strih-bbtn:hover:not(:disabled) { background: var(--st-raised); }
.strih-bbtn:disabled { opacity: 0.35; cursor: default; }
.strih-bbtn.is-on { color: var(--st-teal); border-color: rgba(0,212,170,0.35); }
.strih-play { width: 40px; height: 36px; background: var(--st-teal); color: #04342c; border-radius: 10px; }
.strih-play:hover { background: #19e0b8; }
.strih-play .pi-icon, .strih-tbtn .pi-icon, .strih-bbtn .pi-icon { width: 18px; height: 18px; color: inherit; }
.strih-time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--st-dim); margin-left: 6px; }
.strih-time span:first-child { color: var(--st-text); }
.strih-spacer { flex: 1; }
.strih-vol, .strih-zoom { width: 90px; accent-color: var(--st-teal); }

/* knižnica */
.strih-lib-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--st-line); }
.strih-lib-tabs button { flex: 1; height: 32px; border: 0; background: transparent; color: var(--st-dim); font: inherit; font-size: 12.5px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.strih-lib-tabs button.is-active { color: var(--st-teal); border-bottom-color: var(--st-teal); }
.strih-lib-body { padding: 10px; overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.strih-lib-group + .strih-lib-group { margin-top: 12px; }
.strih-lib-gtitle { font-size: 12px; color: var(--st-dim); margin-bottom: 6px; display: flex; gap: 6px; }
.strih-lib-gtitle span { color: var(--st-teal); font-variant-numeric: tabular-nums; }
.strih-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.strih-lib-item { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: var(--st-raised); color: var(--st-text); cursor: grab; text-align: left; font: inherit; overflow: hidden; position: relative; }
.strih-lib-item:hover { border-color: rgba(255,255,255,0.22); }
.strih-lib-item.is-used { border-color: rgba(0,212,170,0.4); }
.strih-lib-thumb { display: block; aspect-ratio: 16 / 9; background: #0d0d0e center / cover no-repeat; }
.strih[data-aspect="9:16"] .strih-lib-thumb { aspect-ratio: 9 / 16; max-height: 120px; }
.strih-lib-name { font-size: 11.5px; padding: 0 7px 6px; display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strih-lib-name em { font-style: normal; color: var(--st-dim); font-variant-numeric: tabular-nums; }
.strih-lib-item.is-audio { flex-direction: row; align-items: center; gap: 8px; padding: 8px; }
.strih-lib-item.is-audio .strih-lib-name { padding: 0; flex: 1; min-width: 0; }
.strih-lib-aicon .pi-icon { width: 16px; height: 16px; color: var(--st-teal); }
.strih-lib-del { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--st-dim); font-size: 14px; }
.strih-lib-del:hover { background: rgba(255,80,80,0.2); color: #ff8080; }
.strih-lib-list { display: flex; flex-direction: column; gap: 6px; }
.strih-lib-actions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.strih-lib-actions .imax-btn { width: 100%; justify-content: center; }
.strih-lib-empty { font-size: 12px; color: var(--st-dim); line-height: 1.45; padding: 4px 2px; }
.strih-lib-busy { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--st-dim); margin-bottom: 8px; }

/* vlastnosti */
.strih-props { padding: 10px 12px; overflow: auto; font-size: 12.5px; scrollbar-width: thin; }
.strih-props-head { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--st-dim); margin-bottom: 8px; }
.strih-kv { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--st-line); }
.strih-kv span { color: var(--st-dim); }
.strih-kv b { font-weight: 500; font-variant-numeric: tabular-nums; }
.strih-kv b em { font-style: normal; color: var(--st-dim); font-weight: 400; }
.strih-prop { margin-top: 10px; }
.strih-prop label { display: flex; justify-content: space-between; font-size: 12px; color: var(--st-dim); margin-bottom: 4px; }
.strih-prop label b { color: var(--st-text); font-weight: 500; font-variant-numeric: tabular-nums; }
.strih-prop label.strih-sub { margin-top: 6px; }
.strih-prop input[type="range"] { width: 100%; accent-color: var(--st-teal); }
.strih-prop select { width: 100%; height: 32px; border-radius: 8px; border: 1px solid var(--st-line); background: var(--st-raised); color: var(--st-text); font: inherit; font-size: 12.5px; padding: 0 8px; }
.strih-seg, .strih-takes { display: flex; flex-wrap: wrap; gap: 4px; }
.strih-seg button, .strih-takes button { height: 28px; min-width: 34px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--st-line); background: var(--st-raised); color: var(--st-text); font: inherit; font-size: 12px; cursor: pointer; }
.strih-seg button.is-active, .strih-takes button.is-active { border-color: var(--st-teal); color: var(--st-teal); }
.strih-prop-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.strih-prop-actions .imax-btn { flex: 1 1 45%; justify-content: center; }
.strih-prop-actions .imax-btn.is-on { color: var(--st-teal); border-color: rgba(0,212,170,0.4); }
.strih-prop-actions .imax-btn.is-danger:hover { color: #ff8080; }
.strih-props-hint { font-size: 12px; color: var(--st-dim); line-height: 1.5; margin-top: 12px; }
.strih-props-hint kbd { font: inherit; font-size: 11px; padding: 1px 5px; border-radius: 4px; background: var(--st-raised); border: 1px solid var(--st-line); }

/* časová os */
.strih-tl { background: var(--st-panel); border: 1px solid var(--st-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.strih-tl-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--st-line); flex-wrap: wrap; }
.strih-bsep { width: 1px; height: 20px; background: var(--st-line); margin: 0 4px; }
.strih-bhint { font-size: 12px; color: var(--st-dim); font-variant-numeric: tabular-nums; }
.strih-tl-body { display: flex; min-height: 0; max-height: 46vh; overflow-y: auto; scrollbar-width: thin; }
.strih-tl-labels { flex: 0 0 88px; border-right: 1px solid var(--st-line); background: #121214; }
.strih-label { display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 11.5px; color: var(--st-dim); border-bottom: 1px solid var(--st-line); box-sizing: border-box; }
.strih-label.is-ruler { height: 24px; }
.strih-label .pi-icon { width: 14px; height: 14px; color: inherit; }
.strih-tl-scroll { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; position: relative; scrollbar-width: thin; }
.strih-tl-inner { position: relative; min-height: 100%; }
.strih-ruler { position: relative; height: 24px; border-bottom: 1px solid var(--st-line); cursor: text; }
.strih-tick { position: absolute; bottom: 0; width: 1px; height: 5px; background: rgba(255,255,255,0.18); }
.strih-tick.is-major { height: 9px; background: rgba(255,255,255,0.32); }
.strih-tick span { position: absolute; bottom: 10px; left: 3px; font-size: 10.5px; color: var(--st-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.strih-lane { position: relative; border-bottom: 1px solid var(--st-line); box-sizing: border-box; background-image: linear-gradient(rgba(255,255,255,0.02), rgba(255,255,255,0.02)); }
.strih-lane.is-v1 { background-image: none; }
.strih-lane.is-new { background-image: none; border-bottom-style: dashed; }
.strih-lane-hint { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: rgba(255,255,255,0.3); pointer-events: none; white-space: nowrap; }
.strih-label.is-new { color: rgba(255,255,255,0.32); }
.strih-props-note { margin: 6px 0 0; font-size: 11.5px; color: var(--st-dim); line-height: 1.45; }
.strih-filmend { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(255,255,255,0.3); pointer-events: none; }
.strih-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--st-teal); pointer-events: none; z-index: 5; }
.strih-playhead-top { position: absolute; top: 0; left: -5px; width: 12px; height: 12px; background: var(--st-teal); border-radius: 2px; transform: rotate(45deg) translate(-2px, -2px); }
.strih-insert { position: absolute; top: 24px; bottom: 0; width: 3px; margin-left: -1px; background: #fff; z-index: 6; pointer-events: none; }
.strih-insert[hidden] { display: none; }

.strih-clip { position: absolute; top: 5px; bottom: 5px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,0.14); background: var(--st-raised); cursor: grab; user-select: none; box-sizing: border-box; }
.strih-clip.is-dragging { opacity: 0.85; z-index: 10; cursor: grabbing; }
.strih-clip.is-selected { border-color: var(--st-teal); box-shadow: 0 0 0 1px var(--st-teal) inset; z-index: 3; }
.strih-clip.is-hidden { opacity: 0.45; }
.strih-clip.is-collapsed { opacity: 0.6; background: repeating-linear-gradient(135deg, #202023 0 6px, #2a2a2e 6px 12px); }
.strih-clip.is-audio.is-music { background: #163b33; border-color: #1f5a4d; }
.strih-clip.is-audio.is-sfx { background: #2c2440; border-color: #4a3d6a; }
.strih-frames { position: absolute; inset: 0; display: flex; overflow: hidden; }
.strih-frames span { flex: 0 0 auto; height: 100%; background: #0d0d0e center / cover no-repeat; }
.strih-wave { position: absolute; left: 0; top: 2px; height: calc(100% - 4px); pointer-events: none; }
.strih-clip-head { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; gap: 6px; padding: 3px 7px; font-size: 10.5px; color: #fff; background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0)); white-space: nowrap; pointer-events: none; }
.strih-clip-head span { overflow: hidden; text-overflow: ellipsis; }
.strih-clip-head em { font-style: normal; font-variant-numeric: tabular-nums; opacity: 0.8; flex: 0 0 auto; }
.strih-clip-head .pi-icon { width: 12px; height: 12px; color: #fff; }
.strih-trans { position: absolute; right: 0; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(0,212,170,0.35) 0 4px, rgba(0,212,170,0.1) 4px 8px); border-left: 1px solid rgba(0,212,170,0.7); pointer-events: none; }
.strih-fade { position: absolute; top: 0; bottom: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,0.55), rgba(0,0,0,0)); }
.strih-fade.is-in { left: 0; }
.strih-fade.is-out { right: 0; background: linear-gradient(270deg, rgba(0,0,0,0.55), rgba(0,0,0,0)); }
.strih-clip-badge { position: absolute; right: 6px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.strih-clip-badge.is-mute { right: 28px; }
.strih-clip-badge .pi-icon { width: 11px; height: 11px; color: #fff; }
.strih-handle { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; touch-action: none; opacity: 0; transition: opacity 0.12s; z-index: 2; }
.strih-handle.is-start { left: 0; }
.strih-handle.is-end { right: 0; }
.strih-handle::after { content: ''; position: absolute; top: 8px; bottom: 8px; left: 3px; width: 3px; border-radius: 2px; background: #fff; }
.strih-clip:hover .strih-handle, .strih-clip.is-selected .strih-handle { opacity: 0.9; }
.strih-ghost { position: fixed; z-index: 30000; padding: 6px 10px; border-radius: 8px; background: var(--st-raised, #202023); color: #fff; font-size: 12px; border: 1px solid rgba(255,255,255,0.2); pointer-events: none; opacity: 0.6; }
.strih-ghost.is-ok { opacity: 1; border-color: #00d4aa; }

/* okno s otázkou (zvuk) */
.strih-dlg-backdrop { position: fixed; inset: 0; z-index: 26000; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.strih-dlg { width: min(460px, 100%); background: #151517; border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 20px 22px; color: rgba(255,255,255,0.9); }
.strih-dlg h3 { margin: 0 0 8px; font-size: 16px; }
.strih-dlg p { margin: 0 0 12px; font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5; }
.strih-dlg-input { width: 100%; height: 38px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.15); background: #0d0d0e; color: #fff; font: inherit; font-size: 13.5px; padding: 0 10px; box-sizing: border-box; }
.strih-dlg-input:focus { outline: none; border-color: #00d4aa; }
.strih-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* Krok 8 · Film */
.strih-film-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) 280px; gap: 16px; align-items: start; }
.strih-film-screen { position: relative; width: 100%; max-height: 62vh; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); margin: 0 auto; }
.strih-film-screen video { width: 100%; height: 100%; object-fit: contain; display: block; }
.strih-film-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(255,255,255,0.5); font-size: 13.5px; text-align: center; padding: 24px; }
.strih-film-empty .pi-icon { width: 34px; height: 34px; color: rgba(255,255,255,0.25); }
.strih-film-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #151517; border: 1px solid rgba(255,255,255,0.08); font-size: 13px; }
.strih-film-status.is-fresh { border-color: rgba(0,212,170,0.35); }
.strih-film-status.is-fresh .pi-icon { color: #00d4aa; }
.strih-film-status .pi-icon { width: 18px; height: 18px; }
.strih-film-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 200px; }
.strih-film-copy strong { font-weight: 600; }
.strih-film-copy span { color: rgba(255,255,255,0.55); font-size: 12.5px; }
.strih-film-bar { flex-basis: 100%; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); overflow: hidden; }
.strih-film-bar div { height: 100%; background: #00d4aa; transition: width 0.4s; }
.strih-film-err { flex-basis: 100%; color: #ff9a9a; font-size: 12.5px; }
.strih-film-side { display: flex; flex-direction: column; gap: 8px; }
.strih-film-side .imax-btn { justify-content: center; }
.strih-film-history { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #151517; border: 1px solid rgba(255,255,255,0.08); font-size: 12.5px; }
.strih-film-hrow { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.strih-film-hrow span { flex: 1; color: rgba(255,255,255,0.6); }
.strih-link { background: none; border: 0; color: #00d4aa; font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.strih-link.is-danger { color: rgba(255,255,255,0.45); }
.strih-link.is-danger:hover { color: #ff8080; }

/* Krok 6 · zábery na karte úseku */
.strih-takes-row { margin-top: 10px; }
.strih-takes-title { font-size: 11.5px; color: rgba(255,255,255,0.5); margin-bottom: 6px; letter-spacing: 0.04em; }
.strih-takes-title em { font-style: normal; color: #00d4aa; margin-left: 4px; }
.strih-takes-list { display: flex; gap: 6px; flex-wrap: wrap; }
.strih-take { width: 92px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #202023; color: rgba(255,255,255,0.85); font: inherit; cursor: pointer; overflow: hidden; text-align: left; }
.strih-take.is-current { border-color: #00d4aa; }
.strih-take-img { display: block; aspect-ratio: 16 / 9; background: #0d0d0e center / cover no-repeat; }
.imax-sb-img-portrait ~ .strih-takes-row .strih-take-img, .strih-take[data-aspect="9:16"] .strih-take-img { aspect-ratio: 9 / 16; }
.strih-take-name { display: block; font-size: 11px; padding: 3px 6px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strih-takes-hint { margin: 8px 0 0; font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.45; }

/* 2.0 — strih ako prekrytie pracovnej plochy */
.strih-overlay { position: absolute; inset: 0; z-index: 20; background: #0d0d0e; display: flex; flex-direction: column; overflow: auto; padding: 12px 16px 20px; }
.strih-overlay-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.strih-overlay-bar .strih-overlay-title { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
.strih-overlay-tabs { display: flex; gap: 2px; margin-left: 10px; }
.strih-overlay-tabs button { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: rgba(255,255,255,0.6); font: inherit; font-size: 12.5px; cursor: pointer; }
.strih-overlay-tabs button.is-active { color: #00d4aa; border-color: rgba(0,212,170,0.4); }
.strih-overlay[hidden] { display: none; }

@media (max-width: 1100px) {
  .strih-top { grid-template-columns: 200px minmax(0, 1fr) 210px; }
}
@media (max-width: 860px) {
  .strih-top { grid-template-columns: 1fr; }
  .strih-lib, .strih-props { max-height: 260px; }
  .strih-film-grid { grid-template-columns: 1fr; }
  .strih-tl-labels { flex-basis: 34px; }
  .strih-label span { display: none; }
  .strih-bbtn span { display: none; }
}
