/* RT Platform 13.9.1 · Miembros (directorio y pestaña Amigos del perfil). Un único contrato para las tres vistas.
   Ficha limpia: avatar con nivel, nombre, una línea de estado, amistad + «Ver perfil» y una fila «Jugar» con tres
   accesos iguales (Truco, Ajedrez, Mi Mundo). BuddyPress conserva búsqueda, filtros, paginación y la amistad. */
#buddypress ul#members-list.rtp-members-grid{display:grid!important;gap:14px!important;list-style:none!important;padding:0!important;margin:0!important;align-items:stretch!important}
#buddypress ul#members-list.rtp-members-grid::before,#buddypress ul#members-list.rtp-members-grid::after{content:none!important;display:none!important}
/* El <li> no dibuja nada: antes la regla de la pestaña Amigos lo convertía en una grilla de 3 columnas con borde y
   dejaba una "caja vacía" a la derecha de cada amigo. */
#buddypress ul#members-list.rtp-members-grid>li.rtp-member-card{display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;float:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;grid-column:auto!important}
#buddypress ul#members-list .rtp-member-card-inner{position:relative!important;display:grid!important;min-width:0!important;height:100%;margin:0!important;padding:0!important;overflow:hidden!important;border:1px solid var(--rtp-line)!important;border-radius:18px!important;background:var(--rtp-surface)!important;box-shadow:0 6px 18px rgba(13,18,38,.05)!important;box-sizing:border-box!important;text-align:left!important;min-height:0!important}

/* Piezas comunes */
#buddypress ul#members-list .rtp-member-cover{grid-area:cover;display:block!important;justify-self:stretch!important;width:auto!important;height:56px!important;margin:0!important;background:linear-gradient(120deg,color-mix(in srgb,var(--rtp-primary) 70%,#2a1f63),color-mix(in srgb,var(--rtp-primary-2,#5ad0c3) 60%,#18324a))!important;background-size:cover!important;background-position:center!important}
#buddypress ul#members-list .rtp-member-avatar{grid-area:avatar;position:relative!important;display:block!important;width:72px!important;height:72px!important;min-width:0!important;margin:0!important;inset:auto!important;transform:none!important;box-shadow:none!important}
#buddypress ul#members-list .rtp-member-avatar-ring{display:block!important;width:100%!important;height:100%!important;padding:3px!important;border-radius:50%!important;background:conic-gradient(var(--rtp-primary) var(--rtp-progress,0%),var(--rtp-line) 0)!important;box-sizing:border-box!important;overflow:hidden!important}
#buddypress ul#members-list .rtp-member-avatar-ring img{width:100%!important;height:100%!important;border-radius:50%!important;object-fit:cover!important;border:2px solid var(--rtp-surface)!important;box-sizing:border-box!important;margin:0!important}
#buddypress ul#members-list .rtp-member-rank-number{position:absolute!important;right:-3px!important;bottom:-1px!important;min-width:24px!important;height:24px!important;padding:0 5px!important;display:grid!important;place-items:center!important;border:2px solid var(--rtp-surface)!important;border-radius:999px!important;background:var(--rtp-primary)!important;color:#fff!important;font-size:11px!important;font-weight:900!important;line-height:1!important;transform:none!important}
#buddypress ul#members-list .rtp-member-id{grid-area:id;display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important;margin:0!important}
#buddypress ul#members-list .rtp-member-name{display:block!important;align-self:stretch!important;grid-column:auto!important;font-size:16px!important;font-weight:850!important;line-height:1.25!important;color:var(--rtp-text)!important;text-decoration:none!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#buddypress ul#members-list .rtp-member-sub{display:block!important;align-self:stretch!important;grid-column:auto!important;font-size:12.5px!important;line-height:1.35!important;color:var(--rtp-muted)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#buddypress ul#members-list .rtp-member-sub *{display:inline!important;font:inherit!important;color:inherit!important}
#buddypress ul#members-list .rtp-member-social{grid-area:social;display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;margin:0!important}
#buddypress ul#members-list .rtp-member-bp-buttons{display:flex!important;flex:1 1 0!important;gap:8px!important;min-width:0!important;margin:0!important;padding:0!important;position:static!important}
#buddypress ul#members-list .rtp-member-bp-buttons :is(.generic-button,li){display:contents!important}
#buddypress ul#members-list .rtp-member-bp-buttons :empty:not(img){display:none!important}
#buddypress ul#members-list .rtp-member-social :is(.rtp-member-bp-buttons a,.rtp-member-bp-buttons button,.rtp-member-view){display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:1 1 0!important;min-width:0!important;min-height:40px!important;height:auto!important;margin:0!important;padding:6px 12px!important;border-radius:12px!important;font-size:13px!important;font-weight:800!important;line-height:1.2!important;text-decoration:none!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important;box-sizing:border-box!important}
/* Amistad: primaria para "Añadir"; secundaria para "Cancelar amistad" o solicitud pendiente. */
#buddypress ul#members-list .rtp-member-bp-buttons :is(a,button){border:0!important;background:linear-gradient(135deg,var(--rtp-primary),var(--rtp-primary-2,var(--rtp-primary)))!important;color:#fff!important}
#buddypress ul#members-list .rtp-member-bp-buttons :is(a,button):is(.is_friend,.remove,.pending,.awaiting_response,.requested,.reject){border:1px solid var(--rtp-line)!important;background:var(--rtp-surface-2)!important;color:var(--rtp-text)!important}
#buddypress ul#members-list .rtp-member-bp-buttons .bp-screen-reader-text{position:static!important;clip:auto!important;clip-path:none!important;width:auto!important;height:auto!important;margin:0!important;overflow:visible!important}
#buddypress ul#members-list .rtp-member-view{border:1px solid var(--rtp-line)!important;background:transparent!important;color:var(--rtp-text)!important}
/* Jugar: tres accesos iguales, dorados como en el perfil. */
#buddypress ul#members-list .rtp-member-games{grid-area:games;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;min-width:0!important;margin:0!important}
#buddypress ul#members-list .rtp-game-chip{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-width:0!important;min-height:38px!important;margin:0!important;padding:4px 8px!important;border:1px solid color-mix(in srgb,var(--rtp-gold,#d4a843) 45%,var(--rtp-line))!important;border-radius:11px!important;background:color-mix(in srgb,var(--rtp-gold,#d4a843) 7%,var(--rtp-surface))!important;color:var(--rtp-text)!important;font:inherit!important;font-size:12.5px!important;font-weight:800!important;line-height:1!important;text-decoration:none!important;cursor:pointer;box-shadow:none!important;white-space:nowrap!important;overflow:hidden!important}
#buddypress ul#members-list .rtp-game-chip span{font-size:15px!important;line-height:1!important}
#buddypress ul#members-list .rtp-game-chip b{font-weight:800!important;overflow:hidden!important;text-overflow:ellipsis!important}
#buddypress ul#members-list .rtp-game-chip:is(:hover,:focus-visible){border-color:var(--rtp-gold,#d4a843)!important;background:color-mix(in srgb,var(--rtp-gold,#d4a843) 16%,var(--rtp-surface))!important}
#buddypress ul#members-list .rtp-game-chip.is-sent{border-color:var(--rtp-success,#1f9d6b)!important;background:color-mix(in srgb,var(--rtp-success,#1f9d6b) 12%,var(--rtp-surface))!important}
#buddypress ul#members-list .rtp-game-chip[disabled]{opacity:.7;cursor:default}

