/* SportCV public-profile organic-growth actions — v2.
   Desktop/tablet: actions stay integrated in the hero content.
   Phone only: the SAME action row is moved into normal document flow directly
   below the hero card and above the profile tabs. */

body.public-profile-page .scv-public-hero-actions {
  display: grid;
  grid-template-columns: minmax(180px, 264px) minmax(180px, 264px);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.public-profile-page .scv-public-hero-actions > a {
  box-sizing: border-box;
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  padding: 10px 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

/* Primary athlete-contact action. */
body.public-profile-page .scv-public-hero-actions .scv-public-request-action {
  border: 1px solid #3159ae;
  background: linear-gradient(180deg, #4b73d5 0%, #3159ae 100%);
  box-shadow: 0 8px 18px rgba(49, 89, 174, .16);
  color: #fff;
}

/* Secondary platform action — Option A. */
body.public-profile-page .scv-public-hero-actions .scv-build-sportcv-action {
  border: 1.5px solid #1473e6;
  background: #fff;
  box-shadow: 0 4px 12px rgba(20, 115, 230, .06);
  color: #1266c5;
}

@media (hover: hover) and (pointer: fine) {
  body.public-profile-page .scv-public-hero-actions .scv-build-sportcv-action:hover {
    border-color: #0f65cf;
    background: #f5f9ff;
    box-shadow: 0 7px 16px rgba(20, 115, 230, .10);
  }

  body.public-profile-page .scv-public-hero-actions .scv-public-request-action:hover {
    box-shadow: 0 10px 22px rgba(49, 89, 174, .22);
  }
}

body.public-profile-page .scv-public-hero-actions > a:focus-visible {
  outline: 3px solid rgba(20, 115, 230, .28);
  outline-offset: 2px;
}

body.public-profile-page .scv-public-hero-actions .scv-public-request-action[aria-disabled="true"] {
  cursor: default;
}

body.public-profile-page #contactOpportunityCard .contact-note {
  margin-top: 0 !important;
}

/* Hidden anchor on tablet/desktop. */
body.public-profile-page .scv-public-mobile-actions-anchor {
  display: none;
}

/* Tablet portrait, tablet landscape/rotated, and desktop use desktop treatment. */
@media (min-width: 701px) {
  body.public-profile-page .scv-public-hero-actions .scv-build-sportcv-action {
    order: 1;
  }

  body.public-profile-page .scv-public-hero-actions .scv-public-request-action {
    order: 2;
    justify-self: end;
  }
}

/* Phone only: action row is outside the hero card, in normal flow.
   The JS moves the existing row into this anchor so IDs/listeners remain unique. */
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) and (max-width: 1100px) and (pointer: coarse) {
  body.public-profile-page .scv-public-mobile-actions-anchor {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 6px 0 10px;
    padding: 0 12px;
    box-sizing: border-box;
  }

  /* Prevent the legacy mobile hero grid from auto-placing the action row over the identity
     during the brief moment before the relocation script runs. */
  body.public-profile-page .hero .scv-public-hero-actions {
    display: none !important;
  }

  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    width: 100%;
  }

  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions > a {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px;
    max-width: none !important;
    margin: 0 !important;
    padding: 8px 8px;
    border-radius: 11px;
    font-size: 12.5px;
    line-height: 1.15;
    white-space: normal;
  }

  body.public-profile-page .scv-public-mobile-actions-anchor .scv-public-request-action {
    order: 1;
  }

  body.public-profile-page .scv-public-mobile-actions-anchor .scv-build-sportcv-action {
    order: 2;
  }
}

@media (max-width: 390px) {
  body.public-profile-page .scv-public-mobile-actions-anchor {
    padding-right: 10px;
    padding-left: 10px;
  }

  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions {
    gap: 7px;
  }

  body.public-profile-page .scv-public-mobile-actions-anchor > .scv-public-hero-actions > a {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 11.5px;
  }
}
