/* ---------- Jugadores: héroe del jugador ----------
   El color del rol (--role-c) marca el subrayado del nombre, la línea bajo la foto y el radar. */
.player-hero-section { position: relative; }
.player-hero-top-row { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .player-hero-top-row { grid-template-columns: 1fr; } }

.player-hero {
  --role-c: var(--pz-chalk-dim);
  position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr);
  min-height: 300px; overflow: hidden;
  background: var(--pz-glass-2); border: 1px solid var(--pz-line-strong); border-radius: var(--pz-radius-lg);
}
.player-hero[data-role="TOP"] { --role-c: var(--pz-top); }
.player-hero[data-role="JUNGLE"] { --role-c: var(--pz-jg); }
.player-hero[data-role="MIDDLE"] { --role-c: var(--pz-mid); }
.player-hero[data-role="BOTTOM"] { --role-c: var(--pz-adc); }
.player-hero[data-role="UTILITY"] { --role-c: var(--pz-sup); }
@media (max-width: 700px) { .player-hero { grid-template-columns: 1fr; min-height: 0; } }

/* splash del campeón más jugado, a la derecha; la rampa de fondo solo asegura que el texto se lea */
.player-hero-splash {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 72% 22%; opacity: 1; transition: opacity .25s ease;
}
/* rampa corta: solo oscurece lo justo a la izquierda para que el texto se lea; el resto es la imagen */
.player-hero-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 24, 29, .94) 0%, rgba(20, 24, 29, .8) 18%, rgba(20, 24, 29, .52) 40%, rgba(20, 24, 29, .16) 60%, transparent 78%); }
.player-hero-watermark { position: absolute; right: 22px; top: 16px; font-weight: 700; font-stretch: 75%; font-size: 30px; color: var(--pz-chalk); opacity: .16; white-space: nowrap; pointer-events: none; z-index: 1; }
@media (max-width: 700px) { .player-hero-watermark { display: none; } }

.player-hero-photo-col { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; min-height: 300px; padding: 0 12px; }
.player-hero-photo-col::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 4px; border-radius: 4px 4px 0 0; background: var(--role-c); }
.player-hero-photo { max-height: 290px; max-width: 100%; object-fit: contain; object-position: bottom; }
@media (max-width: 700px) { .player-hero-photo-col { min-height: 190px; } .player-hero-photo { max-height: 190px; } }

