/* Styles of the video pages (lists, transcript pages, transcript search).
   Linked by _includes/video-pages-style.html: a separate file, so a style
   change touches this one file instead of every generated video page. */
.vo-summary { font-size: 0.9em; }
.vo-scroll { overflow-x: auto; margin-bottom: 1.5em; }
.vo-table { border-collapse: collapse; font-size: 0.9em; width: 100%; font-variant-numeric: tabular-nums; }
.vo-table.vo-compact { width: auto; margin-left: 0; margin-right: auto; }
.vo-table.vo-compact th, .vo-table.vo-compact td { white-space: nowrap; }
.vo-table th, .vo-table td { padding: 0.2em 0.45em; vertical-align: baseline; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.08); }
.vo-table th { border-bottom: 2px solid rgba(0,0,0,0.25); white-space: nowrap; }
.vo-table tr.vo-newunit td { border-top: 2px solid rgba(0,0,0,0.2); }
.vo-table .vo-num { text-align: right; white-space: nowrap; padding-left: 0.9em; }
.vo-mono { font-family: Menlo, Consolas, monospace; font-size: 0.8em; }
.vo-table td.vo-small, .vo-table td .vo-small { font-size: inherit; }
.vo-table td .vo-note { font-size: 0.9em; opacity: 0.85; }
.vo-nowrap { white-space: nowrap; }
.vo-small { font-size: 0.9em; }
.vo-muted { opacity: 0.6; }

/* search */
.ts { margin: 1em 0 1.5em; }
.ts-input { font: inherit; width: min(100%, 28em); padding: 0.3em 0.5em; border: 1px solid rgba(0,0,0,0.3); border-radius: 4px; background: rgba(255,255,255,0.6); }
.ts-status { margin-left: 0.5em; opacity: 0.7; }
.ts-results { margin-top: 0.5em; }
.ts-hit { margin: 0.6em 0; }
.ts-hit-title { font-size: 0.95em; }
.ts-hit-ctx { font-size: 0.85em; margin: 0.1em 0 0 1em; }
.ts-hit-ctx a.ts-t { font-variant-numeric: tabular-nums; margin-right: 0.4em; }
.ts mark, .tp-text mark { background: rgba(255, 210, 0, 0.45); color: inherit; padding: 0 0.05em; }

