/* The player's title card (media/vinfo.js): the ⓘ beside what is playing, and
   the lobby card it opens over the bottom-left of the picture. The Cinema's
   palette (brass on night glass, cinema.css) so a title reads the same here as
   on its own page; the scores ARE the Cinema's scorecard, laid out for here. */

/* ── the button: a brass-ringed "i" right after the name ── */
#video-player > .video-stage .vct-row { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
#video-player > .video-stage .vct-row .vct-name { flex: 0 1 auto; min-width: 0; }
#video-player > .video-stage .vc-info {
  position: relative;
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  padding: 0;
  border: 1px solid rgba(237, 199, 141, .55);
  border-radius: 50%;
  background: rgba(14, 15, 20, .35);
  color: var(--vc-ink, #f4f0e9);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .15s ease, box-shadow .25s ease;
}
/* 44px to aim at, whatever it looks like. */
#video-player > .video-stage .vc-info::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; }
#video-player > .video-stage .vc-info svg { width: 14px; height: 14px; }
@media (hover: hover) {
  #video-player > .video-stage .vc-info:hover { border-color: #edc78d; background: rgba(237, 199, 141, .16); color: #fff; box-shadow: 0 0 0 4px rgba(237, 199, 141, .12); }
}
#video-player > .video-stage .vc-info:active { transform: scale(.9); }
#video-player > .video-stage .vc-info:focus-visible { outline: 2px solid var(--vc-accent, #edc78d); outline-offset: 3px; }
#video-player > .video-stage .vc-info.is-on { border-color: #edc78d; background: #edc78d; color: #1a150c; box-shadow: 0 0 18px -2px rgba(237, 199, 141, .55); }
#video-player > .video-stage .vc-info[hidden] { display: none; }

/* ── the card ── */
.vinfo {
  --vinfo-left: 40px;
  --vinfo-bottom: 140px;
  --vinfo-brass: #e9c688;
  --vinfo-ink: #f5f1e9;
  --vinfo-dim: #c3c0b8;
  position: absolute;
  z-index: 8;
  left: var(--vinfo-left);
  bottom: var(--vinfo-bottom);
  width: min(660px, calc(100% - var(--vinfo-left) - 16px));
  max-height: calc(100% - var(--vinfo-bottom) - 84px);
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  column-gap: 22px;
  padding: 20px 22px 20px 20px;
  overflow: hidden;
  color: var(--vinfo-ink);
  /* Its own text base: the stage it sits in sets line-height 0 (no gaps round the picture). */
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  border: 1px solid rgba(233, 198, 136, .42);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(37, 37, 30, .9), rgba(16, 21, 27, .94) 62%);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  outline: none;
}
.vinfo[hidden] { display: none; }
/* The player's modal sizes and lifts every img inside it like the picture
   (styles.css `.modal.media-fullscreen img`: 94vh, relative, z-index 5). The
   card's own images are not the picture: reset here, and every image rule
   below carries the id so it outranks that one. */
#video-info img { max-width: none; max-height: none; position: static; z-index: auto; background: none; margin: 0; }
/* The title's own backdrop, far behind the words: a warm glow, not a picture. */
.vinfo-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
#video-info .vinfo-art-img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); filter: blur(26px) saturate(1.3) brightness(.55); transition: opacity .6s ease; }
#video-info.has-art .vinfo-art-img { opacity: .55; }
.vinfo-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(14, 16, 20, .25) 0%, rgba(14, 16, 20, .78) 46%, rgba(14, 16, 20, .9) 100%);
}
/* A brass hairline along the top edge, like the Cinema's plaques. */
.vinfo::before {
  content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(233, 198, 136, .8) 30%, rgba(233, 198, 136, .8) 70%, transparent);
}

