/* Cabecera compacta del club (W-059, cifras en W-069). Sin contenedores: avatar a la izquierda; a la
   derecha, nombre e ID. Al lado, mesas y jugadores en línea, y más aparte las fichas. Carga después
   de banner-club.css y catalogo-club.css. */

/* Sin anclaje de scroll en el lobby: al esconderse la cabecera, el navegador no debe mover el scroll
   (eso volvería a mostrarla y la haría oscilar). */
html:has(> body[data-view=lobby]) { overflow-anchor: none; }

html body[data-view=lobby] #club-view #club-banner {
  display: grid;
  grid-template-columns: 64px fit-content(32%) minmax(min-content, 1fr);
  column-gap: 12px;
  row-gap: 8px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
html body[data-view=lobby] #club-view #club-banner::before,
html body[data-view=lobby] #club-view #club-banner::after {
  content: none !important;
  display: none !important;
}

/* Los contenedores internos no pintan nada: sus hijos pasan a la rejilla de la cabecera. */
html body[data-view=lobby] #club-view #club-banner .club-banner-cabecera,
html body[data-view=lobby] #club-view #club-banner .club-summary,
html body[data-view=lobby] #club-view #club-banner .club-banner-meta,
html body[data-view=lobby] #club-view #club-banner .club-stats { display: contents; }

html body[data-view=lobby] #club-view #club-banner .club-avatar {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 64px;
  height: auto;
  border-radius: 14px;
  align-self: start;
}
html body[data-view=lobby] #club-view #club-banner .mobile-club-live { display: none; }
html body[data-view=lobby] #club-view #club-banner .club-banner-titulo { grid-column: 2; grid-row: 1; line-height: 1.15; }
html body[data-view=lobby] #club-view #club-banner .club-summary h1 {
  font: 700 21px/1.15 'Trio Bricolage', system-ui, sans-serif;
  letter-spacing: -.03em;
}
html body[data-view=lobby] #club-view #club-banner #club-public-id { grid-column: 2; grid-row: 2; justify-self: start; margin: -7px 0 0; }
/* La cifra de jugadores sentados se muestra en «Buscar jugadores» (en línea); no se repite. */
html body[data-view=lobby] #club-view #club-banner #club-player-count { display: none; }

html body[data-view=lobby] #club-view #club-banner .club-banner-acciones {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: stretch;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin: 0;
  padding: 0;
  padding-inline-start: clamp(0px, 100cqi - 360px, 22px);
}
html body[data-view=lobby] #club-view #club-banner .club-banner-acciones button:not([hidden]) {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accion);
  font: 600 13px/1.3 system-ui, sans-serif;
  box-shadow: none;
}
/* Cifras: mesas a la izquierda, en línea a su lado. Solo icono y número. */
html body[data-view=lobby] #club-view #club-banner .cabecera-mesas {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--trio-ink);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
html body[data-view=lobby] #club-view #club-banner .mesas-icono-caja { display: inline-flex; flex: none; color: var(--trio-muted); }
html body[data-view=lobby] #club-view #club-banner .mesas-icono { width: 16px; height: 16px; }
html body[data-view=lobby] #club-view #club-banner .club-online-button .club-banner-buscar,
html body[data-view=lobby] #club-view #club-banner .club-online-button .club-banner-presencia { display: none; }
html body[data-view=lobby] #club-view #club-banner .club-banner-acciones .club-online-button:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--trio-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
html body[data-view=lobby] #club-view #club-banner .club-online-button morph-icon,
html body[data-view=lobby] #club-view #club-banner .club-online-button morph-icon svg {
  width: 16px;
  height: 16px;
  flex: none;
}
html body[data-view=lobby] #club-view #club-banner .club-online-button morph-icon { color: var(--trio-muted); }
html body[data-view=lobby] #club-view #club-banner .club-banner-acciones .club-online-button:disabled { color: var(--trio-muted); font-weight: 500; }
html body[data-view=lobby] #club-view #club-banner .club-online-button .club-banner-conteo { border: 0; margin: 0; padding: 0; }

/* Las fichas van en el mismo lado, separadas de mesas y de jugadores en línea. */
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
}
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas:not(:has(> :not([hidden]))) { display: none; }
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .wallet-chip:not([hidden]) {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 2px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
  transition: background .15s;
}
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas strong { white-space: nowrap; }

/* Si los saldos ya no caben junto al ID, las cifras comparten una fila bajo la identidad. */
@container banner-club (max-width: 345px) {
  html body[data-view=lobby] #club-view #club-banner:has(.cabecera-fichas > :not([hidden])) :is(.club-banner-titulo, #club-public-id) {
    grid-column: 2 / -1;
  }
  html body[data-view=lobby] #club-view #club-banner .club-banner-acciones:has(.cabecera-fichas > :not([hidden])) {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .badge-jugar:not([hidden]) {
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  color: var(--gold);
}
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .badge-transferir:not([hidden]) {
  background: color-mix(in srgb, var(--accion) 18%, transparent);
  color: var(--accion);
}
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .badge-jugar:hover { background: color-mix(in srgb, var(--gold) 32%, transparent); }
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .badge-transferir:hover { background: color-mix(in srgb, var(--accion) 30%, transparent); }
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .wallet-chip::before {
  content: '';
  display: block;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  border: 2px dashed #e8e3da;
  outline-offset: -1px;
  border-radius: 50%;
}
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .badge-jugar::before {
  background: #a81e35;
  outline: 1px solid #ba3145;
}
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .badge-transferir::before {
  background: #3158b6;
  border-color: #b6d2fa;
  outline: 1px solid #274894;
}
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .wallet-chip small,
html body[data-view=lobby] #club-view #club-banner .cabecera-fichas > .wallet-chip > morph-icon { display: none !important; }

/* La cifra de fichas del club, la que a veces dice «Ilimitadas», no se muestra. */
html body[data-view=lobby] #club-view #club-banner .reference-wallets > .reference-club-chip-total { display: none; }

html body[data-view=lobby] #club-view #club-banner .reference-wallets {
  grid-column: 1 / -1;
  display: flex;
  flex-flow: row wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Resto de cifras como texto. */
html body[data-view=lobby] #club-view #club-banner .reference-wallets > :not([hidden]):not(.badge-jugar):not(.badge-club) {
  min-height: 0;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  flex: 0 1 auto;
}
html body[data-view=lobby] #club-view #club-banner .reference-wallets small { font-size: 11px; }
html body[data-view=lobby] #club-view #club-banner .reference-wallets strong { font-size: 17px; }

html body[data-view=lobby] #club-view #club-banner .club-banner-abono:not([hidden]) {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 12px;
}
html body[data-view=lobby] #club-view #club-banner .club-banner-solicitudes:not([hidden]) {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
