/** Lofind Gigneo Fixes v0.3.8 — public Gigneo profile layout, Woodmart compatible.
 *  Scoped only to the gigneo_freelancer / gigneo_employer singular pages.
 *  The dashboard, WooCommerce, Fluent Support, and upload UI are unaffected.
 */

/* Woodmart's duplicate single-post heading is separate from the actual Gigneo
   profile header. Remove the theme-generated title, byline and date, retaining
   the in-profile name, rating, qualification and location. */
body.lofind-public-profile :is(
  .single-post-title,
  .wd-single-post-header,
  .post-single-page > .entry-header,
  .post-single-page > .post-title,
  .post-single-page > .wd-post-header,
  .post-single-page > .wd-entry-meta,
  .post-single-page > .entry-meta,
  .post-single-page > .post-meta,
  .post-single-page > .post-title-wrapper,
  .entry-header .wd-entry-meta,
  .article-inner > .entry-header,
  .article-inner > .wd-entry-meta,
  .article-inner > .post-title,
  .article-inner > .post-title-wrapper
) {
    display: none !important;
}
/* Other Woodmart single-post variants separate their header from the article. */
body.lofind-public-profile .post-single-page .post-title,
body.lofind-public-profile .post-single-page .wd-entry-meta,
body.lofind-public-profile .post-single-page .entry-meta,
body.lofind-public-profile .post-single-page .post-meta,
body.lofind-public-profile .wd-post-header,
body.lofind-public-profile .wd-entry-meta,
body.lofind-public-profile .post-date-meta,
body.lofind-public-profile .post-single-page .meta-post-categories {
    display: none !important;
}
/* Page-title banner, when generated using the current WordPress post title. */
body.lofind-public-profile .main-page-wrapper > .page-title,
body.lofind-public-profile .main-page-wrapper .title-design-centered .entry-meta,
body.lofind-public-profile .main-page-wrapper .post-single-page .entry-title {
    display: none !important;
}

/* Woodmart sidebar: previous bridge versions hid the sidebar-container at ALL
   viewport sizes, including the off-canvas drawer controlled by the mobile
   Sidebar button. That left its page overlay active but its drawer invisible.
   Restrict any desktop-only page-layout suppression to desktop, and let
   Woodmart fully own the mobile off-canvas panel and its animations. */
@media (min-width: 1025px) {
    body.lofind-public-profile .main-page-wrapper .content-layout-wrapper > :is(
        .sidebar-container, .wd-sidebar, aside.sidebar, #sidebar, .widget-area, .sidebar
    ),
    body.lofind-public-profile .main-page-wrapper > .container > .row > .sidebar-container {
        display: none !important;
    }
}
/* Release the profile content column without altering the sidebar widget's
   visibility, position, or overlay on mobile. */
body.lofind-public-profile .content-layout-wrapper > :is(.site-content, .wd-content),
body.lofind-public-profile .main-page-wrapper .content-layout-wrapper > .site-content,
body.lofind-public-profile .main-page-wrapper .site-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    min-width: 0;
}

/* Reference layout: main freelancer content on the LEFT and Gigneo's original
   profile summary/video/language/social panels on the RIGHT. The previous bridge
   version forced one column and moved Gigneo's aside below the long profile.
   Do NOT hide that aside when hiding Woodmart's theme widgets. */
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    align-items: stretch;
}
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-main,
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-aside {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-aside {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start;
    gap: 16px !important;
    align-items: stretch !important;
    align-self: start;
}
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-aside > :is(.gn-section, .gn-notice, .gn-notices-wrapper) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 !important;
    box-sizing: border-box;
}
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-aside > .gn-section ~ .gn-section,
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-aside .gn-notice ~ .gn-section {
    margin-top: 0 !important;
}
@media (min-width: 992px) {
    body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(280px, 32%) !important;
        align-items: start !important;
        gap: clamp(20px, 2.4vw, 32px) !important;
    }
    body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-aside {
        grid-column: 2;
        grid-row: 1;
    }
    body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-main {
        grid-column: 1;
        grid-row: 1;
    }
}
/* Cover, avatar, name and public success-rate card read as one left-column
   profile header. We intentionally leave private financial/order figures out. */