/* ===== TARJETAS (por defecto) ===== */
#buddypress ul#members-list.rtp-members-grid.is-cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))!important}
#buddypress ul#members-list.is-cards .rtp-member-card-inner{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"cover" "avatar" "id" "social" "games"!important;justify-items:center!important;row-gap:10px!important;padding-bottom:14px!important}
#buddypress ul#members-list.is-cards .rtp-member-avatar{margin-top:-46px!important;width:80px!important;height:80px!important}
#buddypress ul#members-list.is-cards .rtp-member-id{align-items:center!important;text-align:center!important;width:100%!important;padding:0 14px!important;box-sizing:border-box!important}
#buddypress ul#members-list.is-cards :is(.rtp-member-social,.rtp-member-games){width:100%!important;padding:0 14px!important;box-sizing:border-box!important}
#buddypress ul#members-list.is-cards .rtp-member-games{padding-top:10px!important;border-top:1px solid var(--rtp-line)!important}

/* ===== COMPACTA: fila con avatar, nombre y amistad (ícono); debajo los tres juegos ===== */
#buddypress ul#members-list.rtp-members-grid.is-compact{grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr))!important;gap:10px!important}
#buddypress ul#members-list.is-compact .rtp-member-card-inner{grid-template-columns:52px minmax(0,1fr) auto!important;grid-template-areas:"avatar id social" "games games games"!important;align-items:center!important;gap:10px 12px!important;padding:12px!important}
#buddypress ul#members-list.is-compact .rtp-member-cover,#buddypress ul#members-list.is-compact .rtp-member-social .rtp-member-view{display:none!important}
#buddypress ul#members-list.is-compact .rtp-member-avatar{width:52px!important;height:52px!important}
#buddypress ul#members-list.is-compact .rtp-member-rank-number{min-width:20px!important;height:20px!important;font-size:10px!important}
#buddypress ul#members-list.is-compact .rtp-game-chip{min-height:34px!important}

