/* Live: track status band, weather, timing tower, race control / radio feed */
#tab-live {
  --h-card: #ffffff; --h-ink: #111317; --h-ink-2: #5d6470; --h-ink-3: #9aa1ab; --h-line: #e7e9ee; --h-red: #e10600; --h-seg: #eceef2;
}
[data-theme="dark"] #tab-live {
  --h-card: #17191d; --h-ink: #f2f3f5; --h-ink-2: #a6acb6; --h-ink-3: #6f7680; --h-line: #262a31; --h-seg: #202329;
}
#tab-live .lv { font-family: Manrope, Inter, system-ui, sans-serif; color: var(--h-ink); padding-bottom: 10px; }
#tab-live .num { font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", ui-monospace, monospace; }
#tab-live .lv button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
#tab-live .lv-empty { padding: 28px 0; text-align: center; color: var(--h-ink-2); font-weight: 600; font-size: 13px; }

#tab-live .lv-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--h-red); color: #fff; border-radius: 999px;
  padding: 5px 10px; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
#tab-live .lv-pill i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: lvpulse 1.4s infinite; }
@keyframes lvpulse { 50% { opacity: .25; } }

/* Idle */
#tab-live .lv-idle { border-radius: 26px; overflow: hidden; min-height: 260px; position: relative; display: flex; align-items: flex-end;
  background: #1c1f24 center/cover no-repeat; color: #fff; }
#tab-live .lv-idle::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.85)); }
#tab-live .lv-idle-body { position: relative; padding: 18px; }
#tab-live .lv-idle .t { font-size: 24px; font-weight: 800; margin-top: 10px; }
#tab-live .lv-idle .x { font-size: 13px; opacity: .85; margin-top: 4px; font-weight: 600; line-height: 1.35; }
#tab-live .lv-idle .n { margin-top: 14px; background: rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 14px; padding: 10px 12px; }
#tab-live .lv-idle .n span { display: block; font-size: 11px; opacity: .75; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
#tab-live .lv-idle .n b { display: block; font-size: 15px; margin-top: 2px; }
#tab-live .lv-idle .n em { font-style: normal; font-size: 13px; opacity: .85; font-weight: 600; }
#tab-live .lv-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
#tab-live .lv-feats div { background: var(--h-card); border: 1px solid var(--h-line); border-radius: 16px; padding: 12px; }
#tab-live .lv-feats b { display: block; font-size: 14px; font-weight: 800; }
#tab-live .lv-feats span { display: block; font-size: 12px; color: var(--h-ink-2); font-weight: 600; margin-top: 2px; }

/* Status band */
#tab-live .lv-status { border-radius: 22px; padding: 14px 16px; color: #fff; background: #16a34a; }
#tab-live .lv-status.yellow { background: #eab308; color: #111; }
#tab-live .lv-status.sc, #tab-live .lv-status.vsc { background: #f97316; }
#tab-live .lv-status.red { background: #dc2626; }
#tab-live .lv-status .top { display: flex; align-items: center; gap: 8px; }
#tab-live .lv-status .top b { font-size: 15px; font-weight: 800; }
#tab-live .lv-status .top .mt { margin-left: auto; font-size: 12px; font-weight: 700; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-live .lv-status .lv-pill { background: rgba(0,0,0,.25); }
#tab-live .lv-status .mid { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 12px; }
#tab-live .lv-status .flag { font-size: 22px; font-weight: 800; line-height: 1.1; }
#tab-live .lv-status .lap { text-align: right; }
#tab-live .lv-status .lap span { display: block; font-size: 11px; font-weight: 700; opacity: .8; text-transform: uppercase; }
#tab-live .lv-status .lap b { font-size: 28px; font-weight: 700; line-height: 1; }
#tab-live .lv-status .lap small { font-size: 15px; opacity: .75; }

#tab-live .lv-wx { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
#tab-live .lv-wx span { flex: 0 0 auto; background: var(--h-card); border: 1px solid var(--h-line); border-radius: 999px; padding: 6px 10px;
  font-size: 12px; font-weight: 700; color: var(--h-ink-2); }
#tab-live .lv-wx b { color: var(--h-ink); }
#tab-live .lv-wx span.rain { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }

/* Tower */
#tab-live .lv-tower { background: var(--h-card); border: 1px solid var(--h-line); border-radius: 20px; margin-top: 12px; overflow: hidden; }
#tab-live .lv-th { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 11px; font-weight: 800;
  color: var(--h-ink-3); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--h-line); }
