/* chat.css — la caja del chat en vivo (Views/sitio/partes/chat.php), sobre el diseño de la plantilla (.chat, .msg)
   y la pantalla del chat para OBS. Se carga en todas las páginas públicas. */
.tb-chat { min-width: 0; }
.tb-chat-lista { display: flex; flex-direction: column; gap: 13px; max-height: 420px; min-height: 180px; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; }
.tb-chat--alto .tb-chat-lista { max-height: min(62vh, 640px); min-height: 320px; }
.tb-chat-lista .msg { flex: none; }
.tb-chat-lista img.ava { object-fit: cover; }
.tb-chat-lista .msg.is-mio .nm .mono { color: var(--accent); }
.tb-chat-lista .msg p { overflow-wrap: anywhere; }
.tb-chat-vacio { padding: 24px 0; text-align: center; letter-spacing: .12em; }
.tb-chat-fijado { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--i10); font-size: 15px; line-height: 1.4; }
.tb-chat-fijado[hidden], .tb-chat-lento[hidden] { display: none; }
.tb-chat-lento { letter-spacing: .12em; }
.tb-chat-aviso { padding: 10px 0 0; color: var(--i7); letter-spacing: .04em; }
.tb-chat-aviso a { text-decoration: underline; }
.tb-chat-form .rq { flex: 1; min-width: 0; }
.tb-chat-form .send:disabled { opacity: .5; cursor: not-allowed; }
.tb-chat-error { color: #e5484d; letter-spacing: .06em; }
.tb-chat-error[hidden] { display: none; }

/* ── La TV con el chat al lado (como YouTube) ── */
.tb-tv-con-chat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(16px, 2vw, 28px); align-items: start; }
.tb-tv-con-chat .tb-chat-lista { max-height: clamp(260px, 30vw, 440px); }
@media (max-width: 980px) {
  .tb-tv-con-chat { grid-template-columns: minmax(0, 1fr); }
}

/* ── Junto a la subasta y al torneo ── */
.tb-chat-sec { margin-top: clamp(40px, 5vw, 72px); }
.tb-chat-sec .tb-chat { max-width: 760px; }

/* ── La página /chat ── */
.tb-chat-pagina { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.tb-chat-reglas { display: flex; flex-direction: column; gap: 14px; }
.tb-chat-reglas ol { display: flex; flex-direction: column; gap: 10px; padding-left: 20px; list-style: decimal; color: var(--i7); line-height: 1.5; }
@media (max-width: 900px) {
  .tb-chat-pagina { grid-template-columns: minmax(0, 1fr); }
}

/* ── La pantalla de OBS (1280 × 720, fondo transparente) ── */
.tb-chat-obs { margin: 0; width: 1280px; height: 720px; background: transparent; overflow: hidden; font-family: 'Archivo', sans-serif; color: #fff; }
.tb-chat-obs-caja { position: absolute; left: 40px; bottom: 150px; max-width: 760px; display: flex; gap: 18px; align-items: center; padding: 18px 26px 18px 18px; background: rgba(12, 11, 10, .92); border-left: 6px solid #C9502A; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); animation: tbChatEntra .5s ease-out; }
.tb-chat-obs-caja[hidden] { display: none; }
.tb-chat-obs-ava { width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 800 28px 'Archivo', sans-serif; object-fit: cover; }
.tb-chat-obs-quien { font: 500 16px 'DM Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: #E8A23A; }
.tb-chat-obs-texto { font-size: 30px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
@keyframes tbChatEntra { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
