/* Semantic event markers keep the feed flat while preserving the event type. */
html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message {
  --studio-event-color: #a0a1aa;
  --studio-event-icon-color: var(--studio-event-color);
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='member'] {
  --studio-event-color: #70c5fa;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='follow'] {
  --studio-event-color: #65d1c1;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='like'] {
  --studio-event-color: #eb82b7;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='gift'] {
  --studio-event-color: #f2c26b;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='envelope'] {
  --studio-event-color: #d1adff;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='repost'] {
  --studio-event-color: #8eaeff;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='share'] {
  --studio-event-color: #72d8a6;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='special'] {
  --studio-event-color: #c19bff;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='special'].freeze {
  --studio-event-color: #83c9f5;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='special'].multiplier {
  --studio-event-color: #f5ad75;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message .message-leading-slot {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  min-width: 22px;
  align-self: stretch;
  min-height: 0;
  place-items: center;
  padding-top: 0;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message .chat-event-icon {
  display: grid;
  flex: 0 0 22px;
  width: 22px !important;
  height: 22px !important;
  padding: 0;
  place-items: center;
  border: 0 !important;
  border-radius: 5px !important;
  background: color-mix(in srgb, var(--studio-event-icon-color) 13%, transparent) !important;
  color: var(--studio-event-icon-color) !important;
  box-shadow: none !important;
  filter: none !important;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message .chat-event-icon > svg {
  display: block;
  width: 17px !important;
  height: 17px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none !important;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon[data-event-kind='member'] {
  --studio-event-icon-color: #70c5fa;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon[data-event-kind='follow'] {
  --studio-event-icon-color: #65d1c1;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon[data-event-kind='like'] {
  --studio-event-icon-color: #eb82b7;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon[data-event-kind='gift'] {
  --studio-event-icon-color: #f2c26b;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon[data-event-kind='envelope'] {
  --studio-event-icon-color: #d1adff;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon[data-event-kind='repost'] {
  --studio-event-icon-color: #8eaeff;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon[data-event-kind='share'] {
  --studio-event-icon-color: #72d8a6;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon[data-event-kind='special'],
html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message[data-kind='special'] .chat-event-icon {
  --studio-event-icon-color: var(--studio-event-color);
}

/* Reserve a small edge accent for valuable events and battle notices. */
html:root[data-platform='desktop'][data-theme][data-chat-style] body.nova-ready #chat #chatFeed .chat-message:is([data-kind='gift'], [data-kind='envelope'], [data-kind='special']) {
  padding-left: 14px !important;
  border-left: 2px solid var(--studio-event-color) !important;
}

html:root[data-platform='desktop'][data-theme][data-chat-style] body.nova-ready #chat #chatFeed .chat-message[data-kind='special'] {
  background: #222126 !important;
  box-shadow: none !important;
}

html:root[data-platform='desktop'][data-theme][data-chat-style] body.nova-ready #chat #chatFeed .chat-message[data-kind='special']:hover {
  background: #2b2930 !important;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message:is(:focus-visible, :focus-within) {
  outline: 2px solid #8e8cff !important;
  outline-offset: -2px;
}

html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message :is(button, a, [tabindex]):focus-visible {
  outline: 2px solid #8e8cff !important;
  outline-offset: 2px;
  border-radius: 3px;
}

html:root[data-platform='desktop'][data-theme='dark-titanium'][data-chat-style='compact'] body.nova-ready #chat #chatFeed .chat-message .message-leading-slot {
  align-self: stretch;
  min-height: 0;
  padding-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-message,
  html:root[data-platform='desktop'][data-theme] body.nova-ready #chat #chatFeed .chat-event-icon {
    animation: none !important;
    transition: none !important;
  }
}
