/* ============================================================
   Followers / Following / Friends modal (js/follow-connections.js)
   Used by pages/profile.html and pages/user.html.
   Built on the shared .modal-overlay / .modal primitives in main.css.
   ============================================================ */

.fc-modal { max-width: 520px; width: 100%; }

.fc-modal .modal-body { padding: 0; }

/* Clickable follower / following counters */
.follow-count.is-clickable,
.pshell-stat.is-clickable {
  cursor: pointer;
  border-radius: 10px;
  padding: 4px 8px;
  transition: background .18s ease, transform .18s ease;
}
.follow-count.is-clickable:hover,
.pshell-stat.is-clickable:hover {
  background: rgba(255, 255, 255, .06);
  transform: translateY(-1px);
}
.follow-count.is-clickable:focus-visible {
  outline: 2px solid var(--accent, #7c5cff);
  outline-offset: 2px;
}

/* ---- Tabs ---- */
.fc-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.fc-tab {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary, #b9b9c8);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  padding: 10px 6px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.fc-tab:hover { color: var(--text-primary, #fff); }
.fc-tab.active {
  color: var(--text-primary, #fff);
  border-bottom-color: var(--accent, #7c5cff);
}
.fc-tab__count {
  display: inline-block;
  margin-left: 5px;
  font-size: .72rem;
  font-weight: 700;
  opacity: .75;
}

/* ---- Toolbar (sort) ---- */
.fc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 6px;
}
.fc-toolbar__hint {
  font-size: .74rem;
  color: var(--text-muted, #8b8b9c);
}
.fc-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: var(--text-muted, #8b8b9c);
}
.fc-sort select {
  appearance: none;
  background: rgba(255, 255, 255, .06);
  color: var(--text-primary, #fff);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 5px 26px 5px 9px;
  font: inherit;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* ---- List ---- */
.fc-list {
  list-style: none;
  margin: 0;
  padding: 6px 8px 14px;
  max-height: 60vh;
  overflow-y: auto;
}
.fc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
}
.fc-row + .fc-row { margin-top: 2px; }
.fc-row:hover { background: rgba(255, 255, 255, .04); }
.fc-row__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .08);
}
.fc-row__main { min-width: 0; flex: 1 1 auto; }
.fc-row__name {
  display: block;
  font-weight: 700;
  font-size: .92rem;
  color: var(--text-primary, #fff);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-row__name:hover { text-decoration: underline; }
.fc-row__meta {
  display: block;
  margin-top: 2px;
  font-size: .72rem;
  color: var(--text-muted, #8b8b9c);
}
.fc-row__meta .fc-friend-tag {
  color: var(--accent, #7c5cff);
  font-weight: 700;
}
.fc-row__action { flex: 0 0 auto; }
.fc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .18s ease, background .18s ease, opacity .18s ease;
}
.fc-btn[disabled] { opacity: .6; cursor: default; }
.fc-btn--primary {
  background: var(--accent, #7c5cff);
  color: #fff;
}
.fc-btn--primary:hover:not([disabled]) { filter: brightness(1.1); }
.fc-btn--ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
  color: var(--text-secondary, #cfcfdb);
}
.fc-btn--ghost:hover:not([disabled]) { background: rgba(255, 255, 255, .12); }

.fc-empty,
.fc-loading {
  padding: 34px 18px;
  text-align: center;
  color: var(--text-muted, #8b8b9c);
  font-size: .85rem;
}
.fc-empty i { display: block; font-size: 1.6rem; margin-bottom: 10px; opacity: .5; }

@media (max-width: 480px) {
  .fc-tab { font-size: .78rem; padding: 9px 2px 11px; }
  .fc-row__avatar { width: 36px; height: 36px; }
}
