/* The public site's additions to the research hub's hearing viewer and video popup (static/hub/app/testimony.js, hearing-popup.js, synced).
   Hand-written; the sync never touches it. */

/* the video popup's looks: the hub's hearing-popup.js writes them into a <style> element, which this site's content security policy does not
   allow; the rules are the same */
dialog.hpop { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg, 10px); background: var(--panel); color: var(--text); }
dialog.hpop::backdrop { background: rgba(0, 0, 0, .55); }
.hpop-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.hpop-head h2 { margin: 0; font-size: 15px; line-height: 1.35; }
.hpop-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.hpop-close { flex: none; min-width: 32px; min-height: 32px; font: inherit; font-size: 18px; line-height: 1; background: transparent; color: var(--text);
  border: 1px solid var(--control-border); border-radius: 6px; cursor: pointer; }
.hpop-body { padding: 12px 14px 14px; }
.hpop-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.hpop-frame iframe, .hpop-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hpop-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; }
.hpop-links a { display: inline-flex; align-items: center; min-height: 24px; color: var(--gold); }
.hpop [hidden] { display: none !important; }
.hpop-note { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* once the hub's list is drawn, the server-built list (a crawler's, and the page without scripts) is hidden */
.hub-hearings .ssr-only.is-replaced { display: none; }

/* the transcript link on a hearing's own page */
.hr-transcript { margin: 16px 0; }
.hr-transcript .hr-read { display: inline-block; padding: 8px 14px; border: 1px solid var(--gold); border-radius: 6px; font-weight: 600; text-decoration: none; }
.hr-transcript .hr-read:hover { background: var(--sunken); }
.hr-transcript .notice { margin-top: 10px; }

/* a hearing with a published transcript: the popup is the hub's whole viewer (/hearings/<id>/watch in a frame), at the viewer's own size;
   the viewer has its own title and close button, so the popup's head steps aside */
dialog.hpop.hpop-wide { width: min(1240px, calc(100vw - 32px)); height: min(920px, calc(100dvh - 32px)); max-width: none; max-height: none;
  overflow: hidden; background: var(--bg); }
dialog.hpop.hpop-wide .hpop-head { display: none; }
dialog.hpop.hpop-wide .hpop-body { padding: 0; height: 100%; }
.hpop-viewer { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) {
  dialog.hpop.hpop-wide { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
}

/* /hearings/<id>/watch itself: only the viewer, filling the frame */
body.embed { margin: 0; background: var(--bg); }
body.embed dialog#tDlg { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
body.embed dialog#tDlg::backdrop { background: var(--bg); }

/* the viewer's head on a narrow screen: a long Hearing choice wraps inside the head instead of pushing the close button off the screen */
#tDlg .t-head > div { min-width: 0; flex: 1; }
#tDlg .t-pickrow label { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; }
#tDlg .t-pickrow select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
