/* =========================
   Friends Page
========================= */

.friends-page {
  padding: 16px;
}

.friends-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.friends-page h2 {
  margin: 0;
}

.friends-eyebrow {
  margin: 0 0 4px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* =========================
   Tabs
========================= */

.friends-tabs {
  display: flex;
  gap: 12px;
  margin: 16px -4px 20px;
  border-bottom: 1px solid #1f2937;
  overflow-x: auto;
  scrollbar-width: none;
}

.friends-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  color: #9ca3af;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: #ffffff;
  border-bottom-color: #3b82f6;
}

/* =========================
   Tab Content
========================= */

.friends-tab-content {
  display: none;
}

.friends-tab-content.active {
  display: block;
}

.friends-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 10px;
  color: #9ca3af;
  text-align: center;
}

/* =========================
   Notifications Page
========================= */

.notifications-page {
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(11, 16, 32, 0.96)),
    #0b1020;
}

.notifications-page-header {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.notifications-page h2 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
}

.notifications-page-subtitle {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.45;
}

.notifications-page .friends-eyebrow {
  color: var(--soshix-platform-soshix);
}

.notifications-tabs-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 0;
  border-bottom: 0;
}

.friends-tabs.notifications-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  gap: 3px;
  margin: 0;
  padding: 0 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: transparent;
  box-shadow: none;
}

.friends-tabs.notifications-tabs .tab-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-bottom-color: rgba(148, 163, 184, 0.2);
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.72)),
    #111827;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 800;
  min-height: 42px;
  margin-bottom: -1px;
  padding: 10px 18px 11px;
  transform: translateY(5px);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  box-shadow:
    inset 0 -10px 16px rgba(2, 6, 23, 0.22),
    0 -1px 0 rgba(255, 255, 255, 0.03);
}

.notifications-tab-label {
  min-width: 0;
}

.notifications-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.28);
}

.friends-tabs.notifications-tabs .tab-btn:hover {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(180deg, rgba(51, 65, 85, 0.72), rgba(15, 23, 42, 0.78)),
    #111827;
  transform: translateY(3px);
}

.friends-tabs.notifications-tabs .tab-btn.active {
  z-index: 3;
  color: #ffffff;
  border-color: rgba(34, 197, 94, 0.34);
  border-bottom-color: #0f172a;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.98)),
    #0f172a;
  box-shadow:
    0 -12px 24px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(34, 197, 94, 0.06) inset;
  transform: translateY(0);
}

.friends-tabs.notifications-tabs .tab-btn.active .notifications-tab-badge {
  background: var(--soshix-platform-soshix);
  color: #052e16;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.18);
}

.notifications-delete-all {
  flex: 0 0 auto;
  margin-bottom: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 0;
  transition:
    color 0.18s ease,
    opacity 0.18s ease;
}

.notifications-delete-all:hover,
.notifications-delete-all:focus-visible {
  color: #fca5a5;
}

.notifications-delete-all:disabled {
  cursor: progress;
  opacity: 0.45;
}

.notifications-tab-content {
  min-height: 260px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

/* =========================
   Search Filters
========================= */

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px;
  background-color: #0b1020;
  border: 1px dashed #374151;
  border-radius: 8px;
}

.search-filters input,
.search-filters select {
  background-color: #111827;
  border: 1px solid #1f2937;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: #e5e7eb;
  min-width: 130px;
  flex: 1;
}

.search-filters select {
  cursor: pointer;
}

.search-filters input::placeholder {
  color: #6b7280;
}

/* =========================
   Search / Clear Buttons
========================= */

