/* ==========================================================
   GF HERO V2 - SHARED RESPONSIVE LAYOUT
   Owns: shell, banner, avatar overlap, profile layout.
   Internals such as badges, tags, socials and buttons live in
   gf-dashboard-hero.css.
========================================================== */

.gf-hero-breakout {
  width: 100%;
  margin: 0;
}

.gf-hero.gf-hero--v2 {
  position: relative;
  width: 100%;
  overflow: visible;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(94, 76, 140, 0.12);
  box-shadow:
    0 18px 42px rgba(42, 31, 78, 0.10),
    0 2px 8px rgba(42, 31, 78, 0.05);
}

.gf-hero--v2,
.gf-hero--v2 * {
  box-sizing: border-box;
}

.gf-hero--v2 button,
.gf-hero--v2 a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* :focus-visible only — keyboard users get the ring, mouse/touch
   clicks don't leave a stuck outline behind */
.gf-hero--v2 button:focus-visible,
.gf-hero--v2 a:focus-visible {
  outline: 2px solid rgba(124, 77, 255, 0.28);
  outline-offset: 3px;
}

.gf-hero--v2 .gf-hero-banner {
  position: relative;
  width: 100%;
  /* Fixed, clamped height keeps the banner premium without ballooning on
     wide desktops. Image is pre-cropped server-side, shown as cover/center. */
  height: clamp(200px, 18vw, 300px);
  overflow: visible;
  /* White frame matching the avatar's 6px ring, fully rounded.
     background-clip keeps the image inside the white border. */
  border: 6px solid #ffffff;
  border-radius: 20px;
  background-color: #dfe8f7;
  background-clip: padding-box;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
      box-shadow: 0 0 0 1.5px rgba(124, 77, 255, 0.35), 0 10px 24px rgba(42, 31, 78, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.gf-hero--v2 .gf-hero-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.03), rgba(17, 24, 39, 0.08)),
    linear-gradient(0deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.gf-hero--v2 .gf-hero-avatar {
  position: absolute;
  left: 30px;
  bottom: -48px;
  z-index: 3;
  width: 138px;
  height: 138px;
  padding: 6px;
  border-radius: 50%;
  background: #ffffff;
  /* overflow must be visible so the camera button is not clipped
     by the circular border-radius. The img clips itself via its own
     border-radius: 50%, so the circular crop is preserved. */
  overflow: visible;
  box-shadow:
    0 16px 34px rgba(31, 23, 62, 0.22),
    0 0 0 1px rgba(124, 77, 255, 0.10);
}

.gf-hero--v2 .gf-hero-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.gf-hero--v2 .gf-hero-details {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 28px;
  row-gap: 16px;
  min-width: 0;
  padding: 24px 26px 26px 184px;
  border-radius: 0 0 20px 20px;

  text-align: left;
}

.gf-hero--v2 .gf-hero-mobile-identity,
.gf-hero--v2 .gf-hero-top,
.gf-hero--v2 .gf-hero-identity,
.gf-hero--v2 .gf-hero-bottom {
  min-width: 0;
}

.gf-hero--v2 .gf-hero-mobile-identity {
  grid-column: 1;
  grid-row: 1;
}

.gf-hero--v2 .gf-hero-bottom {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  column-gap: 28px;
  row-gap: 12px;
  align-items: end;
  text-align: left;
}

.gf-hero--v2 .gf-hero-bottom > .gf-hero-bio,
.gf-hero--v2 .gf-hero-bottom > .gf-profile-tags,
.gf-hero--v2 .gf-hero-bottom > .gf-hero-socials-wrap {
  grid-column: 1;
}

.gf-hero--v2 .gf-hero-bottom > .gf-hero-actions-row {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: end;
  justify-self: end;
}

.gf-hero--v2 .gf-hero-action--banner {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

/* Smaller, more compact "Update banner" button + text.
   Extra .gf-hero-banner in the selector raises specificity so it wins
   over the base .gf-hero-action sizing regardless of stylesheet order. */
.gf-hero--v2 .gf-hero-banner .gf-hero-action--banner {
  min-height: 30px;
  padding: 0 12px;
  font-size: 11.5px;
  border-radius: 9px;
}

.gf-hero--v2 .gf-hero-edit-profile {
  position: absolute;
  right: 18px;
  bottom: -20px;
  z-index: 4;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  /* White ring with a faint purple outline */
  border: 2px solid #ffffff;
  background: rgba(255, 255, 255, 0.92);
  color: #6d28d9;
  box-shadow:
    0 0 0 1.5px rgba(124, 77, 255, 0.35),
    0 10px 24px rgba(42, 31, 78, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gf-hero--v2 .gf-hero-edit-profile svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
}

.gf-hero--v2 .gf-hero-edit-profile svg path {
  stroke: currentColor;
}

.gf-hero--v2 .gf-hero-edit-profile:active,
.gf-hero--v2 .gf-hero-public-link:active,
.gf-hero--v2 .gf-btn-copy:active,
.gf-hero--v2 .gf-btn-share:active {
  transform: translateY(1px) scale(0.98);
}

.gf-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #1c1c1c;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.gf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gf-toast-icon {
  color: #8a5cff;
  font-weight: 700;
}

@media (min-width: 1280px) {
  .gf-hero--v2 .gf-hero-banner {
    min-height: 0;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .gf-hero--v2 .gf-hero-banner {
    height: 180px;
  }

  .gf-hero--v2 .gf-hero-avatar {
    left: 24px;
    bottom: -44px;
    width: 128px;
    height: 128px;
  }

  .gf-hero--v2 .gf-hero-details {
    grid-template-columns: 1fr;
    padding: 64px 22px 24px;
  }

  .gf-hero--v2 .gf-hero-bottom {
    grid-template-columns: 1fr;
  }

  .gf-hero--v2 .gf-hero-bottom > .gf-hero-actions-row {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }
}

@media (max-width: 767px) {
  .gf-hero-breakout {
    width: 98vw;
    margin-top: -8px;
    margin-left: calc(50% - 49vw);
    margin-right: calc(50% - 49vw);
  }

  .gf-hero.gf-hero--v2 {
    width: 100%;
    border-radius: 18px;
  }

  .gf-hero--v2 .gf-hero-banner {
    height: 180px;
    border-width: 5px;
    border-radius: 18px;
    background-position: center;
  }

  .gf-hero--v2 .gf-hero-avatar {
    left: 18px;
    bottom: -46px;
    width: 114px;
    height: 114px;
    padding: 5px;
  }

  .gf-hero--v2 .gf-hero-details {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    /* left padding matches the avatar's left offset (18px) so the name
       starts on the same vertical line as the avatar. */
    padding: 62px 16px 18px 18px;
    text-align: left;
  }

  .gf-hero--v2 .gf-hero-bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: left;
  }

  .gf-hero--v2 .gf-hero-action--banner {
    top: 14px;
    right: 14px;
  }

  .gf-hero--v2 .gf-hero-edit-profile {
    right: 16px;
    bottom: -18px;
    width: 38px;
    height: 38px;
  }
}
