/* Návrh 38 (Peter 30. 10.): the shot panel's footer and the shared model picker. Ported from the approved visualization
   (scratchpad viz-modely/zmeny.css), built from the portal's parts: .pick-pop/.opt, .seg, .chip, .pill, .tip, .btn.
   ARCHITEKTURA.md "Pätička panela záberu" and "Výber modelu". */

/* --- A · the footer is at most a third of the window (Peter's 1.02: it took more than half of 720 px and covered
   "Čo sa stane"); the main button, its price and the credit stay at its bottom, the model row, Upraviť text ručne and
   the notes and warnings scroll inside it ------------------------------------------------------------------------- */
.ifoot.ws-generate:has(> .fs38) { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; }
.ifoot.ws-generate:has(> .fs38) > :not(.fs38) { flex: none; }
.ws-generate > .fs38 { flex: 0 1 auto; min-height: 0; display: grid; gap: 6px; align-content: start;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.ws-generate > .fs38 > * { min-width: 0; }
.ws-generate .nt38:empty { display: none; }
.ws-generate .nt38 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.ws-generate .nt38 .draft-note { margin: 0; }
@media (max-width: 900px) { .ifoot.ws-generate:has(> .fs38) { max-height: 45vh; } }

/* the Seedance line is a block now (a <details> cannot live in a <p>): its (i) stays inside it */
.made-note > details.tip { display: inline-block; }

/* --- B · the model's button opens the panel at once (Peter 18. 11.: no compact menu between). Without a script the
   <details> is the plain menu of the radios; the notes of the model stand on the panel's top --------------------- */
.mp38q .nt38q:empty { display: none; }
.mpick38 { margin: 4px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }

/* --- the panel Vybrať model: about 1000×600 at 1280×720 --------------------------------------------------------- */
dialog.mp38d { width: min(1000px, calc(100vw - 32px)); height: min(600px, calc(100vh - 32px)); max-width: none; max-height: none;
  padding: 0; border: 1px solid var(--line2); border-radius: 16px; background: var(--panel); color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; }
dialog.mp38d::backdrop { background: rgba(5, 7, 8, .62); }
.mp38d .in38 { height: 100%; display: flex; flex-direction: column; }
.mp38d .hd38 { display: flex; align-items: center; gap: 10px; padding: 16px 20px 6px; }
.mp38d .hd38 h2 { margin: 0; font-size: 18px; font-weight: 800; }
.mp38d .sub38 { color: var(--muted); font-size: 13px; }
.mp38d .sp { flex: 1; }
.mp38d .bd38 { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 6px 20px 14px; }
.mp38d .tabs38[hidden], .mp38d .nt38d[hidden] { display: none; }
/* the tabs by the panel's data-tab, never [hidden] on a pane: the settings' fields stay "shown" to the form's scripts
   (Mení sa, the summary, AKU.P64_GONE) while the tab Modely is in front (Codex 18. 11.) */
.mp38d[data-tab="modely"] .st38, .mp38d[data-tab="nastavenia"] .bd38 { display: none; }
/* the two tabs (Peter 18. 11.): Modely, and Nastavenia of the chosen model — the video's row Technika opens this one */
.mp38d .tabs38 { display: flex; gap: 4px; padding: 4px 20px 0; border-bottom: 1px solid var(--line); }
.mp38d .tabs38 button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 7px 12px;
  color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.mp38d .tabs38 button b { color: inherit; font-weight: 700; }
.mp38d .tabs38 button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.mp38d .tabs38 button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.mp38d .nt38d { padding: 4px 20px 0; display: grid; gap: 6px; }
.mp38d .nt38d > .msg { margin: 0; }
/* Nastavenia: what the model gets beside what only it has, at the panel's width (návrh 08 zones, no narrow column) */
.mp38d .st38 { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px 20px 14px; }
.mp38d .cols38 { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.mp38d .col38 { display: grid; gap: 12px; min-width: 0; }
.mp38d .col38 .pzone { margin: 0; }
.mp38d .col38 .pzone > .sec { padding: 8px 14px; }
.mp38d .col38 .pzone > .sec:empty { display: none; }
.mp38d .col38 > .sec { padding: 0 2px; border: 0; }
.mp38d .col38 .prop { grid-template-columns: 104px minmax(0, 1fr); }
.mp38d .col38 .mg { grid-template-columns: 104px minmax(0, 1fr) 34px; }
.tr38 .ls38 { justify-self: start; max-width: 100%; margin-top: 2px; padding: 1px 7px; border-radius: 8px; background: var(--raised);
  color: var(--text2); font-size: 10.5px; font-weight: 600; line-height: 1.3; }
.tr38 .ls38[hidden] { display: none; }
.rec38 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; padding: 10px 14px;
  border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-soft); }
