/*
 * KISURE FE981 ??? centralized player headshot presentation.
 *
 * The original provider image is never rewritten or re-encoded. These rules
 * only change the viewport used to present player photos. Transparent media
 * stays transparent; team crests and non-player images are untouched.
 */
:root{
  --ks-player-headshot-x:50%;
  --ks-player-headshot-y:10%;
  --ks-player-headshot-zoom:1.42;
  --ks-player-hero-headshot-x:50%;
  --ks-player-hero-headshot-y:7%;
  --ks-player-hero-headshot-zoom:1.58;
}

/* Shared compact player-photo surfaces. */
html[data-kisure-design="865"] body :is(
  .ks-player-face-frame,
  .ks-transfer-player-photo,
  .ks-top-transfer-row__photo,
  .ks-ref-transfer-row__photo,
  .global-search-card__media.is-player-face,
  .football-commentary-person__avatar
){
  overflow:hidden !important;
}

/* Existing shared player image contract: head + neck, minimal shoulders. */
html[data-kisure-design="865"] body :is(
  .ks-player-face-frame,
  .ks-transfer-player-photo,
  .ks-top-transfer-row__photo,
  .ks-ref-transfer-row__photo,
  .global-search-card__media.is-player-face,
  .football-commentary-person__avatar
) > img,
html[data-kisure-design="865"] body .ks-player-face-img:not(.ks-player-face-img--hero){
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:var(--ks-player-headshot-x) var(--ks-player-headshot-y) !important;
  transform:scale(var(--ks-player-headshot-zoom)) !important;
  transform-origin:var(--ks-player-headshot-x) var(--ks-player-headshot-y) !important;
}

/* Player profile: a tighter head-first crop while retaining the original file. */
html[data-kisure-design="865"] body [data-kisure-solid-hero="player"] > .football-player-hero__media{
  overflow:hidden !important;
}

html[data-kisure-design="865"] body [data-kisure-solid-hero="player"] .ks-player-face-img--hero{
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:var(--ks-player-hero-headshot-x) var(--ks-player-hero-headshot-y) !important;
  transform:scale(var(--ks-player-hero-headshot-zoom)) !important;
  transform-origin:var(--ks-player-hero-headshot-x) var(--ks-player-hero-headshot-y) !important;
}

/* Slightly reduce zoom on very small viewports to avoid clipping the forehead. */
@media (max-width:520px){
  :root{
    --ks-player-headshot-zoom:1.36;
    --ks-player-hero-headshot-zoom:1.48;
  }
}

/* Respect print/static output: no transform is needed outside screen rendering. */
@media print{
  html[data-kisure-design="865"] body .ks-player-face-img{
    transform:none !important;
  }
}
