/* eResonate — show-chat-web.css · the stored show chat beside a real show
   (show-chat-web.js; contract p6.0 section 9, hook W1).

   live.css hides the chat column on a real show (html.live-real ...
   .chat-col). show-chat-web.js adds html.live-chat-on only when the server
   says the website panel is on, and these rules bring the column back for
   that page alone. They are one class more specific than live.css's, so
   neither file depends on the order they load in. live.css is not edited. */

html.live-chat-on .stream-wrap .stream-grid > .chat-col { display: flex; position: relative; }
html.live-chat-on .stream-wrap .stream-grid.stream-grid { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1024px) {
  html.live-chat-on .stream-wrap .stream-grid.stream-grid { grid-template-columns: minmax(0, 1fr); }
}
/* The demo's own feed, form and made-up count stay behind; the panel replaces them. */
html.live-chat-on .chat-col > #chatFeed,
html.live-chat-on .chat-col > #chatForm,
html.live-chat-on .chat-col #chatCount { display: none; }

.scw { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.scw[hidden], .scw [hidden] { display: none; }

.scw-note {
  padding: .55rem 1.1rem; font-size: .86rem; line-height: 1.45; color: var(--text-muted);
  border-bottom: 1px solid var(--border); background: var(--field-bg);
}
.scw--closed .scw-note { flex: 1; display: grid; place-content: center; text-align: center; border-bottom: 0; background: transparent; }
.scw--closed .scw-feed { display: none; }

.scw-pin {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .35rem;
  padding: .55rem 1.1rem; font-size: .88rem; line-height: 1.4;
  border-bottom: 1px solid var(--border); overflow-wrap: anywhere;
}
.scw-pin-k {
  font-family: 'Outfit', sans-serif; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-text);
}

.scw-feed {
  flex: 1; min-height: 0; overflow-y: auto; padding: .9rem 1.1rem;
  scrollbar-width: thin; scrollbar-color: rgba(127, 127, 127, .25) transparent;
}
.scw-list { display: flex; flex-direction: column; gap: .55rem; }
.scw-earlier {
  display: block; margin: 0 auto .7rem; padding: .3rem .8rem; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  font: inherit; font-size: .82rem; cursor: pointer;
}
.scw-earlier:hover { color: var(--text); border-color: var(--accent); }

.scw-msg { position: relative; padding-right: 1.6rem; overflow-wrap: anywhere; }
.scw-text { white-space: pre-wrap; }
.scw-msg .scw-host { background: var(--accent); color: #fff; }
.scw-msg--held { opacity: .72; }
.scw-held, .scw-reported { display: block; font-size: .76rem; color: var(--text-dim); margin-top: .1rem; }
.scw-more {
  position: absolute; top: 0; right: 0; width: 1.4rem; height: 1.4rem; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--text-dim);
  font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; opacity: .55;
}
.scw-msg:hover .scw-more, .scw-more:focus-visible, .scw-more[aria-expanded="true"] { opacity: 1; }
.scw-more:hover { background: var(--field-bg); color: var(--text); }
@media (hover: none) { .scw-more { opacity: .85; } }
.scw-menu { display: flex; gap: .4rem; margin-top: .3rem; }
.scw-act {
  padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font: inherit; font-size: .8rem; cursor: pointer;
}
.scw-act:hover { border-color: var(--accent); }

.scw-newmark {
  position: absolute; left: 50%; bottom: 4.6rem; transform: translateX(-50%); z-index: 2;
  padding: .35rem .9rem; border-radius: 999px; border: 0; background: var(--accent); color: #fff;
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.scw-err { padding: .45rem 1.1rem 0; font-size: .84rem; line-height: 1.4; color: var(--live); }
.scw-left { padding: .3rem 1.1rem 0; font-size: .78rem; color: var(--text-dim); text-align: right; }
.scw-form input:disabled { opacity: .55; cursor: not-allowed; }
.scw-form .chat-send:disabled { opacity: .55; cursor: not-allowed; }

.scw--out { justify-content: center; }
.scw-signin { margin: 0; padding: 1.4rem 1.1rem; text-align: center; font-size: .95rem; color: var(--text-muted); }
.scw-signin-link { color: var(--accent-text); font-weight: 700; text-decoration: underline; }

/* A sheet over the chat column: the rules, a report, a block. */
.scw-sheet {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end;
  background: rgba(5, 8, 18, .55);
}
.scw-sheet-card {
  width: 100%; max-height: 100%; overflow-y: auto; box-sizing: border-box;
  padding: 1rem 1.1rem 1.1rem; background: var(--bg-card); color: var(--text);
  border-top: 1px solid var(--border); border-radius: 14px 14px 0 0;
}
.scw-sheet-title { margin: 0 0 .5rem; font-family: 'Outfit', sans-serif; font-size: 1.02rem; font-weight: 700; overflow-wrap: anywhere; }
.scw-sheet-p { margin: 0 0 .6rem; font-size: .9rem; line-height: 1.5; color: var(--text-muted); }
.scw-sheet-link { display: inline-block; margin-bottom: .7rem; font-size: .9rem; font-weight: 600; color: var(--accent-text); text-decoration: underline; }
.scw-sheet-label { display: block; margin: 0 0 .6rem; font-size: .85rem; color: var(--text-muted); }
.scw-sheet-select, .scw-sheet-text {
  display: block; width: 100%; box-sizing: border-box; margin-top: .3rem; padding: .5rem .7rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--field-bg); color: var(--text);
  font: inherit; font-size: .9rem;
}
.scw-sheet-text { resize: vertical; }
.scw-sheet-msg { margin: 0 0 .6rem; font-size: .86rem; color: var(--text-muted); }
.scw-sheet-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.scw-sheet-btns .btn { padding: .55rem 1.1rem; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) { .scw-msg { animation: none; } }