/* Compacta y Lista: la amistad es un botón redondo con ícono. El texto de BuddyPress sigue en el botón
   (lo leen los lectores de pantalla) y el estado se distingue por ícono y color. */
#buddypress ul#members-list:is(.is-compact,.is-list) .rtp-member-social{flex:none!important}
#buddypress ul#members-list:is(.is-compact,.is-list) .rtp-member-bp-buttons{flex:none!important}
#buddypress ul#members-list:is(.is-compact,.is-list) .rtp-member-social .rtp-member-bp-buttons .friendship-button{flex:none!important;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border-radius:50%!important;font-size:0!important;line-height:0!important}
#buddypress ul#members-list:is(.is-compact,.is-list) .rtp-member-social .rtp-member-bp-buttons .friendship-button::before{content:"＋";font-size:20px;line-height:1;font-weight:900}
#buddypress ul#members-list:is(.is-compact,.is-list) .rtp-member-social .rtp-member-bp-buttons .friendship-button:is(.is_friend,.remove)::before{content:"✓";color:var(--rtp-success,#1f9d6b)}
#buddypress ul#members-list:is(.is-compact,.is-list) .rtp-member-social .rtp-member-bp-buttons .friendship-button:is(.pending,.pending_friend,.requested,.awaiting_response)::before{content:"⌛";font-size:16px}
#buddypress ul#members-list:is(.is-compact,.is-list) .rtp-member-social .rtp-member-bp-buttons .bp-screen-reader-text{position:absolute!important;clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;overflow:hidden!important}

/* ===== LISTA: una línea por persona; juegos solo con ícono ===== */
#buddypress ul#members-list.rtp-members-grid.is-list{grid-template-columns:minmax(0,1fr)!important;gap:0!important;border:1px solid var(--rtp-line)!important;border-radius:16px!important;overflow:hidden!important;background:var(--rtp-surface)!important}
#buddypress ul#members-list.is-list>li.rtp-member-card+li.rtp-member-card{border-top:1px solid var(--rtp-line)!important}
#buddypress ul#members-list.is-list .rtp-member-card-inner{grid-template-columns:40px minmax(0,1fr) auto auto!important;grid-template-areas:"avatar id games social"!important;align-items:center!important;gap:10px!important;padding:8px 12px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}
#buddypress ul#members-list.is-list .rtp-member-cover,#buddypress ul#members-list.is-list .rtp-member-social .rtp-member-view,#buddypress ul#members-list.is-list .rtp-member-last{display:none!important}
#buddypress ul#members-list.is-list .rtp-member-avatar{width:40px!important;height:40px!important}
#buddypress ul#members-list.is-list .rtp-member-avatar-ring{padding:2px!important}
#buddypress ul#members-list.is-list .rtp-member-rank-number{min-width:17px!important;height:17px!important;padding:0 3px!important;font-size:9px!important;border-width:1.5px!important}
#buddypress ul#members-list.is-list .rtp-member-name{font-size:14.5px!important}
#buddypress ul#members-list.is-list .rtp-member-sub{font-size:12px!important}
#buddypress ul#members-list.is-list .rtp-member-games{display:flex!important;justify-content:flex-end!important;gap:4px!important;min-width:110px!important}
#buddypress ul#members-list.is-list .rtp-game-chip{width:34px!important;min-height:34px!important;height:34px!important;padding:0!important;border-radius:50%!important}
#buddypress ul#members-list.is-list .rtp-game-chip b{display:none!important}
#buddypress ul#members-list.is-list .rtp-member-social .rtp-member-bp-buttons .friendship-button{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important}
@media(max-width:380px){
  #buddypress ul#members-list .rtp-game-chip{font-size:11.5px!important;gap:4px!important}
  #buddypress ul#members-list.is-list .rtp-member-games{gap:2px!important}
  #buddypress ul#members-list.is-list .rtp-game-chip{width:30px!important;height:30px!important;min-height:30px!important}
}

/* Barra de vistas */
.rtp-community-viewbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.rtp-community-viewbuttons{display:inline-flex;gap:4px;padding:3px;border:1px solid var(--rtp-line);border-radius:12px;background:var(--rtp-surface)}
.rtp-community-viewbuttons button{min-height:36px;padding:0 10px;border:0;border-radius:9px;background:transparent;color:var(--rtp-muted);font-weight:800;font-size:12.5px;cursor:pointer}
.rtp-community-viewbuttons button[aria-pressed="true"]{background:var(--rtp-primary);color:#fff}
