/* FIX300 — all-theme game detail rating layout + nested Profile modal ownership.
 * Browser-side only: does not change review numbers, permissions or collection data.
 */

/* The original iPhone breakpoint forced this score tile down to 58px and
 * allowed 8.5/10 to wrap between the 1 and 0. Reserve real typographic space. */
.gameDetailPage .gameHeroRatingGroup:not([hidden]){
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
  max-width:100%;
  flex:0 0 auto;
  flex-wrap:nowrap;
}
.gameDetailPage .gameHeroCommunityRating:not([hidden]){
  box-sizing:border-box;
  display:flex;
  flex:0 0 98px;
  width:98px;
  min-width:98px;
  max-width:98px;
  min-height:100px;
  padding:11px 7px;
  gap:5px;
  border-radius:17px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  overflow:hidden;
}
.gameDetailPage .gameHeroCommunityRatingLabel{
  box-sizing:border-box;
  display:block;
  width:100%;
  font-size:9px;
  line-height:1.3;
  font-weight:900;
  letter-spacing:.07em;
  text-align:center;
  white-space:nowrap;
}
.gameDetailPage .gameHeroCommunityRatingScore{
  display:flex;
  width:100%;
  flex:0 0 auto;
  align-items:baseline;
  justify-content:center;
  gap:1px;
  font-size:29px;
  font-weight:950;
  line-height:1.05;
  letter-spacing:-.035em;
  text-align:center;
  font-variant-numeric:tabular-nums;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
}
.gameDetailPage .gameHeroCommunityRatingScore small{
  display:inline-block;
  flex:0 0 auto;
  font-size:11px;
  font-weight:800;
  line-height:1;
  margin:0;
  white-space:nowrap!important;
}
.gameDetailPage .gameHeroCommunityRatingMeta{
  display:block;
  width:100%;
  max-width:100%;
  font-size:10px;
  line-height:1.25;
  font-weight:750;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.gameDetailPage .gameHeroTitleContent,
.gameDetailPage .gameHeroTitleRow,
.gameDetailPage .gameHeroRatingGroup{
  min-width:0;
}

/* On phones, preserve full title width. A row of rating cards sits
 * beneath the title instead of squeezing the title to a few letters. */
@media(max-width:480px){
  .gameDetailPage .gameHeroTitleRow{
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto;
    row-gap:11px;
  }
  .gameDetailPage .gameHeroRatingGroup:not([hidden]){
    width:100%;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:8px;
  }
  .gameDetailPage .gameHeroCommunityRating:not([hidden]){
    flex:0 0 94px;
    width:94px;
    min-width:94px;
    max-width:94px;
    min-height:94px;
    padding:9px 6px;
  }
  .gameDetailPage .gameHeroVerifiedMetacritic:not([hidden]){
    box-sizing:border-box;
    flex:0 0 94px;
    width:94px;
    min-width:94px;
    max-width:94px;
    min-height:94px;
  }
  .gameDetailPage .gameHeroCommunityRatingScore{
    font-size:27px;
  }
  .gameDetailPage .gameHeroCommunityRatingScore small{
    font-size:10px;
  }
}
@media(max-width:340px){
  .gameDetailPage .gameHeroRatingGroup:not([hidden]){
    justify-content:flex-start;
  }
}

/* Keep the global nav off-screen until the OUTERMOST library modal closes.
 * Closing an inner Add Game picker cannot expose nav over a still-open
 * Completed / Dropped / Wishlist / Currently Playing library sheet.
 * Scope to actual visible modals; [hidden] means the owner has closed.
 * Applies across Basic B*tch, Default and Path of the Wolf themes. */
html body:has(#profileLibraryModal:not([hidden])) #profileBottomNav.gcAppBottomNav,
html body:has(#profileLibraryModal:not([hidden])) nav.gcAppBottomNav,
html body:has(#profileLibraryModal:not([hidden])) #gcAdminUnifiedNav.gcAdminFloatingNav,
html body:has(.gcProfileLibraryModal:not([hidden])) #profileBottomNav.gcAppBottomNav,
html body:has(.gcProfileLibraryModal:not([hidden])) nav.gcAppBottomNav,
html body:has(.gcProfileLibraryModal:not([hidden])) #gcAdminUnifiedNav.gcAdminFloatingNav,
html body:has(#gamePickerModal[style*="display: flex"]) #profileBottomNav.gcAppBottomNav,
html body:has(#gamePickerModal[style*="display: flex"]) nav.gcAppBottomNav{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