.player-hero-info { position: relative; z-index: 1; text-shadow: 0 1px 10px rgba(0, 0, 0, .55); padding: 30px 30px 26px 8px; max-width: 620px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
@media (max-width: 700px) { .player-hero-info { padding: 12px 20px 22px; } }

.player-hero-name-row { position: relative; display: flex; align-items: center; width: fit-content; max-width: 100%; margin: 0 0 6px; }
.player-hero-name-row::after {
  content: ""; position: absolute; left: -2px; right: 0; bottom: -10px; height: 9px; background: var(--role-c);
  -webkit-mask: var(--pz-stroke-mask) 0 0 / 100% 100% no-repeat; mask: var(--pz-stroke-mask) 0 0 / 100% 100% no-repeat;
}
.player-hero-name-select {
  appearance: none; -webkit-appearance: none; background-color: transparent; border: none; outline: none; box-shadow: none;
  padding: 0 40px 0 0; font: 700 54px/1.05 var(--pz-font); font-stretch: 75%; color: var(--pz-chalk); cursor: pointer; max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5l6.5 6.5 6.5-6.5' fill='none' stroke='%23a3aab1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
}
.player-hero-name-select:hover { color: #fff; }
/* sin recuadro al elegir un jugador: el foco de teclado se ve en el subrayado, no en una caja */
.player-hero-name-select:focus, .player-hero-name-select:focus-visible { outline: none; border: none; box-shadow: none; }
.player-hero-name-row:has(.player-hero-name-select:focus-visible)::after { background: var(--pz-chalk); }
.player-hero-name-select option { background: var(--pz-glass-2); color: var(--pz-chalk); font: 400 15px var(--pz-font); }
.player-hero-name-select optgroup { background: var(--pz-glass); color: var(--pz-chalk-dim); font: 700 13px var(--pz-font); font-style: normal; }
.player-hero-crown { display: none; }

.player-hero-meta { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.player-hero-role { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--role-c); }
.player-hero-role::before { content: ""; width: 11px; height: 11px; border-radius: 3px; background: var(--role-c); }
.player-hero-flag { line-height: 1; display: inline-flex; }
.player-hero-flag img { width: 24px; height: 17px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(236, 234, 228, .25); vertical-align: middle; }

.player-hero-tagline { font-size: 13px; color: var(--pz-chalk-dim); margin: 0; }
.player-hero-desc { font-size: 17px; color: var(--pz-chalk); line-height: 1.45; margin: 0; max-width: 46ch; }

.player-hero-pocket-picks { margin-top: 8px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.player-hero-pocket-picks .pocket-picks-label { font-size: 14px; font-weight: 700; color: var(--pz-chalk-dim); white-space: nowrap; }
.pocket-picks-icons { display: flex; gap: 10px; }
.pocket-pick-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pocket-pick-item .champ-icon-wrap { width: 40px; height: 40px; }
.pocket-pick-item .pocket-pick-wr { font-size: 13px; font-weight: 700; }

/* radar */
.player-radar-card { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 10px; }
.player-radar-card .chart-title { font-size: 20px; font-weight: 700; font-stretch: 75%; color: var(--pz-chalk); text-align: left; }
.player-radar-wrap { position: relative; height: 240px; width: 100%; }

/* ---------- KDA promedio (desglose + ratio) ---------- */
.kda-breakdown-row { display: flex; align-items: baseline; gap: 5px; }
.kda-breakdown-row .kda-num { font-size: 32px; font-weight: 700; font-stretch: 75%; line-height: 1.1; }
.kda-breakdown-row .kda-sep { color: var(--pz-chalk-faint); font-size: 22px; }
.kda-ratio-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.kda-ratio-badge { font-size: 13px; font-weight: 700; padding: 3px 10px; color: var(--pz-chalk); border: 1px solid var(--pz-line-strong); border-radius: 6px; }
.kda-ratio-label { font-size: 13px; color: var(--pz-chalk-dim); }
.kda-breakdown-row-sm { margin-bottom: 4px; }
.kda-breakdown-row-sm .kda-num { font-size: 15px; font-stretch: 100%; }
.kda-breakdown-row-sm .kda-sep { font-size: 13px; }
.kda-ratio-badge-sm { font-size: 12px; padding: 1px 8px; display: inline-block; }

/* ---------- tabla de campeones (Jugadores / Insights) ---------- */
.champ-table-wrap { overflow-x: auto; }
.champ-table-toolbar { display: flex; justify-content: flex-end; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--pz-line-strong); }
.champ-table-search {
  background: var(--pz-glass); color: var(--pz-chalk);
  border: 1px solid var(--pz-line-strong); border-radius: var(--pz-radius);
  padding: 9px 12px; font: 400 14px/1.3 var(--pz-font); width: 100%; max-width: 240px;
  transition: border-color .15s ease;
}
.champ-table-search::placeholder { color: var(--pz-chalk-faint); }
.champ-table-search:hover { border-color: var(--pz-chalk-faint); }
.champ-table-search:focus { outline: none; border-color: var(--pz-focus); box-shadow: 0 0 0 1px var(--pz-focus); }
table.champ-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.champ-table thead th { text-align: left; color: var(--pz-chalk-dim); font-weight: 600; font-size: 13px; padding: 12px 16px; border-bottom: 1px solid var(--pz-line-strong); }
table.champ-table tbody td { padding: 10px 16px; border-bottom: 1px solid var(--pz-line); vertical-align: middle; }
table.champ-table tbody tr:last-child td { border-bottom: 0; }
table.champ-table tbody tr:hover { background: var(--pz-glass-3); }
table.champ-table .champ-name-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.winrate-bar { display: inline-block; width: 70px; height: 6px; background: var(--pz-glass-3); border-radius: 3px; position: relative; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.winrate-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pz-jg); border-radius: 3px; }

/* ---------- Rendimiento por Campeón: 5 columnas por rol, con jugadores ---------- */
.role-columns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1180px) { .role-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .role-columns { grid-template-columns: 1fr; } }

.role-col { --role-c: var(--pz-chalk-dim); padding: 18px 16px 12px; border-left: 1px solid var(--pz-line-strong); min-width: 0; }
.role-col:first-child { border-left: 0; }
.role-col[data-role="TOP"] { --role-c: var(--pz-top); }
.role-col[data-role="JUNGLE"] { --role-c: var(--pz-jg); }
.role-col[data-role="MIDDLE"] { --role-c: var(--pz-mid); }
.role-col[data-role="BOTTOM"] { --role-c: var(--pz-adc); }
.role-col[data-role="UTILITY"] { --role-c: var(--pz-sup); }
@media (max-width: 1180px) { .role-col:nth-child(3n+1) { border-left: 0; } }
@media (max-width: 760px) { .role-col { border-left: 0; border-top: 1px solid var(--pz-line-strong); } .role-col:first-child { border-top: 0; } }

