/* The Verifier 2026: "THE VERIFIER LIVE" tab and drawer (inc/livetab.php). */

/* ---------- The tab ---------- */
.tvlt {
  position: fixed; z-index: 9990; display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 0; margin: 0; cursor: pointer; text-decoration: none !important;
  background: #0A1030; color: #fff !important; font: 800 13px/1 var(--tv-font); letter-spacing: 1.5px;
  box-shadow: 0 6px 20px rgba(7, 12, 38, .28);
}
.tvlt:hover { background: #141C4A; }
.tvlt:focus-visible { outline: 3px solid var(--tv-cyan); outline-offset: 2px; }
.tvlt__dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: var(--tv-cyan); box-shadow: 0 0 0 3px rgba(34, 225, 247, .25); }
.tvlt.has-new .tvlt__dot { animation: tvlt-pulse 1.6s ease-in-out infinite; }
@keyframes tvlt-pulse { 50% { box-shadow: 0 0 0 7px rgba(34, 225, 247, .12); } }
@media (prefers-reduced-motion: reduce) { .tvlt.has-new .tvlt__dot { animation: none; } }
.tvlt__badge { min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--tv-cyan); color: #0A1030; font-size: 12px; letter-spacing: 0; }
.tvlt__badge[hidden] { display: none; }

/* Phones: a small button at the bottom right */
.tvlt { right: 16px; bottom: 16px; min-height: 44px; padding: 0 16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.tvlt__txt { font-size: 0; letter-spacing: 0; }
.tvlt__txt::after { content: "LIVE"; font-size: 13px; letter-spacing: 1.5px; }

/* Tablets and up: a tall tab on the left edge, text running up */
@media (min-width: 768px) {
  .tvlt {
    right: auto; left: 0; bottom: auto; top: 50%; transform: translateY(-50%);
    flex-direction: column; min-height: 0; padding: 18px 11px 20px;
    border-right: 3px solid var(--tv-cyan);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  }
  .tvlt__txt { font-size: 13px; letter-spacing: 2px; writing-mode: vertical-rl; transform: rotate(180deg); }
  .tvlt__txt::after { content: none; }
}
html.tvld-on .tvlt { visibility: hidden; }

/* ---------- The drawer ---------- */
.tvld { position: fixed; inset: 0; z-index: 100002; }
.tvld[hidden] { display: none; }
.tvld__shade { position: absolute; inset: 0; background: rgba(7, 12, 38, .55); opacity: 0; transition: opacity .25s; }
.tvld.is-open .tvld__shade { opacity: 1; }
.tvld__panel {
  position: absolute; left: 0; right: 0; bottom: 0; height: 88vh; height: 88dvh;
  display: flex; flex-direction: column; background: var(--tv-panel); color: var(--tv-text);
  border-top: 3px solid var(--tv-cyan); transform: translateY(100%); transition: transform .26s ease;
  direction: rtl;
}
.tvld.is-open .tvld__panel { transform: none; }
@media (prefers-reduced-motion: reduce) { .tvld__panel, .tvld__shade { transition: none; } }
html.tvld-on { overflow: hidden; }

.tvld__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 16px 12px; border-bottom: 1px solid var(--tv-line); }
.tvld__t { margin: 0 !important; display: flex; align-items: center; gap: 10px; font-size: 22px !important; line-height: 1; font-weight: 700; color: var(--tv-text) !important; }
.tvld .tvlive__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tv-cyan); box-shadow: 0 0 0 4px rgba(34, 225, 247, .25); }
.tvld .tvlive__brand { font-weight: 500; }
.tvld__sub { margin: 6px 0 0 !important; font-size: 14px; color: var(--tv-muted); }
.tvld__x { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; background: transparent; color: var(--tv-text); cursor: pointer; }
.tvld__x:focus-visible, .tvld__more:focus-visible, .tvld a:focus-visible { outline: 3px solid var(--tv-cyan); outline-offset: 2px; }

