/* THE CARD ON THE GLASS (js/tvcard.js) — who is on, drawn above the CRT
   layers with its own backing so it reads while a tape airs. */
.tvc { display: none; }
.tv--playing .tvc:not([hidden]) {
  display: block; position: absolute; z-index: 8; left: clamp(10px, 1.6vw, 22px); bottom: clamp(12px, 2.4vw, 30px);
  width: min(52%, 560px); padding: 10px 14px 11px; cursor: pointer;
  border-radius: 12px; border: 1px solid rgba(255, 176, 32, 0.5); border-left: 4px solid var(--neon-cyan, #ffb020);
  background: linear-gradient(180deg, rgba(14, 8, 3, 0.9), rgba(8, 5, 2, 0.94));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 22px -8px rgba(255, 176, 32, 0.5);
  color: #f4e6c6; transition: width 0.35s ease, padding 0.35s ease;
}
/* INFO already lays the full card over the picture, and the key card owns the glass while it is up */
.tv--playing.tv--info .tvc, .tv__screen:has(#tvp-help:not([hidden])) .tvc { display: none; }

.tvc__badges { margin: 0; font-family: var(--font-mono, monospace); font-size: clamp(0.56rem, 0.72vw, 0.74rem); font-weight: 700; letter-spacing: 0.16em;
  color: var(--neon-cyan, #ffb020); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvc__name { margin: 3px 0 0; font-family: var(--font-display, inherit); font-size: clamp(1.15rem, 2vw, 2.1rem); font-weight: 700; line-height: 1.04;
  letter-spacing: 0.01em; color: #fff7e6; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); overflow-wrap: anywhere; }
.tvc__take { margin: 6px 0 0; font-size: clamp(0.84rem, 1.02vw, 1.08rem); line-height: 1.4; color: #f4e6c6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tvc__file { display: inline-block; margin-top: 8px; padding: 4px 11px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-mono, monospace); font-size: clamp(0.56rem, 0.7vw, 0.7rem); font-weight: 700; letter-spacing: 0.16em;
  color: #1a1002; background: linear-gradient(180deg, #ffd08a, #ffb020); }
.tvc__file:hover, .tvc__file:focus-visible { outline: 2px solid #fff3d6; outline-offset: 2px; }

/* settled: a slim name plate, so the picture stays clear */
.tv--playing .tvc:not([hidden]):not(.is-open) { width: auto; max-width: min(52%, 560px); padding: 7px 12px 8px; }
.tvc:not(.is-open) .tvc__take, .tvc:not(.is-open) .tvc__file { display: none; }
.tvc:not(.is-open) .tvc__name { font-size: clamp(0.98rem, 1.4vw, 1.45rem); }
/* hover or keyboard focus on the set opens it again without a click */
@media (hover: hover) {
  .tv--playing .tv__screen:hover .tvc:not([hidden]):not(.is-open), .tv--playing .tvc:not([hidden]):not(.is-open):focus-within { width: min(52%, 560px); padding: 10px 14px 11px; }
  .tv__screen:hover .tvc:not(.is-open) .tvc__take { display: -webkit-box; }
  .tv__screen:hover .tvc:not(.is-open) .tvc__file, .tvc:not(.is-open):focus-within .tvc__file { display: inline-block; }
  .tv__screen:hover .tvc:not(.is-open) .tvc__name { font-size: clamp(1.15rem, 2vw, 2.1rem); }
}

/* the Broadcast is read from the couch */
@media (min-width: 1101px) {
  html.xf-bc .tv--playing .tvc:not([hidden]) { width: min(46%, 760px); padding: 14px 20px 16px; }
  html.xf-bc .tvc__badges { font-size: clamp(0.72rem, 0.9vw, 1rem); }
  html.xf-bc .tvc .tvc__name { font-size: clamp(1.8rem, 3vw, 3.4rem); }
  html.xf-bc .tvc__take { font-size: clamp(1.05rem, 1.35vw, 1.6rem); }
  html.xf-bc .tv--playing .tvc:not([hidden]):not(.is-open) { width: auto; max-width: min(46%, 760px); padding: 10px 16px 11px; }
  html.xf-bc .tvc:not(.is-open) .tvc__name { font-size: clamp(1.3rem, 2vw, 2.2rem); }
  html.xf-bc .tv--playing .tv__screen:hover .tvc:not([hidden]):not(.is-open) { width: min(46%, 760px); padding: 14px 20px 16px; }
  html.xf-bc .tv__screen:hover .tvc:not(.is-open) .tvc__name { font-size: clamp(1.8rem, 3vw, 3.4rem); }
}

/* phones: the picture is the top of the tall glass, so the card sits right
   under it, always open, at full width (margin-top in % is measured on the
   width: 56.25% of it is the picture's height) */
@media (max-width: 700px) {
  .tv--playing .tvc:not([hidden]), .tv--playing .tvc:not([hidden]):not(.is-open) {
    left: 10px; right: 10px; bottom: auto; top: 0; margin-top: calc(56.25% + 10px);
    width: auto; max-width: none; padding: 11px 13px 12px; cursor: default;
  }
  .tvc .tvc__take, .tvc:not(.is-open) .tvc__take { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 0.95rem; }
  .tvc .tvc__file, .tvc:not(.is-open) .tvc__file { display: inline-block; }
  .tvc .tvc__name, .tvc:not(.is-open) .tvc__name { font-size: clamp(1.5rem, 7vw, 2rem); }
  .tvc__badges { font-size: 0.6rem; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .tvc { transition: none; } }