.search-btn {
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

.search-btn:hover {
  background-color: #1d4ed8;
}

.search-btn:disabled {
  background-color: #374151;
  cursor: not-allowed;
  opacity: 0.6;
}

.clear-btn {
  background-color: #1f2937;
  color: #9ca3af;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

.clear-btn:hover {
  background-color: #374151;
}

/* =========================
   Grid Layout
========================= */

.friends-page .friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* =========================
   Friend Card
========================= */

.friends-page .friend-card {
  background-color: #0b1020;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  min-width: 0;
}

/* =========================
   Avatar Placeholder
========================= */

.friends-page .avatar-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.friends-page .friend-avatar,
.friends-page .friend-avatar-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 10px;
}

.friends-page .friend-avatar {
  border-radius: 8px;
  overflow: hidden;
  background-color: #111827;
  border: 1px solid #1f2937;
}

.friends-page .friend-avatar-placeholder {
  background-color: #111827;
  border: 1px dashed #374151;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.4;
}

/* =========================
   Avatar Image
========================= */

.friends-page .friend-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

/* =========================
   Name
========================= */

.friends-page .friend-name {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================
   Actions
========================= */

.friends-page .friend-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Button overrides */
.friends-page .friend-actions button.btn {
  border: none !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  cursor: pointer !important;
  width: 100%;
  min-height: 32px;
}

.friends-page .friend-actions button.btn.toggle-friend,
.friends-page .friend-actions button.btn.accept-request,
.friends-page .friend-actions button.btn.accept-friend {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

.friends-page .friend-actions button.btn.toggle-friend:hover,
.friends-page .friend-actions button.btn.accept-request:hover,
.friends-page .friend-actions button.btn.accept-friend:hover {
  background-color: #1d4ed8 !important;
}

.friends-page .friend-actions button.btn.remove-friend,
.friends-page .friend-actions button.btn.decline-request,
.friends-page .friend-actions button.btn.cancel-request {
  background-color: #1f2937 !important;
  color: #cbd5e1 !important;
}

.friends-page .friend-actions button.btn.remove-friend:hover,
.friends-page .friend-actions button.btn.decline-request:hover,
.friends-page .friend-actions button.btn.cancel-request:hover {
  background-color: #374151 !important;
}

.friends-page .friend-actions button.btn:disabled {
  background-color: #374151 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
}

/* =========================
   ADD FRIEND BUTTON
========================= */

.friends-page .friend-actions button.btn.add {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

.friends-page .friend-actions button.btn.add:hover {
  background-color: #1d4ed8 !important;
}

/* =========================
   ADD FRIEND - SENT / TOGGLED
========================= */

.friends-page .friend-actions button.btn.add[data-state="remove"],
.friends-page .friend-actions button.btn.add:disabled {
  background-color: #374151 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
}

.friends-page .friend-actions button.btn.add[data-state="remove"]:hover,
.friends-page .friend-actions button.btn.add:disabled:hover {
  background-color: #374151 !important;
}

/* =========================
   REMOVE FRIEND BUTTON
========================= */

.friends-page .friend-actions button.btn.remove {
  background-color: #1f2937 !important;
  color: #9ca3af !important;
}

.friends-page .friend-actions button.btn.remove:hover {
  background-color: #374151 !important;
}

/* =========================
   Responsive
========================= */

@media (max-width: 480px) {
  .friends-page {
    padding: 12px;
  }

  .friends-page .friends-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-filters {
    flex-direction: column;
  }
}

/* =========================
   Right Column - Friends
========================= */

#rightFriendsList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.right-friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.right-friend-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.right-friend-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.right-friend-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #1f2937;
  display: block;
}

.right-friend-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border: 2px solid #020617;
  border-radius: 999px;
  background: #22c55e;
}

.right-friend-name {
  font-size: 15px;
  font-weight: 500;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================
   Right Column - Sponsored Ads
========================= */

.right-ad {
  display: flex;
  gap: 10px;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.right-ad:hover {
  background: rgba(255, 255, 255, 0.05);
}

.right-ad img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1f2937;
}

.right-ad-text {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.3;
}

#all-notifications .friend-card {
  padding: 10px 14px;
}

#allNotificationsList {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#allNotificationsList .notification-row {
  display: block;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.62), rgba(15, 23, 42, 0.72)),
    #0f172a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

#allNotificationsList .notification-row:hover {
  border-color: rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.86)),
    #111827;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

#allNotificationsList .notification-row.is-unread {
  border-color: rgba(34, 197, 94, 0.32);
  background:
    linear-gradient(180deg, rgba(22, 101, 52, 0.16), rgba(30, 41, 59, 0.82)),
    #0f172a;
}

