/* ==========================================================================
   PROFILE HEADER MODULE
   --------------------------------------------------------------------------
   Purpose:
   - Styles the top section of BuddyBoss member profiles, including the
     headline, contact information, and layout container
   - Ensures consistent spacing, alignment, and typography across all profile
     types
   - Provides responsive adjustments for mobile layouts

   Exclusions:
   - No snapshot styling (belongs in snapshots.css)
   - No directory or member list styling (belongs in directory.css)
   - No Luminary profile UI (belongs in luminary.css)
   - No form or field styling (belongs in forms.css)
   - No BuddyBoss navigation or layout overrides (belongs in buddyboss-overrides.css)

   Related JS:
   - profile.js (dynamic interactions, contact info enhancements)

   Sections:
   1. Header Container
   2. Headline
   3. Contact Information
   4. Mobile Overrides
   5. Profile Header – Social Icons Alignment Fixes
   ========================================================================== */

/* === Profile Header Layout and Typography === */
.profile-header-custom {
    /* We will use a more standard positioning approach for the main container */
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    overflow: visible;
    height: auto;
    margin: 15px 0 4px;
    font-size: 14px;
    color: var(--bb-body-font-color);
    position: relative;
    padding: 24px;
    padding-bottom: 5px;
    margin-bottom: 0;
}

.profile-headline {
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 8px;
    color: var(--bb-heading-text-color);
}

.profile-contact-info {
    display: flex;
    align-items: center;
    margin: 0 0 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #555;
}

.profile-contact-info span {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.profile-contact-info a {
    color: var(--bb-body-font-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.profile-contact-info a:hover {
    color: var(--bb-primary-color);
}

.profile-contact-info .bb-icon-l {
    font-size: 1em !important;
    margin-right: 0px !important;
    opacity: 1 !important;
    color: var(--bb-body-font-color) !important;
    line-height: 1 !important;
}

.profile-contact-info a:first-of-type {
    padding-right: 6px !important;
}

.separator {
    color: var(--bb-body-font-color);
    padding: 0 4px !important;
    display: inline-block !important;
}

/* Mobile Overrides */
@media (max-width: 768px) {
  .profile-header-custom {
    display: block !important;
    margin-top: 16px;
    margin-bottom: 16px;
    text-align: center;
    padding: 15px;
    padding-bottom: 10px;
  }

  .profile-headline {
    text-align: center;
  }

  .profile-contact-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 10px auto !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .profile-contact-info span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
  }

  .profile-contact-info .separator {
    display: inline-block !important;
    padding: 0 4px !important;
  }
}

/* ==========================================================================
   Profile Header – Social Icons Alignment Fixes
   ========================================================================== */
/* Ensure the social icons sit horizontally next to the action buttons */
.member-header-actions .bb-profile-social {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    margin-left: 12px; /* space between Connect button and icons */
}

/* Fix icon size */
.member-header-actions .bb-profile-social .bb-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

/* Prevent giant icons caused by inherited font-size */
.member-header-actions .bb-profile-social,
.member-header-actions .bb-profile-social a,
.member-header-actions .bb-profile-social .bb-icon {
    font-size: 0 !important;
    line-height: 1 !important;
}

/* Optional: vertically align icons with the Connect button */
.member-header-actions-wrap {
    display: flex;
    align-items: center;
}
