/* LAIREN — perfil público: historial por pestañas V4.
   Tablas mantienen exactamente el mismo contenedor; solo una es visible. */
.player-detail-history .player-detail-history-header{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:36px;box-sizing:border-box;
}
.player-detail-history .player-detail-history-header h2{
  flex:0 0 auto;font-size:12px;margin:0;
}
.player-detail-history-tabs{
  display:inline-flex;align-items:center;gap:4px;
  min-width:0;padding:2px;border:1px solid #354a60;
  border-radius:7px;background:#071421;
}
.player-detail-history-tabs button{
  appearance:none;border:1px solid transparent;
  border-radius:5px;background:transparent;color:#a9bfd2;
  padding:5px 12px;min-height:25px;white-space:nowrap;
  font-family:inherit;font-size:10px;font-weight:800;line-height:1.2;
  cursor:pointer;
}
.player-detail-history-tabs button span{
  display:inline-block;min-width:14px;
  margin-left:6px;color:#a8b8ca;font-size:10px;font-weight:700;
}
.player-detail-history-tabs button.is-active,
.player-detail-history-tabs button[aria-selected="true"]{
  color:#efc2ff;background:#311b3d;border-color:#8e58a8;
}
.player-detail-history-tabs button.is-active span,
.player-detail-history-tabs button[aria-selected="true"] span{color:#e3b8f0}
.player-detail-history-tabs button:hover:not(.is-active){background:#13293c}
.player-detail-history-tabs button:focus-visible{
  outline:2px solid #9ed9f8;outline-offset:2px;
}
.player-detail-tab-panel[hidden]{display:none!important}
.player-detail-tab-panel{min-width:0}
.player-match-history-table{width:100%;table-layout:fixed}
.player-match-history-table th:nth-child(1){width:12%}
.player-match-history-table th:nth-child(2){width:27%}
.player-match-history-table th:nth-child(3){width:12%}
.player-match-history-table th:nth-child(4){width:20%}
.player-match-history-table th:nth-child(5){width:20%}
.player-match-history-table th:nth-child(6){width:9%}
.player-match-history-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-match-opponent{font-weight:800;color:#f2f6fb}
.player-match-result{
  display:inline-flex;min-width:27px;min-height:22px;
  justify-content:center;align-items:center;
  border-radius:6px;font-size:12px;font-weight:900;
}
.player-match-result.is-win{color:#48e1a3;background:rgba(60,223,154,.13)}
.player-match-result.is-draw{color:#ffd164;background:rgba(255,207,95,.13)}
.player-match-result.is-loss{color:#ff798b;background:rgba(250,89,118,.13)}
@media(min-width:1181px){
  /* Conservar el alto original: intercambiar panel no mueve la página. */
  .player-detail-page .player-detail-history>header.player-detail-history-header{
    height:36px!important;min-height:36px!important;
    padding:4px 11px!important;
  }
  .player-detail-page .player-detail-history .player-detail-scroll{
    height:clamp(300px,calc(100dvh - 290px),900px)!important;
    max-height:none!important;
    min-height:260px!important;
    overflow-y:auto!important;
  }
  .player-detail-page .player-match-history-table th{padding:5px 10px!important}
  .player-detail-page .player-match-history-table td{padding:5px 10px!important}
}
@media(max-width:700px){
  .player-detail-page .player-detail-history .player-detail-history-header{
    display:flex;flex-direction:column;align-items:stretch;
    padding:10px!important;gap:9px;
    height:auto!important;min-height:0!important;
  }
  .player-detail-history-tabs{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:5px}
  .player-detail-history-tabs button{
    min-width:0;padding:10px 5px;font-size:10px;
  }
  .player-detail-page .player-detail-history .player-detail-scroll{
    height:auto;min-height:0;max-height:480px;
    overflow-y:auto;overflow-x:auto;
  }
  /* Los cruces son fichas en móvil. No hay que deslizar horizontalmente. */
  .player-detail-page .player-match-history-table{display:block;min-width:0!important;width:100%;border-collapse:separate}
  .player-match-history-table thead{display:none}
  .player-match-history-table tbody{display:grid;gap:8px;padding:8px}
  .player-match-history-table tr{
    display:grid;grid-template-columns:minmax(0,1fr) auto;
    gap:5px 12px;padding:11px 12px;
    border:1px solid #2d4a5e;border-radius:8px;
    background:#0b1e2d;
  }
  .player-match-history-table td{
    display:block;border:0!important;padding:0!important;
    height:auto!important;min-width:0;
    font-size:11px!important;line-height:1.3;
    white-space:normal;
  }
  .player-match-history-table td:before{display:none}
  .player-match-history-table td:nth-child(1){grid-column:2;grid-row:1;color:#9fbbd0;text-align:right;white-space:nowrap}
  .player-match-history-table td:nth-child(2){grid-column:1;grid-row:2;font-weight:800}
  .player-match-history-table td:nth-child(3){grid-column:1;grid-row:1;color:#d8b4ee;font-weight:800}
  .player-match-history-table td:nth-child(4){grid-column:1;grid-row:3;font-weight:850;font-size:13px!important}
  .player-match-history-table td:nth-child(4)::before{content:"VS ";display:inline;color:#a0b6c7;font-size:10px}
  .player-match-history-table td:nth-child(5){grid-column:1;grid-row:4;color:#9db3c4;font-size:10px!important}
  .player-match-history-table td:nth-child(6){grid-column:2;grid-row:3/5;align-self:center;justify-self:end}
  .player-match-result{min-width:32px;min-height:29px;font-size:14px}
}
