/* La cuenta y las acciones globales comparten las mismas posiciones en Grupos y en el club. */
html body :is(.club-topbar,.mobile-groups-header).cabecera-clubes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 60px;
}

.cabecera-clubes-contexto,
.cabecera-clubes-acciones {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cabecera-clubes-contexto { flex: 1 1 auto; min-width: 0; }
.cabecera-clubes-acciones { flex: none; }
.cabecera-clubes-acciones .club-web-version { display: none !important; }

html body .cabecera-clubes .cabecera-clubes-acciones > :is(.cabecera-clubes-campana,.cabecera-clubes-menu,#return-to-table) {
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: none;
  inline-size: 38px;
  min-inline-size: 38px;
  block-size: 38px;
  min-block-size: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
}
html body .cabecera-clubes .cabecera-clubes-acciones > #return-to-table {
  border-color: color-mix(in srgb, var(--accion) 45%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accion) 14%, transparent);
  color: var(--accion);
}
html body .cabecera-clubes .cabecera-clubes-acciones > :is(.cabecera-clubes-campana,.cabecera-clubes-menu) {
  border-radius: 50%;
  background: transparent;
  color: var(--accion);
  box-shadow: none;
  transition: box-shadow 150ms ease;
}
html body .cabecera-clubes :is(.cabecera-clubes-campana,.cabecera-clubes-menu):hover:not(:disabled),
html body .cabecera-clubes .cabecera-clubes-menu[aria-expanded=true] {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accion) 55%, transparent);
}
.cabecera-clubes-campana svg { display: block; width: 22px; height: 22px; }
.cabecera-clubes-menu > morph-icon { display: block; width: 22px; height: 22px; }
html body .cabecera-clubes .cabecera-clubes-campana[data-avisos]::after {
  content: attr(data-avisos);
  position: absolute;
  inset: 0 0 auto auto;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--accion);
  color: var(--accion-tinta);
  box-shadow: 0 0 0 2px var(--trio-page, var(--bg));
  font: 700 9px/16px system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
}

html body .cabecera-clubes .cabecera-clubes-chevron {
  background: var(--trio-surface);
  border-color: var(--trio-edge);
  color: var(--accion);
  transition: rotate 150ms ease;
}
html body .cabecera-clubes .cabecera-clubes-chevron svg { display: block; width: 12px; height: 12px; }
html body .cabecera-clubes-perfil[aria-expanded=true] .cabecera-clubes-chevron { rotate: 180deg; }
.cabecera-clubes-perfil-compacto .cabecera-clubes-retrato { flex: none; width: 36px; height: 36px; }
.cabecera-clubes-perfil-compacto .mobile-groups-photo { width: 32px; }
.cabecera-clubes-perfil-compacto .cabecera-clubes-chevron { width: 14px; height: 14px; }
html body .cabecera-clubes .cabecera-clubes-perfil-compacto {
  display: flex;
  align-items: center;
  gap: 6px;
  min-inline-size: 0;
  min-height: 40px;
  padding: 2px 8px 2px 2px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
}
html body .cabecera-clubes .cabecera-clubes-perfil-compacto:is(:hover,[aria-expanded=true]) {
  border-color: var(--trio-edge);
  background: var(--secundaria);
}
html body .cabecera-clubes-contexto #reference-back-clubs { width: 32px; min-width: 32px; flex: none; }
html body .cabecera-clubes-contexto .cabecera-clubes-nombre {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: start;
  white-space: nowrap;
  cursor: inherit;
  color: var(--trio-ink);
  font: 700 clamp(14px, 3.5vw, 17px)/1.2 system-ui, sans-serif;
}
html body .cabecera-clubes :is(.reference-icon,.cabecera-clubes-perfil,#return-to-table):focus-visible {
  outline: 2px solid var(--anillo);
  outline-offset: -3px;
}
.nav-cuenta-foto.mobile-groups-photo { width: 52px; height: 52px; }

@media (max-width: 360px) {
  html body :is(.club-topbar,.mobile-groups-header).cabecera-clubes { gap: 4px; }
  .cabecera-clubes-contexto, .cabecera-clubes-acciones { gap: 2px; }
  html body .cabecera-clubes .reference-version-stack .display-currency { padding-inline: 6px; }
}

/* Pestañas de juegos y modalidades. El indicador compartido sigue el control elegido. */
html body[data-view=lobby] #club-view #club-game-navigation {
  --club-selector-accent: var(--accion);
  --club-selector-on-accent: var(--accion-tinta);
  padding: 6px;
  gap: 6px;
}
html body[data-view=lobby] #club-view #club-game-navigation .club-primary-variants,
html body[data-view=lobby] #club-view #club-game-navigation .club-secondary-variants {
  position: relative;
  isolation: isolate;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--trio-edge);
  border-radius: 10px;
  background: var(--trio-tint);
}
html body[data-view=lobby] #club-view #club-game-navigation .club-primary-variants { background: var(--secundaria); }
html body[data-view=lobby] #club-view #club-game-navigation #club-aux-variants { gap: 3px; }
html body[data-view=lobby] #club-view #club-game-navigation .club-primary-variants:not(:has(#club-aux-variants > button:not([hidden]))) { --club-primary-count: 2; }
html body[data-view=lobby] #club-view #club-game-navigation .club-primary-variants:has(#club-aux-variants > button:not([hidden])):not(:has(#club-aux-variants > button:not([hidden]) ~ button:not([hidden]))) {
  --club-primary-count: 3;
  --club-aux-count: 1;
}
html body[data-view=lobby] #club-view #club-game-navigation #club-aux-variants:not(:has(button:not([hidden]))) { display: none; }

html body[data-view=lobby] #club-view #club-game-navigation #club-card-variants,
html body[data-view=lobby] #club-view #club-game-navigation #club-card-variants:has(button[data-variant][hidden]) {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}
html body[data-view=lobby] #club-view #club-game-navigation .club-primary-variants button:not([hidden],#club-luck-content button) {
  z-index: 1;
  min-height: 36px;
  padding: 4px 3px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--trio-muted);
  font: 620 clamp(11px, 3.15vw, 13px)/1.2 system-ui, sans-serif;
}
html body[data-view=lobby] #club-view #club-game-navigation .club-primary-variants button:is([aria-selected=true],[aria-expanded=true]):not([hidden]) {
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--trio-ink);
}
html body[data-view=lobby] #club-view #club-game-navigation .club-primary-variants button::after { content: none; }
html body[data-view=lobby] #club-view #club-game-navigation :is(.club-primary-variants,.club-secondary-variants) button:hover:not(:disabled) { color: var(--trio-ink); }
html body[data-view=lobby] #club-view #club-game-navigation :is(.club-primary-variants,.club-secondary-variants) button:focus-visible {
  outline: 2px solid var(--anillo);
  outline-offset: -3px;
}
html body #club-view #club-game-navigation .nav-indicador {
  top: 3px;
  bottom: 3px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accion) 18%, var(--trio-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accion) 45%, transparent);
}
html body[data-view=lobby] #club-view #club-game-navigation #club-luck-variants[data-suerte-inline-selected] {
  border-radius: 10px;
}
html body[data-view=lobby] #club-view #club-game-navigation #club-luck-variants[data-suerte-inline-selected] button[aria-selected=true] {
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--trio-ink);
}
