/* FOKUS SCHALKE / V14 – ONE authoritative picture-fitting layer.
   Images stay unchanged. No cropping, zoom or stale media queries from previous versions.
   Covers every team & season: starting XI, substitutions, and bench. */

/* Keep full-width responsive lineup, even when Safari changes text/zoom scale. */
#matchcenterRoot .mc-lineup-switcher,
#matchcenterRoot .mc-lineup-grid,
#matchcenterRoot .mc-lineup-panel {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
#matchcenterRoot .mc-pitch-row {
  width:100%!important;
  justify-items:center!important;
  align-items:center!important;
  gap:3px!important;
}
#matchcenterRoot .mc-pitch-row>.mc-player,
#matchcenterRoot .mc-pitch-position>.mc-player {
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:var(--s04-cardphoto-h,68px) minmax(2.2em,auto) 1.1em 1.15em!important;
  row-gap:2px!important;
  justify-items:center!important;
  align-items:start!important;
  align-content:start!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  padding:0 1px!important;
  margin:0 auto!important;
}
/* Photo slots are nearly square to match the actual blue portrait assets.
   Different row widths avoid a five-player overlap. */
#matchcenterRoot .mc-pitch-row[style*="--mc-count:5"] {--s04-cardphoto-w:52px;--s04-cardphoto-h:54px;}
#matchcenterRoot .mc-pitch-row[style*="--mc-count:4"] {--s04-cardphoto-w:65px;--s04-cardphoto-h:68px;}
#matchcenterRoot .mc-pitch-row[style*="--mc-count:3"] {--s04-cardphoto-w:72px;--s04-cardphoto-h:76px;}
#matchcenterRoot .mc-pitch-row[style*="--mc-count:2"] {--s04-cardphoto-w:76px;--s04-cardphoto-h:80px;}
#matchcenterRoot .mc-pitch-row[style*="--mc-count:1"] {--s04-cardphoto-w:78px;--s04-cardphoto-h:82px;}
#matchcenterRoot .mc-pitch-row .mc-player-head,
#matchcenterRoot .mc-pitch-position .mc-player-head {
  box-sizing:border-box!important;
  display:block!important;
  position:relative!important;
  width:var(--s04-cardphoto-w,70px)!important;
  height:var(--s04-cardphoto-h,74px)!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  flex:0 0 auto!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:visible!important; /* ratings and substitutions may sit beyond image bounds */
  border-radius:8px!important;
  background:transparent!important;
}

/* Crop only the frame corners, not the portrait. Contain guarantees the FULL picture visible. */
#matchcenterRoot .mc-player-head .mc-photo-viewport,
#matchcenterRoot .mc-md-mini-photo .mc-photo-viewport,
#matchcenterRoot .mc-bench-photo .mc-photo-viewport {
  box-sizing:border-box!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
  border-radius:inherit!important;
  display:block!important;
}
#matchcenterRoot .mc-panel-schalke .mc-photo-viewport,
#matchcenterRoot .mc-panel-schalke .mc-md-mini-photo,
#matchcenterRoot .mc-panel-schalke .mc-bench-photo {background:#082959!important;}
#matchcenterRoot .mc-panel-opponent .mc-photo-viewport,
#matchcenterRoot .mc-panel-opponent .mc-md-mini-photo,
#matchcenterRoot .mc-panel-opponent .mc-bench-photo {background:#f3f4f5!important;}
#matchcenterRoot .mc-player-head .mc-photo-viewport>img,
#matchcenterRoot .mc-md-mini-photo .mc-photo-viewport>img,
#matchcenterRoot .mc-bench-photo .mc-photo-viewport>img,
#matchcenterRoot .mc-player-head img,
#matchcenterRoot .mc-md-mini-photo img,
#matchcenterRoot .mc-bench-photo img,
#matchcenterRoot .mc-panel-schalke .mc-photo-viewport>img,
#matchcenterRoot .mc-panel-opponent .mc-photo-viewport>img {
  display:block!important;
  position:relative!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 center!important;
  transform:none!important;
  filter:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
