/* Sample media inside the Event Space player and the offline HeyStream chat slot. */
.hub-presenter { width: 100%; height: 100%; display: block; object-fit: cover; }
.hub-chat { display: flex; flex-direction: column; height: 100%; padding: 12px; gap: 20px; color: #272838; font: 14px/1.45 system-ui, sans-serif; }
.hub-chat-tabs { display: flex; align-self: center; gap: 4px; padding: 4px; background: #f4f3f6; border-radius: 12px; }
.hub-chat-tabs > * { padding: 5px 12px; }
.hub-chat-tabs strong { background: white; border-radius: 9px; box-shadow: 0 1px 3px #28283824; }
.hub-chat-thread { display: grid; align-content: start; gap: 18px; overflow: hidden; flex: 1; padding: 4px; }
.hub-chat-byline { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.hub-chat-byline span { color: #71717a; font-size: 11px; }
.hub-chat-thread p { margin-top: 5px; padding: 10px 12px; background: #f4f3f6; border-radius: 2px 12px 12px; }
.hub-chat-message-own { justify-self: end; max-width: 85%; }
.hub-chat-message-own .hub-chat-byline { flex-direction: row-reverse; }
/* HeyStream's default primary colour for the viewer's own chat bubble. */
.hub-chat-message-own p { background: oklch(0.55 0.257 284.63); color: white; border-radius: 8px 0 8px 8px; }
.hub-chat-compose { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: #f4f3f6; color: #71717a; }

@media (prefers-reduced-motion: no-preference) {
    /* The player inserts the presenter video when its sponsor introduction ends. */
    [data-event-space-viewing]:not(:has(video.hub-presenter)) .hub-chat-message { visibility: hidden; }
    [data-event-space-viewing]:has(video.hub-presenter) .hub-chat-message {
        animation: hub-message-arrive 250ms ease-out backwards;
        animation-delay: calc(var(--message-index) * 3s);
    }
}

@keyframes hub-message-arrive {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
