/* Chat de MU San Juan (burbuja flotante y chat completo en chat.html). Usa los mismos colores de bronce y oro de la web. */
.chat-burbuja { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid #e2c9a0; background: var(--bronce, #8a5a34); color: #fff;
  font: 700 14px "Segoe UI", system-ui, sans-serif; text-transform: uppercase; letter-spacing: .4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 20px rgba(0,0,0,.6); }
.chat-burbuja:hover { filter: brightness(1.12); }
.chat-burbuja svg { width: 20px; height: 20px; }
.chat-burbuja.abierta { opacity: .85; }
.chat-contador { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: #d93b3b; color: #fff; font-size: 11px; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #111; }
.chat-contador.solo-punto { min-width: 12px; width: 12px; height: 12px; padding: 0; top: -2px; right: 0; }

.chat-panel { position: fixed; right: 18px; bottom: 80px; z-index: 60; width: 400px; height: min(620px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden; background: #141414; color: #efe6d6; border: 1px solid #9a7149;
  border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.75); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; }
.chat-panel[hidden] { display: none; }
.chat-panel.chat-en-pagina { position: relative; right: auto; bottom: auto; z-index: auto; width: 100%; max-width: 980px; margin: 0 auto;
  height: min(720px, calc(100vh - 180px)); min-height: 460px; }
.chat-panel button { font: inherit; }
.chat-panel button:disabled { opacity: .55; }

.chat-cab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(180deg, #4a1a0e, #2c0f08); border-bottom: 1px solid #5a2a18; }
.chat-titulo { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.chat-titulo b { color: var(--gold, #f5c451); font-size: 15px; }
.chat-titulo small { color: #c9b89a; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-wsp { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: #1f8f4e; color: #fff !important;
  text-decoration: none; font-weight: 700; font-size: 12px; border: 1px solid #45c97a; }
.chat-wsp:hover { filter: brightness(1.12); }
.chat-wsp svg { width: 16px; height: 16px; }
.chat-cerrar { background: none; border: 0; color: #e9d6bf; font-size: 24px !important; line-height: 1; padding: 0 4px; }
.chat-cerrar:hover { color: #fff; }

.chat-pestanas { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; border-bottom: 1px solid #2c2c2c; background: #191919; scrollbar-width: thin; }
.chat-pestana { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid #3a3a3a; background: #222; color: #d9c8a8; font-size: 13px !important; max-width: 170px; }
.chat-pestana span:not(.chat-ico) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pestana:hover { border-color: #9a7149; }
.chat-pestana.activa { background: var(--bronce, #8a5a34); color: #fff; border-color: #e2c9a0; }
.chat-pestana.chat-mas { color: var(--gold, #f5c451); border-style: dashed; }
.chat-ico { font-size: 12px; }
.chat-nl { min-width: 18px; padding: 0 5px; border-radius: 9px; background: #d93b3b; color: #fff; font-size: 11px; text-align: center; }

.chat-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 7px 12px; font-size: 13px; color: #c9b89a; background: #1d1712; border-bottom: 1px solid #3a2c1e; }
.chat-info[hidden] { display: none; }
.chat-info b { color: var(--gold, #f5c451); }
.chat-codigo { padding: 1px 8px; border-radius: 4px; border: 1px dashed #b48a5e; background: #111; color: var(--gold, #f5c451); font-family: Consolas, monospace !important; letter-spacing: 1px; }
.chat-enlace { background: none; border: 0; padding: 0; color: #e8b27c; text-decoration: underline; font-size: 13px !important; }
.chat-enlace:hover { color: #fff; }

.chat-lista { flex: 1; overflow-y: auto; padding: 8px 12px; scrollbar-width: thin; }
.chat-sala[hidden] { display: none; }
.chat-vacio { color: #8c826f; text-align: center; margin: 30px 10px; }
.chat-msg { padding: 3px 0; overflow-wrap: anywhere; }
.chat-msg time { color: #7a7060; font-size: 11px; margin-right: 6px; }
.chat-nombre { background: none; border: 0; padding: 0; color: #e8b27c; font-weight: 700; }
.chat-nombre::after { content: ":"; color: #7a7060; margin-right: 4px; }
.chat-nombre:hover { text-decoration: underline; }
.chat-msg.mio .chat-nombre { color: #7fd0ff; }
.chat-msg.gm .chat-nombre { color: #ff8a5c; }
.chat-gm { display: inline-block; margin: 0 5px 0 -1px; padding: 0 5px; border-radius: 3px; background: #b3341b; color: #fff; font-size: 10px; font-weight: 800; vertical-align: 1px; }
.chat-texto { color: #efe6d6; }
.chat-aviso { margin: 4px 0; color: #8c826f; font-size: 12px; font-style: italic; text-align: center; }

.chat-pie { border-top: 1px solid #2c2c2c; padding: 8px 10px 10px; background: #191919; }
.chat-pie p { margin: 0 0 6px; }
.chat-pie small { color: #8c826f; }
.chat-fila { display: flex; gap: 6px; }
.chat-fila input { flex: 1; min-width: 0; padding: 8px 10px; color: #fff; font: inherit; }
.chat-login .chat-fila input { flex: 1 1 90px; }
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; min-width: 0; padding: 9px 10px; color: #fff; font: inherit; }
.chat-boton { flex: none; padding: 8px 14px; border-radius: 6px; border: 1px solid #e2c9a0; background: var(--bronce, #8a5a34); color: #fff;
  font-weight: 700 !important; text-transform: uppercase; font-size: 12px !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.chat-boton:hover:not(:disabled) { filter: brightness(1.12); }
.chat-yo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 13px; color: #c9b89a; }
.chat-yo b { color: var(--gold, #f5c451); }
.chat-yo select { padding: 2px 6px; color: #fff; font: inherit; }
.chat-yo .chat-enlace:last-child { margin-left: auto; }
.chat-error { color: #ff8d7a; font-size: 13px; min-height: 0; }
.chat-error:empty { display: none; }

.chat-menu { position: absolute; z-index: 3; min-width: 190px; display: flex; flex-direction: column; padding: 6px; background: #1d1d1d;
  border: 1px solid #9a7149; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.7); }
.chat-menu[hidden] { display: none; }
.chat-menu b { padding: 4px 8px 6px; color: var(--gold, #f5c451); border-bottom: 1px solid #2c2c2c; margin-bottom: 4px; }
.chat-menu button { text-align: left; padding: 6px 8px; border: 0; border-radius: 5px; background: none; color: #efe6d6; }
.chat-menu button:hover:not(:disabled) { background: #2a241d; }

.chat-capa { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 14px; background: rgba(0,0,0,.65); }
.chat-capa[hidden] { display: none; }
.chat-dialogo { width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto; padding: 12px 14px; background: #1a1a1a; border: 1px solid #9a7149; border-radius: 8px; }
.chat-dialogo-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.chat-dialogo-cab b { color: var(--gold, #f5c451); font-size: 15px; }
.chat-mini { padding: 10px 0; border-top: 1px solid #2c2c2c; }
.chat-mini p { margin: 0 0 6px; color: #c9b89a; font-size: 13px; }
.chat-lista-simple { list-style: none; margin: 0; padding: 0; }
.chat-lista-simple li { padding: 6px 0; border-bottom: 1px solid #262626; font-size: 13px; color: #c9b89a; }
.chat-lista-simple b { color: #efe6d6; }

/* En el celular la ventana ocupa toda la pantalla */
@media (max-width: 560px) {
  .chat-panel:not(.chat-en-pagina) { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; }
  .chat-burbuja { right: 12px; bottom: 12px; padding: 11px 14px; }
  .chat-burbuja.abierta { display: none; }
  .chat-panel.chat-en-pagina { height: calc(100vh - 140px); }
}

/* Página del chat */
.chat-seccion { padding: 24px 16px 50px; }
.chat-seccion .chat-ayuda { max-width: 980px; margin: 0 auto 14px; color: #c9b89a; font-size: 14px; }

/* Mascota que empuja el botón del chat (mascota.js) */
.muneco { position: fixed; left: 0; bottom: 10px; z-index: 61; background-repeat: no-repeat; will-change: transform;
  cursor: url("cursor.png?v=3") 2 2, pointer; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.muneco.salta { animation: muneco-feliz 1.6s ease-out; }
@keyframes muneco-feliz { 0% { translate: 0 0; } 15% { translate: 0 -38px; } 30% { translate: 0 0; } 45% { translate: 0 -24px; } 60% { translate: 0 0; } 75% { translate: 0 -10px; } 100% { translate: 0 0; } }
.chat-burbuja.volviendo { transition: transform .6s ease-out; }
@media (max-width: 759px), (prefers-reduced-motion: reduce) { .muneco { display: none; } }
.muneco.respira { animation: muneco-respira 1.8s ease-in-out infinite; }
@keyframes muneco-respira { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }