/* ================================================================
   FriendsByChance — privacy.css
   The lock every shared thing wears (privacy.js: lock / slot), and My
   Profile's Privacy group — its Global and Custom tabs (privacy-page.js).
   The table itself is the component's (components/privacy-editor.css).
   ================================================================ */

/* ── The lock: a glyph, who sees it in its title; pressed, its table ── */

/* Following what is above it: light — set apart from one of its own at
   a glance (the user, 2026-10-20). */
.privacy-lock {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    flex:            0 0 auto;
    width:           30px;
    height:          28px;
    padding:         0;
    border:          1px solid var(--color-divider);
    border-radius:   14px;
    background:      transparent;
    color:           var(--color-text-muted);
    opacity:         0.75;
    font:            inherit;
    line-height:     1;
    cursor:          pointer;
    vertical-align:  middle;
}
.privacy-lock:hover { background: var(--color-hover); color: var(--color-text); opacity: 1; }
.privacy-lock svg   { flex: 0 0 auto; }
/* A table of its own: strong — filled in the app's colour. */
.privacy-lock--own,
.privacy-lock--own:hover {
    border-color: var(--color-primary);
    background:   var(--color-primary);
    color:        var(--color-text-on-primary);
    opacity:      1;
}
/* A table set above limits it: a red dot. */
.privacy-lock--warned { position: relative; }
.privacy-lock--warned::after {
    content:       '';
    position:      absolute;
    top:           -2px;
    right:         -2px;
    width:         8px;
    height:        8px;
    border-radius: 50%;
    background:    var(--color-danger);
}

/* A section title with its lock at the end. */
.privacy-titled {
    display:     flex;
    align-items: center;
    gap:         8px;
}
.privacy-titled > .privacy-lock { margin-left: auto; text-transform: none; letter-spacing: 0; }

.privacy-open-error { margin: 0; color: var(--color-danger); }

/* ── My Profile's Privacy group (privacy-page.js) ──────────────────── */

.privacy-page {
    display:        flex;
    flex-direction: column;
    gap:            14px;
}
.privacy-intro { margin: 0; }
.privacy-global,
.privacy-custom {
    display:        flex;
    flex-direction: column;
    gap:            16px;
}