/* transcript page: player sticks to the top while reading */
.tp-bar { position: sticky; top: 0; z-index: 5; background: #F5EBD9; padding: 4px 0 6px; }
.tp-player { position: relative; max-width: 560px; aspect-ratio: 16 / 9;
             padding: 5px; box-sizing: content-box; width: calc(100% - 12px);
             background: #faf6ed; border: 1px solid #aeaa9e; border-radius: 4px; }
.tp-player iframe, .tp-player > div, .tp-start { position: absolute; top: 5px; left: 5px; width: calc(100% - 10px); height: calc(100% - 10px); border: 0; margin: 0; padding: 0; background: #000; }
.tp-start { cursor: pointer; overflow: hidden; }
.tp-start img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; padding: 0; border: 0; border-radius: 0; }
.tp-start .yt-lite-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); }
.tp-start .yt-lite-play-bg { fill: #212121; fill-opacity: 0.8; }
.tp-start:hover .yt-lite-play-bg, .tp-start:focus-visible .yt-lite-play-bg { fill: #902015; fill-opacity: 1; }
.tp-controls { margin: 0.3em 0 0; opacity: 0.8; }
/* video page before YouTube has a transcript */
.tp-pending { margin: 0.8em 0 1.2em; padding: 0.4em 0.6em; border-left: 3px solid rgba(144, 32, 21, 0.35); background: rgba(255, 255, 255, 0.35); }
.tp-disclaimer { margin: 0.6em 0 1.2em; padding: 0.4em 0.6em; border-left: 3px solid rgba(144, 32, 21, 0.35); background: rgba(255, 255, 255, 0.35); }
.tp-controls label { margin-left: 1em; white-space: nowrap; }
.tp-text p { position: relative; }
.tp-text [data-t] { cursor: pointer; border-radius: 2px; }
.tp-text span[data-t]:hover { background: rgba(144, 32, 21, 0.08); }
.tp-text span.tp-now { background: rgba(144, 32, 21, 0.16); box-shadow: 0 0 0 2px rgba(144, 32, 21, 0.16); }
.tp-text .tp-time { font-size: 0.75em; font-variant-numeric: tabular-nums; opacity: 0.6; margin-right: 0.3em; text-decoration: none; }
.tp-text .tp-chapter { font-size: 1.15em; margin-top: 1.5em; }
.tp-text .tp-chapter a { font-size: 0.7em; opacity: 0.6; font-variant-numeric: tabular-nums; text-decoration: none; }
.tp-nav { display: flex; justify-content: space-between; gap: 1em; margin-top: 2em; }

/* draft (video_timelines): a full-width "app" below the title, filling the window:
   outline | video ║ notes page, transcript pane below; height set by transcript-timeline.js */
.tl-app { box-sizing: border-box; width: 100vw; margin-left: calc(50% - 50vw); padding: 0 18px 4px;
          height: var(--tl-h, calc(100vh - 20px)); min-height: 480px;
          display: grid; grid-template-columns: auto 10px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 12px; gap: 0 4px; }
/* the bottom border: drag to make the whole thing (and so the transcript) taller or shorter */
.tl-grip { grid-column: 1 / -1; cursor: row-resize; position: relative; touch-action: none; }
.tl-grip::after { content: ""; position: absolute; left: 30%; right: 30%; top: 5px; height: 2px; border-radius: 1px; background: #cfc6b4; }
.tl-grip:hover::after, .tl-grip:focus-visible::after, .tl-app.tl-vdragging .tl-grip::after { background: #902015; }
.tl-app.tl-vdragging { user-select: none; cursor: row-resize; }
.tl-app.tl-vdragging iframe { pointer-events: none; }
.tl-toc { overflow-y: auto; min-height: 0; font-size: 0.8em; line-height: 1.35; }
.tl-toc details[open] { width: var(--tl-toc, 270px); }
.tl-toc summary { cursor: pointer; font-weight: bold; white-space: nowrap; padding: 2px 0 4px; font-size: 1.1em; }
.tl-app .tl-list { list-style: none; margin: 0; padding: 0; }
.tl-app .tl-list li { display: block; margin: 0; padding: 1px 4px; border-radius: 3px; }
.tl-app .tl-list li::before { content: none; }
.tl-list li.tl-section { font-variant: small-caps; letter-spacing: 0.03em; margin-top: 0.5em; opacity: 0.75;
                         white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-list .tl-go { cursor: pointer; display: grid; grid-template-columns: 2.7em minmax(0, 1fr) auto; column-gap: 0.45em; align-items: baseline; }
.tl-list .tl-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-list .tl-go:hover .tl-what { text-decoration: underline; }
.tl-list .tl-time { font-variant-numeric: tabular-nums; opacity: 0.6; text-align: right; }
.tl-list .tl-p { font-size: 0.9em; opacity: 0.6; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-toc:has(details:not([open])) + .tl-split-toc { visibility: hidden; }
.tl-list li.tl-animation .tl-what { color: #902015; }
.tl-list li.tl-slido .tl-what { color: #1e6b3a; }
.tl-list li.tl-other { opacity: 0.6; }
.tl-list li.tl-weak .tl-what::after { content: " ?"; opacity: 0.6; }
.tl-list li.tl-now { background: rgba(144, 32, 21, 0.16); }
.tl-main { display: grid; min-width: 0; min-height: 0;
           grid-template-columns: var(--tl-split, 64%) 10px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
           grid-template-areas: "video split side" "pane split side"; }
.tl-video { grid-area: video; }
.tl-main > .tl-split { grid-area: split; }
.tl-side { grid-area: side; overflow-y: auto; }
.tl-pane { grid-area: pane; }
.tl-video .tp-player { max-width: none; }
.tl-split { align-self: stretch; cursor: col-resize; position: relative; }
.tl-split::after { content: ""; position: absolute; left: 4px; top: 10%; bottom: 10%; width: 2px; border-radius: 1px; background: #cfc6b4; }
.tl-split:hover::after, .tl-split:focus-visible::after, .tl-app.tl-dragging .tl-split::after { background: #902015; }
.tl-app.tl-dragging { user-select: none; cursor: col-resize; }
.tl-app.tl-dragging iframe { pointer-events: none; }
.tl-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 5px; font-size: 0.9em; }
/* everything in the side column as wide as the notes page (also against the site's figure/canvas rules) */
.tl-app .tl-side > * { width: 100%; max-width: none; margin: 0; box-sizing: border-box; }
.tl-app .tl-page { padding: 0; border: 0; }
.tl-app .tl-page canvas, .tl-app .tl-btn canvas { max-width: none; margin: 0; padding: 0; }
.tl-page canvas { display: block; width: 100%; aspect-ratio: 5 / 3; height: auto; background: #fff; cursor: zoom-in;
                  border: 1px solid #aeaa9e; border-radius: 3px; box-sizing: border-box; }
.tl-page .tl-cap { margin-top: 3px; line-height: 1.3; }
.tl-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tl-btn { display: flex; flex-direction: column; gap: 3px; min-width: 0; font: inherit; font-size: 0.9em; padding: 4px;
          border: 1px solid #aeaa9e; border-radius: 4px; background: #faf6ed; color: #902015; cursor: pointer; text-align: center; }
.tl-btn canvas { display: block; width: 100%; aspect-ratio: 5 / 3; height: auto; background: #fff; border-radius: 2px; }
.tl-btn .tl-thumb { position: relative; display: block; }
.tl-btn .tl-ph { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
                 gap: 4px; padding: 6px; border-radius: 2px; background: #efe6d6; color: #6b6257; font-style: italic; white-space: normal; }
.tl-btn.tl-nopage .tl-ph { display: flex; }
.tl-btn.tl-nopage canvas { visibility: hidden; }
.tl-btn .tl-ph-animation { background: rgba(144, 32, 21, 0.12); color: #902015; font-style: normal; }
.tl-btn .tl-ph-animation i { font-size: 1.8em; }
.tl-btn .tl-ph-slido { background: #dff0e3; color: #1e6b3a; font-style: normal; }
.tl-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-btn small { opacity: 0.7; }
.tl-btn:hover:not(:disabled) { background: #fff; border-color: #902015; }
.tl-btn:disabled { color: #aeaa9e; cursor: default; }
.tl-btn:disabled canvas { visibility: hidden; }
.tl-vnav { margin: 0 0 0.6em; }
.tl-try { display: grid; grid-template-columns: auto 1fr; column-gap: 0.7em; align-items: center; padding: 0.5em 0.8em;
          border-radius: 4px; text-decoration: none; background: rgba(144, 32, 21, 0.1); border: 1px solid rgba(144, 32, 21, 0.35); }
.tl-try[hidden] { display: none; }
.tl-try i { grid-row: span 2; font-size: 1.8em; }
.tl-try span { font-weight: bold; }
.tl-try small { opacity: 0.8; }
.tl-try:hover { background: rgba(144, 32, 21, 0.16); }
.tl-pane { min-height: 0; overflow-y: auto; margin-top: 10px; padding: 0 12px 0 2px;
           border-top: 1px solid #d8ccb7; }
.tl-panehead { position: sticky; top: 0; z-index: 2; background: #F5EBD9; padding: 4px 0 2px; }
.tl-pane .tp-controls { margin: 0; }
.tl-pane .tp-disclaimer { margin-top: 0.4em; }
.tl-zoom { position: fixed; z-index: 30; cursor: zoom-out; background: #fff; border: 1px solid #aeaa9e; border-radius: 4px;
           box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25); }
.tl-zoom canvas { display: block; }
/* below ~1100 px the outline goes above the video, collapsed; phones get the plain page */
@media (max-width: 1100px) {
  .tl-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) 12px; }
  .tl-split-toc { display: none; }
  .tl-toc details[open] { width: auto; max-height: 30vh; overflow-y: auto; }
}
@media (max-width: 760px) {
  .tl-app, .tl-main { height: auto; width: auto; margin-left: 0; padding: 0; display: block; }
  .tl-split, .tl-side, .tl-grip { display: none; }
  .tl-pane { overflow: visible; }
}
.tp-nav .tp-next { margin-left: auto; text-align: right; }
