/* «Из чата пары» — the note's block and the player's panel share this list (js/chatlog.js). */
.chatlog {
  display: grid;
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
  --cl-text: var(--text);
  --cl-text-2: var(--text-2);
  --cl-text-3: var(--text-3);
  --cl-plate: var(--surface);
  --cl-line: var(--border);
}
.chatlog__item { display: grid; gap: var(--s-2); min-width: 0; }
.chatlog__meta { display: flex; align-items: center; gap: var(--s-2); color: var(--cl-text-3); font-size: var(--fs-12); }
.chatlog__who { font-weight: 600; }
.chatlog__item.is-teacher .chatlog__who { color: var(--accent-text); }
.chatlog__time { font-variant-numeric: tabular-nums; }
.chatlog__text {
  margin: 0;
  color: var(--cl-text);
  font-size: var(--fs-14);
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.chatlog__url { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

.chatlog__codebox { position: relative; min-width: 0; }
.chatlog__code {
  margin: 0;
  max-height: 22em;
  overflow: auto;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--cl-plate);
  color: var(--cl-text);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  tab-size: 4;
}
.chatlog__copy {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  padding: 4px 10px;
  border: 0;
  border-radius: var(--r-pill, 999px);
  background: var(--accent-soft);
  color: var(--accent-text);
  font: inherit;
  font-size: var(--fs-12);
  font-weight: 600;
  cursor: pointer;
}
.chatlog__copy:hover { filter: brightness(1.1); }

.chatlog__files { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chatlog__file {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  max-width: 100%;
  padding: 6px 12px 6px 6px;
  border-radius: var(--r-md);
  background: var(--cl-plate);
  color: var(--cl-text);
  font-size: var(--fs-14);
  text-decoration: none;
}
.chatlog__file:hover { color: var(--accent-text); }
.chatlog__file svg { width: 16px; height: 16px; flex: none; color: var(--cl-text-3); }
.chatlog__ext {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 36px;
  height: 32px;
  padding: 0 4px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.chatlog__fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatlog__fsize { flex: none; color: var(--cl-text-3); font-size: var(--fs-12); }
.chatlog__pic { display: block; max-width: min(100%, 420px); border-radius: var(--r-md); overflow: hidden; background: var(--cl-plate); }
.chatlog__pic img { display: block; width: 100%; height: auto; }

/* The note's block: the same card as the glossary. */
.nt-chat {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
  border-radius: var(--r-xl);
  background: var(--surface-2);
}
.nt-chat .chatlog { --cl-plate: var(--surface); }
.nt-chat .nt-sec__watch, .nt-chat .chatlog__time { font-size: var(--fs-12); }

@media print {
  .chatlog__copy, .chatlog__file svg { display: none; }
  .chatlog__code { max-height: none; overflow: visible; white-space: pre-wrap; }
}
