/* Override widget-base.css fully */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  display: block !important;
  background: transparent;
  font-family: system-ui, sans-serif;
  color: #fff;
}

/* Root: narrower column for OBS */
#chat-widget {
  width: 420px !important;    /* half screen */
  max-width: none;         /* cap for ultra-wide canvases */
  height: 100%;
  padding: 4px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* Small header pill */
#chat-header {
  display: inline-block;
  align-self: flex-start;
  font-size: 18px;
  padding: 2px 8px;
  margin-bottom: 4px;
    background: rgba(34, 34, 34, 1.20);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 2px 8px;
}

/* Messages stack under the header */
#chat-messages {
  display: flex;
  flex-direction: column;
  gap: 4px;              /* a bit more space between comments */
  overflow: hidden;
    align-items: flex-start;   /* ⭐ don't stretch bubbles to full width */
}

/* Message row: avatar + text inline */
.chat-message {
  display: inline-flex;     /* shrink to content width */
  align-items: flex-start;
  gap: 4px;

  font-size: 12px;
  line-height: 1.5;

  margin: 0;
  padding: 2px 4px;

  border-radius: 4px;

  white-space: normal;
  overflow: visible;

  text-shadow: 0 0 3px rgba(0,0,0,1);
  width: auto;              /* ⭐ not forced to 100% */
  max-width: 100%;          /* still prevent overflowing the column */
    background: rgba(34, 34, 34, 1.15);           /* darker like header */
  border: 1px solid rgba(255, 255, 255, 0.15);/* optional, header-like */
  border-radius: 999px;                       /* make it a pill (optional) */
  padding: 4px 10px;                          /* a bit more pill padding */

}



/* Avatar */
.chat-avatar {
  display: block !important;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Username + text */
.chat-message .username,
.chat-message .text {
  display: inline;
}

.chat-message .username {
  display: inline-block;   /* ❗ prevents splitting onto multiple lines */
  white-space: nowrap;     /* ❗ force username to stay as one unit */
  font-weight: 700;
  color: #2fa1ff;
  margin-right: 4px;
  vertical-align: top;     /* aligns nicely with multiple text lines */
}


.chat-message .text {
  font-weight: 400;
    display: inline;
  white-space: normal;     /* allow wrapping */
  word-break: break-word;  /* long words/links wrap instead of overflowing */
    flex: 1 1 auto;            /* allow wrapping but don't stretch bubble too wide */
}

/* Hide timestamp/meta */
.chat-message .meta {
  display: none !important;
}
