/* =====================================================================
   Nexus Networking - Member contact list (/member-contact-list/)
   Companion to nexus.css. Loaded only where [nexus_member_contacts] runs.

   Note: .share-btn / .copy-tip styling lives in nexus.css and is scoped to
   `body .nexus-page`, so the page markup must keep its
   <main class="nexus-page"> wrapper. Overrides below match that specificity.
===================================================================== */

/* ----- Toolbar: search + category chips ----- */
.nxc-toolbar { display: grid; gap: var(--space-5); margin-bottom: var(--space-5); }

.nxc-search {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-3) var(--space-6);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nxc-search:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(212, 88, 42, 0.15);
}

.nxc-filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.nxc-chip {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.nxc-chip:hover { border-color: var(--color-brand); color: var(--color-brand); }
.nxc-chip.active { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }

.nxc-count {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* ----- The list ----- */
.nxc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }

.nxc-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.05fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.nxc-row:hover { box-shadow: var(--shadow); border-color: var(--color-accent); }
.nxc-row[hidden] { display: none !important; }

.nxc-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--color-brand);
  background-color: var(--color-navy);
  color: var(--color-text-light);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-base);
  font-weight: 700;
  flex: none;
}

.nxc-id { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.nxc-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-navy);
  text-decoration: none;
  transition: color var(--transition);
}
.nxc-name:hover { color: var(--color-brand); }
.nxc-business { font-size: var(--text-sm); font-weight: 600; color: var(--color-brand); }
.nxc-id .industry-tag { margin-top: var(--space-2); }

.nxc-contact { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.nxc-c {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color var(--transition);
}
.nxc-c:hover { color: var(--color-brand); }
.nxc-c svg { width: 16px; height: 16px; flex: none; color: var(--color-brand); }

.nxc-actions { display: flex; align-items: center; gap: var(--space-4); }
.nxc-view {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-brand);
  text-decoration: none;
  white-space: nowrap;
  transition: gap var(--transition);
}
.nxc-view:hover { gap: var(--space-2); }

/* Save-contact button: widen the shared circular .share-btn into a labelled pill.
   Selector matches nexus.css's `body .nexus-page .share-btn` specificity + 1. */
body .nexus-page .nxc-actions .share-btn {
  width: auto;
  height: 40px;
  padding: 0 var(--space-4);
  gap: var(--space-2);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
}
body .nexus-page .nxc-actions .share-btn svg { width: 17px; height: 17px; }
body .nexus-page .nxc-actions .share-btn:hover { transform: none; }

.nxc-empty { text-align: center; color: var(--color-text-muted); padding: var(--space-10) 0; }

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .nxc-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .nxc-contact { grid-column: 2 / -1; }
}
@media (max-width: 600px) {
  .nxc-row { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-4); }
  .nxc-contact { grid-column: 1 / -1; }
  .nxc-actions { grid-column: 1 / -1; justify-content: space-between; }
  .nxc-name { font-size: var(--text-base); }
}

/* ----- Password gate (WordPress core post-password form) ----- */
.nxc-gate { text-align: center; }
.nxc-gate h2 { margin-bottom: var(--space-3); }
.nxc-gate .nxc-gate-sub { max-width: 420px; margin: 0 auto var(--space-8); }
.nxc-gate .post-password-form { max-width: 400px; margin: 0 auto; }
.nxc-gate .post-password-form p { color: var(--color-text-muted); margin-bottom: var(--space-4); }
.nxc-gate .post-password-form label {
  display: block;
  text-align: left;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.nxc-gate .post-password-form [type="password"] {
  display: block;
  width: 100%;
  margin-top: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.nxc-gate .post-password-form [type="password"]:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(212, 88, 42, 0.15);
}
.nxc-gate .post-password-form [type="submit"] {
  margin-top: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: #fff;
  background-color: var(--color-brand);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-pill);
  padding: var(--space-3) var(--space-8);
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}
.nxc-gate .post-password-form [type="submit"]:hover {
  background-color: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
}