.tvld__list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 12px; }
.tvld__wait { margin: 24px 0 !important; color: var(--tv-muted); font-size: 15px; }
.tvld__item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--tv-line); }
.tvld .tvlive__av { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; color: #0A1030; background: var(--tv-cyan); }
.tvld .tvlive__av--lav { background: var(--tv-lavender); }
.tvld__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tvld .tvlive__by { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.tvld .tvlive__by span { color: var(--tv-muted); }
.tvld__body p { margin: 0 !important; font-size: 15px; line-height: 1.55; color: var(--tv-text); overflow-wrap: anywhere; }
.tvld__body p a { color: var(--tv-accent-text) !important; text-decoration: underline; }
.tvld__imgs { display: grid; gap: 4px; margin-top: 2px; }
.tvld__imgs--2, .tvld__imgs--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tvld__imgs a { display: block; }
.tvld__imgs img { display: block; width: 100%; height: 100%; max-height: 260px; object-fit: cover; background: var(--tv-line); }
.tvld__imgs--2 img, .tvld__imgs--3 img { aspect-ratio: 1; max-height: none; }
.tvld__imgs--3 a:first-child { grid-column: 1 / -1; }
.tvld__imgs--3 a:first-child img { aspect-ratio: 16 / 9; }
.tvld__vid { display: block; width: 100%; max-height: 320px; background: #000; }
.tvld__more { display: block; width: 100%; min-height: 48px; margin: 14px 0 4px; border: 1px solid var(--tv-line); border-radius: 0; background: transparent; color: var(--tv-text); font: 700 15px/1 var(--tv-font); cursor: pointer; }
.tvld__more:hover { border-color: var(--tv-cyan); }
.tvld__more[disabled] { opacity: .5; cursor: default; }

.tvld__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: #0A1030; color: #fff; }
.tvld__foot p { margin: 0 !important; font-size: 14px; line-height: 1.4; color: #D5DAF2; }
a.tvld__app { flex-shrink: 0; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; background: var(--tv-cyan); color: #0A1030 !important; font-size: 14px; font-weight: 700; text-decoration: none !important; }

/* Tablets and up: a 400px drawer from the left edge, where the tab is */
@media (min-width: 768px) {
  .tvld__panel { right: auto; top: 0; width: 400px; height: auto; border-top: 0; border-right: 3px solid var(--tv-cyan); transform: translateX(-100%); }
  .tvld__head { padding: 22px 20px 14px; }
  .tvld__list { padding: 4px 20px 14px; }
  .tvld__foot { padding: 16px 20px; }
  body.admin-bar .tvld__panel { top: 32px; }
}

/* ---------- Chat order: oldest at the top, newest at the bottom ---------- */
.tvld__list { display: flex; flex-direction: column; overflow-anchor: none; }
.tvld__list::before { content: ""; flex: 1 0 auto; } /* few messages: they sit at the bottom, like a chat */
.tvld__top { padding: 14px 0 4px; text-align: center; font-size: 13px; color: var(--tv-muted); }
.tvld__day { display: flex; justify-content: center; margin: 14px 0 2px; position: sticky; top: 6px; z-index: 1; pointer-events: none; }
/* Every day line sticks to the same spot, so they pile up there. One fixed width means the newest covers the older ones exactly. */
.tvld__day span { min-width: 132px; text-align: center; box-sizing: border-box; padding: 4px 12px; background: var(--tv-bg); border: 1px solid var(--tv-line); font-size: 12px; font-weight: 700; color: var(--tv-muted); }
.tvld__feed .tvld__item:last-child { border-bottom: 0; }
/* fixed shapes, so photos loading late don't make the list jump */
.tvld__imgs--1 img { aspect-ratio: 4 / 3; max-height: none; }
.tvld__vid { aspect-ratio: 16 / 9; height: auto; }
.tvld__panel { position: absolute; }
.tvld__new {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 2;
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 20px; cursor: pointer;
  background: var(--tv-cyan); color: #0A1030; font: 700 14px/1 var(--tv-font); box-shadow: 0 6px 18px rgba(7, 12, 38, .3);
}
.tvld__new[hidden] { display: none; }
.tvld__imgs a { cursor: zoom-in; }