.vinfo-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(10, 12, 16, .55);
  color: var(--vinfo-dim);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .12s ease;
}
.vinfo-close::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
@media (hover: hover) { .vinfo-close:hover { background: rgba(255, 255, 255, .14); color: #fff; } }
.vinfo-close:active { transform: scale(.92); }
.vinfo-close:focus-visible { outline: 2px solid var(--vinfo-brass); outline-offset: 2px; }

.vinfo-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vinfo-poster {
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #0b0d11;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .9), 0 0 0 1px rgba(233, 198, 136, .28);
  transform-origin: 50% 100%;
}
.vinfo-poster[hidden] { display: none; }
#video-info .vinfo-poster-img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* No poster: the words take the whole card, and where you are moves under them. */
.vinfo.no-poster { grid-template-columns: minmax(0, 1fr); }
.vinfo.no-poster .vinfo-side { order: 2; margin-top: 12px; }
/* Where you are: the bar's own brass, as a line and the time left. */
.vinfo-where { display: grid; gap: 6px; }
.vinfo-where[hidden] { display: none; }
.vinfo-where-line { display: block; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.vinfo-where-line i { display: block; height: 100%; background: linear-gradient(90deg, #b8935a, var(--vinfo-brass)); transform-origin: left center; transform: scaleX(0); transition: transform .4s linear; }
.vinfo-where-text { font-size: 11.5px; line-height: 1.3; color: var(--vinfo-dim); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vinfo-copy {
  min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding-right: 30px;          /* clear of the close button */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.vinfo-copy > [hidden] { display: none; }
/* Every line keeps its height: when the words outgrow the card, the column scrolls. */
.vinfo-copy > * { flex-shrink: 0; }
.vinfo-eyebrow {
  margin: 2px 0 0;
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--vinfo-brass);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vinfo-title {
  margin: 0;
  font-size: 27px; line-height: 1.12; font-weight: 750; letter-spacing: -.03em;
  color: #fff9ed;
  text-wrap: balance; overflow-wrap: anywhere;
}
#video-info .vinfo-logo { display: none; max-width: min(320px, 100%); max-height: 64px; width: auto; height: auto; object-fit: contain; object-position: left center; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .6)); }
#video-info .vinfo-title.has-logo .vinfo-logo { display: block; }
.vinfo-title.has-logo .vinfo-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vinfo-ep { margin: 0; font-size: 14px; font-weight: 650; color: var(--vinfo-ink); text-wrap: balance; }
.vinfo-genres { margin: 0; font-size: 12.5px; color: var(--vinfo-dim); }
.vinfo-tagline { margin: 0; font-size: 14px; font-style: italic; color: #e8dcc4; text-wrap: balance; }

.vinfo-synopsis { margin-top: 2px; }
.vinfo-label { display: block; margin-bottom: 4px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9fa6af; }
.vinfo-label:empty { display: none; }
.vinfo-text {
  margin: 0;
  max-width: 62ch;
  font-size: 14px; line-height: 1.6; color: #dde0e7;
  text-wrap: pretty;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4;
  overflow: hidden;
}
.vinfo-synopsis.is-full .vinfo-text { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.vinfo-synopsis.is-empty .vinfo-text { color: #9fa6af; font-style: italic; }
.vinfo-synopsis.is-loading .vinfo-text { animation: vinfo-breathe 1.4s ease-in-out infinite; }
@keyframes vinfo-breathe { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .vinfo-synopsis.is-loading .vinfo-text { animation: none; } }
.vinfo-more {
  margin-top: 4px;
  min-height: 28px;
  padding: 2px 0;
  border: 0; background: none;
  color: var(--vinfo-brass);
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  cursor: pointer;
}
.vinfo-more[hidden] { display: none; }
@media (hover: hover) { .vinfo-more:hover { text-decoration: underline; text-underline-offset: 3px; } }
.vinfo-more:focus-visible { outline: 2px solid var(--vinfo-brass); outline-offset: 2px; border-radius: 4px; }

/* The Cinema's scorecard, as one row of scores across the foot of the words. */
.vinfo-scores { margin-top: 6px; }
.vinfo-scores[hidden] { display: none; }
.vinfo-scores .cinema-scorecard {
  background: rgba(8, 10, 14, .42);
  border-color: rgba(233, 198, 136, .3);
  box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.vinfo-scores .cinema-scorecard-heading { display: none; }
.vinfo-scores .cinema-scorecard-list { display: flex; flex-wrap: wrap; padding: 4px 6px; }
.vinfo-scores .cinema-score-row { flex: 1 1 110px; margin: 0 8px; padding: 8px 0 10px; border: 0; row-gap: 6px; }
.vinfo-scores .cinema-score-value b { font-size: 24px; }
.vinfo-scores .cinema-score-context { display: block; grid-column: 1 / -1; font-size: 10.5px; color: #aeb3bb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* A phone or a narrow window: the card spans the width over the bar. */
@media (max-width: 640px) {
  .vinfo {
    left: 12px; right: 12px; width: auto;
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 14px;
    padding: 16px 14px 14px;
    border-radius: 16px;
  }
  .vinfo-title { font-size: 21px; }
  #video-info .vinfo-logo { max-height: 44px; }
  .vinfo-text { font-size: 13.5px; -webkit-line-clamp: 3; line-clamp: 3; }
  .vinfo-scores .cinema-score-row { flex-basis: 84px; margin: 0 6px; }
  .vinfo-scores .cinema-score-value b { font-size: 20px; }
  .vinfo-scores .cinema-score-context { display: none; }
}
@media (pointer: coarse) {
  #video-player > .video-stage .vc-info { width: 30px; height: 30px; }
  .vinfo-close { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  #video-info .vinfo-art-img, #video-player > .video-stage .vc-info { transition: none; }
}