.privacy-global-groups {
    display:        flex;
    flex-direction: column;
    gap:            22px;
}
.privacy-global-group-title { margin: 0 0 8px; }
.privacy-global-list {
    display:        flex;
    flex-direction: column;
    gap:            8px;
}
.privacy-global-row {
    display:       flex;
    align-items:   center;
    gap:           12px;
    padding:       10px 12px;
    border:        1px solid var(--color-divider);
    border-radius: 10px;
}
.privacy-global-text  { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.privacy-global-title { font-weight: 600; }
.privacy-global-hint  { font-size: 0.8rem; color: var(--color-text-secondary); }
/* What it comes to — the lock carries no words (privacy.js). */
.privacy-global-reach { font-size: 0.82rem; color: var(--color-text-muted); }
.privacy-global-reach--own { color: var(--color-text); font-weight: 600; }
.privacy-global-warning {
    display:     flex;
    align-items: flex-start;
    gap:         5px;
    font-size:   0.8rem;
    color:       var(--color-danger);
}

/* The tools: the search, "Warnings only"; then how many, with Select and
   Delete at its end — room under the search, never crammed (the user,
   2026-10-20; 000 L13). */
.privacy-custom-tools {
    display:     flex;
    flex-wrap:   wrap;
    align-items: center;
    gap:         10px 14px;
}
.privacy-custom-search { flex: 1 1 220px; min-width: 0; }
.privacy-custom-warned { flex: 0 0 auto; }
.privacy-custom-bar {
    display:     flex;
    align-items: center;
    gap:         8px;
    min-height:  36px;
    margin-top:  6px;
}
.privacy-custom-bar .privacy-custom-count { flex: 1 1 auto; margin: 0; }
.privacy-node-select { width: 18px; height: 18px; margin: 0; cursor: pointer; flex: 0 0 auto; }
.privacy-custom-count  { font-size: 0.8rem; color: var(--color-text-muted); }

/* What folds: a section, a top-level journey; the Journeys section's own
   button, at its title's end, folds or unfolds every top-level journey. */
.privacy-fold { flex: 0 0 auto; }
.privacy-fold svg { transition: transform var(--transition); }
.privacy-fold--folded svg { transform: rotate(-90deg); }
.privacy-tree-head { display: flex; align-items: center; gap: 4px; }
.privacy-tree-head .privacy-tree-title { margin: 0; flex: 1 1 auto; }
.privacy-journeys-fold-all { flex: 0 0 auto; }

.privacy-tree-section + .privacy-tree-section { margin-top: 14px; }
.privacy-tree-list {
    margin:     0;
    padding:    0 0 0 14px;
    list-style: none;
    border-left: 1px solid var(--color-divider);
}
.privacy-tree-section > .privacy-tree-list { padding-left: 0; border-left: 0; }
.privacy-node-row {
    display:       flex;
    align-items:   flex-start;
    gap:           8px;
    padding:       6px 4px 6px 8px;
    border-radius: 8px;
}
.privacy-node-row:hover { background: var(--color-hover); }
.privacy-node-lead    { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; min-height: 30px; }
.privacy-node-text    { flex: 1; min-width: 0; padding-top: 5px; }
.privacy-node-label   { color: var(--color-text-secondary); }
.privacy-node--own > .privacy-node-row .privacy-node-label { color: var(--color-text); font-weight: 600; }
.privacy-node-reach,
.privacy-node-rows    { font-size: 0.8rem; color: var(--color-text-secondary); }
.privacy-node-warning {
    display:     flex;
    align-items: flex-start;
    gap:         5px;
    font-size:   0.8rem;
    color:       var(--color-danger);
}
.privacy-node-warning-icon { flex: 0 0 auto; line-height: 0; margin-top: 2px; }
.privacy-node-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.privacy-empty,
.privacy-error { margin: 0; color: var(--color-text-muted); }
.privacy-error { color: var(--color-danger); }

/* ── My Profile: who sees the check-ins, by their age ───────────────── */

.profile-checkin-bands {
    display:        flex;
    flex-direction: column;
    gap:            4px;
    margin:         4px 0 10px;
}
.profile-checkin-bands-title {
    margin:    0 0 2px;
    font-size: 0.82rem;
    font-weight: 600;
    color:     var(--color-text-secondary);
}
.profile-checkin-band {
    padding:   4px 8px;
    font-size: 0.86rem;
    border-radius: 8px;
}
.profile-checkin-band:hover { background: var(--color-hover); }
/* "Older than 7 days" inherits from "older than 24 hours": drawn inside it
   (--depth: how many bands up it inherits through). */
.profile-checkin-band { margin-left: calc(var(--depth, 0) * 16px); }

/* ── The Blocked tab (privacy-page.js) ────────────────────────────── */

.privacy-blocked[hidden] { display: none; }
.privacy-blocked-note {
    min-height: 1.2em;
    margin:     6px 0;
    font-size:  0.85rem;
    color:      var(--color-danger);
}
.privacy-blocked-list {
    list-style:     none;
    margin:         0;
    padding:        0;
    display:        flex;
    flex-direction: column;
    gap:            6px;
}
.privacy-blocked-row {
    display:       flex;
    align-items:   center;
    gap:           12px;
    padding:       8px 12px;
    border:        1px solid var(--color-divider);
    border-radius: 10px;
}
.privacy-blocked-row--selected { background: var(--color-selected); }
/* The row's own button: pressed, it selects the row (its buttons shown). */
.privacy-blocked-pick {
    flex:        1;
    min-width:   0;
    display:     flex;
    align-items: baseline;
    gap:         8px;
    padding:     6px 0;
    border:      0;
    background:  none;
    color:       inherit;
    font:        inherit;
    text-align:  left;
    cursor:      pointer;
}
.privacy-blocked-handle { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.privacy-blocked-row--off .privacy-blocked-handle { color: var(--color-text-secondary); }
.privacy-blocked-state  { font-size: 0.8rem; color: var(--color-text-secondary); white-space: nowrap; }
.privacy-blocked-actions { display: flex; gap: 6px; flex-shrink: 0; }
.privacy-blocked-note--done { color: var(--color-text-secondary); }
.privacy-blocked-empty  { font-size: 0.85rem; color: var(--color-text-secondary); padding: 4px 0; }