body.lofind-public-profile .gn-profile-single .gn-main > .gn-head {
    margin-bottom: 18px;
}
body.lofind-public-profile .gn-profile-single .gn-profile-cover .gn-cover {
    height: clamp(120px, 14vw, 180px);
}
body.lofind-public-profile .gn-profile-single .gn-profile-media-wrapper .gn-profile-info > .gn-name {
    font-size: clamp(21px, 2vw, 26px);
    line-height: 1.3;
}
body.lofind-public-profile .gn-profile-single .gn-profile-media-wrapper .lofind-public-stat-cards {
    grid-template-columns: minmax(140px, 200px);
    justify-content: start;
    gap: 12px;
}
/* Preserve Gigneo's in-page navigation and full profile content. */
body.lofind-public-profile .gn-profile-single .gn-single-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
}
body.lofind-public-profile .gn-profile-single .gn-main .gn-single-content-wrapper,
body.lofind-public-profile .gn-profile-single .gn-main .gn-body {
    max-width: 100%;
    min-width: 0;
}
/* Rating, education and location share a consistent inline baseline; wrap as
   whole items on phones rather than breaking icon away from its text. */
body.lofind-public-profile .gn-profile-single .gn-profile-media-wrapper .gn-profile-info > ul.gn-meta {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 10px 22px !important;
    padding: 0 !important;
    margin: 12px 0 0 !important;
    list-style: none !important;
}
body.lofind-public-profile .gn-profile-single .gn-profile-media-wrapper .gn-profile-info > ul.gn-meta > li {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto;
    align-self: center;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.5;
    white-space: nowrap;
}
body.lofind-public-profile .gn-profile-single .gn-profile-media-wrapper .gn-profile-info > ul.gn-meta > li > i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0 !important;
    line-height: 1;
}

/* Consistent, single-line language and social badges on public profiles. */
body.lofind-public-profile .gn-profile-single .gn-language-cards,
body.lofind-public-profile .gn-profile-single .gn-socials-section .gn-body {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    align-content: start;
    justify-content: flex-start;
    gap: 8px !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}
body.lofind-public-profile .gn-profile-single .gn-language-cards > li.gn-language,
body.lofind-public-profile .gn-profile-single .gn-socials-section a.gn-social-tag {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    min-height: 35px;
    width: auto !important;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 12px !important;
    margin: 0 !important;
    line-height: 20px !important;
    white-space: nowrap;
    vertical-align: middle;
}
body.lofind-public-profile .gn-profile-single .gn-language-cards .gn-level {
    display: inline !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 20px !important;
    white-space: nowrap;
}
body.lofind-public-profile .gn-profile-single .gn-socials-section a.gn-social-tag > img {
    display: block;
    flex: 0 0 20px;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    object-fit: contain;
}

/* Settings dashboard: user-added language and social items line up even when
   entries have different text lengths; leave the original edit modal alone. */
body.lofind-gigneo-dashboard #gn-profile-languages ul.gn-profile-language-list,
body.lofind-gigneo-dashboard #gn-profile-socials .gn-profile-social-list {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.lofind-gigneo-dashboard #gn-profile-languages ul.gn-profile-language-list > li.gn-language,
body.lofind-gigneo-dashboard #gn-profile-socials .gn-profile-social-list > a.gn-social-tag {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 0 !important;
    width: auto !important;
    max-width: 100%;
    white-space: nowrap;
    vertical-align: middle;
    box-sizing: border-box;
}
body.lofind-gigneo-dashboard #gn-profile-languages .gn-language .gn-level {
    margin: 0 !important;
    white-space: nowrap;
}

@media (max-width: 767px) {
    body.lofind-public-profile .gn-profile-single .gn-profile-media-wrapper .gn-profile-info > ul.gn-meta {
        gap: 8px 16px !important;
    }
    body.lofind-public-profile .gn-profile-single .gn-language-cards > li.gn-language,
    body.lofind-public-profile .gn-profile-single .gn-socials-section a.gn-social-tag {
        max-width: 100%;
    }
}

/* Compact consistent badge alignment in Gigneo's actual right-column panels. */
body.lofind-public-profile .gn-profile-single > .gn-aside .gn-languages-section .gn-language-cards,
body.lofind-public-profile .gn-profile-single > .gn-aside .gn-socials-section .gn-body {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
}
body.lofind-public-profile .gn-profile-single > .gn-aside .gn-language-cards > li.gn-language,
body.lofind-public-profile .gn-profile-single > .gn-aside .gn-socials-section a.gn-social-tag {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    min-height: 32px;
    white-space: nowrap;
    max-width: 100%;
}
body.lofind-public-profile .gn-profile-single > .gn-aside .gn-language-cards > li.gn-language .gn-level {
    margin: 0 !important;
    padding: 0 !important;
}
@media (max-width: 991px) {
    body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-aside {
        width: 100% !important;
    }
}



