/* pages/families.css — "Choose a family" picker, "Start another family" and
 * "Join a family with a code" (docs/MULTI-FAMILY-CONTRACT.md §12.1). Shown only to a
 * person with 2+ families or who can start/join one; a one-family parent never sees
 * this page. Colours come from the shared kit tokens, so WCAG AA holds in both
 * themes; phone width stacks with no sideways scroll. */

.families .page-msg:empty { display: none; }

/* The picker list: one selectable row per family. */
.fams-picker { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.fams-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.fams-row:hover:not(.is-paused) { border-color: var(--border-strong); background: var(--surface-3); }
.fams-row.is-paused { opacity: 0.7; cursor: not-allowed; }
.fams-row-ico { display: flex; width: 38px; height: 38px; flex: none; align-items: center; justify-content: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.fams-row-ico .ico { width: 20px; height: 20px; }
.fams-row-info { min-width: 0; flex: 1 1 auto; }
.fams-row-nameline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fams-row-name { font-weight: 650; font-size: 0.98rem; }
.fams-row-sub { font-size: 0.82rem; margin-top: 2px; }
.fams-row-go { width: 18px; height: 18px; flex: none; color: var(--text-faint); }
.fams-last { font-size: 0.72rem; }
.fams-paused { font-size: 0.72rem; }

/* Add-a-family actions + the start / join sheets. */
.fams-actions { display: flex; flex-direction: column; gap: 12px; }
.fams-action-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fams-action-row p { margin: 0; flex: 1 1 16rem; }
.fams-sheet { border: 1px solid var(--primary-soft); }
.fams-sheet-actions { gap: 10px; margin-top: 12px; }
.fams-form-err:empty { display: none; }
.fams-join-confirm:empty { display: none; }
.fams-join-confirm { margin-top: 10px; }
.fams-start-slot:empty, .fams-join-slot:empty { display: none; }

@media (max-width: 560px) {
  .fams-action-row .btn { width: 100%; }
}
