/**
 * Public profile — Linktree-style stack.
 * Load after abutic-dot-public-profile.css.
 */

body.ab-dot-public-profile.ab-linktree .profile-container.fade-in-section {
  max-width: min(100%, 36rem);
  padding-left: 1.1rem !important;
  padding-right: 1.1rem !important;
  box-sizing: border-box;
}

/* ── Banner: short wash behind the avatar ── */
body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner) .profile-banner-container {
  height: clamp(9.75rem, 32vw, 14.5rem) !important;
  margin-bottom: -4.75rem !important;
}

@media (min-width: 900px) {
  body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner) .profile-banner-container {
    height: clamp(11.25rem, 20vw, 15.75rem) !important;
    margin-bottom: -5.25rem !important;
  }
}

body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner) .profile-banner-image {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 36%,
    rgba(0, 0, 0, 0.84) 56%,
    rgba(0, 0, 0, 0.46) 76%,
    rgba(0, 0, 0, 0.14) 90%,
    transparent 100%
  ) !important;
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 36%,
    rgba(0, 0, 0, 0.84) 56%,
    rgba(0, 0, 0, 0.46) 76%,
    rgba(0, 0, 0, 0.14) 90%,
    transparent 100%
  ) !important;
}

body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner).ab-profile-bg-dark .profile-banner-fade,
body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner):not(.ab-profile-bg-light) .profile-banner-fade {
  height: 58%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(8, 8, 12, 0.16) 42%,
    rgba(8, 8, 12, 0.55) 76%,
    rgba(8, 8, 12, 0.92) 100%
  );
}

/* ── Identity sits in the page, not on a floating card ── */
body.ab-dot-public-profile.ab-linktree .profile-card.fade-in-section,
body.ab-dot-public-profile.ab-linktree:not(.has-owner-preview) .profile-card.fade-in-section,
body.ab-dot-public-profile.ab-linktree.has-owner-preview .profile-card.fade-in-section,
body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner):not(.has-owner-preview) .profile-card.fade-in-section,
body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner).has-owner-preview .profile-card.fade-in-section {
  margin-top: 0 !important;
  padding: 0.25rem 0 0.5rem !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.ab-dot-public-profile.ab-linktree .profile-card.fade-in-section::before,
body.ab-dot-public-profile.ab-linktree .profile-card.fade-in-section::after {
  display: none !important;
}

body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap,
body.ab-dot-public-profile.ab-linktree:not(.has-owner-preview) .profile-avatar-wrap,
body.ab-dot-public-profile.ab-linktree.has-owner-preview .profile-avatar-wrap {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 0 auto 0.85rem;
  width: 6.75rem;
  height: 6.75rem;
}

body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap .profile-img,
body.ab-dot-public-profile.ab-linktree .profile-img {
  width: 6.75rem !important;
  height: 6.75rem !important;
  border-radius: 999px !important;
  border: 3px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 8px 24px rgba(15, 23, 42, 0.16) !important;
}

body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap .profile-img.profile-img--initials {
  font-size: 2.15rem !important;
}

@media (min-width: 768px) {
  body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap,
  body.ab-dot-public-profile.ab-linktree:not(.has-owner-preview) .profile-avatar-wrap,
  body.ab-dot-public-profile.ab-linktree.has-owner-preview .profile-avatar-wrap {
    width: 8.75rem;
    height: 8.75rem;
    margin-bottom: 1rem;
  }

  body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap .profile-img,
  body.ab-dot-public-profile.ab-linktree .profile-img {
    width: 8.75rem !important;
    height: 8.75rem !important;
  }

  body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap .profile-img.profile-img--initials {
    font-size: 2.7rem !important;
  }
}

@media (min-width: 900px) {
  body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap,
  body.ab-dot-public-profile.ab-linktree:not(.has-owner-preview) .profile-avatar-wrap,
  body.ab-dot-public-profile.ab-linktree.has-owner-preview .profile-avatar-wrap {
    width: 10.25rem;
    height: 10.25rem;
  }

  body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap .profile-img,
  body.ab-dot-public-profile.ab-linktree .profile-img {
    width: 10.25rem !important;
    height: 10.25rem !important;
  }

  body.ab-dot-public-profile.ab-linktree .profile-avatar-wrap .profile-img.profile-img--initials {
    font-size: 3.15rem !important;
  }
}

body.ab-dot-public-profile.ab-linktree .profile-header-text,
body.ab-dot-public-profile.ab-linktree:not(.has-owner-preview) .profile-header-text,
body.ab-dot-public-profile.ab-linktree.has-owner-preview .profile-header-text {
  margin-top: 0 !important;
}

body.ab-dot-public-profile.ab-linktree .profile-card h1,
body.ab-dot-public-profile.ab-linktree .profile-card h1.text-2xl {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  margin: 0 !important;
}

body.ab-dot-public-profile.ab-linktree .profile-header-subline {
  margin-top: 0.3rem !important;
  margin-bottom: 0 !important;
  gap: 0.05rem;
}

body.ab-dot-public-profile.ab-linktree .profile-header-text .profile-title-line,
body.ab-dot-public-profile.ab-linktree .profile-header-subline .profile-org {
  font-size: 0.875rem !important;
}

body.ab-dot-public-profile.ab-linktree .profile-business-logo {
  margin-top: 0.65rem;
  max-width: 2.5rem;
}

body.ab-dot-public-profile.ab-linktree .profile-header-spacer {
  display: none !important;
  height: 0 !important;
}

body.ab-dot-public-profile.ab-linktree:not(.has-owner-preview) .profile-wrapper.ab-dot-public-profile-main,
body.ab-dot-public-profile.ab-linktree.no-profile-banner:not(.has-owner-preview) .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 1.75rem !important;
}

