/* FOKUS SCHALKE – V15, 04.11.2026
   Spacing repair based on the user's screenshots.
   The image itself is never enlarged or cropped. Square photo slots remove letterboxing
   from square source images, and the labels sit directly under each photo.
   Applies to every team and season; the score / tactics / data are unchanged. */

/* Starting 11: compact, connected photo/name/position block without reserved 2.2em
   name height. Each position follows its own name rather than a blank grid track. */
#matchcenterRoot .mc-pitch-row > .mc-player,
#matchcenterRoot .mc-pitch-position > .mc-player {
  display:flex!important;
  flex-direction:column!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  justify-items:initial!important;
  align-self:start!important;
  align-content:normal!important;
  grid-template-rows:none!important;
  grid-template-columns:none!important;
  row-gap:0!important;
  gap:0!important;
  padding:0 1px!important;
  margin:0 auto!important;
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
}
#matchcenterRoot .mc-pitch-row > .mc-player > .mc-player-head,
#matchcenterRoot .mc-pitch-position > .mc-player > .mc-player-head {
  flex:0 0 auto!important;
  margin:0 auto 3px!important;
  aspect-ratio:1/1!important;
  /* Using width (not the previous 1.1x height) prevents top/bottom bands. */
  height:var(--s04-cardphoto-w,64px)!important;
  width:var(--s04-cardphoto-w,64px)!important;
  max-width:95%!important;
  padding:0!important;
  overflow:visible!important;
}
#matchcenterRoot .mc-pitch-row > .mc-player > strong,
#matchcenterRoot .mc-pitch-position > .mc-player > strong {
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  display:block!important;
  align-content:normal!important;
  justify-content:normal!important;
  min-height:0!important;
  max-height:none!important;
  height:auto!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  font-size:clamp(9px,2.6vw,12px)!important;
  line-height:1.08!important;
  text-align:center!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  text-wrap:balance!important;
}
#matchcenterRoot .mc-pitch-row > .mc-player > small,
#matchcenterRoot .mc-pitch-position > .mc-player > small {
  box-sizing:border-box!important;
  display:block!important;
  flex:0 0 auto!important;
  align-self:center!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:2px 0 0!important;
  padding:0!important;
  font-size:clamp(9px,2.3vw,11px)!important;
  line-height:1.1!important;
  white-space:nowrap!important;
  text-align:center!important;
}
#matchcenterRoot .mc-pitch-row > .mc-player > .mc-contributions,
#matchcenterRoot .mc-pitch-position > .mc-player > .mc-contributions {
  flex:0 0 auto!important;
  display:flex!important;
  width:auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  margin:3px 0 0!important;
  padding:0!important;
  gap:4px!important;
  justify-content:center!important;
  align-items:center!important;
  line-height:1!important;
}
/* Row contents should be top-aligned, not centered in a fixed min-height row. */
#matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates) > .mc-pitch-row {
  align-items:start!important;
  align-content:start!important;
  justify-content:normal!important;
  justify-items:center!important;
  padding:0!important;
  gap:3px!important;
  min-height:0!important;
}
#matchcenterRoot .mc-lineup-panel > .mc-pitch:not(.mc-pitch-coordinates){
  justify-content:space-around!important;
  row-gap:5px!important;
}
/* Consistent square picture slots; no forced enlargement or image cropping. */
#matchcenterRoot .mc-player-head .mc-photo-viewport,
#matchcenterRoot .mc-md-mini-photo .mc-photo-viewport,
#matchcenterRoot .mc-bench-photo .mc-photo-viewport{
  display:block!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
  border-radius:inherit!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-panel-schalke .mc-photo-viewport > img,
#matchcenterRoot .mc-panel-opponent .mc-photo-viewport > img {
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:50% 50%!important;
  transform:none!important;
  filter:none!important;
  background:transparent!important;
}
/* Substitutions: compact portraits equal height, with text immediately beside them. */
#matchcenterRoot .mc-md-change-list .mc-md-mini-person {
  display:flex!important;
  min-height:64px!important;
  height:auto!important;
  gap:5px!important;
  align-items:center!important;
}
#matchcenterRoot .mc-md-change-list .mc-md-mini-photo {
  position:relative!important;
  flex:0 0 64px!important;
  min-width:64px!important;
  max-width:64px!important;
  width:64px!important;
  min-height:64px!important;
  max-height:64px!important;
  height:64px!important;
  border-radius:7px!important;
  overflow:hidden!important;
}
#matchcenterRoot .mc-md-change-list .mc-md-mini-name {
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:2px!important;
  min-width:0!important;
}
/* Reserve bench: two evenly sized columns, like reference picture #2.
   Square images avoid the blue bars created by the previous tall image slot. */
