/* ==========================================================================
   CHAT EN VIVO DE LAS TRANSMISIONES (inc/chat.php + assets/js/mc-chat.js)
   Estilo "Twitch": botón debajo del video y panel oscuro con la lista de
   mensajes y la caja para escribir.
   ========================================================================== */

.transmision-seccion { display: flex; flex-direction: column; }
.mc-chat { margin-top: 14px; }
.mc-chat[hidden], .mc-chat [hidden] { display: none !important; }

/* Botón "Chat en vivo" */
.mc-chat-toggle {
	width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
	background: #131315; color: #fff; border: 1px solid rgba(255,158,0,0.45); border-radius: 12px;
	padding: 11px 16px; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}
.mc-chat-toggle:hover { background: #1a1a1d; border-color: var(--accent); }
.mc-chat-toggle .fa-comments { color: var(--accent); font-size: 1.05rem; }
.mc-chat-toggle-texto { letter-spacing: 0.3px; }
.mc-chat-toggle-texto::after {
	content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
	background: #d92626; margin-left: 9px; vertical-align: middle; animation: mc-chat-latido 1.6s infinite;
}
.mc-chat-toggle-flecha { font-size: 0.7rem; color: var(--text-gray); transition: transform 0.2s; }
.mc-chat.is-abierto .mc-chat-toggle { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.mc-chat.is-abierto .mc-chat-toggle-flecha { transform: rotate(180deg); }
@keyframes mc-chat-latido { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Panel */
.mc-chat-panel {
	position: relative; display: flex; flex-direction: column; height: 380px;
	background: #18181b; border: 1px solid rgba(255,158,0,0.45); border-top: none;
	border-radius: 0 0 12px 12px; overflow: hidden;
}
.mc-chat-cabecera {
	display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto;
	padding: 9px 14px; background: #0e0e10; border-bottom: 1px solid #26262b;
	font-size: 0.72rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #c9c9cf;
}
.mc-chat-cerrar {
	background: none; border: none; color: var(--text-gray); cursor: pointer; font-size: 0.95rem; padding: 2px 4px;
}
.mc-chat-cerrar:hover { color: #fff; }

.mc-chat-lista {
	flex: 1 1 auto; overflow-y: auto; padding: 8px 6px; scrollbar-width: thin; scrollbar-color: #3a3a40 transparent;
	overscroll-behavior: contain;
}
.mc-chat-msg {
	position: relative; padding: 4px 46px 4px 8px; border-radius: 6px; font-size: 0.86rem; line-height: 1.4;
	color: #efeff1; word-break: break-word;
}
.mc-chat-msg:hover { background: rgba(255,255,255,0.05); }
.mc-chat-msg.is-equipo { background: rgba(255,158,0,0.08); }
.mc-chat-msg.is-para-mi { background: rgba(145,70,255,0.18); border-left: 3px solid #9146ff; }
.mc-chat-cuerpo { display: block; }
.mc-chat-avatar {
	display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
	border-radius: 50%; background: #3a3a40; color: #fff; font-size: 0.65rem; font-weight: 800;
	overflow: hidden; vertical-align: middle; margin-right: 6px;
}
.mc-chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-chat-plataforma { font-size: 0.8rem; margin-right: 5px; vertical-align: middle; }
.mc-chat-nombre { font-weight: 800; }
.mc-chat-msg.is-equipo .mc-chat-nombre { color: var(--accent); }
.mc-chat-etiqueta {
	display: inline-block; background: var(--accent); color: #1a0f00; font-size: 0.58rem; font-weight: 800;
	text-transform: uppercase; letter-spacing: 0.4px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle;
}
.mc-chat-dos-puntos { color: #adadb8; }
.mc-chat-cita {
	font-size: 0.72rem; color: #adadb8; margin: 0 0 2px 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-chat-cita i { font-size: 0.65rem; margin-right: 2px; }
/* Botones al pasar el mouse (o al tocar el mensaje en el celular): responder y, para administradores, moderar */
.mc-chat-acciones {
	position: absolute; top: 1px; right: 42px; display: none; gap: 3px; padding: 2px; z-index: 2;
	background: #2a2a2f; border-radius: 7px; box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.mc-chat-msg:hover .mc-chat-acciones, .mc-chat-msg.is-sel .mc-chat-acciones, .mc-chat-acciones:focus-within { display: flex; }
.mc-chat-accion {
	background: none; color: #c9c9cf; border: none; border-radius: 5px; width: 24px; height: 24px;
	cursor: pointer; font-size: 0.72rem; display: flex; align-items: center; justify-content: center;
}
.mc-chat-accion:hover { background: var(--accent); color: #1a0f00; }
.mc-chat-msg.is-oculto { opacity: 0.5; }
.mc-chat-nota-oculto { color: #adadb8; font-size: 0.75rem; }
.mc-chat-etiqueta.is-bloqueado { background: #d92626; color: #fff; }
.mc-chat-nombre.is-clicable { cursor: pointer; }
.mc-chat-nombre.is-clicable:hover { text-decoration: underline; }
.mc-chat-mencion { color: #bf94ff; font-weight: 700; background: rgba(145,70,255,0.18); border-radius: 4px; padding: 0 3px; }

/* Corazón en cada mensaje (como en TikTok): cualquiera con cuenta puede darlo; si lo da el equipo, se marca aparte */
.mc-chat-corazon {
	position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
	display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 34px; padding: 4px 4px;
	background: none; border: none; border-radius: 8px; cursor: pointer; color: #8a8a93; font: inherit; font-size: 0.95rem; line-height: 1;
	opacity: 0.4; transition: opacity 0.15s, color 0.15s, transform 0.15s;
}
.mc-chat-msg:hover .mc-chat-corazon, .mc-chat-msg.is-sel .mc-chat-corazon, .mc-chat-corazon.tiene-likes, .mc-chat-corazon.is-activo, .mc-chat-corazon:focus-visible { opacity: 1; }
.mc-chat-corazon:hover { color: #ff6b81; background: rgba(255,255,255,0.06); }
.mc-chat-corazon.is-activo { color: #ff3b5c; }
.mc-chat-corazon.is-activo i { animation: mc-chat-pop 0.3s ease-out; }
.mc-chat-corazon-n { font-size: 0.66rem; font-weight: 700; color: #c9c9cf; min-height: 0.66rem; }
.mc-chat-corazon-n:empty { display: none; }
@keyframes mc-chat-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.mc-chat-like-equipo {
	display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; margin-left: 8px; padding: 1px 8px 1px 3px;
	border-radius: 999px; background: rgba(255,59,92,0.14); border: 1px solid rgba(255,59,92,0.55); white-space: nowrap; line-height: 1.2;
}
.mc-chat-like-equipo img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; display: block; }
.mc-chat-like-equipo .fa-heart { color: #ff3b5c; font-size: 0.62rem; margin-left: 3px; }
.mc-chat-like-equipo img + .fa-heart { margin-left: 0; }
.mc-chat-like-equipo-texto { font-size: 0.62rem; font-weight: 700; color: #ffb3c0; letter-spacing: 0.2px; }

/* Sugerencias al escribir "@" */
.mc-chat-sugerencias {
	list-style: none; margin: 0 0 6px; padding: 4px; background: #0e0e10; border: 1px solid #3a3a40; border-radius: 8px;
}
.mc-chat-sugerencia { padding: 6px 10px; border-radius: 6px; font-size: 0.84rem; color: #efeff1; cursor: pointer; }
.mc-chat-sugerencia:first-child, .mc-chat-sugerencia:hover { background: rgba(255,158,0,0.18); }

.mc-chat-nuevos {
	position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); z-index: 3;
	background: var(--accent); color: #1a0f00; border: none; border-radius: 20px; padding: 6px 14px;
	font: inherit; font-size: 0.75rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

/* Caja para escribir */
.mc-chat-pie { flex: 0 0 auto; padding: 8px 10px 10px; border-top: 1px solid #26262b; background: #18181b; }
.mc-chat-form { display: flex; gap: 8px; }
.mc-chat-texto {
	flex: 1 1 auto; min-width: 0; background: #0e0e10; color: #fff; border: 1px solid #3a3a40; border-radius: 8px;
	padding: 9px 12px; font: inherit; font-size: 0.86rem; outline: none;
}
.mc-chat-texto:focus { border-color: var(--accent); }
.mc-chat-enviar {
	flex: 0 0 auto; width: 40px; border: none; border-radius: 8px; background: var(--accent); color: #1a0f00;
	cursor: pointer; font-size: 0.9rem;
}
.mc-chat-enviar:hover { filter: brightness(1.1); }
.mc-chat-form.is-enviando .mc-chat-enviar { opacity: 0.5; cursor: wait; }
.mc-chat-respondiendo {
	display: flex; align-items: center; gap: 4px; font-size: 0.74rem; color: #c9c9cf; background: #26262b;
	padding: 5px 8px; border-radius: 6px; margin-bottom: 6px;
}
.mc-chat-quitar-resp { margin-left: auto; background: none; border: none; color: var(--text-gray); cursor: pointer; }
.mc-chat-quitar-resp:hover { color: #fff; }
.mc-chat-login, .mc-chat-aviso { margin: 0; text-align: center; font-size: 0.8rem; color: #adadb8; }
.mc-chat-login a { color: var(--accent); font-weight: 700; }
.mc-chat-aviso { color: #ff8b8b; margin-top: 6px; }

@media (max-width: 768px) {
	.mc-chat-panel { height: 340px; }
	.mc-chat-msg { font-size: 0.9rem; }
}

/* ==========================================================================
   CAMPANITA DE AVISOS (header, solo para quienes ingresaron): respuestas y
   menciones del chat — assets/js/mc-avisos.js
   ========================================================================== */
.mc-avisos { position: relative; flex-shrink: 0; margin-left: 12px; }
.mc-avisos + .mc-cuenta-link { margin-left: 10px; }
.mc-avisos-boton {
	position: relative; width: 38px; height: 38px; border: none; border-radius: 50%; cursor: pointer;
	background: rgba(0,0,0,0.12); color: #1a1a1c; font-size: 1.05rem;
	display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.mc-avisos-boton:hover { background: rgba(0,0,0,0.22); }
.mc-avisos-punto {
	position: absolute; top: 6px; right: 7px; width: 11px; height: 11px; border-radius: 50%;
	background: #e11d1d; border: 2px solid #FFB020; box-sizing: content-box; margin: -2px -2px 0 0;
}
.mc-avisos-punto[hidden] { display: none; }
.mc-avisos-panel {
	position: absolute; top: calc(100% + 10px); right: 0; z-index: 1100; width: 340px; max-width: calc(100vw - 20px);
	background: #18181b; color: #efeff1; border: 1px solid rgba(255,158,0,0.45); border-radius: 12px;
	box-shadow: 0 14px 40px rgba(0,0,0,0.6); overflow: hidden;
}
.mc-avisos-panel[hidden] { display: none; }
.mc-avisos-cabecera {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px;
	background: #0e0e10; border-bottom: 1px solid #26262b; font-size: 0.82rem;
}
.mc-avisos-todos { background: none; border: none; color: var(--accent); font: inherit; font-size: 0.74rem; font-weight: 700; cursor: pointer; padding: 0; }
.mc-avisos-todos:hover { text-decoration: underline; }
.mc-avisos-lista { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.mc-avisos-vacio { padding: 20px 16px; font-size: 0.82rem; color: #adadb8; text-align: center; }
.mc-avisos-item { border-bottom: 1px solid #26262b; }
.mc-avisos-item:last-child { border-bottom: none; }
.mc-avisos-enlace { display: block; padding: 10px 14px; color: inherit; text-decoration: none; }
.mc-avisos-enlace:hover { background: rgba(255,255,255,0.05); }
.mc-avisos-item.is-nuevo .mc-avisos-enlace { background: rgba(145,70,255,0.14); border-left: 3px solid #9146ff; padding-left: 11px; }
.mc-avisos-titulo { display: block; font-size: 0.8rem; color: #c9c9cf; }
.mc-avisos-titulo i { color: var(--accent); font-size: 0.72rem; }
.mc-avisos-titulo i.mc-avisos-corazon { color: #ff3b5c; }
.mc-avisos-texto { display: block; margin-top: 3px; font-size: 0.84rem; color: #fff; word-break: break-word; }
.mc-avisos-hora { display: block; margin-top: 3px; font-size: 0.7rem; color: #8a8a93; }

@media (max-width: 992px) {
	.mc-avisos { margin-left: auto; }
	/* En el celular el panel se ancla a la pantalla, no al botón, para que no se salga */
	.mc-avisos { position: static; }
	.mc-avisos-panel { position: fixed; top: 76px; right: 10px; left: 10px; width: auto; max-width: none; }
}
