/* Members settings sub-view + invite sheet (settings-views/members.js).
 * Member rows render inside a canonical .section-group; the invite sheet rides
 * the shared .modal-overlay/.modal-sheet system. v2 tokens only. */

/* ---- member rows ---- */
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--v2-border-soft);
}
.member-row:last-child {
  border-bottom: none;
}

.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--v2-pop-sage-bg);
  color: var(--v2-accent-botanical);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--v2-font-display);
  font-weight: 500;
  font-size: 17px;
  flex-shrink: 0;
}
.member-avatar--pending {
  background: var(--v2-bg-secondary);
  color: var(--v2-text-muted);
}

.member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.member-name {
  font-family: var(--v2-font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--v2-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-name--muted {
  font-family: var(--v2-font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--v2-text-secondary);
}
.member-role {
  font-family: var(--v2-font-body);
  font-size: 11px;
  color: var(--v2-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.member-you {
  font-family: var(--v2-font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-accent-botanical);
  background: var(--v2-pop-sage-bg);
  border-radius: var(--v2-radius-pill);
  padding: 2px 7px;
}
.member-pending-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--v2-border-strong);
  border-top-color: var(--v2-pop-ochre);
  display: inline-block;
  animation: member-pending-spin 0.8s linear infinite;
}
@keyframes member-pending-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .member-pending-dot { animation: none; }
}

.member-remove {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v2-pop-coral);
  flex-shrink: 0;
  border-radius: var(--v2-radius-md);
}
@media (hover: hover) {
  .member-remove:hover { background: var(--v2-pop-coral-bg); }
}

/* ---- supporting copy ---- */
.members-status {
  padding: 16px 14px;
  font-family: var(--v2-font-body);
  font-size: 14px;
  color: var(--v2-text-tertiary);
}
.members-readonly-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 4px 14px;
  padding: 10px 12px;
  background: var(--v2-pop-slate-bg);
  border-radius: var(--v2-radius-sm);
  font-family: var(--v2-font-body);
  font-size: 12px;
  color: var(--v2-text-secondary);
  line-height: 1.4;
}
.members-readonly-note svg {
  color: var(--v2-pop-slate);
  flex-shrink: 0;
}
.members-invite-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.members-note {
  font-family: var(--v2-font-body);
  font-size: 12.5px;
  color: var(--v2-text-tertiary);
  line-height: 1.5;
  margin: 10px 4px 0;
}

/* ---- invite bottom sheet ---- */
.invite-sheet {
  background: var(--v2-bg-panel);
  border-radius: var(--v2-radius-xl) var(--v2-radius-xl) 0 0;
  max-height: 80vh;
  max-height: 80dvh;
}
.invite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 20px 4px;
  flex-shrink: 0;
}
.invite-title {
  font-family: var(--v2-font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--v2-text-primary);
}
.invite-cancel {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  font-family: var(--v2-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-text-stone);
  cursor: pointer;
  padding: 8px 4px;
  min-height: 44px;
}
.invite-body {
  padding: 4px 20px 28px;
  overflow-y: auto;
}
.invite-sub {
  font-family: var(--v2-font-body);
  font-size: 12.5px;
  color: var(--v2-text-secondary);
  line-height: 1.45;
  margin: 0 0 14px;
}
.invite-body .field-row {
  padding: 0 0 16px;
}
/* Approved deviation: email reads better in DM Sans 16px than the canonical
 * 24px-Fraunces .text-input, and 16px avoids iOS zoom-on-focus. Scoped under
 * .invite-sheet so it beats .text-input regardless of stylesheet load order. */
.invite-sheet .invite-input {
  font-family: var(--v2-font-body);
  font-size: 16px;
  font-weight: 400;
}
