/* Cabecera «L» de Javi 1.2 (Nerio 20/11/2026 23:08-23:11, orden J12-163; diseño L de Mariela, aprobado con un cambio: sin la palabra «Contactos»).
   Solo en teléfono (html.cl-m, lo pone cabecera_l.js con ancho < 980 px): una sola fila arriba — foto · ‹ Javi · perfil · asistente · máscaras · campana · voz · ⋮ · sello —,
   igual en el chat con Javi y en Contactos. Debajo, el buscador ancho con la lupa dentro y el + dorado. En cada contacto: Escribir (rojo) y ⋮ (Walkie, Llamar, Video).
   No quita funciones: los botones de siempre siguen en el documento y los nuevos les hacen clic (llamadas, walkie y push no se tocan). En escritorio no cambia nada. */
.cl-nuevo { display: none; }
html.cl-m .cl-nuevo { display: flex; }
html.cl-m .cl-nuevo[hidden] { display: none !important; }

/* ---- la fila de arriba ---- */
html.cl-m header#cab { gap: 4px; padding-left: 10px; padding-right: 10px; padding-bottom: 7px; justify-content: space-between; flex-wrap: nowrap; }
html.cl-m header#cab > #cl-foto { order: 1; } html.cl-m header#cab > #cl-volver { order: 2; } html.cl-m header#cab > #cl-perfil { order: 3; }
html.cl-m header#cab > #cl-robot { order: 4; } html.cl-m header#cab > #bident { order: 5; } html.cl-m header#cab > #bcampana { order: 6; }
html.cl-m header#cab > #bvoz { order: 7; } html.cl-m header#cab > #cl-mas { order: 8; } html.cl-m header#cab > #insignia { order: 9; }
html.cl-m header#cab > .quien, html.cl-m header#cab > #ahora-mini, html.cl-m header#cab > #brecargar, html.cl-m header#cab > #bplan, html.cl-m header#cab > #bayuda,
html.cl-m header#cab > #bajustes, html.cl-m header#cab > #bsalir, html.cl-m header#cab > #badmin, html.cl-m header#cab > #bjuegos, html.cl-m header#cab > #bnata,
html.cl-m header#cab > #bcontactos { display: none !important; }

/* botones redondeados de 33 px (se achican solos en pantallas angostas); el selector triple gana a los temas «cuadrado», «compacto», etc. */
html.cl-m.cl-m.cl-m header#cab .cl-b, html.cl-m.cl-m.cl-m header#cab #bident, html.cl-m.cl-m.cl-m header#cab #bcampana, html.cl-m.cl-m.cl-m header#cab #bvoz {
  flex: 0 1 33px; width: 33px !important; height: 33px !important; min-width: 26px; padding: 0 !important; border-radius: 10px !important; box-sizing: border-box;
  border: 1px solid var(--oro) !important; background: rgba(0, 0, 0, .4) !important; font-size: 15px !important; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  /* 21/11/2026: los temas (plata «Actual», Clásico, paletas) pintan la letra de los botones de la cabecera con «color: #000 !important»; sobre este fondo oscuro los iconos quedaban invisibles.
     Aquí el icono va SIEMPRE claro, gane el tema que gane. */
  color: #f5e6b0 !important; -webkit-text-fill-color: #f5e6b0 !important; text-shadow: none !important; box-shadow: none !important; filter: none !important; font-weight: 700;
}
/* campana y voz: los temas dibujan su icono con una máscara negra (::before) que sobre este fondo oscuro no se ve (y algunos navegadores la recortan); aquí se usa el emoji de siempre, en todos los temas */
html.cl-m.cl-m.cl-m header#cab #bcampana::before, html.cl-m.cl-m.cl-m header#cab #bvoz::before { display: none !important; }
html.cl-m.cl-m.cl-m header#cab #bcampana .emo, html.cl-m.cl-m.cl-m header#cab #bvoz .emo { filter: none !important; font-size: 15px; line-height: 1; }
html.cl-m.cl-m.cl-m header#cab #bcampana, html.cl-m.cl-m.cl-m header#cab #bvoz { overflow: hidden; position: relative; }
html.cl-m header#cab #bident { overflow: hidden; }
/* el 🔑 de permisos (lo crea permisos_nativo.js) ya no va suelto en la cabecera: vive en el ⋮ como «Permisos» */
html.cl-m header#cab > #bpermisos { display: none !important; }
html.cl-m.cl-m.cl-m header#cab #bcampana[hidden], html.cl-m.cl-m.cl-m header#cab #bvoz[hidden] { display: none !important; }
html.cl-m header#cab .cl-b svg { width: 62%; height: 62%; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
html.cl-m header#cab #cl-mas svg { fill: currentColor; }
html.cl-m header#cab .btn-cab::after { display: none !important; }
html.cl-m header#cab #cl-robot.cl-off { opacity: .45; }
html.cl-m.cl-m.cl-m header#cab #cl-volver { flex: 0 0 auto; width: auto !important; min-width: 0; padding: 0 9px 0 4px !important; font: 700 13px var(--f-titulo, system-ui); gap: 0; }
html.cl-m header#cab #cl-volver svg { width: 16px; height: 16px; }
html.cl-m header#cab #cl-volver.on { background: rgba(220, 171, 36, .22) !important; box-shadow: 0 0 10px rgba(220, 171, 36, .35); }

