/* =========================================================
   DATOS · PLAYER DETAIL · HISTÓRICO
   ========================================================= */

#datos-page .datos-player-history-card {
  position: relative;

  width: 100%;
  min-width: 0;

  margin-top: 18px;
  padding: 14px;

  box-sizing: border-box;

  border-radius: 18px;

  background:
    linear-gradient(
      180deg,
      var(--datos-player-history-soft, rgba(255,255,255,.055)) 0%,
      rgba(255,255,255,.025) 100%
    );

  border: 1px solid
    color-mix(
      in srgb,
      var(--datos-player-history-accent, rgba(255,255,255,.35)) 24%,
      rgba(255,255,255,.10)
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.045),
    0 12px 28px rgba(0,0,0,.16);

  overflow: hidden;
}

#datos-page .datos-player-history-card::before {
  content: "";

  position: absolute;
  inset: 0 0 auto 0;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.25),
      transparent
    );

  pointer-events: none;
}

#datos-page .datos-player-history-header {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 12px;

  min-width: 0;
}

#datos-page .datos-player-history-title-block {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 4px;
}

#datos-page .datos-player-history-title {
  color: white;

  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
}

#datos-page .datos-player-history-subtitle {
  color: rgba(255,255,255,.62);

  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

#datos-page .datos-player-history-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;

  flex: 0 0 auto;
}

#datos-page .datos-player-history-pill {
  min-height: 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 10px;

  border-radius: 999px;

  color: rgba(255,255,255,.86);

  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;

  background: rgba(255,255,255,.060);
  border: 1px solid rgba(255,255,255,.12);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    0 5px 12px rgba(0,0,0,.12);
}

#datos-page .datos-player-history-pill.is-count {
  color: rgba(220,252,231,.98);

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(34,197,94,.22),
      rgba(22,163,74,.08)
    );

  border-color: rgba(34,197,94,.26);
}

#datos-page .datos-player-history-grid-wrap {
  position: relative;
  z-index: 1;

  width: 100%;
  min-width: 0;
}

#datos-page .datos-player-history-grid,
#datos-page .datos-player-history-grid .ag-root-wrapper,
#datos-page .datos-player-history-grid .ag-root {
  width: 100% !important;
}

#datos-page .datos-player-history-grid .ag-root-wrapper {
  border-radius: 14px;

  overflow: hidden;

  border: 1px solid rgba(255,255,255,.09);

  background: rgba(0,0,0,.16);
}

#datos-page .datos-player-history-grid .ag-header {
  background: rgba(255,255,255,.045) !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

#datos-page .datos-player-history-grid .ag-header-cell-label {
  color: rgba(255,255,255,.78);

  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .25px;
}

#datos-page .datos-player-history-grid .ag-row {
  background: rgba(255,255,255,.018) !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}

#datos-page .datos-player-history-grid .ag-row:hover {
  background:
    color-mix(
      in srgb,
      var(--datos-player-history-accent, rgba(255,255,255,.35)) 10%,
      rgba(255,255,255,.045)
    ) !important;
}

#datos-page .datos-player-history-cell {
  color: rgba(255,255,255,.78);

  font-size: 11px;
  font-weight: 650;
}

#datos-page .datos-player-history-empty {
  position: relative;
  z-index: 1;

  padding: 14px 16px;

  border-radius: 14px;

  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
}

#datos-page .datos-player-history-empty-title {
  color: rgba(255,255,255,.78);

  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

#datos-page .datos-player-history-path {
  margin-top: 10px;

  color: rgba(255,255,255,.36);

  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;

  word-break: break-all;
}


/* =========================================================
   DATOS · PLAYER HEADER · TABS
   ========================================================= */

#datos-page .datos-player-detail-header-main-row {
  width: 100%;
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#datos-page .datos-player-detail-header-left {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 14px;

  flex: 1 1 auto;
}

#datos-page .datos-player-header-tabs-inline {
  flex: 0 1 auto;
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;

  margin-left: auto;
}

/* Navbar negro tipo tabs de ligas/equipos */
#datos-page .datos-player-header-tabs {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;

  padding: 5px;

  border-radius: 999px;

  background:
    linear-gradient(
      180deg,
      rgba(9, 12, 20, .98) 0%,
      rgba(3, 5, 10, .94) 100%
    );

  border: 1px solid rgba(255,255,255,.10);

  box-shadow:
    0 14px 32px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.08);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Botones de tabs dentro del navbar de jugador */
#datos-page .datos-player-header-tabs .navpill-btn-datos-league {
  appearance: none;
  -webkit-appearance: none;

  min-height: 32px;
  padding: 0 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1px solid transparent;

  background: transparent;
  color: rgba(255,255,255,.66);

  font-size: 12px;
  font-weight: 850;
  line-height: 1;

  white-space: nowrap;

  cursor: pointer;

  transition:
    color .16s ease,
    background .16s ease,
    border-color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

#datos-page .datos-player-header-tabs .navpill-btn-datos-league:hover {
  color: white;

  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.12);
}

/* Tab activa con acento de la categoría */
#datos-page .datos-player-header-tabs .navpill-btn-datos-league.is-active {
  color: white;

  background:
    radial-gradient(
      circle at 25% 15%,
      color-mix(
        in srgb,
        var(--datos-league-accent, var(--datos-player-detail-accent, rgba(255,255,255,.45))) 28%,
        rgba(255,255,255,.10)
      ),
      rgba(255,255,255,.08)
    );

  border-color:
    color-mix(
      in srgb,
      var(--datos-league-accent, var(--datos-player-detail-accent, rgba(255,255,255,.45))) 46%,
      rgba(255,255,255,.16)
    );

  box-shadow:
    0 0 0 1px
      color-mix(
        in srgb,
        var(--datos-league-accent, var(--datos-player-detail-accent, rgba(255,255,255,.45))) 26%,
        transparent
      ),
    inset 0 1px 0 rgba(255,255,255,.12);
}

/* Tab Jugador vacía por ahora */
#datos-page .datos-player-detail-body-card.is-empty {
  min-height: 220px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.035) 0%,
      rgba(255,255,255,.018) 100%
    );

  border-style: dashed;
}


/* =========================================================
   DATOS · PLAYER DETAIL · RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  #datos-page .datos-player-detail-header-main-row {
    align-items: flex-start;
    flex-direction: column;
  }

  #datos-page .datos-player-header-tabs-inline {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  #datos-page .datos-player-header-tabs {
    width: auto;
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  #datos-page .datos-player-header-tabs-inline {
    align-items: stretch;
    flex-direction: column;
  }

  #datos-page .datos-player-header-selector {
    width: 100%;
    min-width: 0;
  }

  #datos-page .datos-player-header-tabs {
    width: 100%;
  }
}

@media (max-width: 760px) {
  #datos-page .datos-player-history-header {
    flex-direction: column;
    align-items: stretch;
  }

  #datos-page .datos-player-history-pills {
    justify-content: flex-start;
  }

  #datos-page .datos-player-history-grid {
    height: 320px !important;
  }
}