#allNotificationsList .notif-row {
  align-items: flex-start;
  gap: 14px;
}

#allNotificationsList .notif-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(59, 130, 246, 0.18)),
    #1f2937;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#allNotificationsList .notif-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

#allNotificationsList .notif-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.5;
  min-width: 0;
  flex: 1 1 auto;
}

#allNotificationsList .notif-platform {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: fit-content;
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

#allNotificationsList .notif-platform-soshix {
  color: var(--soshix-platform-soshix);
}

#allNotificationsList .notif-platform-aura {
  color: var(--soshix-platform-aura);
}

#allNotificationsList .notif-platform-flux {
  color: var(--soshix-platform-flux);
}

#allNotificationsList .notif-platform-vox {
  color: var(--soshix-platform-vox);
}

#allNotificationsList .notif-message {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  color: #dbe4f0;
  font-size: 15px;
  line-height: 1.45;
}

#allNotificationsList .notif-actor {
  display: inline;
  color: #ffffff;
  font-weight: 900;
}

#allNotificationsList .notif-action {
  color: #cbd5e1;
}

#allNotificationsList .notif-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
}

#allNotificationsList .notif-meta-separator {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
}

#allNotificationsList .notif-time {
  flex: 0 0 auto;
  padding-top: 0;
  color: #7b8798;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

#allNotificationsList .notif-actions {
  margin-top: 14px;
  margin-left: 62px;
  gap: 8px;
}

#allNotificationsList .notif-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  opacity: 0.58;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

#allNotificationsList .notif-delete-btn:hover,
#allNotificationsList .notif-delete-btn:focus-visible {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.22);
  color: #fca5a5;
  opacity: 1;
}

#allNotificationsList .notif-delete-btn:disabled {
  cursor: progress;
  opacity: 0.4;
}

@media (max-width: 640px) {
  .notifications-page {
    padding: 18px;
  }

  .notifications-tabs-row {
    align-items: flex-end;
    flex-direction: row;
    gap: 8px;
  }

  .friends-tabs.notifications-tabs {
    width: 100%;
    gap: 3px;
    padding: 0 6px;
  }

  .friends-tabs.notifications-tabs .tab-btn {
    flex: 0 0 auto;
    text-align: center;
    min-height: 40px;
    padding: 9px 14px 10px;
  }

  .notifications-delete-all {
    align-self: flex-end;
    margin-bottom: 7px;
  }

  #allNotificationsList .notif-row {
    gap: 12px;
  }

  #allNotificationsList .notif-avatar {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  #allNotificationsList .notif-delete-btn {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  #allNotificationsList .notif-meta {
    align-items: center;
    flex-direction: row;
    gap: 5px;
  }

  #allNotificationsList .notif-actions {
    margin-left: 58px;
  }
}

.notif-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 15px;
}

.notif-text {
  font-size: 14px;
  color: #e5e7eb;
  flex: 1;
}

.notif-time {
  font-size: 12px;
  color: #9ca3af;
  flex-shrink: 0;
}

.notification-row {
  padding: 8px 0;
  border-bottom: 1px solid #2a2f45;
}

.notification-row:last-child {
  border-bottom: none;
}

.notifications-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.notifications-page-btn {
  border: none;
  border-radius: 999px;
  background: #1f2937;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 34px;
  padding: 7px 12px;
}

.notifications-page-btn:hover {
  background: #374151;
}

.notifications-page-btn.is-active {
  background: #22c55e;
  color: #052e16;
}

.notifications-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* =========================
   FRIENDS CARD
========================= */

.friends-card {
  padding: 16px;
}

.friends-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.friends-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.see-all-friends {
  font-size: 13px;
  color: #4f46e5;
  cursor: pointer;
}

.see-all-friends:hover {
  text-decoration: underline;
}

.friends-count {
  font-size: 14px;
  color: #9ca3af;
  margin: 6px 0 12px 0;
}

.friends-card .friends-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.friends-card .friend-item {
  display: flex;
  flex-direction: column;
}

.friends-card .friend-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #1f2937;
  overflow: hidden;
}

.friends-card .friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friends-card .friend-name {
  margin-top: 6px;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friends-card .friend-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
