/* Flamingo, the redesign, personal preferences and the person page (flags
   "redesign" and "personal_prefs"): Settings > Your preferences, /people/{id},
   the suggestions on the group's preferences screen, and the extra chips on
   the new-group step. Loaded after r.css and uses its tokens. Classes start
   with "pf-". */

/* ---------- answer pills: radios and checkboxes that look like chips ---------- */
.pf-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-opts label { position: relative; display: block; }
.pf-opts input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pf-opts span { display: flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; }
.pf-opts input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.pf-opts input[type="checkbox"]:checked + span::before { content: "\2713\00a0"; }
.pf-opts input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.pf-opts .pf-none span { color: var(--muted); border-style: dashed; }
.pf-opts .pf-none input:checked + span { color: var(--bg); border-style: solid; }

/* ---------- Settings > Your preferences ---------- */
.pf-form { display: flex; flex-direction: column; gap: 14px; }
.pf-card { gap: 12px; }
.pf-vis summary { min-height: 40px; }
.pf-vis-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.pf-vis-row { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 8px 4px; cursor: pointer; }
.pf-vis-row input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.pf-vis-text { display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.pf-vis-text strong { font-size: 15px; font-weight: 700; }

/* ---------- chips for what someone shares ---------- */
.pf-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.pf-chip.is-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-fg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-chip:not(.is-warn) { background: var(--tile); } }
:root[data-theme="dark"] .pf-chip:not(.is-warn) { background: var(--tile); }
.pf-chip.is-warn::before { content: "\26A0\00a0"; }

/* ---------- the person page ---------- */
.pf-person { gap: 24px; }
.pf-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-top: 4px; }
.pf-hero .r-title { margin: 0; }
.r-face-xxl { width: 104px; height: 104px; font-size: 34px; font-weight: 800; }
.pf-sub { font-size: 15px; color: var(--muted); }
.pf-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pf-group { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pf-group-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--f3-bg); color: var(--f3-fg); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
.pf-group-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-group-text strong { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.pf-actions { display: flex; gap: 18px; margin-top: auto; }
.pf-actions form { margin: 0; }
.r .pf-actions .pf-act { appearance: none; background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; text-decoration: none; }
.r .pf-actions .pf-act:hover { color: var(--text); }

/* a person in the group page's people row is a link to their page */
.rg-plink { display: contents; color: inherit; text-decoration: none; }
.r-person-name a { color: inherit; text-decoration: none; font-weight: inherit; }
.r-person-name a:hover { text-decoration: underline; }
.rg-plist-name a { color: inherit; text-decoration: none; }
.rg-plist-name a:hover { text-decoration: underline; }

/* ---------- the group's preferences screen ---------- */
.pf-card-list { gap: 12px; }
.pf-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pf-memberrow { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.pf-memberrow:first-child { border-top: 0; padding-top: 2px; }
.pf-memberrow:last-child { padding-bottom: 2px; }
.r .pf-member { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-height: 44px; }
.r .pf-member strong { font-size: 15px; font-weight: 700; color: var(--text); }
.pf-memberrow .pf-chips { padding-left: 46px; }
.pf-empty { margin: 0; font-size: 14px; color: var(--muted); }
.pf-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pf-notes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.pf-notes li:first-child { border-top: 0; }
.pf-fold summary { cursor: pointer; font-weight: 700; color: var(--link); min-height: 40px; display: flex; align-items: center; }
.pf-fold .pf-notes { border-top: 1px solid var(--line); }
.pf-notes form { margin: 0; flex: none; }
.pf-notes .r-btn-surface { min-height: 40px; padding: 0 16px; font-size: 14px; }
.pf-summary { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 600; }
.pf-summary li { padding: 10px 14px; border-radius: 14px; background: var(--tile); }

/* ---------- new group, step 2 ---------- */
.pf-welcome { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; }

@media (min-width: 720px) {
  .pf-page .pf-form, .pf-person { max-width: 640px; }
}
