/* D2.4.2 SAFE PROFILE PHOTO DISPLAY FIX — profile overview ONLY.
   Overrides the inherited tall portrait / circular ring rules without affecting
   matches, other avatars, uploads, rank logic, scripts or database. */

/* Give the profile photograph one dependable footprint, regardless of the
   older dashboard / character-avatar / Option C display styles. */
body #profile [data-royal-tab="overview"] #playerAvatar {
  display: block !important;
  position: relative !important;
  box-sizing: border-box !important;
  flex: 0 0 184px !important;
  width: 184px !important;
  height: 184px !important;
  min-width: 184px !important;
  min-height: 184px !important;
  max-width: 184px !important;
  max-height: 184px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  border: 3px solid #e3c279 !important;
  background: #0c3027 !important;
  box-shadow: 0 0 0 5px #214b38, 0 12px 24px #0005 !important;
  transform: none !important;
  isolation: isolate !important;
}
/* Remove the superimposed circular ring and any avatar badge graphic. */
body #profile [data-royal-tab="overview"] #playerAvatar::before,
body #profile [data-royal-tab="overview"] #playerAvatar::after,
body #profile [data-royal-tab="overview"] #playerAvatar > img::before,
body #profile [data-royal-tab="overview"] #playerAvatar > img::after {
  content: none !important;
  display: none !important;
  box-shadow: none !important;
}
/* Both an uploaded photo and the original eight avatar images fill the card
   with aspect ratio preserved, rather than stretching a narrow portrait. */
body #profile [data-royal-tab="overview"] #playerAvatar > img {
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: center 32% !important;
  aspect-ratio: auto !important;
  transform: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
/* The rank title remains separate, outside the image. */
body #profile [data-royal-tab="overview"] .dashboard-identity {
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
@media (max-width: 650px) {
  body #profile [data-royal-tab="overview"] #playerAvatar {
    flex-basis: 150px !important;
    width: 150px !important; height: 150px !important;
    min-width: 150px !important; min-height: 150px !important;
    max-width: 150px !important; max-height: 150px !important;
  }
}