/* foto del usuario (toca = Mi perfil); sin foto, la inicial */
html.cl-m header#cab #cl-foto { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--oro); padding: 0; margin-right: 2px; overflow: hidden;
  background: linear-gradient(145deg, #7a0f17, #b3121b) center/cover no-repeat; color: #fff; font: 700 18px var(--f-titulo, system-ui); align-items: center; justify-content: center; box-shadow: 0 0 8px rgba(217, 173, 69, .35); }
/* el sello de Javi, a la derecha y sin el texto «JAVI / maracucho rajao» */
html.cl-m header#cab #insignia { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 6px; box-shadow: none; margin-left: 2px; }
html.cl-m header#cab #insignia img { border-radius: 6px; }
@media (max-width: 350px) {
  html.cl-m header#cab { gap: 2px; padding-left: 6px; padding-right: 6px; }
  html.cl-m header#cab #cl-foto { flex-basis: 34px; width: 34px; height: 34px; }
  html.cl-m header#cab #insignia { flex-basis: 32px; width: 32px; height: 32px; }
}

/* menú ⋮ de la cabecera */
#cl-sombra { position: fixed; inset: 0; z-index: 9400; background: rgba(0, 0, 0, .35); }
#cl-menu { position: fixed; right: 10px; width: 244px; max-width: calc(100vw - 20px); z-index: 9500; background: #1a0709; border: 1px solid var(--oro); border-radius: 14px; padding: 6px; box-shadow: 0 8px 24px #000; }
#cl-menu button { display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 10px; border-radius: 10px; color: #f0dca0; font: 500 15px var(--f-texto, system-ui); text-align: left; }
#cl-menu button:active { background: rgba(220, 171, 36, .16); }
#cl-menu svg { width: 21px; height: 21px; flex: none; color: var(--oro); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Contactos: sin barra propia ni título; buscador ancho con la lupa dentro y el + a su derecha ---- */
html.cl-m #panel-contactos #ct-lista { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
html.cl-m #panel-contactos #ct-lista > .ct-barra { display: contents; }
html.cl-m #panel-contactos #ct-lista > .ct-barra > *:not(#ct-bmas) { display: none !important; }
html.cl-m #panel-contactos #ct-lista > .ct-titulo { display: none; }
html.cl-m #panel-contactos #ct-lista > .ct-buscar { order: 1; flex: 1 1 0; min-width: 0; margin: 10px 0 8px 14px; height: 42px; }
html.cl-m #panel-contactos #ct-lista #ct-bmas { order: 2; margin: 10px 14px 8px 8px; width: 42px; height: 42px; min-width: 42px; }
html.cl-m #panel-contactos #ct-lista > .ct-filtros { order: 3; width: 100%; }
html.cl-m #panel-contactos #ct-lista > #ct-compartir { order: 4; width: 100%; }
html.cl-m #panel-contactos #ct-lista > #ct-contactos { order: 5; width: 100%; }

/* ---- cada contacto: Escribir (rojo) y ⋮ ---- */
html.cl-m #panel-contactos .ct-cto .ct-avatar { width: 48px; height: 48px; }
html.cl-m #panel-contactos .ct-cto .ct-dos { gap: 8px; align-items: center; }
html.cl-m #panel-contactos .ct-cto .ct-dos > .ct-bt.ct-escribir { width: 40px; height: 40px; padding: 0; border-radius: 50%; flex-direction: row; justify-content: center; }
html.cl-m #panel-contactos .ct-cto .ct-dos > .ct-bt.ct-escribir span { display: none; }
html.cl-m #panel-contactos .ct-cto .ct-dos > .ct-bt.ct-escribir svg { width: 20px; height: 20px; }
.cl-mas-fila { display: none; }
html.cl-m #panel-contactos .cl-mas-fila { display: flex; width: 40px; height: 40px; border-radius: 50%; flex: none; align-items: center; justify-content: center;
  border: 1px solid rgba(220, 171, 36, .35); background: rgba(60, 22, 26, .8); color: var(--oro2); padding: 0; }
html.cl-m #panel-contactos .cl-mas-fila svg { width: 18px; height: 18px; fill: currentColor; pointer-events: none; }
.cl-pop { display: contents; }
html.cl-m #panel-contactos .ct-cto .cl-pop { display: none; position: absolute; right: 12px; top: calc(100% - 8px); z-index: 30; flex-direction: column; width: 200px; padding: 6px;
  background: #1a0709; border: 1px solid var(--oro); border-radius: 14px; box-shadow: 0 8px 24px #000; }
html.cl-m #panel-contactos .ct-cto.cl-arriba .cl-pop { top: auto; bottom: calc(100% - 8px); }
html.cl-m #panel-contactos .ct-cto.cl-abierto .cl-pop { display: flex; }
html.cl-m #panel-contactos .cl-pop .ct-bt { width: 100% !important; height: 46px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 10px; border: 0; border-radius: 10px;
  background: none !important; color: #f0dca0 !important; font-size: 15px !important; font-weight: 500; }
html.cl-m #panel-contactos .cl-pop .ct-bt:active { background: rgba(220, 171, 36, .16) !important; }
html.cl-m #panel-contactos .cl-pop .ct-bt svg { width: 24px; height: 21px; flex: none; color: var(--oro); }
html.cl-m #panel-contactos .cl-pop .ct-bt img { height: 26px; width: 24px; flex: none; object-fit: contain; }
html.cl-m #panel-contactos .ct-cto.cl-abierto { z-index: 31; }
