/* Watch together in Hearth's own player (watch/together.js): the bar button, the
   faces after the title, and the panel on the stage. Faces, toasts, tossed paper
   and the countdown leader come from watch/faces.css. */

/* The app has no global [hidden] rule, and these set their own display. */
.wt-panel[hidden], .wt-panel [hidden], .wt-app-faces[hidden], .wt-app-leader[hidden], .vc-together[hidden] { display: none !important; }

/* The stage sets line-height 0 and a black backing on images (for the picture);
   nothing here wants either. */
.wt-panel, .wt-app-toasts, .wt-app-sky, .wt-app-leader, .wt-app-faces { line-height: 1.4; }
#video-stage .wt-panel img, #video-stage .wt-app-sky img, #video-stage .wt-app-toasts img, #video-stage .wt-app-faces img { background: none; }

/* The bar button: the stage's round buttons, brass while a room is open. */
#video-player .vc-together, .video-stage .vc-together { position: relative; }
.video-stage .vc-together.is-on { color: var(--wt-brass, #e9b878); }
.video-stage .vc-together.is-open { background: rgba(255, 255, 255, .14); }
.vc-together-count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--wt-brass, #e9b878); color: #2a1708; font: 700 10.5px/17px var(--wt-sans); text-align: center; pointer-events: none; }
.vc-together-count:empty { display: none; }

/* Faces right of the title (inside vinfo's .vct-row, before the ⓘ). */
.wt-app-faces { display: inline-flex; align-items: center; flex-shrink: 0; margin: 0; border: 0; background: transparent; color: inherit; font: inherit; padding: 2px 4px 2px 10px; cursor: pointer; border-radius: 999px; transition: background-color .15s; }
.wt-app-faces:hover { background: rgba(255, 255, 255, .08); }
.wt-app-faces:focus-visible { outline: 2px solid var(--wt-brass-hi); outline-offset: 2px; }
.wt-app-faces .wf { margin-left: -7px; box-shadow: 0 0 0 2px rgba(10, 8, 6, .9), 0 2px 6px rgba(0, 0, 0, .4); animation: wt-app-pop .5s var(--wt-spring) both; }
.wt-app-faces .wf:first-child { margin-left: 0; }
.wt-app-faces .wf:hover { transform: translateY(-2px) scale(1.12); z-index: 1; }
.wt-app-faces .wt-more { margin-left: 5px; font-size: 12px; font-weight: 650; color: var(--vc-dim, #b9b4aa); }
@keyframes wt-app-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Layers on the stage. */
.video-stage .wt-app-sky { z-index: 9; }
.video-stage .wt-app-leader { z-index: 6; }
.video-stage .wt-app-toasts { top: 84px; z-index: 12; }
.video-stage .wt-app-toasts .wt-toast { font-size: 13.5px; color: #f4e8d3; }

/* The panel: a slip of the room's ticket, standing at the right of the picture. */
.wt-panel {
  position: absolute; z-index: 11; right: clamp(16px, 2.6vw, 40px); top: 80px; bottom: 150px;
  width: min(372px, calc(100% - 32px)); overflow: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 16px; padding: 18px 18px 20px;
  border-radius: 18px; color: #f4e8d3; font-family: var(--wt-sans);
  background: linear-gradient(170deg, rgba(43, 32, 24, .94), rgba(22, 17, 13, .94));
  box-shadow: 0 0 0 1px rgba(233, 184, 120, .24) inset, 0 30px 80px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  animation: wt-panel-in .45s var(--wt-ease) both;
}
@keyframes wt-panel-in { from { opacity: 0; transform: translateX(16px) scale(.98); } to { opacity: 1; transform: none; } }
.wt-p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wt-p-heading { min-width: 0; }
.wt-p-eyebrow { margin: 0 0 6px; font: 600 11px/1.2 var(--wt-sans); letter-spacing: .24em; text-transform: uppercase; color: var(--wt-brass); }
.wt-p-title { margin: 0; font: 600 24px/1.1 var(--wt-serif); letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wt-p-close { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: inherit; cursor: pointer; }
.wt-p-close svg { width: 18px; height: 18px; }
.wt-p-close:hover { background: rgba(255, 255, 255, .16); }
.wt-panel :focus-visible { outline: 2px solid var(--wt-brass-hi); outline-offset: 2px; }
.wt-p-intro { display: flex; flex-direction: column; gap: 16px; }
.wt-p-intro p { margin: 0; font-size: 14px; line-height: 1.6; color: #d9c9ae; text-wrap: pretty; }
.wt-p-flock { display: flex; justify-content: center; padding: 8px 0 2px; }
.wt-p-flock .wf { margin-left: -10px; animation: wt-flock 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.6s); }
.wt-p-flock .wf:first-child { margin-left: 0; }
@keyframes wt-flock { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.wt-p-room { display: flex; flex-direction: column; gap: 16px; }
.wt-p-error { color: #ffb4a4 !important; min-height: 0; }
.wt-p-error:empty { display: none; }

.wt-p-lamp { min-height: 48px; padding: 12px 24px; border: 0; border-radius: 999px; cursor: pointer; background: linear-gradient(180deg, #ffd9a3, #e9b878 55%, #a77a43); color: #2a1708; font: 650 15px/1 var(--wt-sans); white-space: nowrap; box-shadow: 0 0 0 1px rgba(255, 217, 163, .45) inset, 0 10px 26px -8px rgba(255, 154, 82, .6); transition: transform .18s var(--wt-spring), box-shadow .2s; }
.wt-p-lamp:hover { transform: translateY(-1px) scale(1.02); }
.wt-p-lamp:active { transform: scale(.98); }
.wt-p-lamp:disabled { filter: grayscale(.4) brightness(.8); cursor: progress; }
.wt-p-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(233, 184, 120, .3); background: rgba(14, 11, 9, .5); color: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
.wt-p-ghost:hover { border-color: var(--wt-brass); background: rgba(58, 42, 28, .8); }
.wt-p-ghost:disabled { opacity: .5; cursor: progress; }
.wt-p-danger { color: #ffb4a4; align-self: flex-start; }
.wt-p-danger:hover { border-color: #ffb4a4; }

/* The ticket: QR stub and the link. */
.wt-p-ticket { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: linear-gradient(180deg, #ffd9a3, #e9b878 60%, #c8955a); color: #2a1708; }
.wt-p-ticket canvas { width: 96px; height: 96px; border-radius: 8px; background: #f7ecd7; padding: 4px; image-rendering: pixelated; }
.wt-p-ticket-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wt-p-admit { margin: 0; font: 700 10.5px/1.2 var(--wt-sans); letter-spacing: .28em; text-transform: uppercase; }
.wt-p-url { width: 100%; min-width: 0; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(42, 23, 8, .25); background: rgba(255, 246, 228, .7); color: #2a1708; font: 12.5px var(--wt-sans); text-overflow: ellipsis; }
.wt-p-row { display: flex; gap: 6px; }
.wt-p-ticket .wt-p-ghost { flex: 1; min-height: 36px; padding: 6px 10px; border-color: rgba(42, 23, 8, .35); background: rgba(42, 23, 8, .12); color: #2a1708; font-size: 13px; }
.wt-p-ticket .wt-p-ghost:hover { background: rgba(42, 23, 8, .2); border-color: #2a1708; }

.wt-p-sync { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.wt-p-status { margin: 0; font: italic 500 15px/1.4 var(--wt-serif); color: #ffd9a3; }
.wt-p-from, .wt-p-seg { display: flex; padding: 3px; border-radius: 999px; background: rgba(11, 9, 7, .7); border: 1px solid rgba(233, 184, 120, .16); }
.wt-p-from label, .wt-p-seg label { position: relative; flex: 1; }
.wt-p-from input, .wt-p-seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.wt-p-from span, .wt-p-seg span { display: block; padding: 8px 10px; border-radius: 999px; text-align: center; font-size: 12.5px; font-weight: 600; color: #a8977d; white-space: nowrap; transition: background-color .2s, color .2s; }
.wt-p-from input:checked + span, .wt-p-seg input:checked + span { background: #2a2018; color: #f4e8d3; box-shadow: 0 0 0 1px rgba(233, 184, 120, .3) inset; }
.wt-p-from input:focus-visible + span, .wt-p-seg input:focus-visible + span { outline: 2px solid var(--wt-brass-hi); outline-offset: 2px; }
.wt-p-remote { margin: 0; padding: 0; border: 0; min-width: 0; }
.wt-p-remote legend { padding: 0 0 8px; font-size: 12.5px; color: #a8977d; }
.wt-p-foot { display: flex; align-items: flex-end; gap: 10px; }
.wt-p-foot .wt-p-remote { flex: 1; }
.wt-p-foot .wt-p-danger { align-self: flex-end; min-height: 38px; }

.wt-p-people h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font: 600 16px/1.2 var(--wt-serif); }
.wt-p-count { font: 500 12.5px var(--wt-sans); color: #a8977d; }
.wt-p-people ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.wt-p-people li { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(233, 184, 120, .1); }
.wt-p-people li:last-child { border-bottom: 0; }
.wt-p-people li > div { min-width: 0; }
.wt-p-people strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-p-people small { display: block; font-size: 12px; color: #a8977d; }
.wt-p-people li.is-away strong { color: #a8977d; }
.wt-p-toss { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.wt-p-tossbtn { display: grid; place-items: center; aspect-ratio: 1; padding: 6px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 1px rgba(233, 184, 120, .14) inset; cursor: pointer; transition: transform .2s var(--wt-spring), background-color .15s; }
.wt-p-tossbtn img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.wt-p-tossbtn:hover { background: rgba(255, 255, 255, .1); transform: translateY(-3px) rotate(-6deg); }
.wt-p-tossbtn.is-cool { opacity: .45; }

/* The pop-out and narrow windows: the panel becomes a sheet over the picture. */
.video-stage.is-popout .wt-panel, .vc-narrow ~ .wt-panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: calc(100% - 16px); }
@media (max-width: 640px) {
  .wt-panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 78%; border-radius: 18px 18px 14px 14px; }
  .video-stage .wt-app-toasts { top: 72px; }
}
@media (prefers-reduced-motion: reduce) { .wt-panel, .wt-app-faces .wf, .wt-p-flock .wf { animation: none; } }
