/* The live audience screen. The platform colours are a fixed, colour-blind-safe set (Okabe-Ito) and always sit beside
   their name. The rest follows the portal's own tokens. Keep this alike with the app's AudienceStyles.razor. */
.hb-aud {
    --aud-p1: #0072b2; --aud-p2: #e69f00; --aud-p3: #009e73; --aud-p4: #cc79a7; --aud-p5: #56b4e9; --aud-p6: #d55e00; --aud-p7: #6b7280;
    --aud-accent: var(--color-sf-primary, #0f6cbd); --aud-u1: var(--color-sf-primary, #0f6cbd); --aud-u2: #b9b4a6;
    --aud-area: color-mix(in srgb, var(--color-sf-primary, #0f6cbd) 22%, transparent);
    --aud-band: color-mix(in srgb, var(--hb-border, #dee2e6) 35%, transparent);
    --aud-band2: color-mix(in srgb, var(--hb-border, #dee2e6) 80%, transparent);
    --aud-grid: var(--hb-border, #dee2e6); --aud-muted: var(--hb-muted, #6c757d); --aud-fg: inherit;
    --aud-card: var(--hb-card-bg, #fff); --aud-live: #c4372d;
}
:root[data-hb-theme="dark"] .hb-aud, [data-theme="dark"] .hb-aud {
    --aud-p1: #4aa8e6; --aud-p2: #f0b43a; --aud-p3: #35c79a; --aud-p4: #e3a0c6; --aud-p5: #7cc4f0; --aud-p6: #f08a4b; --aud-p7: #9aa1ab; --aud-u2: #5b626b; --aud-live: #ff7b70;
}

.hb-aud-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
@media (max-width: 800px) { .hb-aud-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hb-aud-tile { border: 1px solid var(--hb-border, #dee2e6); border-radius: 8px; padding: .6rem .8rem; background: var(--hb-card-bg, #fff); }
.hb-aud-tile .k { color: var(--hb-muted, #6c757d); font-size: .8rem; }
.hb-aud-tile .v { font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
.hb-aud-tile .d { color: var(--hb-muted, #6c757d); font-size: .78rem; }
.hb-aud-pill { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--aud-live, #c4372d); }
.hb-aud-pill::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.hb-aud-split { display: inline-flex; border: 1px solid var(--hb-border, #dee2e6); border-radius: 6px; overflow: hidden; }
.hb-aud-split button { font: inherit; padding: .3rem .8rem; border: 0; background: transparent; color: inherit; cursor: pointer; }
.hb-aud-split button.on { background: var(--color-sf-primary, #0f6cbd); color: #fff; font-weight: 600; }
.hb-aud-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; }
@media (max-width: 900px) { .hb-aud-cols { grid-template-columns: 1fr; } }
.hb-aud-card { border: 1px solid var(--hb-border, #dee2e6); border-radius: 8px; padding: .9rem 1rem; margin-bottom: 1rem; background: var(--hb-card-bg, #fff); min-width: 0; }
.hb-aud-card h5 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 600; }

.hbaud-chart svg, .hbaud-lanes svg { display: block; width: 100%; height: auto; }
.hbaud-keys { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .5rem; font-size: .86rem; }
.hbaud-keys span { display: inline-flex; align-items: center; gap: .4rem; }
.hbaud-keys i { width: .7rem; height: .7rem; border-radius: 2px; display: block; }
.hbaud-keys b { font-variant-numeric: tabular-nums; font-weight: 600; }
.hbaud-at { margin-left: auto; color: var(--hb-muted, #6c757d); }
.hbaud-empty { padding: 1.5rem 0; color: var(--hb-muted, #6c757d); }
.hbaud-lanes { margin-top: .6rem; border-top: 1px solid var(--hb-border, #dee2e6); padding-top: .5rem; }

.hb-aud-plat { display: grid; grid-template-columns: .7rem 1fr auto auto; gap: .5rem; align-items: center; padding: .2rem 0; font-size: .9rem; }
.hb-aud-plat i { width: .7rem; height: .7rem; border-radius: 2px; display: block; }
.hb-aud-plat .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.hb-aud-plat .p { color: var(--hb-muted, #6c757d); min-width: 3rem; text-align: right; font-variant-numeric: tabular-nums; }
.hb-aud-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--hb-border, #dee2e6); margin-bottom: .6rem; }
.hb-aud-stack i { display: block; height: 100%; }

.hb-aud-people { max-height: 17rem; overflow-y: auto; border: 1px solid var(--hb-border, #dee2e6); border-radius: 6px; }
.hb-aud-person { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) 8rem 9rem; gap: .6rem; align-items: center; padding: .35rem .65rem; border-bottom: 1px solid var(--hb-border, #dee2e6); font-size: .88rem; cursor: pointer; }
.hb-aud-person:last-child { border-bottom: 0; }
.hb-aud-person.on { background: var(--aud-band2); }
.hb-aud-person .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-aud-person .m { color: var(--hb-muted, #6c757d); font-size: .8rem; }
.hb-aud-person .now { color: var(--aud-live, #c4372d); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 700px) { .hb-aud-person { grid-template-columns: 1.4rem minmax(0, 1fr) 6rem; } .hb-aud-person .since { display: none; } }

.hb-aud-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.hb-aud-table th, .hb-aud-table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--hb-border, #dee2e6); }
.hb-aud-table th { color: var(--hb-muted, #6c757d); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.hb-aud-table td.n, .hb-aud-table th.n { text-align: right; font-variant-numeric: tabular-nums; }

.hb-aud-msg { padding: .6rem .1rem; border-bottom: 1px solid var(--hb-border, #dee2e6); }
.hb-aud-msg:last-child { border-bottom: 0; }
.hb-aud-msg .when { color: var(--hb-muted, #6c757d); font-size: .8rem; }
.hb-aud-msg .text { overflow-wrap: anywhere; }
.hb-aud-msg.down .text { text-decoration: line-through; color: var(--hb-muted, #6c757d); }
.hb-aud-msg .meta { color: var(--hb-muted, #6c757d); font-size: .8rem; display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin-top: .15rem; }
.hb-aud-msg .meta b { color: inherit; font-weight: 600; }
.hb-aud-tag { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--hb-border, #dee2e6); border-radius: 4px; padding: 0 .35rem; margin-left: .4rem; color: var(--hb-muted, #6c757d); vertical-align: middle; }
.hb-aud-tag.push { border-color: var(--color-sf-primary, #0f6cbd); color: var(--color-sf-primary, #0f6cbd); }
.hb-aud-check { display: flex; gap: .55rem; align-items: flex-start; margin: .6rem 0; font-size: .92rem; }
