/* TESSIRVE Vitrina 5.19.175 — grilla 8/4/2, rótulos de época y nota de ascenso al pie. */
.ms-team-profile .tv-root{
  --tv-ink:var(--ms-ink,#182230);
  --tv-muted:var(--ms-muted,#667085);
  --tv-bg:var(--ms-card,#fff);
  --tv-line:var(--ms-line,#e4e7ec);
  --tv-primary:var(--tsv-readable-link,var(--theme-primary,#137b58));
  --tv-secondary:var(--ms-ink,#13493a);
  color:var(--tv-ink);font-family:inherit;font-size:inherit;
  max-width:100%;margin:0 auto;padding:10px;border-radius:13px;
  border:1px solid var(--tv-line);background:var(--tv-bg);box-sizing:border-box;
}
.ms-team-profile .tv-root *,
.ms-team-profile .tv-root *::before,
.ms-team-profile .tv-root *::after{box-sizing:border-box}
.ms-team-profile .tv-hero{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;
  padding:12px 14px;border:1px solid var(--tv-line);border-radius:12px;
  background:linear-gradient(110deg,color-mix(in srgb,var(--tv-primary),var(--tv-bg) 93%),var(--tv-bg));
}
.ms-team-profile .tv-hero-intro{min-width:0}
.ms-team-profile .tv-eyebrow{display:block;color:var(--tv-secondary);font-size:10px;font-weight:850;letter-spacing:.09em}
.ms-team-profile .tv-hero h2{font-size:clamp(21px,2.5vw,27px);font-weight:850;line-height:1.15;color:var(--tv-ink);margin:3px 0}
.ms-team-profile .tv-hero h2 span{font-size:.8em}
.ms-team-profile .tv-hero p{color:var(--tv-muted);margin:0;font-size:12px;line-height:1.4}
.ms-team-profile .tv-totals{
  display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;
  border:1px solid color-mix(in srgb,var(--tv-primary),var(--tv-line) 60%);
  background:var(--tv-bg);max-width:100%;
}
.ms-team-profile .tv-totals strong{font-size:clamp(24px,3vw,34px);line-height:1;color:var(--tv-primary);font-variant-numeric:tabular-nums}
.ms-team-profile .tv-totals>span{font-size:12px;font-weight:750;line-height:1.4;color:var(--tv-ink)}
.ms-team-profile .tv-totals small{display:block;color:var(--tv-muted);font-size:10px;font-weight:550;line-height:1.4}
.ms-team-profile .tv-totals .tv-totals-eras{font-size:10px;margin-top:1px}
.ms-team-profile .tv-controls{
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;
  padding:5px 0 4px;margin:4px 0 7px;
}
.ms-team-profile .tv-check{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;
  cursor:pointer;user-select:none;padding:6px 11px;border:1px solid var(--tv-line);
  border-radius:9px;background:color-mix(in srgb,var(--tv-primary),var(--tv-bg) 93%);
  color:var(--tv-ink);font-size:12px;font-weight:750;
}
.ms-team-profile .tv-check:has(input:not(:checked)){background:var(--tv-bg);color:var(--tv-muted)}
.ms-team-profile .tv-check input{accent-color:var(--tv-primary);width:15px;height:15px;cursor:pointer;margin:0}
.ms-team-profile .tv-section{
  min-width:0;background:var(--tv-bg);border:1px solid var(--tv-line);
  border-radius:12px;padding:10px 12px;margin:0 0 9px;
}
.ms-team-profile .tv-section:last-child{margin-bottom:0}
.ms-team-profile .tv-section-heading{
  display:flex;align-items:center;justify-content:center;gap:6px;
  padding:1px 0 7px;margin:0;border-bottom:1px solid var(--tv-line);text-align:center;
}
.ms-team-profile .tv-section-heading h3{font-size:clamp(17px,2vw,21px);line-height:1.25;color:var(--tv-ink);margin:0;font-weight:850}
.ms-team-profile .tv-section-counter{color:var(--tv-primary);font-size:.83em;font-weight:800;font-variant-numeric:tabular-nums}
.ms-team-profile .tv-era{min-width:0;opacity:1;transform:translateY(0);transition:opacity var(--tv-fade,180ms) ease,transform var(--tv-fade,180ms) ease}
.ms-team-profile .tv-era.is-hiding{opacity:0;transform:translateY(-3px);pointer-events:none}
.ms-team-profile .tv-era[hidden]{display:none!important}
.ms-team-profile .tv-era h4{text-align:center;font-size:12px;color:var(--tv-secondary);font-weight:800;letter-spacing:.01em;margin:9px 0 7px}
.ms-team-profile .tv-shelf{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,148px));
  justify-content:center;justify-items:stretch;align-items:stretch;
  gap:9px;margin:0 auto 6px;max-width:100%;
}
.ms-team-profile .tv-trophy{
  min-width:0;max-width:148px;display:flex;flex-direction:column;overflow:hidden;
  border:1px solid var(--tv-line);border-radius:10px;background:var(--tv-bg);
  box-shadow:0 2px 7px rgba(16,24,40,.06);
}
.ms-team-profile .tv-photo{
  height:104px;display:grid;place-items:center;position:relative;
  background:linear-gradient(145deg,color-mix(in srgb,var(--tv-primary),var(--tv-bg) 94%),var(--tv-bg));
  border-bottom:1px solid var(--tv-line)
}
.ms-team-profile .tv-photo img{width:100%;height:100%;object-fit:contain;padding:5px}
.ms-team-profile .tv-no-photo{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--tv-muted);font-size:9px;text-align:center;padding:8px;line-height:1.25}
.ms-team-profile .tv-no-photo svg{height:42px;width:42px;opacity:.55}
.ms-team-profile .tv-trophy-body{display:flex;flex:1;flex-direction:column;align-items:center;gap:6px;padding:8px 6px 9px;text-align:center}
.ms-team-profile .tv-cup-name{color:var(--tv-ink);font-weight:800;line-height:1.25;font-size:11px;text-decoration:none!important;overflow-wrap:anywhere}
.ms-team-profile a.tv-cup-name:hover{color:var(--tv-primary);text-decoration:underline!important}
/* Sólo la cifra, con Nunito ya cargada por el Theme. */
.ms-team-profile .tv-trophy-count{
  display:block;margin-top:auto;font-family:"Nunito Variable",var(--ms-ui-font,"Nunito Variable",ui-rounded,system-ui,sans-serif);font-size:clamp(30px,3vw,35px);
  font-weight:900;line-height:1.08;color:var(--tv-ink);font-variant-numeric:tabular-nums
}
.ms-team-profile .tv-year-disclosure{width:100%;display:flex;flex-direction:column;align-items:center;gap:0;min-width:0}
/* Reproduce las dimensiones y el chevrón de goleadores del Main (24 × 18). */
.ms-team-profile .tv-year-disclosure > .tv-year-toggle{
  box-sizing:border-box;list-style:none;display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:18px;padding:0;margin:1px auto 0;border:1px solid color-mix(in srgb,var(--tv-primary),transparent 50%);
  border-radius:999px;background:var(--tv-bg);color:var(--tv-primary);cursor:pointer
}
.ms-team-profile .tv-year-disclosure > .tv-year-toggle::-webkit-details-marker{display:none}
.ms-team-profile .tv-year-toggle i{
  border-bottom:2px solid currentColor;border-right:2px solid currentColor;
  display:block;width:6px;height:6px;transform:translateY(-2px) rotate(45deg);
  transition:transform .16s ease
}
.ms-team-profile .tv-year-disclosure[open] > .tv-year-toggle i{transform:translateY(2px) rotate(225deg)}
.ms-team-profile .tv-year-toggle:focus-visible{outline:2px solid var(--tv-primary);outline-offset:3px}
.ms-team-profile .tv-year-disclosure:not([open]) > .tv-years{display:none!important}
.ms-team-profile .tv-year-disclosure > .tv-years{
  width:100%;padding:9px 0 2px;max-height:190px;overflow-y:auto;
  display:flex;flex-wrap:wrap;gap:4px;justify-content:center;align-items:center
}
.ms-team-profile .tv-year{
  font-size:10px;line-height:1.35;color:var(--tv-primary);
  background:color-mix(in srgb,var(--tv-primary),var(--tv-bg) 93%);
  border:1px solid color-mix(in srgb,var(--tv-primary),var(--tv-line) 60%);
  border-radius:999px;padding:2px 5px;text-decoration:none!important;font-variant-numeric:tabular-nums
}
.ms-team-profile a.tv-year:hover{background:var(--tv-primary);color:#fff}
.ms-team-profile .tv-year.is-static{color:var(--tv-muted);background:var(--tv-bg);border-color:var(--tv-line)}
.ms-team-profile .tv-card-edit{position:absolute;right:4px;top:4px;z-index:2;display:grid;place-items:center;width:25px;height:25px;color:var(--tv-ink);background:var(--tv-bg);border-radius:50%;border:1px solid var(--tv-line);text-decoration:none!important;font-size:14px}
@media (max-width:680px){
  .ms-team-profile .tv-root{padding:7px;border-radius:10px}
  .ms-team-profile .tv-hero{padding:10px;gap:9px;border-radius:9px}
  .ms-team-profile .tv-hero h2{font-size:22px}
  .ms-team-profile .tv-totals{padding:6px 9px}
  .ms-team-profile .tv-section{padding:9px 7px;border-radius:10px}
  .ms-team-profile .tv-controls{margin:5px 0 7px;gap:6px}
  .ms-team-profile .tv-check{min-height:33px;padding:6px 8px;font-size:11px}
  .ms-team-profile .tv-shelf{grid-template-columns:repeat(2,minmax(0,145px));gap:8px}
  .ms-team-profile .tv-trophy{max-width:145px;width:100%;justify-self:center}
  .ms-team-profile .tv-photo{height:98px}
  .ms-team-profile .tv-trophy-count{font-size:33px}
}
@media(max-width:360px){.ms-team-profile .tv-shelf{grid-template-columns:repeat(2,minmax(0,132px))}.ms-team-profile .tv-check{font-size:10px}}
@media(prefers-reduced-motion:reduce){.ms-team-profile .tv-era{transition:none!important}}
/* El switch del Theme controla la paleta real. Nunca forzamos la vitrina oscura en modo claro. */
html[data-tessirve-color-mode="dark"] .ms-team-profile .tv-root{
  --tv-ink:var(--ms-ink,#f2f4f7);
  --tv-muted:var(--ms-muted,#aeb9c9);
  --tv-bg:var(--ms-card,#161d27);
  --tv-line:var(--ms-line,#303947);
  --tv-secondary:color-mix(in srgb,var(--theme-primary,#7fb7ff),#fff 45%);
}
html[data-tessirve-color-mode="dark"] .ms-team-profile .tv-hero{
  background:linear-gradient(115deg,color-mix(in srgb,var(--tv-primary),var(--tv-bg) 83%),var(--tv-bg));
}
html[data-tessirve-color-mode="dark"] .ms-team-profile .tv-check input{accent-color:var(--tv-primary)}
html[data-tessirve-color-mode="dark"] .ms-team-profile .tv-year{color:var(--tv-ink)}

/* 5.19.163 — una fotografía jamás modifica la geometría de su recuadro.
 * Contenedor fijo incluso si Theme o WordPress inyectan tamaños de imagen. */
.ms-team-profile .tv-shelf > .tv-trophy{min-width:0!important;max-width:148px;width:100%;}
.ms-team-profile .tv-trophy > .tv-photo{
  display:block;position:relative;flex:0 0 104px;
  width:100%;height:104px!important;min-height:0;max-height:104px;
  overflow:hidden;contain:layout paint;
}
.ms-team-profile .tv-trophy > .tv-photo > img{
  position:absolute!important;inset:0!important;display:block!important;
  width:100%!important;height:100%!important;
  min-width:0!important;min-height:0!important;
  max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:center!important;
  padding:5px!important;margin:0!important;transform:none!important;
}
.ms-team-profile .tv-trophy > .tv-photo > .tv-no-photo{
  height:100%;width:100%;min-width:0;min-height:0;
}
@media(max-width:680px){
  .ms-team-profile .tv-trophy > .tv-photo{height:98px!important;max-height:98px;flex-basis:98px}
}


/* 5.19.169 — palmarés histórico de ascenso, visible y más discreto.
 * Nunca superponer cifras o cortar las fotografías globales. */
.ms-team-profile .tv-ascenso{
  margin-top:14px;padding:10px 11px;border-style:dashed;
  background:color-mix(in srgb,var(--tv-muted),var(--tv-bg) 97%);
}
.ms-team-profile .tv-ascenso-heading h3{font-size:clamp(13px,1.7vw,16px);font-weight:780;color:var(--tv-muted)}
.ms-team-profile .tv-ascenso-explainer{font-size:11px;line-height:1.5;text-align:center;color:var(--tv-muted);margin:6px auto 9px;max-width:48ch}
.ms-team-profile .tv-ascenso .tv-shelf{grid-template-columns:repeat(auto-fit,minmax(106px,124px));gap:8px}
.ms-team-profile .tv-ascenso .tv-shelf>.tv-trophy{max-width:124px!important;width:100%}
.ms-team-profile .tv-ascenso .tv-trophy>.tv-photo{height:88px!important;max-height:88px!important;flex-basis:88px!important}
.ms-team-profile .tv-ascenso .tv-trophy-body{padding:7px 5px 8px;gap:5px}
.ms-team-profile .tv-ascenso .tv-cup-name{font-size:10px}
.ms-team-profile .tv-ascenso .tv-trophy-count{font-size:25px;line-height:1.05}
.ms-team-profile .tv-ascenso-inline{margin-top:3px;font-size:10px!important}
.ms-team-profile .tv-ascenso-inline b{font-variant-numeric:tabular-nums}
@media(max-width:680px){
 .ms-team-profile .tv-ascenso .tv-shelf{grid-template-columns:repeat(2,minmax(0,124px));gap:8px}
 .ms-team-profile .tv-ascenso .tv-trophy>.tv-photo{height:84px!important;max-height:84px!important;flex-basis:84px!important}
}

/* 5.19.175 — 8 trofeos por renglón en PC, 4 en tablet y 2 en móvil.
 * Flex mantiene centradas las filas incompletas; no hay columnas vacías
 * al final de una categoría. Se respeta el límite de alto de fotografías. */
.ms-team-profile .tv-shelf,
.ms-team-profile .tv-ascenso .tv-shelf{
  display:flex;
  flex-flow:row wrap;
  justify-content:center;
  align-items:stretch;
  gap:9px;
  width:100%;
  min-width:0;
}
/* Estos máximos impiden que las tarjetas de ancho limitado creen una
 * novena columna en PC o una quinta en tablet. */
.ms-team-profile .tv-shelf{max-width:min(100%, 1247px)}
.ms-team-profile .tv-ascenso .tv-shelf{max-width:min(100%, 1055px)}
.ms-team-profile .tv-shelf > .tv-trophy,
.ms-team-profile .tv-ascenso .tv-shelf > .tv-trophy{
  flex:0 1 calc(12.5% - 7.875px);
  min-width:0!important;
  box-sizing:border-box;
}
/* Épocas: profesional con énfasis normal, amateur en un tono más leve,
 * tanto en el encabezado de sección como en su filtro. */
.ms-team-profile .tv-era[data-tv-era="amateur"] > h4{
  color:var(--tv-muted);
  font-weight:650;
}
.ms-team-profile .tv-controls .tv-check:has(input[data-tv-filter="amateur"]) span{
  color:var(--tv-muted);
  font-weight:650;
}
/* La aclaración de ascenso es un pie de sección, debajo de los títulos. */
.ms-team-profile .tv-ascenso > .tv-ascenso-explainer{
  max-width:none;
  margin:12px 0 0;
  padding:9px 4px 1px;
  border-top:1px solid var(--tv-line);
  font-size:11px;
  line-height:1.45;
  text-align:center;
}
@media (min-width:681px) and (max-width:1024px){
  .ms-team-profile .tv-shelf{max-width:min(100%, 619px)}
  .ms-team-profile .tv-ascenso .tv-shelf{max-width:min(100%, 523px)}
  .ms-team-profile .tv-shelf > .tv-trophy,
  .ms-team-profile .tv-ascenso .tv-shelf > .tv-trophy{
    flex-basis:calc(25% - 6.75px);
  }
}
@media (max-width:680px){
  .ms-team-profile .tv-shelf,
  .ms-team-profile .tv-ascenso .tv-shelf{gap:8px}
  .ms-team-profile .tv-shelf{max-width:min(100%, 298px)}
  .ms-team-profile .tv-ascenso .tv-shelf{max-width:min(100%, 256px)}
  .ms-team-profile .tv-shelf > .tv-trophy,
  .ms-team-profile .tv-ascenso .tv-shelf > .tv-trophy{
    flex-basis:calc(50% - 4px);
  }
}

/* 5.19.178 — una tarjeta mundial sólo si el club ganó en ambas eras de torneo.
 * Detalle por competición dentro del desplegable, sin deformar grilla 8/4/2. */
.ms-team-profile .tv-world-group .tv-world-disclosure>.tv-world-parts{
  width:100%;padding:8px 0 2px;max-height:210px;overflow-y:auto;min-width:0;
}
.ms-team-profile .tv-world-group .tv-world-disclosure:not([open])>.tv-world-parts{display:none!important}
.ms-team-profile .tv-world-group .tv-world-part{padding:5px 0;border-top:1px solid var(--tv-line)}
.ms-team-profile .tv-world-group .tv-world-part:first-child{border-top:0}
.ms-team-profile .tv-world-group .tv-world-part-title{display:flex;justify-content:center;align-items:center;gap:6px;color:var(--tv-ink);font-size:9px;font-weight:750;line-height:1.35;text-align:left;min-width:0}
.ms-team-profile .tv-world-group .tv-world-part-title b{color:var(--tv-muted);font-weight:750}
.ms-team-profile .tv-world-group .tv-world-part .tv-years{display:flex;justify-content:center;flex-wrap:wrap;gap:4px;margin:5px 0 0}

/* 5.19.180 — La copa FIFA anual integrada ocupa TODA la foto principal.
 * Las otras copas aparecen exclusivamente junto a los rótulos de su historia. */
.ms-team-profile .tv-world-group .tv-photo > img.tv-world-main-photo{
  display:block!important;position:static!important;
  width:100%!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:center!important;
  padding:5px 6px!important;margin:0!important;
  transform:none!important;
}
.ms-team-profile .tv-world-group .tv-world-part-caption{
  flex:0 1 auto;min-width:0;overflow-wrap:break-word;
}
.ms-team-profile .tv-world-group .tv-world-part-thumb{
  width:25px;height:25px;flex:0 0 25px;
  display:inline-flex;align-items:center;justify-content:center;
  overflow:hidden;border:1px solid var(--tv-line);border-radius:6px;
  background:var(--tv-bg);box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.ms-team-profile .tv-world-group .tv-world-part-thumb img{
  display:block!important;position:static!important;
  width:100%!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;
  padding:1px!important;margin:0!important;
  object-fit:contain!important;object-position:center!important;
  transform:none!important;
}
.ms-team-profile .tv-world-group .tv-world-part-thumb.is-pending{
  color:var(--tv-muted);opacity:.65;
}
.ms-team-profile .tv-world-group .tv-world-part-thumb.is-pending svg{
  width:17px;height:17px;
}

/* 5.19.209: ocultar secciones sin títulos con los filtros de época */
.ms-team-profile .tv-section[hidden]{display:none!important}

.ms-team-profile .tv-international-summary[hidden],.ms-team-profile .tv-national-summary[hidden]{display:none!important}