#matchcenterRoot .mc-pitch-row .mc-player strong,
#matchcenterRoot .mc-pitch-position .mc-player strong {
  width:100%!important;
  min-height:2.2em!important;
  height:auto!important;
  display:flex!important;
  align-items:start!important;
  justify-content:center!important;
  text-align:center!important;
  font-size:10px!important;
  line-height:1.1!important;
  overflow-wrap:anywhere!important;
  margin:0!important;
}
#matchcenterRoot .mc-pitch-row .mc-player small,
#matchcenterRoot .mc-pitch-position .mc-player small {height:1.1em!important;min-height:1.1em!important;font-size:9px!important;text-align:center!important;margin:0!important;}
#matchcenterRoot .mc-pitch-row .mc-contributions,
#matchcenterRoot .mc-pitch-position .mc-contributions {height:1.15em!important;min-height:1.15em!important;margin:0!important;justify-content:center!important;}

/* Subs: equal photo dimensions left and right, as on the supplied reference. */
#matchcenterRoot .mc-md-mini-photo {
  position:relative!important;
  display:block!important;
  flex:0 0 68px!important;
  width:68px!important;
  height:72px!important;
  min-width:68px!important;
  min-height:72px!important;
  max-width:68px!important;
  max-height:72px!important;
  overflow:hidden!important;
  border-radius:7px!important;
  box-sizing:border-box!important;
}
#matchcenterRoot .mc-md-mini-person {
  box-sizing:border-box!important;
  align-items:center!important;
  min-width:0!important;
  min-height:72px!important;
}

/* Bench: same cropped-free photos, consistent card-height, two columns when space permits. */
#matchcenterRoot .mc-bench-person>.mc-bench-photo,
#matchcenterRoot .mc-bench-person .mc-bench-photo {
  position:relative!important;
  box-sizing:border-box!important;
  display:block!important;
  flex:0 0 68px!important;
  width:68px!important;
  min-width:68px!important;
  height:76px!important;
  min-height:76px!important;
  max-height:76px!important;
  overflow:hidden!important;
  border-radius:0!important;
}
#matchcenterRoot .mc-bench-list>.mc-bench-person,
#matchcenterRoot .mc-bench-person {
  box-sizing:border-box!important;
  min-height:76px!important;
  align-items:center!important;
}
#matchcenterRoot .mc-bench-photo .mc-player-placeholder,
#matchcenterRoot .mc-md-mini-photo .mc-player-placeholder {
  width:100%!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
}

@media(max-width:650px) {
  #matchcenterRoot .mc-md-mini-photo {
    flex-basis:55px!important;
    min-width:55px!important;
    width:55px!important;
    max-width:55px!important;
    min-height:65px!important;
    height:65px!important;
    max-height:65px!important;
  }
  #matchcenterRoot .mc-md-mini-person {min-height:65px!important;}
  #matchcenterRoot .mc-bench-person>.mc-bench-photo,
  #matchcenterRoot .mc-bench-person .mc-bench-photo {
    flex-basis:55px!important;
    min-width:55px!important;
    width:55px!important;
    min-height:70px!important;
    height:70px!important;
    max-height:70px!important;
  }
  #matchcenterRoot .mc-bench-list>.mc-bench-person,
  #matchcenterRoot .mc-bench-person {min-height:70px!important;}
}
@media(max-width:375px) {
  #matchcenterRoot .mc-pitch-row[style*="--mc-count:5"] {--s04-cardphoto-w:45px;--s04-cardphoto-h:48px;}
  #matchcenterRoot .mc-pitch-row[style*="--mc-count:4"] {--s04-cardphoto-w:58px;--s04-cardphoto-h:61px;}
  #matchcenterRoot .mc-pitch-row[style*="--mc-count:3"] {--s04-cardphoto-w:66px;--s04-cardphoto-h:70px;}
  #matchcenterRoot .mc-pitch-row[style*="--mc-count:2"] {--s04-cardphoto-w:70px;--s04-cardphoto-h:74px;}
  #matchcenterRoot .mc-pitch-row[style*="--mc-count:1"] {--s04-cardphoto-w:70px;--s04-cardphoto-h:74px;}
}