body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner):not(.has-owner-preview) .profile-wrapper.ab-dot-public-profile-main {
  padding-top: 0 !important;
}

/* ── Socials: simple icon row ── */
body.ab-dot-public-profile.ab-linktree .social-buttons {
  display: flex !important;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.85rem auto 1.15rem !important;
  padding: 0 !important;
}

body.ab-dot-public-profile.ab-linktree .social-buttons a,
body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .social-buttons a {
  width: 2.5rem !important;
  height: 2.5rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.ab-dot-public-profile.ab-linktree.ab-profile-bg-light .social-buttons a {
  background: rgba(15, 23, 42, 0.06) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

body.ab-dot-public-profile.ab-linktree .social-buttons a::after {
  display: none !important;
}

body.ab-dot-public-profile.ab-linktree .social-buttons a i,
body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .social-buttons a i {
  font-size: 1.05rem !important;
}

body.ab-dot-public-profile.ab-linktree .social-buttons a:hover {
  transform: translateY(-2px) scale(1.04) !important;
}

/* ── Sections: no labeled cards ── */
body.ab-dot-public-profile.ab-linktree .profile-section {
  padding-bottom: 0.65rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.ab-dot-public-profile.ab-linktree:not(.has-profile-editor) .profile-section-label {
  display: none !important;
}

body.ab-dot-public-profile.ab-linktree .profile-bio-card,
body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .profile-bio-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 0.5rem !important;
  max-width: 28rem;
  margin: 0 auto;
}

body.ab-dot-public-profile.ab-linktree .profile-bio-card__text {
  text-align: center;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
}

body.ab-dot-public-profile.ab-linktree .profile-bio-card__title {
  display: none !important;
}

/* ── Linktree buttons ── */
body.ab-dot-public-profile.ab-linktree .links-grid,
body.ab-dot-public-profile.ab-linktree .cta-grid {
  gap: 0.7rem;
}

body.ab-dot-public-profile.ab-linktree .profile-link-row,
body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .profile-link-row {
  position: relative;
  min-height: 3.85rem;
  padding: 0.7rem 1.15rem 0.7rem 1.15rem !important;
  border-radius: 0.9rem !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: 0 6px 18px -12px rgba(15, 23, 42, 0.28) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .profile-link-row {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.45) !important;
}

body.ab-dot-public-profile.ab-linktree .profile-link-row:hover {
  transform: scale(1.015);
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.32) !important;
}

body.ab-dot-public-profile.ab-linktree .profile-link-row__thumb,
body.ab-dot-public-profile.ab-linktree .profile-link-row__thumb--pdf,
body.ab-dot-public-profile.ab-linktree .profile-link-row__thumb--promo,
body.ab-dot-public-profile.ab-linktree .profile-link-row__thumb--link {
  position: absolute;
  left: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.85rem !important;
  height: 2.85rem !important;
  border-radius: 0.65rem !important;
}

body.ab-dot-public-profile.ab-linktree .profile-link-row__body {
  width: 100%;
  padding: 0 2.4rem;
  align-items: center;
  text-align: center;
}

body.ab-dot-public-profile.ab-linktree .profile-link-row:not(:has(.profile-link-row__thumb)) .profile-link-row__body {
  padding: 0 0.75rem;
}

body.ab-dot-public-profile.ab-linktree .profile-link-row__label {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

body.ab-dot-public-profile.ab-linktree .profile-link-row__host,
body.ab-dot-public-profile.ab-linktree .profile-link-row__chevron {
  display: none !important;
}

body.ab-dot-public-profile.ab-linktree .profile-button.custom-button:not(.mobile-connect-btn),
body.ab-dot-public-profile.ab-linktree .cta-grid a,
body.ab-dot-public-profile.ab-linktree .cta-grid button {
  width: 100%;
  min-height: 3.85rem !important;
  border-radius: 0.9rem !important;
  font-weight: 650 !important;
  letter-spacing: -0.015em !important;
  box-shadow: 0 6px 18px -12px rgba(15, 23, 42, 0.28) !important;
}

body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .about-cta-grid .profile-button,
body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .about-cta-grid .profile-button i {
  color: rgba(255, 255, 255, 0.94) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.94) !important;
}

body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .social-buttons a i {
  color: rgba(255, 255, 255, 0.94) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.ab-dot-public-profile.ab-linktree .about-section,
body.ab-dot-public-profile.ab-linktree:not(.ab-profile-bg-light) .about-section {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}

@media (max-width: 767px) {
  body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner) .profile-banner-container {
    height: clamp(8.75rem, 40vw, 12.5rem) !important;
    margin-bottom: -4rem !important;
  }

  body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner):not(.has-owner-preview) .profile-card.fade-in-section,
  body.ab-dot-public-profile.ab-linktree:not(.no-profile-banner).has-owner-preview .profile-card.fade-in-section {
    margin-top: 0 !important;
  }

  /* Compact sticky Connect — don't cover the page with a dock */
  body.ab-dot-public-profile.ab-linktree .ios-bottom-bar {
    gap: 3px;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 -1px 12px rgba(15, 23, 42, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
  }

  body.ab-dot-public-profile.ab-linktree .ios-bottom-meta {
    font-size: 0.625rem;
    opacity: 0.6;
    margin: 0;
    line-height: 1.2;
  }

  body.ab-dot-public-profile.ab-linktree .mobile-connect-btn.profile-button.custom-button {
    width: min(18.5rem, 82%) !important;
    min-width: 12.5rem;
    max-width: 20rem;
    min-height: 3.05rem !important;
    height: 3.05rem;
    padding: 0 1.4rem !important;
    margin: 0 !important;
    font-size: 0.9375rem !important;
    font-weight: 650 !important;
    letter-spacing: -0.01em !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12) !important;
  }

  body.ab-dot-public-profile.ab-linktree .mobile-connect-btn.profile-button i {
    font-size: 0.875rem !important;
  }

  body.ab-dot-home.ab-dot-public-profile.ab-linktree.has-mobile-connect-bar .profile-wrapper.ab-dot-public-profile-main {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }
}
