/* =====================================================
   Household surfacing.
   The dashboard nudge card + the Household modal's empty
   pitch and member roster. Path to Household stays the
   same as the tutorial video: Profile → Household.
   ===================================================== */

/* ---------- Dashboard nudge card ----------
   Shown on the resident dashboard for residents who haven't
   set up a household (role: 'none') or have started but never
   added anyone. Dismissable per device.
*/
.hh-nudge {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background:
    linear-gradient(180deg, var(--surface-sunken) 0%, var(--surface-raised) 90%);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
}
.hh-nudge__ill {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--surface-raised);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 1;
}
.hh-nudge__ill svg { display: block; }
.hh-nudge__body { flex: 1; min-width: 0; }
.hh-nudge__title {
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 4px;
  color: var(--text-primary);
  text-wrap: balance;
}
.hh-nudge__sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.5;
}
.hh-nudge__row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.hh-nudge__cta {
  background: var(--text-primary);
  color: var(--surface-raised);
  border: 0;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font: var(--weight-semibold) 12.5px var(--font-sans, inherit);
  cursor: pointer;
}
.hh-nudge__snooze {
  background: transparent;
  color: var(--text-secondary);
  border: 0;
  font: 500 12px var(--font-sans, inherit);
  padding: 8px 10px;
  cursor: pointer;
}
.hh-nudge__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: 0;
  padding: 4px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 0;
}
.hh-nudge__close:hover { color: var(--text-primary); }

/* ---------- Household modal · empty pitch ----------
   For a head who's never added anyone. Currently the modal
   just shows an "Add member" button with no context; this
   pitches what a household actually is.
*/
.hh-empty {
  text-align: center;
  padding: 12px 8px 4px;
}
.hh-empty__ill {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-sunken);
  border: 1px solid var(--surface-border);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: var(--text-primary);
}
.hh-empty__title {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
  text-wrap: balance;
  color: var(--text-primary);
}
.hh-empty__sub {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 auto 18px;
  line-height: 1.5;
  max-width: 30ch;
}

/* ---------- Household modal · member roster ----------
   Once a head has added anyone, show them as a list. Each
   row carries name, relationship, and join state (joined
   vs invited-but-not-signed-up).
*/
.hh-roster {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hh-roster__label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: var(--weight-semibold);
  padding: 4px 4px 2px;
  margin: 0;
}
.hh-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.hh-member__av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-sunken);
  display: grid;
  place-items: center;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-primary);
  flex-shrink: 0;
  text-transform: uppercase;
}
.hh-member__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hh-member__name {
  font-size: 13.5px;
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hh-member__meta {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
}
.hh-member__meta--pending { color: var(--color-warn, #B9520B); }

/* ---------- Household modal · "just added" state ----------
   Shown immediately after a head adds a member: green tick banner,
   direct instruction, code framed as the thing to send, and a
   primary share button pre-scoped to that member's first name.
*/
.hh-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 157, 88, 0.08);
  border: 1px solid rgba(13, 157, 88, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.hh-ok__k {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-allow, #0d9d58);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.hh-ok__m {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-primary);
}
.hh-ok__m strong { font-weight: var(--weight-semibold); }

.hh-instr {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 4px 4px 0;
}
.hh-instr strong { font-weight: var(--weight-bold); }
.hh-instr-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 4px;
}

/* Inverted code card — reads as identity, not a UI chip. */
.hh-code-dark {
  background: var(--text-primary);
  color: var(--surface-raised);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hh-code-dark__m { flex: 1; min-width: 0; }
.hh-code-dark__l {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 245, 241, 0.65);
  font-weight: var(--weight-semibold);
}
.hh-code-dark__v {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--surface-raised);
}
.hh-code-dark__b {
  background: rgba(245, 245, 241, 0.14);
  color: var(--surface-raised);
  border: 0;
  border-radius: var(--radius-sm, 8px);
  padding: 7px 10px;
  font: 500 11.5px inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.hh-code-dark__b:hover { background: rgba(245, 245, 241, 0.22); }
