/* chat-off.css - every chat surface hidden while the chat switch is off.

   Branch chat/report-block (.planning/chat/DESIGN.md 1.4, 2.7). base.html sets
   <html data-chat="on|off"> from the server's value and window.InvestupChat
   changes it on every connect, reconnect and `chat_switch`. The chat scripts
   still load and start while hidden, so turning chat back on needs no reload.

   UNLAYERED AND !important ON PURPOSE: the surfaces below are styled from many
   sheets (the pre-lobby page's own <style>, v3-menu.css, foundation.css,
   game_v2's page block), several of them unlayered. A hidden chat must stay
   hidden whatever those say. Ids are unchanged; nothing is removed from the DOM.

   What stays: the "N watching" chip (#spectator-count), the player list, every
   game control. Names are user content and are not chat. */

/* ── the pre-lobby (/lobby/<id>, /v2/lobby/<id>) ─────────────────────────── */
[data-chat="off"] .pv2-shell .pv2-col.mid,
[data-chat="off"] .pv2-shell .v3m-chatsheet,
[data-chat="off"] .pv2-shell .v3m-chatnote { display: none !important; }

/* The other two columns share the width the chat column left, each keeping
   the floor it had (280px roster, 430px host controls). */
[data-chat="off"] .pv2-shell .pv2-grid { grid-template-columns: minmax(280px, 1fr) minmax(430px, 1fr); }
@media (max-width: 1180px) {
  [data-chat="off"] .pv2-shell .pv2-grid { grid-template-columns: minmax(260px, 1fr) minmax(0, 1fr); }
  [data-chat="off"] .pv2-shell .pv2-col.right {
    grid-column: auto; border-top: 0; border-left: 1px solid var(--line);
  }
}
@media (max-width: 780px) {
  [data-chat="off"] .pv2-shell .pv2-grid { grid-template-columns: 1fr; }
  [data-chat="off"] .pv2-shell .pv2-col.right { border-left: 0; border-top: 1px solid var(--line); }
}

/* ── the legacy pre-lobby (/legacy/lobby/<id>) ───────────────────────────────
   Its chat box has no Report or Block and nothing in the app links to the page,
   so it is hidden with chat on too (DESIGN 1.4). The actions column takes the
   chat column's width. */
.pl-body > .pl-chat { display: none !important; }
.pl-body { grid-template-columns: 300px 1fr; }
@media (max-width: 960px) {
  .pl-body { grid-template-columns: 1fr; }
}

/* ── the game (/game, /v2/game, /legacy/game, the turn desk) ─────────────── */
[data-chat="off"] #chat-widget-container,
[data-chat="off"] #btn-chat,
[data-chat="off"] #chat-badge { display: none !important; }
