/* Pestañas de modalidades, carga y estado vacío del catálogo del club. */

/* ── Modalidades: subrayado con indicador deslizante ── */
html body[data-view=lobby] #club-view #club-game-navigation :is(#club-card-variants, #club-domino-variants, #club-luck-variants, #club-fichas-variants).club-secondary-variants {
  position: relative;
  display: flex;
  gap: 0;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--trio-edge);
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow-x: auto;
  scrollbar-width: none;
}
html body[data-view=lobby] #club-view #club-game-navigation :is(#club-card-variants, #club-domino-variants, #club-luck-variants, #club-fichas-variants).club-secondary-variants > button[role=tab]:not([hidden]) {
  flex: 1 1 auto;
  min-height: 44px;
  margin: 0;
  padding: 10px 8px 12px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--trio-muted);
  font: 600 13px/1.2 system-ui, sans-serif;
  text-align: center;
  white-space: nowrap;
}
html body[data-view=lobby] #club-view #club-game-navigation :is(#club-card-variants, #club-domino-variants, #club-luck-variants, #club-fichas-variants).club-secondary-variants > button[role=tab]:not([hidden])[aria-selected=true] {
  color: var(--trio-ink);
  background: none;
  box-shadow: none;
}
html body[data-view=lobby] #club-view #club-game-navigation :is(#club-card-variants, #club-domino-variants, #club-luck-variants, #club-fichas-variants).club-secondary-variants > button[role=tab]:not([hidden]):is(:hover, :focus-visible):not(:disabled) {
  color: var(--trio-ink);
  background: none;
}
html body[data-view=lobby] #club-view #club-game-navigation :is(#club-card-variants, #club-domino-variants, #club-luck-variants, #club-fichas-variants).club-secondary-variants > button[role=tab]:not([hidden]):focus-visible {
  outline: 2px solid var(--accion);
  outline-offset: -2px;
  border-radius: 6px;
}
html body[data-view=lobby] #club-view #club-game-navigation :is(#club-card-variants, #club-domino-variants, #club-luck-variants, #club-fichas-variants).club-secondary-variants > button[role=tab]:not([hidden]):active:not(:disabled) {
  box-shadow: none;
}
.modalidades-indicador {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--accion);
  opacity: 0;
  pointer-events: none;
}

/* ── «Crear mesa» estándar: placa de acento con un signo más ── */
html body[data-view=lobby] #club-view .catalogue-create-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accion);
  color: #fff;
}
html body[data-view=lobby] #club-view .catalogue-create-mark .catalogue-icon { margin: 0; display: grid; place-items: center; }
html body[data-view=lobby] #club-view .catalogue-create-mark svg { color: #fff; }

html body[data-view=lobby] #club-view .bacc-catalogue .catalogue-create[hidden] { display: none; }