.role-col .role-col-title { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 700; font-stretch: 75%; color: var(--role-c); margin-bottom: 10px; }
.role-col .role-col-title::before { content: ""; width: 11px; height: 11px; border-radius: 3px; background: var(--role-c); flex: none; }
.role-pos-icon { width: 16px; height: 16px; filter: brightness(0) invert(1); opacity: 0.8; }

/* jugadores de la columna */
.pool-players { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pool-player-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  font: 600 13px/1 var(--pz-font); color: var(--pz-chalk-dim);
  background: transparent; border: 1px solid var(--pz-line-strong); border-radius: 999px; padding: 7px 12px; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pool-player-chip small { font-size: 11.5px; font-weight: 500; color: var(--pz-chalk-faint); }
.pool-player-chip:hover { color: var(--pz-chalk); border-color: var(--pz-chalk-faint); }
.pool-player-chip.active { background: var(--pz-chalk); border-color: var(--pz-chalk); color: var(--pz-glass); }
.pool-player-chip.active small { color: #4a525a; }
.pool-player-one { font-size: 15px; font-weight: 600; color: var(--pz-chalk); display: inline-flex; align-items: baseline; gap: 8px; }
.pool-player-one small { font-size: 12.5px; font-weight: 500; color: var(--pz-chalk-dim); }

.role-champ-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 9px 2px; border-bottom: 1px solid var(--pz-line); font-size: 14px; }
.role-champ-row.is-dim { opacity: .35; }
.role-champ-row .role-champ-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.role-champ-row .role-champ-n { color: var(--pz-chalk-dim); width: 24px; text-align: right; }
.role-champ-row .role-champ-w { color: var(--pz-chalk-dim); width: 24px; text-align: right; }
.role-champ-row .role-champ-pct { width: 46px; text-align: right; font-weight: 700; }
.role-champ-row .role-champ-pill { width: auto; padding: 2px 8px; border: 1px solid transparent; border-radius: 999px; text-align: center; font-size: 13px; }
.role-champ-who { flex: 1 1 100%; padding-left: 40px; font-size: 13px; color: var(--pz-chalk-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-champ-who b { color: var(--pz-chalk); font-weight: 700; }
.role-champ-bar { flex: 1 1 100%; height: 4px; background: var(--pz-glass-3); border-radius: 2px; position: relative; overflow: hidden; margin-top: 2px; }
.role-champ-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.role-col-empty { color: var(--pz-chalk-dim); font-size: 14px; padding: 14px 2px; }

.role-legend { color: var(--pz-chalk-dim); font-size: 13px; font-weight: 600; padding: 0 2px 8px; border-bottom: 1px solid var(--pz-line-strong); }
.role-legend .role-legend-spacer { flex: 1; }
.role-legend .role-champ-n, .role-legend .role-champ-w, .role-legend .role-champ-pct { color: var(--pz-chalk-dim); font-weight: 600; }
.sortable-mini { cursor: pointer; user-select: none; }
.sortable-mini:hover { color: var(--pz-chalk); }
.sortable-mini.sort-active { color: var(--pz-adc); }
.sortable-mini .sort-arrow { display: inline-block; width: 8px; font-size: 8px; margin-left: 2px; }
.role-champ-row.role-champ-highlight { background: rgba(255, 211, 77, 0.08); border-radius: 6px; }

/* ---------- iconos de campeón con respaldo ---------- */
.champ-icon-wrap { position: relative; width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid var(--pz-line-strong); border-radius: 8px; background: var(--pz-glass); overflow: hidden; }
.champ-icon-wrap.lg { width: 36px; height: 36px; }
.champ-icon { width: 100%; height: 100%; object-fit: cover; display: block; }
.champ-icon.broken { display: none; }
.champ-fallback { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--pz-chalk-faint); }
.champ-icon.broken + .champ-fallback { display: flex; }

/* alinea las columnas del pool aunque unas tengan selector de jugadores y otras solo el nombre */
.pool-players { min-height: 34px; align-items: center; }
#tab-champs .filter-bar .filter-field { flex: 0 1 380px; }

/* separación entre los paneles apilados de Jugadores */
#tab-players .panel + .panel { margin-top: 16px; }