/* v0.4.0 — Restore a centered, full-width public-profile canvas.
 * Woodmart's single post template often retains a narrow .container or col-lg-9
 * after hiding its widget sidebar. The profile must not sit flush left with an
 * unused strip on the right. Constrain the OUTER content container, not each
 * nested row, and let the Gigneo grid consume the resulting available width. */
@media (min-width: 992px) {
  body.lofind-public-profile .main-page-wrapper > :is(.container, .wd-container, .container-fluid),
  body.lofind-public-profile .main-page-wrapper > .main-content > :is(.container, .wd-container, .container-fluid) {
    box-sizing: border-box !important;
    width: calc(100% - 64px) !important;
    max-width: 1536px !important;
    padding-inline: 0 !important;
    margin-inline: auto !important;
  }
}
/* When Woodmart wraps the profile in a Bootstrap row, release the 9-column
 * constraint and prevent negative row gutters from shifting the profile left. */
body.lofind-public-profile .main-page-wrapper .content-layout-wrapper:has(.gn-profile-single.gn-profile-single-layout-1) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}
body.lofind-public-profile .main-page-wrapper .content-layout-wrapper > :is(
  .site-content, .wd-content, .content-area, #primary, .primary
):has(.gn-profile-single.gn-profile-single-layout-1) {
  box-sizing: border-box !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding-inline: 0 !important;
  margin-inline: 0 !important;
}
body.lofind-public-profile .main-page-wrapper :is(
  .post-single-page, .article-inner, .entry-content, .wd-entry-content,
  .single-post-content, .entry-content-wrapper
):has(.gn-profile-single.gn-profile-single-layout-1) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}
/* Scope a final width limit to Gigneo's layout as a fallback for custom
 * templates that bypass Woodmart's normal content container. */
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1536px !important;
  margin-inline: auto !important;
  gap: 24px !important;
}
@media (min-width: 992px) {
  body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 {
    grid-template-columns: minmax(0, 1.85fr) minmax(340px, 1fr) !important;
    column-gap: clamp(24px, 2.2vw, 36px) !important;
    align-items: start !important;
  }
}
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > :is(.gn-main, .gn-aside) {
  min-width: 0 !important;
}
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 > .gn-main > .gn-head {
  margin-bottom: 24px !important;
}
body.lofind-public-profile .gn-profile-single .gn-profile-cover .gn-cover {
  height: clamp(150px, 13vw, 192px) !important;
}
/* Maintain a readable rhythm between identity, success rate and tab menu. */
body.lofind-public-profile .gn-profile-single .gn-profile-media-wrapper .gn-profile-info {
  margin-bottom: 20px;
}
body.lofind-public-profile .gn-profile-single .gn-profile-media-wrapper .lofind-public-stat-cards {
  gap: 12px !important;
}
body.lofind-public-profile .gn-profile-single .gn-single-menu-wrapper {
  margin-top: 8px;
}
body.lofind-public-profile .gn-profile-single .gn-single-content-wrapper {
  padding-top: 16px;
}
/* Uniform sidebar cards, without changing Gigneo's own information hierarchy. */
body.lofind-public-profile .gn-profile-single > .gn-aside {
  gap: 18px !important;
}
body.lofind-public-profile .gn-profile-single > .gn-aside > .gn-section {
  box-sizing: border-box;
  width: 100% !important;
  margin: 0 !important;
  padding: 20px !important;
  gap: 16px !important;
}
/* Theme container still has usable side padding on tablets and phones. */
@media (max-width: 991px) {
  body.lofind-public-profile .main-page-wrapper > :is(.container, .wd-container, .container-fluid),
  body.lofind-public-profile .main-page-wrapper > .main-content > :is(.container, .wd-container, .container-fluid) {
    box-sizing: border-box;
    width: calc(100% - 40px) !important;
    max-width: 100% !important;
    padding-inline: 0 !important;
    margin-inline: auto !important;
  }
  body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 {
    gap: 28px !important;
  }
  body.lofind-public-profile .gn-profile-single > .gn-aside {
    gap: 16px !important;
  }
}
@media (max-width: 600px) {
  body.lofind-public-profile .main-page-wrapper > :is(.container, .wd-container, .container-fluid),
  body.lofind-public-profile .main-page-wrapper > .main-content > :is(.container, .wd-container, .container-fluid) {
    width: calc(100% - 28px) !important;
  }
  body.lofind-public-profile .gn-profile-single > .gn-aside > .gn-section {
    padding: 16px !important;
  }
  body.lofind-public-profile .gn-profile-single .gn-single-content-wrapper {
    padding-top: 12px;
  }
}