/* Creación y filtros antes de las filas. Los estados se presentan debajo. */
#club-view .catalogue-filters[hidden],
:is(#club-view, .diseno-escenario) .catalogue-feedback[hidden] { display: none; }
:is(#club-view, .diseno-escenario) .catalogue-feedback[data-estado=cargando]:not([hidden]) {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 12px;
  text-align: center;
  color: var(--trio-muted);
}
:is(#club-view, .diseno-escenario) .catalogue-feedback > p { margin: 0; }

/* ── Estado vacío: pila de tarjetas (base Kokonut UI) con una forma por tipo ── */
html body[data-view=lobby] #club-view .estado-vacio-mesas,
.diseno-escenario .estado-vacio-mesas {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 18px 14px 20px;
  border: 1px dashed var(--trio-edge);
  border-radius: 16px;
  background: color-mix(in srgb, var(--trio-surface) 70%, transparent);
  text-align: center;
}
.estado-vacio-escena {
  position: relative;
  width: 178px;
  height: 92px;
  margin-bottom: 8px;
}
.estado-vacio-carta {
  position: absolute;
  top: 6px;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--trio-edge);
  background: var(--trio-tint);
  transition: transform 300ms ease-out;
}
.estado-vacio-fondo-izq { left: 14px; width: 84px; height: 66px; transform: rotate(-8deg); }
.estado-vacio-fondo-der { right: 14px; width: 84px; height: 66px; transform: rotate(8deg); }
.estado-vacio-frente {
  left: 50%;
  top: 0;
  width: 92px;
  height: 78px;
  margin-left: -46px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accion) 45%, var(--trio-edge));
  background: var(--trio-surface);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--trio-ink) 8%, transparent);
}
.estado-vacio-mesas:is(:hover, :focus-within) .estado-vacio-fondo-izq { transform: rotate(-12deg) translateX(-4px); }
.estado-vacio-mesas:is(:hover, :focus-within) .estado-vacio-fondo-der { transform: rotate(12deg) translateX(4px); }
.estado-vacio-placa {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accion);
  color: #fff;
}
.estado-vacio-placa svg { width: 15px; height: 15px; }
.estado-vacio-pintas { display: flex; gap: 4px; }
.estado-vacio-pintas i { width: 7px; height: 7px; border-radius: 50%; background: var(--trio-edge); }
.estado-vacio-lineas { display: grid; gap: 5px; }
.estado-vacio-lineas i { height: 5px; border-radius: 3px; background: var(--trio-edge); }
.estado-vacio-lineas i:last-child { width: 55%; }

/* Forma por tipo: cartas (pintas), fichas (pila de discos), dominó (divisor con puntos), ajedrez (cuadrícula). */
.estado-vacio-mesas[data-forma=fichas] .estado-vacio-pintas i { border-radius: 50%; background: var(--accion); box-shadow: 0 0 0 2px var(--trio-surface), 0 0 0 3px color-mix(in srgb, var(--accion) 40%, transparent); }
.estado-vacio-mesas[data-forma=domino] .estado-vacio-frente { justify-content: center; gap: 8px; }
.estado-vacio-mesas[data-forma=domino] .estado-vacio-pintas { display: none; }
.estado-vacio-mesas[data-forma=domino] .estado-vacio-lineas { display: flex; justify-content: space-between; }
.estado-vacio-mesas[data-forma=domino] .estado-vacio-lineas i { width: 26px; height: 26px; border-radius: 6px; background: var(--trio-tint); }
.estado-vacio-mesas[data-forma=domino] .estado-vacio-lineas i:last-child { width: 26px; }
.estado-vacio-mesas[data-forma=ajedrez] .estado-vacio-pintas { display: grid; grid-template-columns: repeat(2, 1fr); width: 36px; gap: 0; }
.estado-vacio-mesas[data-forma=ajedrez] .estado-vacio-pintas i { width: 17px; height: 9px; border-radius: 0; background: var(--trio-tint); }
.estado-vacio-mesas[data-forma=ajedrez] .estado-vacio-pintas i:nth-child(2n) { background: var(--trio-edge); }
.estado-vacio-mesas[data-forma=ajedrez] .estado-vacio-lineas { display: none; }

.estado-vacio-titulo {
  margin: 0;
  color: var(--trio-ink);
  font: 700 16px/1.25 'Trio Bricolage', system-ui, sans-serif;
  letter-spacing: -.02em;
}
.estado-vacio-texto { margin: 2px 0 0; max-width: 30ch; color: var(--trio-muted); font-size: 13px; line-height: 1.45; }
.estado-vacio-acciones { margin-top: 12px; }
.estado-vacio-accion {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--accion) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accion) 12%, var(--trio-surface));
  color: var(--trio-ink);
  font: 650 13px/1 system-ui, sans-serif;
  cursor: pointer;
}
.estado-vacio-accion:is(:hover, :focus-visible) { border-color: var(--accion); }
.estado-vacio-accion:focus-visible { outline: 2px solid var(--accion); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .estado-vacio-carta { transition: none; }
}

/* El recorte del slide pertenece a los juegos. La cabecera queda fuera. */
#club-view[data-deslizando-juego] > .club-juegos { overflow-x: clip; }
