/* Twitch clip views (/twitch-clip-views/), on top of entity.css: the Twitch accent, the clip card
   with its thumbnail, the facts and the stream timeline, the live chart and the top clips list. */
:root.p-twitch { --accent: #7B3FE4; --accent-soft: rgba(123, 63, 228, .10); --tc-badge: rgba(14, 14, 16, .78); }
:root.p-twitch[data-theme="dark"] { --accent: #B794FF; --accent-soft: rgba(183, 148, 255, .15); --tc-badge: rgba(0, 0, 0, .72); }

/* ---------- paste box ---------- */
.tc-form { margin-top: 22px; max-width: 640px; }
.tc-form .search-box input { font-size: 16px; }
/* one line kept for the message, so the page does not move when it shows */
.tc-msg { min-height: 20px; margin-top: 6px; color: var(--bad); font-size: 13px; }

/* ---------- the count card ---------- */
.tc-card { padding-bottom: 20px; }
.tc-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tc-thumb { position: relative; flex: none; display: block; width: 128px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--sunken); }
.tc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: .92; transition: opacity .2s; }
.tc-play svg { width: 34px; height: 34px; padding: 8px 7px 8px 9px; border-radius: 50%; background: var(--tc-badge); fill: #fff; }
.tc-thumb:hover .tc-play, .tc-thumb:focus-visible .tc-play { opacity: 1; }
.tc-thumb:hover .tc-play svg { background: var(--accent); }
.tc-dur { position: absolute; inset-inline-end: 6px; bottom: 6px; padding: 1px 6px; border-radius: 5px; background: var(--tc-badge); color: #fff; font-size: 11.5px; font-weight: 650; line-height: 17px; font-variant-numeric: tabular-nums; }
.tc-dur:empty { display: none; }
.tc-who { min-width: 0; }
.tc-title { display: -webkit-box; overflow: hidden; font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tc-by { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 6px; color: var(--ink-2); font-size: 13.5px; }
.tc-by-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.tc-by a { color: var(--ink); font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.tc-by a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tc-fol { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tc-av { position: relative; flex: none; display: grid; place-items: center; width: 24px; height: 24px; overflow: hidden; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 750; }
.tc-av::before { content: attr(data-l); }
.tc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-av.sm { width: 22px; height: 22px; }
.tc-card .now-kicker { margin-top: 16px; }
.tc-card .dot { animation: tc-pulse 2.4s ease-out infinite; }
@keyframes tc-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft), 0 0 0 4px var(--accent-soft); } 70% { box-shadow: 0 0 0 9px transparent, 0 0 0 4px var(--accent-soft); } 100% { box-shadow: 0 0 0 0 transparent, 0 0 0 4px var(--accent-soft); } }
.tc-card .now-count { margin-top: 8px; }
/* the time to the next check: a hairline along the bottom of the card */
.tc-next { position: absolute; inset: auto 0 0 0; height: 3px; overflow: hidden; }
.tc-next i { display: block; width: 100%; height: 100%; background: var(--accent); opacity: .35; transform: scaleX(0); transform-origin: 0 50%; }
[dir="rtl"] .tc-next i { transform-origin: 100% 50%; }
.tc-next.is-run i { animation: tc-next var(--tc-every, 5s) linear forwards; }
@keyframes tc-next { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tc-card.is-wait .now-count { min-height: 1em; }
.tc-card.is-wait .tc-title bdi, .tc-card.is-wait #tc-asof { color: var(--muted); }
.tc-card.is-empty { padding: 22px 24px; }
.tc-card.is-empty::before { background: var(--line-2); }

.tc-note { max-width: 720px; margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------- first ad: a fixed 300 x 250 (728 x 90 from 1000 px), so nothing moves when it fills ---------- */
div.ad.ad-counter { display: block; min-height: 270px; margin: 28px auto 0; text-align: center; overflow: hidden; }
.ad-counter ins[data-lc-slot] { display: inline-block; width: 300px; max-width: 100%; height: 250px; vertical-align: top; }
.ad-counter:has(ins[data-ad-status="unfilled"]) .ad-label { visibility: hidden; }
@media (max-width: 339px) { div.ad.ad-counter { overflow: visible; } .ad-counter ins[data-lc-slot] { max-width: none; margin: 0 calc((100% - 300px) / 2); } }
@media (min-width: 1000px) { div.ad.ad-counter { min-height: 112px; } .ad-counter ins[data-lc-slot] { width: 728px; height: 90px; } }
.ad-bottom { min-height: 130px; }
.ad-bottom:has(ins[data-ad-status="unfilled"]) .ad-label { visibility: hidden; }

/* ---------- about this clip ---------- */
.tc-about { margin-top: 28px; padding: 18px 20px 20px; }
.tc-about .card-title { margin-bottom: 14px; }
.tc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.tc-facts dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.tc-facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; margin-top: 3px; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.tc-facts dd a { color: inherit; text-decoration: none; }
.tc-facts dd a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tc-facts small { flex-basis: 100%; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tc-facts time { font-variant-numeric: tabular-nums; }
.tc-box { position: relative; flex: none; width: 20px; height: 27px; overflow: hidden; border-radius: 3px; background: var(--sunken); }
.tc-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* where in the stream the clip comes from */
.tc-tl { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tc-tl-t { color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tc-tl-bar { position: relative; height: 10px; margin-top: 10px; border-radius: var(--r-pill); background: repeating-linear-gradient(90deg, var(--sunken) 0 6px, var(--surface-2) 6px 7px); box-shadow: inset 0 0 0 1px var(--line); }
.tc-tl-clip { position: absolute; top: -3px; bottom: -3px; min-width: 6px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tc-tl-ends { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tc-about .ent-actions { margin-top: 18px; }

/* ---------- since you opened the page ---------- */
.tc-live { margin-top: 16px; }
.tc-chart { position: relative; height: 150px; margin: 6px 0 4px; }
.tc-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tc-chart .c-line { stroke-width: 2.25; }
.tc-chart-wait[hidden] { display: none; }
.tc-chart .c-jump { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.tc-chart .c-now { fill: var(--accent); }
.tc-chart .c-glow { fill: var(--accent); opacity: .25; transform-box: fill-box; transform-origin: center; animation: tc-glow 2.4s ease-out infinite; }
@keyframes tc-glow { 0% { transform: scale(1); opacity: .35; } 100% { transform: scale(3.2); opacity: 0; } }
.tc-chart-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13.5px; text-align: center; }
.tc-chart-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tc-live .stats { margin-top: 14px; }
.tc-live .stat dd { font-variant-numeric: tabular-nums; }
.tc-up { color: var(--good); }

/* the Space-Node card runs as wide as the cards around it */
.tc-live + .spacenode-promo-card { max-width: none; margin-top: 16px; }

/* ---------- the explainer's little step chart ---------- */
.tc-steps { display: block; width: 100%; max-width: 520px; height: auto; margin: 14px 0 4px; color: var(--accent); }
.tc-steps .s-grid { stroke: var(--grid); stroke-width: 1; }
.tc-steps .s-line { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.tc-steps .s-area { fill: var(--accent-soft); }
.tc-steps .s-dot { fill: var(--surface); stroke: currentColor; stroke-width: 2; }
.tc-steps .s-check { fill: var(--muted); }

/* ---------- the channel's top clips ---------- */
.tc-top { margin-top: 36px; }
.tc-top .card-head { align-items: flex-start; }
.tc-tabs { margin-bottom: 0; }
.tc-tabs .ptab { height: 32px; padding-inline: 12px; font-size: 13px; }
.tc-ol li { min-height: 72px; }
.tc-ol li.is-current { margin-inline: -10px; padding-inline: 10px; border-radius: var(--r-sm); background: var(--accent-soft); }
.tc-ol li.is-current + li { border-top-color: transparent; }
.tc-row { gap: 12px; }
.tc-rthumb { position: relative; flex: none; width: 96px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 7px; background: var(--sunken); }
.tc-rthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-rthumb .tc-dur { inset-inline-end: 4px; bottom: 4px; padding: 0 4px; font-size: 10.5px; line-height: 15px; }
.tc-ol .t-nm bdi { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
.tc-ol.is-loading { opacity: .55; transition: opacity .2s; }

/* ---------- text ---------- */
.tc-src { max-width: 720px; margin-top: 18px; color: var(--muted); font-size: 12.5px; }

@media (min-width: 760px) {
    .tc-card { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); column-gap: 32px; align-items: center; }
    .tc-card.is-empty { display: block; }
    .tc-head { display: contents; }
    .tc-thumb { grid-row: 1 / span 4; width: 100%; border-radius: 12px; }
    .tc-who { grid-column: 2; }
    .tc-card .now-kicker, .tc-card .now-count, .tc-card .now-asof { grid-column: 2; }
    .tc-card .now-kicker { margin-top: 14px; }
    .tc-title { font-size: 19px; }
    .tc-play svg { width: 52px; height: 52px; padding: 13px 11px 13px 15px; }
    .tc-dur { font-size: 12.5px; }
}
@media (max-width: 640px) {
    .tc-form { margin-top: 18px; }
    .tc-card { padding: 18px 16px 18px; }
    .tc-thumb { width: 120px; border-radius: 8px; }
    .tc-title { font-size: 15.5px; }
    .tc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tc-about { padding: 16px 14px 18px; }
    .tc-rthumb { width: 80px; }
    .tc-ol .t-num { min-width: 58px; }
    .tc-top .card-head { gap: 10px; }
    .tc-tabs { display: flex; width: 100%; }
    .tc-tabs .ptab { flex: 1 1 0; justify-content: center; padding-inline: 4px; }
    .lede .lede-2 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .tc-card .dot, .tc-chart .c-glow { animation: none; }
    .tc-next.is-run i { animation: none; }
}
