/* ASCENSOS · Ficha de equipo (ficha-equipo.js) y extras de la lista de equipos */

/* Lista: nombre clicable, medallas y portales */
.asc-eq-fila button.e-nom { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.asc-eq-fila button.e-nom:hover b, .asc-eq-fila button.e-nom:focus-visible b { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.asc-eq-fila button.e-nom:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.e-nom small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.e-meds { display: inline-flex; gap: 4px; }
.e-med { display: inline-flex; align-items: center; gap: 3px; padding: 0 5px; border-radius: 8px; background: rgba(255, 255, 255, .06); font: 800 .62rem/16px var(--font-body); }
.e-med i { font-size: .6rem; }
.e-med-leyenda_mes { color: #B6FF00; } .e-med-top1 { color: #FFD54A; } .e-med-top2 { color: #CFD8DC; } .e-med-top3 { color: #E0A36B; }
.ev-sep { width: 1px; height: 22px; margin: 0 2px; background: rgba(var(--primary-rgb), .3); align-self: center; }
.ev-ico.ev-portal { border-radius: 6px; }

/* Ranking: cada equipo en su tarjeta, puesto destacado y total en píldora.
   El prefijo .asc-equipos gana a style.css e inicio.css sin depender del orden de carga. */
.asc-equipos .asc-rank-tit { align-items: center; margin: 22px 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(var(--primary-rgb), .1); }
.asc-equipos .asc-rank-tit:first-child { margin-top: 4px; }
.asc-equipos .asc-eq-cab { padding: 6px 15px 10px; border-bottom: 0; color: var(--gray); }
.asc-equipos .asc-eq-fila { margin-bottom: 8px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; background: rgba(255, 255, 255, .025); transition: border-color .16s ease, background-color .16s ease; }
.asc-equipos .asc-eq-fila:hover { border-color: rgba(var(--primary-rgb), .35); background-color: rgba(var(--primary-rgb), .05); }
.asc-equipos .asc-eq-fila.top1 { --puesto: #FFD54A; } .asc-equipos .asc-eq-fila.top2 { --puesto: #CFD8DC; } .asc-equipos .asc-eq-fila.top3 { --puesto: #E0A36B; }
.asc-equipos .asc-eq-fila:is(.top1, .top2, .top3) { border-color: color-mix(in srgb, var(--puesto) 38%, transparent); background: linear-gradient(100deg, color-mix(in srgb, var(--puesto) 14%, #121416), #121416 62%); }
.asc-equipos .asc-eq-fila .e-pos { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, .06); font: 800 .82rem var(--font-body); font-variant-numeric: tabular-nums; }
.asc-equipos .asc-eq-fila:is(.top1, .top2, .top3) .e-pos { color: #0b0c0e; background: var(--puesto); }
.asc-equipos .asc-eq-fila:is(.top1, .top2, .top3) .e-pos i { color: #0b0c0e !important; }
.asc-equipos .asc-eq-fila .e-nom b { font-size: .98rem; line-height: 1.35; }
.asc-equipos .asc-eq-fila .e-asc.cero { visibility: hidden; }
.asc-equipos .asc-eq-fila .e-tot { justify-self: end; padding: 5px 11px; border-radius: 999px; background: rgba(var(--primary-rgb), .13); font: 700 1rem var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.asc-equipos .asc-eq-fila .e-tot::after { content: ' pts'; color: var(--gray); font: 500 .68rem var(--font-body); }
.asc-equipos .asc-eq-fila .e-evs { gap: 8px; align-items: center; }
@media (max-width: 640px) {
  .asc-equipos .asc-eq-fila { grid-template-columns: 30px minmax(0, 1fr) auto auto; column-gap: 12px; row-gap: 0; padding: 12px; }
  .asc-equipos .asc-eq-fila .e-pos { align-self: start; }
  /* Sin ascensos no se reserva su columna, y el nombre largo baja de línea en vez de cortarse. */
  .asc-equipos .asc-eq-fila .e-asc.cero { display: none; }
  .asc-equipos .asc-eq-fila .e-nom b { white-space: normal; overflow-wrap: anywhere; }
  .asc-equipos .asc-eq-fila .e-evs { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .06); }
}

/* Ficha */
.asc-ficha { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid rgba(182, 255, 0, .35); border-radius: 6px; color: #f2f2f2; background: #0b0d0b; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); font-family: 'Inter', var(--font-body, sans-serif); }
.asc-ficha::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
.asc-ficha[open] { animation: af-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes af-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .asc-ficha[open] { animation: none; } }
.af-cerrar { position: sticky; top: 10px; float: right; z-index: 2; width: 36px; height: 36px; margin: 10px 10px 0 0; border: 1px solid rgba(255, 255, 255, .15); border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .6); cursor: pointer; }
.af-cerrar:hover { border-color: #B6FF00; color: #B6FF00; }
.af-cuerpo { padding: 22px 22px 24px; }
.af-cab { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.af-logo { flex: 0 0 76px; display: grid; place-items: center; width: 76px; height: 76px; overflow: hidden; border: 2px solid #B6FF00; border-radius: 50%; color: #B6FF00; background: #141814; font: 700 2rem 'Space Grotesk', sans-serif; }
.af-logo img { width: 100%; height: 100%; object-fit: cover; }
.af-tit { min-width: 0; }
.af-eyebrow { margin: 0 0 2px; color: #B6FF00; font: 600 .68rem 'Space Grotesk', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.af-tit h2 { margin: 0; overflow-wrap: anywhere; font: 700 1.5rem/1.15 'Space Grotesk', sans-serif; }
.af-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 0; font-size: .85rem; color: #b5b5b5; }
.af-meta a { color: #fff; text-decoration: none; } .af-meta a:hover { color: #B6FF00; }
.af-tag { padding: 0 6px; border: 1px solid rgba(182, 255, 0, .4); border-radius: 3px; color: #B6FF00; font-weight: 700; }
.af-sin { opacity: .6; }
.af-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.af-stats div { padding: 10px 6px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 4px; background: #111411; text-align: center; }
.af-stats b { display: block; color: #B6FF00; font: 700 1.3rem 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; }
.af-stats small { color: #9a9a9a; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
/* Las hojas de la página dan mucho aire a cada section; dentro de la ficha no. */
.asc-ficha section { min-height: 0; margin: 0; padding: 0; }
.asc-ficha section + section { margin-top: 18px; }
.asc-ficha h3 { margin: 0 0 10px; color: #fff; font: 700 .85rem 'Space Grotesk', sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.asc-ficha h3 i { color: #B6FF00; margin-right: 6px; }
.af-vacio { margin: 0; color: #8f8f8f; font-size: .85rem; }
.af-meds, .af-ligas, .af-portales { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.af-meds { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.af-med { --med: #B6FF00; display: flex; flex-direction: column; align-items: center; padding: 14px 8px 12px; border: 1px solid color-mix(in srgb, var(--med) 28%, transparent); border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--med) 9%, #111411), #111411 70%); text-align: center; }
.af-med-top1 { --med: #FFD54A; } .af-med-top2 { --med: #CFD8DC; } .af-med-top3 { --med: #E0A36B; }
.af-med-per { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: auto; padding-top: 8px; }
.af-med-per:empty { display: none; }
.af-med-per small { width: 100%; }
.af-med-per span { padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--med) 40%, transparent); border-radius: 999px; color: var(--med); font: 600 .72rem/1.5 'Inter', sans-serif; white-space: nowrap; }
.af-med-img { position: relative; display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 8px; }
.af-med-img img { width: 84px; height: 84px; object-fit: contain; }
.af-med-img > i { font-size: 2rem; }
.af-med-leyenda_mes .af-med-img > i { color: #B6FF00; } .af-med-top1 .af-med-img > i { color: #FFD54A; } .af-med-top2 .af-med-img > i { color: #CFD8DC; } .af-med-top3 .af-med-img > i { color: #E0A36B; }
.af-med-img em { position: absolute; right: -2px; bottom: 0; padding: 0 5px; border-radius: 8px; color: #000; background: #B6FF00; font: 800 .65rem/16px 'Inter', sans-serif; font-style: normal; }
.af-med b { display: block; font-size: .8rem; } .af-med small { display: block; color: #9a9a9a; font-size: .72rem; overflow-wrap: anywhere; }
.af-ligas li, .af-portales li > * { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: #111411; color: inherit; text-decoration: none; }
.af-ligas li { background: linear-gradient(90deg, color-mix(in srgb, var(--cat) 12%, #111411), #111411 55%); }
.af-portales { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.af-portales a:hover { border-color: var(--cat); }
.af-logo-s { flex: 0 0 44px; display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--cat) 60%, transparent); border-radius: 50%; background: #0a0a0a; color: var(--cat); }
.af-logo-s img { width: 34px; height: 34px; object-fit: contain; }
.af-liga-n, .af-portales li span:last-child { flex: 1; min-width: 0; }
.af-ligas b, .af-portales b { display: block; overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.af-ligas small, .af-portales small { color: #9a9a9a; font-size: .72rem; }
.af-ligas small i { color: #FFD54A; }
.af-liga-p { color: #B6FF00; font: 700 1rem 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; text-align: right; }
.af-liga-p small { margin-left: 3px; }
@media (max-width: 520px) {
  .af-cuerpo { padding: 18px 16px 20px; }
  .af-stats { grid-template-columns: repeat(2, 1fr); }
  .af-logo { flex-basis: 60px; width: 60px; height: 60px; font-size: 1.6rem; }
  .af-tit h2 { font-size: 1.25rem; }
}

.af-rosters { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.af-rost { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .03); }
.af-rost b .fa-crown { color: #FFD54A; }
.af-rost-rol { font-size: .75rem; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(182, 255, 0, .4); color: #B6FF00; }
.af-rost small { color: #b3b3b3; font-size: .75rem; min-width: 5.5rem; text-align: right; }
.af-rost-ant { opacity: .8; } .af-rost-ant .af-rost-rol { border-color: rgba(255, 255, 255, .2); color: #c9c9c9; }
.af-rost-tit { margin: 14px 0 6px; font-size: .85rem; color: #b3b3b3; }
@media (max-width: 480px) { .af-rost { grid-template-columns: 1fr auto; } .af-rost small { grid-column: 1 / -1; text-align: left; } }