.rec38 .k38 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.mp38d[data-multi="1"] .k38one, .mp38d:not([data-multi="1"]) .k38many { display: none; }
.rec38 .m38 { font-size: 16px; font-weight: 800; color: var(--text); }
.rec38 .m38 span { font-weight: 500; color: var(--text2); font-size: 13.5px; }
.rec38 .m38:has(b:empty) { display: none; }
.rec38 .ry38 { grid-column: 1; margin: 0; color: var(--text2); font-size: 13px; line-height: 1.4; }
.rec38 .alt38 { color: var(--muted); }
.rec38 .alt38 b { color: var(--text2); }
.rec38 .btn { grid-column: 2; grid-row: 1 / span 3; }
.rec38 .btn[hidden] { display: none; }
.rec38 [data-mp38-take] { gap: .3em; }
.fl38 { display: flex; align-items: center; gap: 6px; }
.fl38 .chip { height: 28px; padding: 0 12px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
.fl38 .chip.on::before { content: "✓"; margin-right: 2px; }
.fl38 .n38 { color: var(--muted); font-size: 12px; }
.tb38 { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; overscroll-behavior: contain; }
.tr38 { display: flex; align-items: center; gap: 0 10px; padding: 6px 12px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text2); cursor: pointer; }
.rows38 > .tr38:first-child { border-top: 0; }
.tr38[hidden] { display: none; }
.tr38.th38 { position: sticky; top: 0; z-index: 1; background: #1B2023; cursor: default; padding-top: 7px; padding-bottom: 7px; border-top: 0;
  border-bottom: 1px solid var(--line); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.tr38:not(.th38):not(.off38):hover { background: rgba(255, 255, 255, .03); }
.mp38d:not([data-multi="1"]) .tr38.on { background: var(--accent-soft); }
.c38 { flex: none; min-width: 0; }
.c38-ck { width: 22px; display: grid; place-items: center; }
.c38-nm { flex: 1.25 1 170px; display: grid; gap: 1px; }
.c38-cena { width: 214px; }
.c38-cas { width: 70px; }
.c38-zvuk { width: 46px; }
.c38-konce { width: 64px; }
.c38-dlzka { width: 62px; }
/* the 3D plate (place podklad_3d, Peter 1. 11.): how many cards go, and whether the model holds the layout */
.c38-karty { width: 74px; }
.c38-drzi { width: 118px; }
.tr38 .h38 { font-weight: 700; color: var(--text2); }
.tr38 .h38-drzi { color: var(--ok); }
.tr38 .h38-priblizne { color: var(--warn); }
.tr38 .h38-nevie, .tr38 .h38-nic { color: var(--faint); font-weight: 400; }
.c38-kvalita { flex: 2 1 190px; display: flex; align-items: flex-start; gap: 4px; }
.tr38 .rb38, .tr38 .cb38 { width: 14px; height: 14px; accent-color: var(--accent); margin: 0; }
.mp38d[data-multi="1"] .rb38, .mp38d:not([data-multi="1"]) .cb38 { display: none; }
.c38-nm b { color: var(--text); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th38 .c38-nm { display: block; }
.c38-nm small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c38-nm .w38 { justify-self: start; max-width: 100%; margin-top: 2px; padding: 1px 7px; border-radius: 8px; background: var(--warn-bg);
  color: var(--warn); font-size: 10.5px; font-weight: 600; line-height: 1.3; }
.c38-nm .w38[hidden] { display: none; }
.tr38 .yes38 { color: var(--ok); font-weight: 700; }
.tr38 .no38 { color: var(--faint); }
.tr38 .q38t { min-width: 0; color: var(--text2); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.tr38 .tg38 { display: inline-flex; vertical-align: 1px; margin-right: 5px; height: 17px; font-size: 10.5px; padding: 0 7px; }
.tr38 .tg38-final { background: var(--accent-soft); color: var(--accent); }
.tr38 .tg38-skusanie, .tr38 .tg38-test { background: var(--raised); color: var(--faint); }
.tr38 .c38-kvalita > details.tip { flex: none; }
.tr38 .one38 i { font-style: normal; font-size: 10.5px; }
.tr38 .one38 { display: grid; font-weight: 600; color: var(--text2); }
.tr38 .one38 i { color: var(--muted); font-weight: 400; }
.tr38 .one38 i:empty, .tr38 .one38 .aj38:empty { display: none; }
.tr38 .one38[hidden] { display: none; }
/* the row's other lanes, a grey word: chosen only in Nastavenia · Kde sa počíta (Peter 18. 11.) */
.tr38 .one38 .aj38 { color: var(--faint); font-size: 10.5px; font-weight: 400; }
/* Nastavenia · Kde sa počíta: the one control of the chosen model's machine, with each lane's price and time */
.mp38d .kde38 { display: grid; gap: 6px; }
.mp38d .kde38 h3 { margin: 0; font-size: 13px; font-weight: 700; color: var(--text2); }
.mp38d .kde38s { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mp38d .kde38s[hidden], .mp38d .kde38w[hidden], .mp38d .kde38s button[hidden] { display: none; }
.mp38d .kde38n { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.mp38d .kde38s button { display: grid; gap: 1px; min-width: 108px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--well); color: var(--muted); font: inherit; line-height: 1.2; text-align: left; cursor: pointer; }
.mp38d .kde38s button i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--text2); }
.mp38d .kde38s button b { font-size: 13px; color: var(--text); white-space: nowrap; }
.mp38d .kde38s button span { font-size: 11px; color: var(--faint); }
.mp38d .kde38s button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mp38d .kde38s button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mp38d .kde38w { margin: 0; color: var(--muted); }
.mp38d[data-multi="1"] .cols38, .mp38d[data-multi="1"] .sft38 .one38f { display: none; }
/* a place without the video's settings: only Kde sa počíta, no sentence about settings a model does not know */
.mp38d .cols38:empty, .mp38d .cols38:empty ~ .sft38 .one38f { display: none; }
.mp38d .cols38:empty ~ .sft38 { margin-top: auto; }
.tr38 .why38 { display: none; }
.tr38.off38 { cursor: default; }
.tr38.off38 > .c38:not(.c38-ck):not(.c38-nm):not(.why38) { display: none; }
.tr38.off38 > .c38-ck, .tr38.off38 > .c38-nm { opacity: .55; }
/* the reason spans the columns it hides (their widths, gaps and the quality's share), so the name keeps its width */
.tr38.off38 .why38 { display: block; flex: 2 1 696px; color: var(--text2); font-size: 12px; }
.sep38 { padding: 9px 12px 5px; border-top: 1px solid var(--line); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); font-weight: 600; background: rgba(255, 255, 255, .015); }
.sep38[hidden] { display: none; }
.offs38 > .tr38:first-child { border-top: 1px solid var(--line); }
.tools38 { margin: 0; padding: 8px 12px 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.ft38 { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.mp38d[data-multi="1"] .ft38 .one38f, .mp38d[data-multi="1"] .ft38 > details.tip, .mp38d[data-multi="1"] .ft38 .esc38,
.mp38d:not([data-multi="1"]) .ft38 .sum38, .mp38d:not([data-multi="1"]) .ft38 [data-mp38-done] { display: none; }
.ft38 .sum38 { color: var(--text2); font-weight: 600; font-size: 13px; }
@media (max-width: 900px) {
  dialog.mp38d { width: calc(100vw - 16px); height: calc(100vh - 16px); }
  .c38-cas, .c38-zvuk, .c38-konce, .c38-dlzka, .c38-karty { display: none; }
  .c38-cena { width: auto; }
  .tr38 { flex-wrap: wrap; }
  .mp38d .cols38 { grid-template-columns: minmax(0, 1fr); }
}
.tip-pop .lk38 { display: block; margin-top: 6px; color: var(--accent); font-weight: 600; text-decoration: none; } .tip-pop .lk38:hover { text-decoration: underline; }   /* Peter 1. 11.: Viac v Knižnici → */
