/*
   38-profile-social.css
   Extracted from 06-profile.css to keep surface ownership explicit.
*/

/* v11.209: ALL text on the full-page user profile uses the app default font
   (Söhne). The profile carries scattered 'Sora' / 'DM Sans' declarations
   (section titles, media titles, picker titles, manual inputs, etc.) across
   ~17 rules. Rather than patch each, one authoritative container-scoped
   normalization forces Söhne on #profile-page + every descendant + pseudo-
   elements. Mirrors the FPMP font normalization. !important + last-loaded so
   it wins over the per-element rules; font weights/sizes are intentionally
   left intact — only the family is normalized. */
#profile-page,
#profile-page *,
#profile-page *::before,
#profile-page *::after {
  font-family: 'Sohne', system-ui, -apple-system, sans-serif !important;
}

/* ===========================================================================
   v11367 — Followers / Following / Mutual FULL PAGE (Instagram-style layout,
   Editorial Dark theme). Slides in from the right over the profile page.
   =========================================================================== */
.profile-social-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: #0E0E0E;
  display: flex;
  flex-direction: column;
  transform: translate3d(100%, 0, 0);
  will-change: transform;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* v11370: vertical list scrolling stays native; horizontal swipe-to-close
     reaches the JS gesture (bindProfileSocialPageSwipe). */
  touch-action: pan-y;
}
.profile-social-page-overlay.profile-social-page-open {
  transform: translate3d(0, 0, 0);
}
.profile-social-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.profile-social-page-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: max(var(--shelfd-safe-top, 0px), env(safe-area-inset-top, 0px)) 8px 0;
  min-height: 52px;
  flex: 0 0 auto;
}
.profile-social-page-back {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f5f5f7;
  cursor: pointer;
  flex: 0 0 44px;
}
.profile-social-page-back svg { width: 23px; height: 23px; }
.profile-social-page-back:active { transform: scale(0.94); }
.profile-social-page-title {
  flex: 1 1 auto;
  text-align: center;
  font-family: 'Sohne', 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.03em;
  color: #f5f5f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-social-page-spacer { flex: 0 0 44px; }

.profile-social-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 6px;
  flex: 0 0 auto;
}
.profile-social-tab {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 13px 4px 12px;
  font-family: 'Sohne', 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: rgba(235, 232, 244, 0.55);
  position: relative;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-social-tab strong { font-weight: 600; color: inherit; }
.profile-social-tab.active { color: #f5f5f7; }
.profile-social-tab.active::after {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -1px;
  height: 2px;
  background: #f5f5f7;
  border-radius: 2px;
}

.profile-social-list {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 16px);
}
.profile-social-list::-webkit-scrollbar { display: none; }

/* v11371 — horizontal pager: 3 panels side by side, the track translates to
   page between mutual / followers / following. */
.profile-social-pager {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.profile-social-track {
  display: flex;
  height: 100%;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* will-change is set inline only while a swipe is active (see
     bindProfileSocialPager) so no idle compositing layer is kept. */
}
.profile-social-panel {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 16px);
}
.profile-social-panel::-webkit-scrollbar { display: none; }
/* v11374: while a horizontal swipe is active, lock the panels so vertical
   scrolling is disabled until the swipe ends. Scoped to this page + only
   present while the gesture is engaged (class added/removed in JS). */
.profile-social-page-overlay.horizontal-swipe-active .profile-social-panel {
  overflow: hidden;
  touch-action: pan-x;
}

.profile-social-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
}
.profile-social-row-main {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.profile-social-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 52px;
  background: #1a1a1f;
}
.profile-social-row-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.profile-social-row-name {
  font-family: 'Sohne', 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: #f5f5f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-social-row-sub {
  font-family: 'Sohne', 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: rgba(235, 232, 244, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-social-follow-btn {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  min-width: 104px;
  min-height: 34px;
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: 'Sohne', 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.2, 1, 0.3, 1), filter 200ms ease, background 200ms ease;
}
.profile-social-follow-btn:active { transform: scale(0.97); }
.profile-social-follow-btn.is-follow,
.profile-social-follow-btn.is-followback {
  /* v11377: french-lilac accent (matches the shelf-banner Follow button,
     including its lavender glow) so "Follow" / "Follow Back" read clearly as
     the active accent, not a flat surface. */
  background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.34);
}
.profile-social-follow-btn.is-following,
.profile-social-follow-btn.is-requested {
  background: rgba(255, 255, 255, 0.085);
  color: #ece9f3;
  border-color: rgba(255, 255, 255, 0.16);
}

.profile-social-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 24px;
  color: rgba(235, 232, 244, 0.55);
  font-family: 'Sohne', 'DM Sans', sans-serif;
  letter-spacing: 0.03em;
}
.profile-social-state-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: #a78bfa;
  animation: profileSocialSpin 0.7s linear infinite;
}
@keyframes profileSocialSpin { to { transform: rotate(360deg); } }

/* v11381 — own My List header: followers/following counts (replaced Tier List).
   Plain tappable text inside the centered .mylist-profile-action-row. */
.mylist-profile-social-count {
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
  border: 0 !important;
  padding: 2px 2px !important;
  font-family: 'Sohne', 'DM Sans', sans-serif !important;
  font-weight: 400 !important;
  font-size: 14px !important;                   /* v11.582: followers/following label +1px (was 13px) */
  letter-spacing: 0.03em !important;
  color: rgba(255, 255, 255, 0.9) !important;   /* v11.582: white @ 90% opacity (was muted 0.62) */
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
}
.mylist-profile-social-count strong {
  font-weight: 600 !important;
  color: #f5f5f7 !important;
}
.mylist-profile-social-count:active { opacity: 0.6 !important; }
.mylist-profile-social-sep {
  color: rgba(235, 232, 244, 0.4) !important;
  font-size: 13px !important;
}

