/* Nesign profile layout. Applies only inside the profile or bubble content area (#main-content).
   The Nesign header, sidebar and footer are not touched. */

/* One readable column: cover, header, tabs and cards share the same edges. */
html.nk-profile #main-content .bx-base-pofile-cover-image-wrp > .bx-base-pofile-cover-image,
html.nk-profile #main-content .bx-base-pofile-cover-info,
html.nk-profile #main-content [id^="bx-page-view-"] {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 1088px;
  margin-left: auto;
  margin-right: auto;
}
html.nk-profile #main-content [id^="bx-page-view-"] { padding: 0 0 8px; }
html.nk-profile #main-content .bx-page-wrapper:has([id^="bx-page-view-"]) { padding-left: 0; padding-right: 0; }

/* Cover: soft rounded card with a gentle fade at the bottom. */
html.nk-profile #main-content .bx-base-pofile-cover-image-wrp { padding: 14px 0 0; }
html.nk-profile #main-content .bx-base-pofile-cover-image-wrp > .bx-base-pofile-cover-image {
  border-radius: 20px;
  overflow: hidden;
}
html.nk-profile #main-content .bx-base-pofile-cover-image-wrp > .bx-base-pofile-cover-image img { border-radius: 0; }
html.nk-profile #main-content .bx-base-pofile-cover-image-wrp > .bx-base-pofile-cover-image { min-height: 168px; }
html.nk-profile #main-content .bx-base-pofile-ci-cnt { padding-bottom: 1rem; }
html.nk-profile #main-content .bx-base-pofile-cover-image-wrp > .bx-base-pofile-cover-image::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0,0,0,.42), rgba(0,0,0,0));
  pointer-events: none;
}
html.nk-profile #main-content .bx-base-pofile-cover-info { padding-left: 16px; padding-right: 16px; }
html.nk-profile #main-content .bx-base-pofile-unit-thumb.ring-4 { --tw-ring-color: var(--nk-panel); }

/* Name, facts and buttons: grouped, aligned, never overflowing. */
html.nk-profile #main-content .bx-base-profile-cover-title-bages h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  padding-left: 0;
}
html.nk-profile #main-content .bx-base-profile-cover-meta-holder {
  height: auto !important;
  margin-top: .6rem;
}
html.nk-profile #main-content .bx-base-profile-cover-meta {
  position: static !important;
  width: 100%;
}
html.nk-profile #main-content .bx-base-profile-cover-meta ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .5rem;
  justify-content: inherit;
}
html.nk-profile #main-content .bx-base-profile-cover-meta .sys-meta-div { display: none; }
html.nk-profile #main-content .bx-base-profile-cover-meta li.bx-menu-item {
  align-items: center;
  min-height: 1.75rem;
  padding: 0 .6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--nk-text) 7%, transparent);
}
html.nk-profile #main-content .bx-base-pofile-cover-actions {
  height: auto !important;
  flex: 0 0 auto;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}
html.nk-profile #main-content .bx-base-profile-cover-title-bages { flex: 1 1 0; min-width: 0; }
html.nk-profile #main-content .bx-base-pofile-cover-actions ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

/* Tabs: part of the header, not a separate dark strip. */
html.nk-profile #main-content #bx-menu-main-bar-wrapper {
  background-color: color-mix(in srgb, var(--nk-panel) 78%, transparent) !important;
  border-color: var(--nk-border) !important;
  margin-top: .25rem;
}

/* Cards: one radius, one gap. */
html.nk-profile #main-content [id^="bx-page-view-"] .bx-def-border-radius-block { border-radius: 16px; }
html.nk-profile #main-content [id^="bx-page-view-"] .bx-layout-cell > .bx-page-block-container { margin-bottom: 20px; }
html.nk-profile #main-content [id^="bx-page-view-"] .bx-layout-cell > .bx-page-block-container:first-child { margin-top: 20px; }