#tab-live .lv .lv-toggle { color: var(--h-red); font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
#tab-live .lv-row { display: flex; align-items: center; gap: 9px; padding: 7px 12px; border-bottom: 1px solid var(--h-line); position: relative; cursor: pointer; }
#tab-live .lv-row:last-child { border-bottom: 0; }
#tab-live .lv-row::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tc); }
#tab-live .lv-row.out, #tab-live .lv-row.ko { opacity: .45; }
#tab-live .lv-row .pos { width: 20px; text-align: center; font-size: 14px; font-weight: 700; }
#tab-live .face { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--tc) 55%, #fff) 0%, var(--tc) 75%); }
#tab-live .face img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.15) translateY(6%); }
#tab-live .lv-row .mid { flex: 1; min-width: 0; }
#tab-live .lv-row .mid b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-live .lv-row .mid span { display: block; font-size: 11px; color: var(--h-ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-live .lv-row .mid em { font-style: normal; color: var(--h-red); font-weight: 800; }
#tab-live .tyre { width: 40px; display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
#tab-live .tyre i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #999; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 9px; font-weight: 900; color: var(--h-ink); background: var(--h-card); box-sizing: border-box; }
#tab-live .tyre span { font-size: 11px; color: var(--h-ink-2); font-weight: 600; }
#tab-live .t-S i { border-color: #e10600; } #tab-live .t-M i { border-color: #f5c400; }
#tab-live .t-H i { border-color: #c9ccd1; } #tab-live .t-I i { border-color: #22a447; } #tab-live .t-W i { border-color: #1683e6; }
#tab-live .lv-row .val { width: 84px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }
#tab-live .lv-row .val b { font-size: 13px; font-weight: 700; }
#tab-live .lv-row .val b.st { color: var(--h-red); font-family: Manrope, Inter, sans-serif; font-weight: 800; }
#tab-live .lv-row .val span { font-size: 11px; color: var(--h-ink-3); }
#tab-live .lv-row .val span.purple { color: #9333ea; font-weight: 700; }
#tab-live .lv-row .val span.green { color: #16a34a; font-weight: 700; }

/* Feed */
#tab-live .lv-feed-tabs { display: flex; background: var(--h-seg); border-radius: 14px; padding: 4px; gap: 4px; margin-top: 14px; }
#tab-live .lv-feed-tabs button { flex: 1; padding: 9px 0; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--h-ink-2); }
#tab-live .lv-feed-tabs button.active { background: var(--h-card); color: var(--h-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
#tab-live .lv-feed { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
#tab-live .lv-msg { display: flex; gap: 10px; background: var(--h-card); border: 1px solid var(--h-line); border-left: 4px solid var(--h-line);
  border-radius: 14px; padding: 9px 12px; }
#tab-live .lv-msg.yellow, #tab-live .lv-msg.doubleyellow { border-left-color: #eab308; }
#tab-live .lv-msg.red { border-left-color: #dc2626; }
#tab-live .lv-msg.green, #tab-live .lv-msg.clear { border-left-color: #16a34a; }
#tab-live .lv-msg.safetycar { border-left-color: #f97316; }
#tab-live .lv-msg.blue { border-left-color: #1683e6; }
#tab-live .lv-msg .tm { font-size: 10px; color: var(--h-ink-3); font-weight: 700; min-width: 34px; line-height: 1.4; }
#tab-live .lv-msg .tx { font-size: 12px; font-weight: 600; line-height: 1.4; }
#tab-live .lv .lv-radio { display: flex; align-items: center; gap: 10px; background: var(--h-card); border: 1px solid var(--h-line);
  border-radius: 14px; padding: 8px 12px; text-align: left; width: 100%; }
#tab-live .lv-radio .mid { flex: 1; }
#tab-live .lv-radio .mid b { display: block; font-size: 14px; font-weight: 800; }
#tab-live .lv-radio .mid span { font-size: 11px; color: var(--h-ink-3); }
#tab-live .lv-radio .mid .tr { display: block; margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--h-ink); }
#tab-live .lv-radio .mid .tr.wait { font-size: 12px; color: var(--h-ink-3); }
#tab-live .lv-radio .mid .en { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--h-ink-3); }
#tab-live .lv-radio .play { flex: none; }
#tab-live .lv-radio .play { width: 34px; height: 34px; border-radius: 50%; background: var(--h-red); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 12px; }
#tab-live .lv-radio.playing { border-color: var(--h-red); box-shadow: inset 0 0 0 1px var(--h-red); }
/* idle: no session, so the LIVE badge must not look on air */
#tab-live .lv-idle .lv-pill { background: rgba(255,255,255,.22); }
#tab-live .lv-idle .lv-pill i { animation: none; opacity: .5; }

/* narrow phones: give the driver name room (Хюлькенберг) */
#tab-live .lv-row { gap: 7px; padding: 7px 10px; }
#tab-live .lv-row .face { width: 28px; height: 28px; }
#tab-live .tyre { width: 36px; }
#tab-live .lv-row .val { width: 74px; }
#tab-live .lv-row .mid b { font-size: 13.5px; }
