/* Close friends: the list editor (assets/js/close_friends.js), the composer
   option and the badge on Close friends posts. Uses the site's theme tokens. */
.cf { position: fixed; inset: 0; z-index: 2001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cf[hidden] { display: none; }
.cf-backdrop { position: absolute; inset: 0; background: rgba(8,14,24,.6); backdrop-filter: blur(3px); }
.cf-sheet { position: relative; width: 100%; max-width: 440px; max-height: min(640px, 92vh); display: flex; flex-direction: column;
            background: var(--sb-surface, #fff); color: var(--sb-text, #1c1e21); border-radius: 22px; overflow: hidden;
            box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: cfRise .22s cubic-bezier(.2,.8,.2,1); }
.cf-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 6px; }
.cf-head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.cf-count { margin: 0; font-size: .85rem; color: var(--sb-text-muted, #65676b); }
.cf-star { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none;
           background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; font-size: 1.25rem; box-shadow: 0 6px 14px rgba(34,197,94,.35); }
.cf-x { margin-left: auto; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer; background: #16a34a; color: #fff; }
.cf-note { margin: 4px 18px 10px; font-size: .86rem; color: var(--sb-text-muted, #65676b); line-height: 1.45; }
.cf-search { margin: 0 18px 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--sb-border, #e4e6eb);
             background: var(--sb-bg, #f0f2f5); color: inherit; font-size: .95rem; }
.cf-list { overflow-y: auto; padding: 4px 10px 14px; }
.cf-row { display: flex; align-items: center; gap: 12px; margin: 0; padding: 9px 8px; border-radius: 12px; cursor: pointer; font-weight: 600; }
.cf-row:hover { background: var(--sb-hover, #f2f3f5); }
.cf-row img, .cf-ph { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; background: #e9edf3; }
.cf-ph { display: flex; align-items: center; justify-content: center; font-weight: 800; color: #0073b7; }
.cf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #cfd5df; position: relative;
             cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.cf-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
                    box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.cf-switch:checked { background: #16a34a; }
.cf-switch:checked::after { transform: translateX(18px); }
.cf-switch:focus-visible { outline: 2px solid #16a34a; outline-offset: 2px; }
.cf-empty { padding: 22px 12px; text-align: center; color: var(--sb-text-muted, #65676b); }
@keyframes cfRise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .cf-sheet { animation: none; } }

/* The badge on a Close friends post (feed/partials/postHead.php). */
.cf-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; margin-left: 4px; border-radius: 999px;
            background: rgba(22,163,74,.12); color: #15803d; font-size: 11.5px; font-weight: 800; vertical-align: 1px; white-space: nowrap; }
body.theme-dark .cf-badge { background: rgba(34,197,94,.18); color: #4ade80; }
/* The composer's option and its "Edit list" link (post/partials/inc/post_pretext.php). */
.sb-privacy-opt .cf-edit { margin-left: 22px; font-size: 12px; font-weight: 700; color: #16a34a; }

/* The subscriber-only badge on a post (feed/partials/postHead.php; creator subscriptions). */
.subs-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800;
              background: rgba(245, 158, 11, .15); color: #b45309; vertical-align: middle; }
body.theme-dark .subs-badge { color: #fbbf24; }