/* Leave out cards that only say "Empty". */
html.nk-profile #main-content .bx-page-block-container:has(> .bx-db-container > .bx-db-content > .bx-msg-box-container),
html.nk-profile #main-content .bx-page-block-container:has(.bx-search-result-block-empty) {
  display: none;
}

/* The side column becomes a tidy row of cards when the main column is empty. */
html.nk-profile #main-content [id^="bx-page-view-"] .bx-layout-bar-right-content:not(:has(.bx-page-block-container)) {
  display: none;
}
html.nk-profile #main-content [id^="bx-page-view-"] .bx-layout-bar-right-content:not(:has(.bx-page-block-container)) + .bx-layout-bar-right-bar {
  width: 100%;
  max-width: 100%;
}
html.nk-profile #main-content [id^="bx-page-view-"] .bx-layout-bar-right-bar > .bx-layout-cell {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  align-items: start;
}
html.nk-profile #main-content [id^="bx-page-view-"] .bx-layout-bar-right-bar > .bx-layout-cell > .bx-page-block-container {
  margin: 0;
}

/* Timeline options button sits quietly on the right. */
html.nk-profile #main-content #bx-page-block-295 > .bx-db-container > .bx-db-header,
html.nk-profile #main-content .bx-page-block-container > .bx-db-container.bx-dbc-nobg > .bx-db-header {
  padding-top: 0;
  padding-bottom: .75rem;
}
html.nk-profile #main-content .bx-db-header .bx-db-menu { margin-left: auto; }
@media (min-width: 1024px) {
  html.nk-profile #main-content .bx-base-pofile-cover-image-wrp > .bx-base-pofile-cover-image { min-height: 232px; }
  html.nk-profile #main-content .bx-base-pofile-cover-actions { flex: 0 1 280px; }
}

/* Mobile: everything centered and symmetric. */
@media (max-width: 1023px) {
  html.nk-profile #main-content .bx-base-profile-cover-title-bages { text-align: center; margin-left: 0; margin-right: 0; }
  html.nk-profile #main-content .bx-base-profile-cover-title-bages h1 { text-align: center; font-size: 1.9rem; }
  html.nk-profile #main-content .bx-base-profile-cover-meta ul { justify-content: center; }
  html.nk-profile #main-content .bx-base-pofile-cover-actions { justify-content: center; margin-top: 1rem; }
  html.nk-profile #main-content .bx-base-pofile-cover-actions ul { justify-content: center; }
}
@media (max-width: 640px) {
  html.nk-profile #main-content .bx-base-pofile-cover-image-wrp > .bx-base-pofile-cover-image,
  html.nk-profile #main-content .bx-base-pofile-cover-info,
  html.nk-profile #main-content [id^="bx-page-view-"] { width: calc(100% - 24px); }
  html.nk-profile #main-content .bx-base-pofile-cover-image-wrp { padding-top: 10px; }
  html.nk-profile #main-content .bx-base-pofile-cover-image-wrp > .bx-base-pofile-cover-image { border-radius: 16px; }
}

/* Facts are plain counts, without stacks of faces. */
html.nk-profile #main-content .bx-base-profile-cover-meta .sys-action-counter-profiles { display: none; }


/* The post form on a space must stay visible, even if a status message is inside the block. */
html.nk-profile #main-content #bx-page-block-293,
html.nk-profile #main-content #nk-post,
html.nk-profile #main-content #bx-page-block-293.bx-page-block-container:has(.bx-msg-box-container) {
  display: block !important;
  scroll-margin-top: 88px;
}

/* Guests should not see a list or a row of faces for this person's friends. */
body.bx-user-unauthorized [id^="bx-conn-counter-sys-profiles-friends-"] .sys-action-counter-profiles,
body.bx-user-unauthorized [id^="bx-conn-by-popup-sys-profiles-friends-"],
body.bx-user-unauthorized #bx-page-block-84 {
  display: none !important;
}
body.bx-user-unauthorized [id^="bx-conn-counter-sys-profiles-friends-"] {
  pointer-events: none;
  cursor: default;
}
