/*
 * Shadow Nexus Social — snx-stage11.css
 * Stage 11 Core Social Experience Polish
 *
 * Purpose: targeted polish layer applied on top of all existing styles.
 * Does NOT replace or rebuild any existing system.
 * Fixes: button consistency, card standardisation, mobile overflow,
 *        empty states, loading states, responsive video, max-widths.
 */

/* ═══════════════════════════════════════════════════════════
   1. GLOBAL MAX-WIDTH CONSTRAINT  (desktop readability)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  .page {
    max-width: 700px;
  }
  /* Messages inbox stays wider — it has its own split layout */
  #inboxPage {
    max-width: none !important;
    width: calc(100% - 240px) !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   2. BUTTON SYSTEM — three canonical variants
   ═══════════════════════════════════════════════════════════ */

/* Primary button — electric blue */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #003d99, #0077dd);
  border: 1px solid rgba(0, 174, 239, 0.65);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  touch-action: manipulation;
  white-space: nowrap;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0055bb, #0099ff);
  box-shadow: 0 0 18px rgba(0, 174, 239, 0.45);
}
.btn-primary:active { transform: scale(0.96); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Active / success — neon green accent */
.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 10px;
  background: rgba(0, 80, 20, 0.25);
  border: 1px solid rgba(57, 255, 20, 0.55);
  color: #39FF14;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  touch-action: manipulation;
}
.btn-success:hover {
  background: rgba(0, 100, 20, 0.35);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.35);
}
.btn-success:active { transform: scale(0.96); }

/* Danger — delete / end live / destructive */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 10px;
  background: rgba(140, 10, 30, 0.18);
  border: 1px solid rgba(255, 51, 80, 0.58);
  color: #ff4466;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  touch-action: manipulation;
}
.btn-danger:hover {
  background: rgba(200, 20, 50, 0.30);
  box-shadow: 0 0 14px rgba(255, 40, 70, 0.35);
}
.btn-danger:active { transform: scale(0.96); }

/* ═══════════════════════════════════════════════════════════
   3. CARD STANDARDISATION
   ═══════════════════════════════════════════════════════════ */

/* Unified card surface — dark, thin blue border, subtle glow on hover */
.snx-card {
  background: rgba(11, 31, 58, 0.92);
  border: 1px solid rgba(0, 174, 239, 0.22);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.snx-card:hover {
  border-color: rgba(0, 174, 239, 0.42);
  box-shadow: 0 0 18px rgba(0, 100, 220, 0.10);
}

/* ═══════════════════════════════════════════════════════════
   4. EMPTY STATE — consistent text treatment
   ═══════════════════════════════════════════════════════════ */
.snx-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 20px;
  text-align: center;
  color: #2a4a6a;
  font-size: 13px;
}
.snx-empty-state-icon { font-size: 36px; }
.snx-empty-state-title { font-size: 15px; font-weight: 700; color: #3a6a9a; }
.snx-empty-state-sub { color: #2a4060; line-height: 1.6; max-width: 260px; }

/* ═══════════════════════════════════════════════════════════
   5. LOADING SPINNER — one clean state
   ═══════════════════════════════════════════════════════════ */
.snx-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(0, 174, 239, 0.20);
  border-top-color: #00AEEF;
  animation: snxSpin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes snxSpin { to { transform: rotate(360deg); } }

.snx-loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px 20px;
  color: #3a6a9a;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════
   6. RESPONSIVE VIDEO — 16:9 aspect ratio helper
   ═══════════════════════════════════════════════════════════ */
.snx-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.snx-video-wrap > iframe,
.snx-video-wrap > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ═══════════════════════════════════════════════════════════
   7. MOBILE OVERFLOW SAFETY
   Prevent any page from producing horizontal overflow.
   ═══════════════════════════════════════════════════════════ */
.page,
.section-card,
.postBox,
.inbox-split,
.profile-header {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════
   8. NOTIFICATION FILTER TAB — consistent with rest of app
   ═══════════════════════════════════════════════════════════ */
.notif-filter-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(0, 174, 239, 0.18);
  margin-bottom: 12px;
}
.notif-filter-tabs::-webkit-scrollbar { display: none; }
.notif-filter-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #6a90b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.notif-filter-tab:hover { color: #00AEEF; }
.notif-filter-tab.active {
  color: #00AEEF;
  border-bottom-color: #00AEEF;
}
.notif-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #39FF14;
  color: #040f00;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
  box-shadow: 0 0 7px rgba(57, 255, 20, 0.55);
}

/* ═══════════════════════════════════════════════════════════
   9. MUSIC HUB NAV ITEM — consistent glow accent
   ═══════════════════════════════════════════════════════════ */
#navMusic.active-nav,
#scNavMusic.sc-item-active {
  color: #39FF14 !important;
}

/* ═══════════════════════════════════════════════════════════
   10. SIDEBAR SCROLL SAFETY
   The mobile slide-out drawer is position:fixed + transform —
   it never requires body overflow:hidden.
   Comment-only marker; actual scroll locks are set by modal JS
   as inline styles which have higher specificity than any rule here.
   ═══════════════════════════════════════════════════════════ */
/* No CSS rule needed — confirmed in code audit: openMobileDrawer /
   closeMobileDrawer never touch body.style.overflow. */
