/* Website-only read-only chat beside the player. */
.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.player-video-column {
  align-self: start;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.chat-panel {
  display: flex;
  align-self: start;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  background: #0d0d14;
  overflow: hidden;
}

.chat-panel > .chat-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.chat-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.chat-readonly {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chat-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #56566b;
  content: "";
}

.chat-status.is-online::before {
  background: var(--ok);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.65);
}

.chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 10px 8px 14px 16px;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: #343449 transparent;
  scrollbar-width: thin;
}

.chat-message {
  padding: 7px 9px 8px 0;
  border-bottom: 1px solid rgba(38, 38, 58, 0.55);
}

.chat-message-meta {
  line-height: 1.4;
}

.chat-user {
  font-size: 13px;
  font-weight: 800;
}

.chat-time {
  margin-right: 4px;
  color: #67667a;
  font-size: 10px;
}

.chat-text {
  color: #d8d6e3;
  font-size: 13px;
  line-height: 1.4;
}

.chat-emote {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin: -5px 2px;
  object-fit: contain;
  vertical-align: middle;
}

@media (max-width: 900px) and (min-width: 721px) {
  .player-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .chat-messages { padding-left: 12px; }
}

@media (max-width: 720px) {
  .player-layout { display: block; }
  .player-video-column { border-right: 0; }
  .chat-panel { border-top: 1px solid var(--line); }
  .chat-messages { min-height: 280px; max-height: 360px; }
}
