.ai-notes-live-root {
  --live-border: #d8dde5;
  --live-surface: #ffffff;
  --live-accent: #20262e;
}

.ai-notes-live-status[data-kind="error"] {
  color: #a3212b !important;
}

.ai-notes-live-status[data-kind="warning"] {
  color: #765700 !important;
}

.ai-notes-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.ai-notes-live-card {
  overflow: hidden;
  background: var(--live-surface);
  border: 1px solid var(--live-border);
  border-radius: 0.75rem;
  box-shadow: 0 0.2rem 0.8rem rgb(24 31 41 / 8%);
}

.ai-notes-live-card.is-selected {
  border-color: var(--live-accent);
  box-shadow: 0 0 0 2px rgb(32 38 46 / 15%);
}

.ai-notes-live-card-button {
  display: flex;
  width: 100%;
  min-height: 7rem;
  padding: 1rem;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  flex-direction: column;
  justify-content: space-between;
}

.ai-notes-live-card-button:focus-visible {
  outline: 3px solid #4c79b8;
  outline-offset: -3px;
}

.ai-notes-live-stack-label {
  font-size: 1.05rem;
  font-weight: 650;
}

.ai-notes-live-bot-count {
  color: #5e6875;
  font-size: 0.875rem;
}

.ai-notes-live-room-select {
  max-width: 34rem;
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f6f8fa;
  border: 1px solid var(--live-border);
  border-radius: 0.75rem;
}

.ai-notes-live-room-label {
  display: flex;
  gap: 0.5rem;
  font-weight: 600;
  flex-direction: column;
}

.ai-notes-live-room-control {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.45rem 0.65rem;
  background: var(--live-surface);
  border: 1px solid #9aa3ae;
  border-radius: 0.45rem;
}

.ai-notes-live-feed-section {
  margin: 1.5rem 0 2rem;
}

.ai-notes-live-feed-heading {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

.ai-notes-live-feed-status,
.ai-notes-live-hidden-count {
  margin-bottom: 0.75rem;
  color: #5e6875;
  font-size: 0.875rem;
}

.ai-notes-live-feed-status:empty {
  display: none;
}

.ai-notes-live-feed-status[data-kind="error"] {
  color: #a3212b;
}

.ai-notes-live-feed-status[data-kind="warning"] {
  color: #765700;
}

.ai-notes-live-hidden-count {
  padding: 0.4rem 0.65rem;
  background: #f6f8fa;
  border-radius: 0.35rem;
  text-align: center;
}

.ai-notes-live-feed {
  display: flex;
  min-height: 15rem;
  max-height: min(65vh, 48rem);
  padding: 1rem;
  overflow-y: auto;
  background: #f8f9fb;
  border: 1px solid var(--live-border);
  border-radius: 0.75rem;
  flex-direction: column;
  gap: 0.65rem;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.ai-notes-live-event {
  width: min(78%, 42rem);
  padding: 0.65rem 0.8rem;
  background: var(--live-surface);
  border: 1px solid #e0e4ea;
  border-radius: 0.75rem;
}

.ai-notes-live-event.is-left {
  align-self: flex-start;
  border-top-left-radius: 0.2rem;
}

.ai-notes-live-event.is-right {
  align-self: flex-end;
  border-top-right-radius: 0.2rem;
}

.ai-notes-live-event.is-chat {
  width: min(62%, 32rem);
  padding: 0.5rem 0.65rem;
  background: #eef3f8;
}

.ai-notes-live-event.is-system {
  display: flex;
  width: auto;
  max-width: 90%;
  padding: 0.35rem 0.65rem;
  align-self: center;
  color: #59636f;
  background: #eceff3;
  border: 0;
  border-radius: 999px;
  font-size: 0.8rem;
  gap: 0.5rem;
}

.ai-notes-live-event-header {
  display: flex;
  margin-bottom: 0.25rem;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.ai-notes-live-speaker {
  font-size: 0.82rem;
  font-weight: 650;
}

.ai-notes-live-event-time {
  color: #6f7883;
  font-size: 0.75rem;
  white-space: nowrap;
}

.ai-notes-live-event-text {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ai-notes-live-system-text {
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .ai-notes-live-grid {
    grid-template-columns: 1fr;
  }

  .ai-notes-live-event,
  .ai-notes-live-event.is-chat {
    width: 92%;
  }

  .ai-notes-live-feed {
    padding: 0.65rem;
  }
}