/* v0.4.1: Give the public profile its own viewport-sized canvas, independent
 * of Woodmart's residual article-column width. The companion script measures
 * and centers this canvas; this CSS preserves the original layout if JS fails. */
body.lofind-public-profile .gn-profile-single.gn-profile-single-layout-1 {
  box-sizing: border-box !important;
  position: relative;
  max-width: none !important;
}
/* Let the centered profile extend beyond the original Woodmart content column
 * without being clipped by legacy single-post layout wrappers. */
body.lofind-public-profile :is(
  .main-page-wrapper, .content-layout-wrapper, .site-content, .wd-content,
  .article-inner, .post-single-page, .entry-content
):has(.gn-profile-single.gn-profile-single-layout-1) {
  overflow-x: visible !important;
}


/* v0.4.2 — Woodmart post-footer breathing room on Gigneo public profiles.
 * The social-share buttons and the older/newer profile pager are emitted by
 * Woodmart BELOW Gigneo's centered profile grid. They do not inherit the
 * profile's calculated viewport gutters. Target those footer components only.
 * No layout changes to the profile grid, uploader, dashboard or site header.
 */
body.lofind-public-profile .main-page-wrapper :is(
  .wd-post-share,
  .wd-post-social,
  .wd-share-buttons,
  .post-share-buttons,
  .post-share,
  .share-post,
  .single-post-share,
  .social-buttons,
  .wd-social-share,
  .woodmart-social-icons,
  .wd-social-icons,
  .wd-social-icons-wrapper
) {
    box-sizing: border-box !important;
    padding-inline-start: clamp(24px, 4.2vw, 72px) !important;
    padding-inline-end: clamp(20px, 3vw, 48px) !important;
}
/* Do not display Woodmart previous/next profile navigation. Unlike
   Gigneo's Overview/Reviews/Credentials tabs, this is the theme-level post pager. */
body.lofind-public-profile .main-page-wrapper :is(
  .wd-post-nav, .wd-posts-nav, .wd-single-post-nav, .woodmart-post-nav,
  .woodmart-posts-nav, .post-navigation, .posts-navigation, .post-nav-links,
  .single-post-navigation, .navigation.post-navigation, .single-post-footer-nav,
  .wd-posts-navigation, .wd-single-post-navigation, .wd-post-nav-links
) {
    display: none !important;
}
/* Some Woodmart releases wrap both footer rows in a common article footer.
 * Use these fallback selectors ONLY when the actual Gigneo content is not
 * nested inside the footer, preventing padding changes to the profile itself.
 */
body.lofind-public-profile .main-page-wrapper :is(
  .post-single-page > .entry-footer,
  .post-single-page > .post-footer,
  .post-single-page > .wd-single-footer,
  .article-inner > .entry-footer,
  .article-inner > .post-footer
) {
    box-sizing: border-box !important;
    padding-inline: clamp(20px, 3vw, 48px) !important;
}
@media (max-width: 600px) {
  body.lofind-public-profile .main-page-wrapper :is(
    .wd-post-share, .wd-post-social, .wd-share-buttons,
    .post-share-buttons, .post-share, .share-post, .single-post-share,
    .social-buttons, .wd-social-share, .woodmart-social-icons,
    .wd-social-icons, .wd-social-icons-wrapper
  ) {
      padding-inline: 20px !important;
  }
}

/* v0.4.3: Prevent mobile/off-canvas sidebar disappearance caused by legacy
 * CSS in earlier versions. Woodmart's drawer must retain its own display rules;
 * do not style .sidebar-container or its children on small screens. */


/* v0.4.4: Woodmart can output its single-post Older/Newer pager outside
 * .main-page-wrapper, where earlier scoped rules never matched.
 * Hide only post-to-post navigation, not the mobile off-canvas sidebar,
 * archive pagination, or Gigneo's own Overview/Reviews/Credentials tabs. */
body.lofind-public-profile :is(
  .wd-post-nav, .wd-posts-nav, .wd-posts-navigation,
  .wd-single-post-nav, .wd-single-post-navigation,
  .woodmart-post-nav, .woodmart-posts-nav,
  .woodmart-post-navigation, .post-navigation,
  .posts-navigation, .single-post-navigation,
  .single-post-footer-nav, .wd-post-nav-links,
  .wd-posts-nav-links, .wd-blog-nav, .wd-blog-navigation,
  .wd-single-nav, .wd-prev-next, nav.navigation.post-navigation,
  nav.navigation.posts-navigation,
  .wp-block-post-navigation-link,
  .wd-el-post-navigation, .wd-post-navigation,
  .elementor-widget-wd_post_navigation
) {
  display: none !important;
}
