/* SportCV embedded-browser/WebView typography stability v2.
   Prevent Android/iOS in-app browsers from font-boosting or splitting the
   Sport + Role identity row differently from regular mobile browsers. */
html,
body {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

.hero .hero-identity-head,
.hero .hero-identity-head *,
.hero .hero-identity-primary,
.hero .hero-identity-primary * {
  -webkit-text-size-adjust: none !important;
  text-size-adjust: none !important;
}

.hero .hero-content,
.hero .hero-identity-head,
.hero .hero-identity-primary,
.hero .hero-name-row,
.hero .subtitle-meta,
.hero #heroRole,
.hero #heroRole .sport-inline,
.hero #heroRole .hero-sport-line,
.hero #heroRole .hero-sport-text,
.hero #heroRole .hero-role-line,
.hero #subtitleCountry,
.hero #heroNationalityBadge {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Accepted profile-name baseline. */
.hero .hero-name-row .hero-name,
.hero .hero-name {
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  font-style: normal !important;
  text-transform: none !important;
}

/* Sport, Role, and Country stay on one shared typographic scale. */
.hero #heroRole,
.hero #heroRole .hero-sport-line,
.hero #heroRole .hero-sport-text,
.hero #heroRole .hero-role-line,
.hero #subtitleCountry,
.hero #subtitleCountry > span,
.hero #heroNationalityBadge,
.hero #heroNationalityBadge .hero-nationality-value,
.hero #heroNationalityBadge .flag-inline > span {
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  font-style: normal !important;
  text-transform: none !important;
}

.hero #heroRole .sport-inline,
.hero .subtitle-meta {
  overflow: visible !important;
}

.hero #heroRole .hero-sport-text,
.hero #heroRole .hero-role-line,
.hero #subtitleCountry,
.hero #heroNationalityBadge {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .hero #heroRole,
  .hero #heroRole .hero-sport-line,
  .hero #heroRole .hero-sport-text,
  .hero #heroRole .hero-role-line,
  .hero #subtitleCountry,
  .hero #subtitleCountry > span,
  .hero #heroNationalityBadge,
  .hero #heroNationalityBadge .hero-nationality-value,
  .hero #heroNationalityBadge .flag-inline > span {
    font-size: 20px !important;
  }
}

@media (max-width: 760px) {
  .hero .hero-name-row .hero-name,
  .hero .hero-name {
    font-size: 24px !important;
    line-height: 1.1 !important;
  }

  .hero .hero-identity-primary > .subtitle-meta {
    margin-top: 0 !important;
  }

  .hero #heroRole,
  .hero #heroRole .hero-sport-line,
  .hero #heroRole .hero-sport-text,
  .hero #heroRole .hero-role-line,
  .hero #subtitleCountry,
  .hero #subtitleCountry > span,
  .hero #heroNationalityBadge,
  .hero #heroNationalityBadge .hero-nationality-value,
  .hero #heroNationalityBadge .flag-inline > span {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }

  /* Keep Sport and Role on separate full-width rows; long text can still wrap. */
  .hero #heroRole .sport-inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    align-items: stretch !important;
    gap: 2px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  .hero #heroRole .hero-sport-line,
  .hero #heroRole .hero-sport-text,
  .hero #heroRole .hero-role-line {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  .hero #heroRole .hero-sport-line,
  .hero #heroRole .hero-role-line {
    flex: none !important;
    width: 100% !important;
  }

  .hero #heroRole .hero-role-line {
    display: block !important;
  }

  .hero #subtitleCountry,
  .hero #heroNationalityBadge {
    flex: 0 1 auto !important;
    width: auto !important;
  }

  .hero #heroNationalityBadge {
    margin-bottom: 4px !important;
  }
}

/* v2.3 — compact public mobile action-row baseline.
   Normal phone widths: two equal 50/50 columns, compact 50px controls,
   14px semibold labels, no clipping. Very narrow phones stack cleanly. */
@media (max-width: 700px) {
  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    grid-auto-rows: 47px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 8px !important;
  }

  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 47px !important;
    min-height: 47px !important;
    max-height: 47px !important;
    margin: 0 !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-synthesis: none !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }
}

/* Slightly narrower phones keep the 50/50 row but reduce text a little
   before we ever allow clipping or uneven button heights. */
@media (max-width: 390px) {
  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions > a {
    font-size: 13px !important;
    padding-inline: 4px !important;
  }
}

/* Genuinely narrow phones: stack both actions rather than squeezing or
   wrapping only one label. */
@media (max-width: 340px) {
  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: 47px !important;
    gap: 8px !important;
  }

  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions > a {
    height: 47px !important;
    min-height: 47px !important;
    max-height: 47px !important;
    padding: 4px 10px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }
}


/* v2.4 — final mobile spacing + parent-managed badge refinement.
   Keep the action row visually centered between the hero card and section nav,
   and free horizontal room for the Parent Managed label on phone layouts. */
@media (max-width: 700px) {
  body.public-profile-page .scv-public-mobile-actions-anchor {
    margin-top: 11px !important;
    margin-bottom: 5px !important;
  }

  body.public-profile-page .hero .scv-parent-managed-badge .scv-profile-safety-icon {
    display: none !important;
  }

  body.public-profile-page .hero .scv-profile-safety-badge.scv-parent-managed-badge {
    gap: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}
