/* Návrh 3 „miesto v zábere“ (Peter 29. 11.), ported from the prototype's proto3.css / proto2.css / proto.css
   (scratchpad navrh-miesto-v-zabere/nastroje): the place chip in the shot's head, the one next step on the empty
   stage, the place picker. Only classes m2-*, m3-*, mz-* of the prototype; colours by the portal's tokens. */

/* the place in the head */
.m3-pc { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 9px 0 3px; border-radius: 8px; border: 1px solid var(--line2); background: var(--raised); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; flex: none; white-space: nowrap; text-decoration: none; max-width: 260px; }
.m3-pc:hover { border-color: var(--muted); }
.m3-pc img, .m3-pc .n { width: 36px; height: 22px; border-radius: 4px; object-fit: cover; display: block; flex: none; }
.m3-pc .n { background: repeating-linear-gradient(135deg, #1b2125 0 5px, #232a2f 5px 10px); }
.m3-pc .m3-nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.m3-pc .m3-ch { font-size: 10px; opacity: .7; }
.m3-pc .m3-plus { width: 18px; text-align: center; font-weight: 700; color: var(--text2); flex: none; }
.m3-pc.none { border-style: dashed; background: none; color: var(--text2); padding-left: 6px; }
.m3-pc.sug { border-style: dashed; border-color: var(--accent-line); background: none; padding: 0 9px 0 3px; gap: 6px; }
.m3-pc.sug:hover { border-color: var(--accent); }
.m3-pc.sug small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.m3-pc .mz-dot { margin-left: -2px; }
/* the shot head at 1280 px holds the name, the chip, the tabs and 3D scéna: the chip gives way before the name does */
.ws-head .m3-pc { flex: 9 1 64px; min-width: 64px; max-width: max-content; }  /* a line breaks at 64 px, the chip grows into what is left */
/* a laptop: the place's name before its thumbnail, and Storyboard's grey „nepovinný“ (its hint says it too) gives room */
@media (max-width: 1440px) { .ws-head .m3-pc > img, .ws-head .m3-pc > .n { display: none; } .ws-head .m3-pc { padding-left: 9px; }
  .hd55:has(.m3-pc) .s55 .n55.opt { display: none; } }
.ws-head .m3-pc .m3-nm { min-width: 3.5em; } .ws-head .m3-pc small { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* the dot of a state */
.mz-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.mz-dot.run { background: var(--accent); animation: mzpulse 1.3s ease-in-out infinite; }
.mz-dot.warn { background: var(--warn, #e0b34a); }
.mz-dot.ok { background: #5fbf7a; }
@keyframes mzpulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .mz-dot.run { animation: none; } }

/* the empty stage: the one next step in its middle */
.m2-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 100%; border-radius: 12px; overflow: hidden; background: #0c0f10; border: 1px solid var(--line); }
.m2-frame.empty { border-style: dashed; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; }
/* in the portal the stage is .viewer, whose .empty (navrh04) is a 360 px note: the frame fills the stage as in proto2 */
.viewer .m2-frame.empty { max-width: none; padding: 0; width: calc(100% - 28px); max-height: calc(100% - 28px); }
.m3-mid { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 16px; }
.m3-mid form { margin: 0; }
.m3-stage .btn.primary.big.m3-cta { display: grid; gap: 1px; justify-items: center; min-width: 270px; padding: 11px 24px; width: auto; height: auto; cursor: pointer; }
.m3-cta > span { font-size: 15px; font-weight: 700; } .m3-cta > small { font-size: 12.5px; font-weight: 500; opacity: .78; }
.m3-cta[disabled] { opacity: .55; cursor: not-allowed; }
.m3-cta > span .term { color: inherit; opacity: .7; font-weight: 500; font-size: 12px; margin-left: 8px; }  /* the grey term beside its verb (koordinátor 2. 12.) */
.m3-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.m3-upf label, .m3-pn label { position: relative; }
.m3-under { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); min-height: 20px; }
.m3-under .linkish { font-size: 12px; color: var(--muted); }
.m3-stl { display: block; max-width: 520px; }
.m2-st { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); min-width: 0; }
.m3-stl .m2-st { justify-content: center; flex-wrap: wrap; }
.m3-stage .n51prog { width: min(520px, 92%); }
.m2-from { position: absolute; left: 22px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.m2-in { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border: 1px dashed var(--line2); border-radius: 999px; color: var(--text2); font-size: 12px; }
.m2-in img { width: 28px; height: 16px; object-fit: cover; border-radius: 3px; } .m2-in.t { padding-left: 8px; }

/* the picker of the shot's place */
.m3-pickf { border-style: solid; place-items: stretch; overflow: auto; }
.m2-pick { width: min(880px, 100%); display: grid; gap: 16px; padding: 22px 24px 18px; align-content: start; text-align: left; color: var(--text); }
.m2-pick h2 { margin: 0; font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.m2-sp { flex: 1; }
.m2-pg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.m2-pg form { margin: 0; display: grid; }
.m2-pt { display: grid; gap: 0; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid var(--line2); background: var(--raised); color: var(--text); cursor: pointer; text-align: left; font: inherit; width: 100%; }
.m2-pt .im { aspect-ratio: 16 / 9; background: repeating-linear-gradient(135deg, #1b2125 0 6px, #232a2f 6px 12px); display: grid; place-items: center; color: var(--text2); }
.m2-pt .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m2-pt .im .m3-plus { font-size: 26px; font-weight: 300; }
.m2-pt .tx { padding: 8px 10px 9px; display: grid; gap: 1px; }
.m2-pt b { font-size: 13.5px; } .m2-pt small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.m2-pt.on { border-color: var(--accent); background: rgba(245, 170, 40, .1); }
.m2-pt.new { border-style: dashed; background: none; } .m2-pt.new .im { background: none; }
.m2-pt.m3-sg { border-color: var(--accent-line); border-style: dashed; }
.m3-pn { cursor: default; } .m3-pn .tx { gap: 7px; padding: 12px 10px; } .m3-pn .field { width: 100%; } .m3-pn .btn { justify-content: center; }
.m3-tag { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 4px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; }
.m2-pf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Z čoho of the empty shot: the other starts under the chips */
.m3-starts { margin-top: 8px; }
.m3-auto { cursor: default; }
.m3-ns { margin: 0 0 10px; }
.m3-ns .term { color: inherit; opacity: .7; font-weight: 500; font-size: 11.5px; margin-left: 6px; }
.ws-head .m3-pc.none { flex: none; min-width: 0; }  /* „+ Miesto ▾“ is short: never cut (prechádzka 29. 11., hlava pri 1280 px) */
/* the open 3D editor names its place in its own bar (Miesto): there the head's chip would cut the steps at 1280 px
   (prechádzka 29. 11.); one rule for every way the editor opens */
.ws:has([data-scena-data]) .ws-head .m3-pc { display: none; }
/* aku-test 29. 11. (real place cards): navrh04 `.viewer .empty b` (16 px, block) won over the tile's name, and a portrait
   photograph stretched its tile past 16:9 — the picker is an empty frame too, so both are set here for good */
.viewer .m2-frame.empty b { display: inline; font-size: inherit; margin-bottom: 0; color: inherit; }
.viewer .m2-frame.empty .m2-pt b { font-size: 13.5px; }
.m2-pt .im { position: relative; overflow: hidden; }
.m2-pt .im img { position: absolute; inset: 0; }
/* aku-test 29. 11.: in a crowded head the proposal's „ako 1.01“ is what the chip says — it stays whole, the name yields;
   the chip clips inside its own border, never over the steps beside it; in the 3D podkroky (Postaviť › Záber › Obraz,
   `.n57sub`) the 3D window shows the place itself and the head has no room — the chip is out, as in the 3D editor */
.ws-head .m3-pc { overflow: hidden; }
.ws-head .m3-pc .m3-nm { flex-shrink: 60; }
.ws-head .m3-pc small { flex: none; }
.ws-head:has(.n57sub) .m3-pc { display: none; }
/* coordinator 30. 11.: the place card's own Pridať fotky beside the stage's sentence of a place that waits for photographs
   (Web.place3_add) — the card's tile and form, compact as one button under the sentence; chosen files show as its tiles */
.m3-add { display: grid; gap: 8px; justify-items: center; }
.m3-add .mf5grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.m3-add .mf5tile.fm81tile { min-height: 0; grid-auto-flow: column; gap: 8px; padding: 7px 16px; }
.m3-add .mf5tile.new { width: 164px; }  /* its name („vybraná, ešte nenahratá“) whole at 12 px */
.m3-add .fm81kf { justify-content: center; }
.m3-add .fm81kf[hidden], .m3-add .fm81kf [hidden] { display: none; }

/* ---- návrh Priestor miesta, časť záberu (Peter 1. 12.): the place chip is a menu (proto.css of the návrh, ported) ---- */
.npm-chip { position: relative; display: inline-block; }
.npm-chip > summary { list-style: none; cursor: pointer; } .npm-chip > summary::-webkit-details-marker { display: none; }
.npm-chip .npm-lv { color: var(--muted); font-weight: 500; font-size: 11.5px; white-space: nowrap; }
.npm-chip > summary.m3-pc { display: inline-flex; gap: 6px; }
/* the chip is a <details>: the head's flex rules of .m3-pc move to it (the name yields, the level stays whole) */
.ws-head .npm-chip { flex: 9 1 64px; min-width: 64px; max-width: max-content; display: inline-flex; }
.ws-head .npm-chip > summary.m3-pc { flex: 1 1 auto; min-width: 0; max-width: 100%; padding-left: 9px; }
.ws-head:has(> .npm-chip) > h1 { flex-grow: 0; }
.npm-chip .seg span { height: 26px; font-size: 12.5px; white-space: nowrap; } .npm-chip .seg label { flex: none; }
.npm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5fbf7a; margin-right: 6px; vertical-align: 1px; flex: none; }
.npm-dot.run { background: var(--accent); animation: npmb 1.2s infinite; } .npm-dot.warn { background: var(--warn, #e0b34a); }
.npm-dot.none { background: transparent; border: 1px solid var(--muted); }
@keyframes npmb { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .npm-dot.run { animation: none; } }
.npm-chip > .pick-pop { width: 360px; max-width: calc(100vw - 16px); right: auto; display: grid; gap: 10px; padding: 12px; z-index: 60;
  max-height: calc(100vh - 140px); overflow: auto; overscroll-behavior: contain; }
.npm-ph { display: flex; align-items: baseline; gap: 8px; } .npm-ph b { font-size: 15px; } .npm-ph .npm-sp { flex: 1; }
.npm-say { margin: 0; }
.npm-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 6px; margin: 0; }
.npm-r > :nth-child(3) { grid-column: 1 / -1; } .npm-r .tip > summary { margin: 0; }
.npm-two { grid-template-columns: minmax(0, 1fr) auto; } .npm-two > .seg { grid-column: 1 / -1; justify-self: start; }
/* the form's hidden fields come first: its label and (i) stand in one row as in .npm-r (preklik 2. 12.) */
.npm-r.npm-two > .npm-l { grid-column: 1; } .npm-r.npm-two > .tip { grid-column: 2; }
.npm-rest { display: grid; gap: 0; margin: 0 -4px; padding-top: 6px; border-top: 1px solid var(--line); }
.npm-rest .opt { padding: 6px 10px; } .npm-rest form { display: contents; }
.npm-rest .opt small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.npm-chip.npm-inbar { margin-right: 4px; } .npm-chip.npm-inbar > summary { height: 32px; }
.npm-l { color: var(--muted); font-size: 12px; } .npm-v { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.npm-stv { flex-direction: column; align-items: flex-start; gap: 1px; } .npm-stv .muted { font-size: 12px; }
.npm-v .term { color: var(--faint, #8a9298); font-size: 11.5px; font-weight: 400; }
.npm-chip .npm-main { justify-self: start; } .npm-chip form:has(> .npm-main), .npm-chip form:has(.npm-main) { margin: 0; }
.pop .opt small.offwhy { color: var(--warn, #e0b34a); }
.npm-chip .offwhy { margin: 0; }
.npm-kt .tip-pop, .npm-ktp.tip-pop { width: min(560px, 86vw); max-width: none; }
.npm-kinds { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: 6px 0; }
.npm-kinds th, .npm-kinds td { text-align: left; padding: 4px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.npm-kinds th { font-weight: 600; } .npm-kinds td .term, .npm-kinds th .term { color: var(--faint, #8a9298); font-size: 11px; display: block; font-weight: 400; }
@media (max-width: 640px) {
  .npm-kinds tr:first-child { display: none; }
  .npm-kinds tr { display: grid; grid-template-columns: 92px 1fr; border-top: 1px solid var(--line); padding: 4px 0; }
  .npm-kinds th { grid-column: 1 / -1; border: 0; padding-bottom: 0; }
  .npm-kinds td { display: contents; }
  .npm-kinds td::before { content: attr(data-l); color: var(--muted); padding: 1px 6px; }
}
/* the picker: Nové miesto with its two choices, each saying which place it is for */
.npm-new .tx { display: grid; gap: 6px; } .npm-new .btn { justify-content: flex-start; }
.npm-new .npm-ch { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.npm-new .npm-ch > small { font-size: 11.5px; line-height: 1.3; display: block; }
.npm-new .npm-ch form { display: contents; }
.npm-new .npm-ch .btn, .npm-new .npm-blm { width: 100%; }
.npm-blm .term { color: inherit; opacity: .7; font-weight: 500; font-size: 11.5px; margin-left: 4px; }
.m2-pt small .npm-dot { margin-right: 0; }
/* bod 103: Z obrazu tohto záberu, the first tile of the place picker across the whole width ((i) in its corner) */
.m2-pg > .npm-ownw { grid-column: 1 / -1; position: relative; display: grid; }
.npm-ownw > form { display: grid; }
.m2-pt.npm-own { grid-template-columns: clamp(72px, 28%, 128px) 1fr; align-items: center; }
.m2-pt.npm-own .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m2-pt.npm-own .tx { padding: 8px 38px 9px 12px; }
.npm-ownw > .npm-owntip { position: absolute; top: 8px; right: 10px; }
.m3-stage .npm-why { max-width: 460px; text-align: center; margin: 6px auto 0; }
/* the head's chip yields to the 3D editor's own bar as the plain chip did (part E puts the chip into the bar) */
.ws:has([data-scena-data]) .ws-head .npm-chip, .ws-head:has(.n57sub) .npm-chip { display: none; }
/* koordinátor 2. 12. bod 4 (hlava pri 1280 px: „1.16 Mi…“ a „Miest… bez priestoru ▾“): a shot without text is named, grey,
   by its place (návrh 3 § 7) — a head that carries the place chip says the place once, in the chip: the number stays, the
   grey stand-in yields, and the chip has room for the whole name. Where the chip steps out of the head (the 3D editor,
   a head with the 3D steps) the stand-in yields only to what says the place there: the 3D editor's bar chip, the 3D
   start's Postaviť kameru „v mieste …“, its line, its reason or its „Vznikne z … ↳ <miesto>“ (Codex 2. 12.: never a page
   where nothing names it). A
   head without either keeps the grey name. Guard: __walk.autoName in tools/prechadzka.py (every audit). */
.ws:not(:has([data-scena-data])) .ws-head.hd55:not(:has(.n57sub)):has(.m3-pc) > h1 .m3-auto,
.ws:has(.npm-inbar > summary.m3-pc, form.m3-camf, .m3-stage .m3-stl, .m3-stage .npm-why, .m3-stage .m2-from) .ws-head.hd55 > h1 .m3-auto { display: none; }
.ws:not(:has([data-scena-data])) .ws-head.hd55:not(:has(.n57sub)):has(.m3-pc) > h1:has(.m3-auto),
.ws:has(.npm-inbar > summary.m3-pc, form.m3-camf, .m3-stage .m3-stl, .m3-stage .npm-why, .m3-stage .m2-from) .ws-head.hd55 > h1:has(.m3-auto) { min-width: 0; flex: none; }
/* … and the chip then is the shot's name: whole up to 15em (an auto name „Miesto záberu 1.16“ always), the rest of a full
   head gives way first and may take its second row (prechádzka 2. 12.: „Obýv…“ beside five steps with their counts) */
.ws-head.hd55:has(> h1 .m3-auto) > .npm-chip { flex: none; width: max-content; max-width: 15em; }
/* koordinátor 2. 12. bod 4, the chip's half: the place's name and its grey level side by side did not fit the head at
   1280 px nor the 3D editor's bar at 1000–1440 px (auto names „Miesto záberu 1.16“ beside „z fotky · počíta sa“, „3D z
   fotky“) — the level goes under the name inside the same 30 px chip (32 px in the bar), so both stay whole and the
   chip is as wide as the longer of the two; the dot and the face left of both lines, the caret right of them. Margins,
   not gaps: a part the chip does not draw (no dot in the head, no face on a laptop) leaves no space */
.ws-head .npm-chip > summary.m3-pc, .npm-chip.npm-inbar > summary.m3-pc { display: inline-grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 0; row-gap: 0;
  align-items: center; align-content: center; line-height: 1.12; padding-top: 0; padding-bottom: 0; }
:is(.ws-head .npm-chip, .npm-chip.npm-inbar) > summary.m3-pc > .npm-dot { grid-column: 1; grid-row: 1 / 3; margin-right: 6px; }
:is(.ws-head .npm-chip, .npm-chip.npm-inbar) > summary.m3-pc > :is(img, .n) { grid-column: 2; grid-row: 1 / 3; margin-right: 7px; }
:is(.ws-head .npm-chip, .npm-chip.npm-inbar) > summary.m3-pc > .m3-nm { grid-column: 3; grid-row: 1; }
:is(.ws-head .npm-chip, .npm-chip.npm-inbar) > summary.m3-pc > .npm-lv { grid-column: 3; grid-row: 2; font-size: 11px; }
:is(.ws-head .npm-chip, .npm-chip.npm-inbar) > summary.m3-pc > .m3-ch { grid-column: 4; grid-row: 1 / 3; margin-left: 7px; }