#matchcenterRoot .mc-bench .mc-bench-list {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
  grid-auto-rows:auto!important;
  width:100%!important;
  min-width:0!important;
}
#matchcenterRoot .mc-bench .mc-bench-list > .mc-bench-person {
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:row!important;
  justify-content:flex-start!important;
  align-items:center!important;
  min-width:0!important;
  width:100%!important;
  height:70px!important;
  min-height:70px!important;
  max-height:none!important;
  padding:0!important;
  gap:6px!important;
  border-radius:8px!important;
  overflow:hidden!important;
}
#matchcenterRoot .mc-bench .mc-bench-list > .mc-bench-person > .mc-bench-photo {
  position:relative!important;
  box-sizing:border-box!important;
  display:block!important;
  flex:0 0 68px!important;
  min-width:68px!important;
  max-width:68px!important;
  width:68px!important;
  min-height:68px!important;
  max-height:68px!important;
  height:68px!important;
  overflow:hidden!important;
  border-radius:0!important;
  margin:0!important;
}
#matchcenterRoot .mc-bench .mc-bench-list > .mc-bench-person > .mc-bench-details {
  display:flex!important;
  flex:1 1 0!important;
  width:auto!important;
  min-width:0!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  padding:2px 3px 2px 0!important;
  gap:1px!important;
  overflow:visible!important;
}
#matchcenterRoot .mc-bench .mc-bench-details .mc-md-firstname{
  width:100%!important;
  font-size:clamp(10px,2.6vw,13px)!important;
  line-height:1.1!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
#matchcenterRoot .mc-bench .mc-bench-details strong{
  width:100%!important;
  font-size:clamp(12px,3.45vw,17px)!important;
  line-height:1.09!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
}
@media(max-width:390px){
 #matchcenterRoot .mc-bench .mc-bench-list{gap:7px!important;}
 #matchcenterRoot .mc-bench .mc-bench-list > .mc-bench-person{
   height:66px!important;min-height:66px!important;gap:5px!important;
 }
 #matchcenterRoot .mc-bench .mc-bench-list > .mc-bench-person > .mc-bench-photo{
   flex-basis:63px!important;min-width:63px!important;max-width:63px!important;
   width:63px!important;height:63px!important;min-height:63px!important;max-height:63px!important;
 }
 #matchcenterRoot .mc-md-change-list .mc-md-mini-photo{
   flex-basis:57px!important;min-width:57px!important;max-width:57px!important;
   width:57px!important;height:57px!important;min-height:57px!important;max-height:57px!important;
 }
}
@media(max-width:350px){
 #matchcenterRoot .mc-bench .mc-bench-list > .mc-bench-person > .mc-bench-photo{
   flex-basis:52px!important;min-width:52px!important;max-width:52px!important;
   width:52px!important;height:52px!important;min-height:52px!important;max-height:52px!important;
 }
 #matchcenterRoot .mc-bench .mc-bench-details strong{font-size:12px!important;}
 #matchcenterRoot .mc-bench .mc-bench-details .mc-md-firstname{font-size:10px!important;}
}

/* Row-count-specific legacy rules also reserved two full lines under each photo.
   This selector overrides them for all 3/4/5-row formations. */
#matchcenterRoot .mc-lineup-panel .mc-pitch:not(.mc-pitch-coordinates) .mc-pitch-row > .mc-player > strong,
#matchcenterRoot .mc-lineup-panel .mc-pitch.mc-pitch-coordinates .mc-pitch-position > .mc-player > strong {
  display:block!important;
  box-sizing:border-box!important;
  height:max-content!important;
  min-height:0!important;
  max-height:none!important;
  line-height:1.08!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 auto!important;
}
#matchcenterRoot .mc-lineup-panel .mc-pitch:not(.mc-pitch-coordinates) .mc-pitch-row > .mc-player > small,
#matchcenterRoot .mc-lineup-panel .mc-pitch.mc-pitch-coordinates .mc-pitch-position > .mc-player > small {
  display:block!important;
  height:max-content!important;
  min-height:0!important;
  max-height:none!important;
  margin:2px 0 0!important;
  padding:0!important;
}
