/*
 * Kanály › Obrazovky: the TVs as a wall of mini TVs (js/modules/obrazovky.js). Each plays a live preview of its
 * /screen/<id> in a frame scaled from 1920 × 1080; a small light on the bezel says if the real TV is connected.
 */
.mtv-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: var(--space-8, 32px) var(--space-6, 24px);
  margin-top: var(--space-4, 16px);
}
.mtv { display: grid; gap: var(--space-3, 12px); align-content: start; min-width: 0; }

/* the set: bezel with the picture, a short stand */
.mtv-set { display: block; border-radius: 10px; }
/* the TV itself opens its preview (14. 11. 2026): it answers the pointer and shows the focus of the keyboard */
.mtv-set:hover .mtv-bezel { transform: translateY(-2px); }
.mtv-set:focus-visible { outline: 2px solid var(--sys-blue, #0a84ff); outline-offset: 4px; }
.mtv-bezel {
  position: relative;
  padding: 7px 7px 9px;
  background: linear-gradient(#1b1b1d, #0d0d0e);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 14px 30px -18px rgba(0, 0, 0, .9);
  transition: transform var(--dur-base, 200ms) var(--ease-standard, ease);
}
.mtv-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 3px;
  background: #000;
  --mtv-scale: .2;
}
.mtv-screen iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  border: 0;
  transform: scale(var(--mtv-scale));
  transform-origin: 0 0;
  pointer-events: none;
}
.mtv-blocked {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  color: #a9a79f;
  font-size: var(--fs-13, 13px);
}
.mtv-blocked[hidden] { display: none; }
.mtv.is-off .mtv-screen { filter: grayscale(1) brightness(.55); }

/* light on the bezel: connected, waiting, not connected, off */
.mtv-led {
  position: absolute;
  right: 14px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5b5b5e;
}
.mtv-led[data-tone="ok"] { background: #3fc58f; box-shadow: 0 0 6px #3fc58f; }
.mtv-led[data-tone="bad"] { background: #f07a5a; box-shadow: 0 0 6px #f07a5a; }
.mtv-led[data-tone="wait"] { background: #edba37; }
.mtv-stand {
  width: 18%;
  height: 10px;
  margin: 0 auto;
  background: linear-gradient(#141415, #0b0b0c);
  border-radius: 0 0 6px 6px;
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
}

/* name and state under the set */
.mtv-info { display: grid; gap: var(--space-2, 8px); }
.mtv-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mtv-title b { font-size: var(--fs-16, 16px); }
.mtv-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-13, 13px); }

@media (prefers-reduced-motion: reduce) {
  .mtv-bezel { transition: none; }
}

/* ---------- Fotky z bistra (Obrazovky › Fotky): one card per photo ---------- */
.ph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr));
  gap: 16px;
  margin: 14px 0;
}
.ph-card {
  display: grid;
  gap: 12px;
  align-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  min-width: 0;
}
.ph-card.is-hidden .ph-pic img { opacity: .4; filter: grayscale(1); }
.ph-main { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: start; }
.ph-pic { position: relative; }
.ph-pic img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface);
}
.ph-badges { position: absolute; left: 6px; top: 6px; display: grid; gap: 4px; justify-items: start; }
.ph-pos {
  position: absolute; right: 6px; bottom: 6px;
  padding: 1px 7px; border-radius: 99px;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px;
}
.ph-fields { display: grid; gap: 10px; min-width: 0; }
.ph-fields > .input { width: 100%; font-weight: 600; }
.ph-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: center; min-width: 0; }
.ph-row--top { align-items: start; }
.ph-row--top > .ph-label { padding-top: 3px; }
.ph-label { color: var(--text-muted); font-size: 12px; letter-spacing: .02em; }
.ph-hint { color: var(--text-muted); font-size: 12px; }
.ph-inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; min-width: 0; }
.ph-stack { display: grid; gap: 8px; min-width: 0; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ph-chip { position: relative; cursor: pointer; }
.ph-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ph-chip span {
  display: block; padding: 4px 10px; border-radius: 99px;
  border: 1px solid var(--line-strong, var(--line)); color: var(--text-muted); font-size: 12.5px; line-height: 1.3;
}
.ph-chip input:checked + span { background: var(--brand-gold); border-color: var(--brand-gold); color: var(--brand-ink); font-weight: 600; }
.ph-chip input:focus-visible + span { outline: 2px solid var(--brand-gold); outline-offset: 2px; }
.ph-check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.ph-offer { display: grid; gap: 6px; }
.ph-offer[hidden] { display: none; }
.ph-offer > .input { width: 100%; }
.ph-price { width: 5.5em; }
.ph-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--line);
}
@media (max-width: 480px) {
  .ph-main { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .ph-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ph-row--top > .ph-label { padding-top: 0; }
}

/* ---------- Témata snímku počasí (Obrazovky › Počasí); shares the cards of the photos ---------- */
.th-card.is-current { border-color: var(--brand-gold); }
.th-head { display: flex; gap: 10px; justify-content: space-between; align-items: start; }
.th-head h3 { margin: 0 0 2px; font-size: 16px; }
.th-head p { margin: 0; }
.th-card .input { width: 100%; }
.th-title { font-weight: 600; }
.th-text { resize: vertical; min-height: 3.4em; font: inherit; }
.th-preview {
  display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px;
  background: #0b0b0b; color: #f6f4ee; font-size: 13.5px; line-height: 1.35;
}
.th-preview b { color: var(--brand-gold); font-size: 17px; letter-spacing: -.01em; }

/* ---------- Náhled na TV: one slide of the Tabule in a dialog (js/modules/tv-preview.js) ---------- */
dialog.dlg.dlg--tv { width: min(1040px, calc(100% - 32px)); }
.tvp { display: grid; gap: 10px; min-width: 0; }
.tvp-live { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tvp-live__note { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.tvp-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 10px; background: #0a0a0a; border: 1px solid var(--line);
  --tvp-scale: .4;
}
.tvp-stage iframe {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0;
  transform: scale(var(--tvp-scale)); transform-origin: 0 0; pointer-events: none;
}

/* ---------- Denní nabídka (Obrazovky › Denní nabídka): the soup and the dishes in shared columns ---------- */
.do { display: grid; gap: 22px; min-width: 0; }
.do .card-head { margin: 0; }
.do-part { display: grid; gap: 10px; min-width: 0; }
.do-part h3 { margin: 0; font-size: 15px; font-weight: 600; }
.do-rows { display: grid; gap: 8px; }
.do-row { display: grid; grid-template-columns: minmax(0, 5fr) 124px minmax(0, 4fr) 36px; gap: 8px; align-items: center; min-width: 0; }
.do-row > * { min-width: 0; }
.do-row .input { width: 100%; }
.do-heads { color: var(--text-muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.do-heads span { padding-left: 2px; }
.do-price { position: relative; display: block; }
.do-price .input { padding-right: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.do-price span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.do-price input::-webkit-outer-spin-button, .do-price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.do-price input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.do-del {
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  border: 1px solid transparent; border-radius: 10px; background: transparent;
  color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.do-del:hover, .do-del:focus-visible { border-color: var(--line-strong, var(--line)); color: var(--text); }
.do-add { justify-self: start; }
.do-empty { margin: 0; }
.do-empty[hidden] { display: none; }
.do-foot { display: grid; gap: 8px; }
.do-foot .field-help { margin: 0; }
@media (max-width: 720px) {
  .do-heads { display: none; }
  .do-row { grid-template-columns: 112px minmax(0, 1fr) 44px; grid-template-areas: "name name del" "price note note"; }
  .do-del { width: 44px; height: 44px; }           /* a touch target */
  .do-row > :nth-child(1) { grid-area: name; }
  .do-row > :nth-child(2) { grid-area: price; }
  .do-row > :nth-child(3) { grid-area: note; }
  .do-row > :nth-child(4) { grid-area: del; }
  .do-rows { gap: 0; }
  .do-rows .do-row { padding: 12px 0; border-top: 1px solid var(--line); }
  .do-rows .do-row:first-child { border-top: 0; padding-top: 0; }
}
