/* ============================================================
   SocialNet 1.3.17 — настройки приватности
   ============================================================ */

/* ---------- Настройки → Приватность ---------- */
.sn-priv .settings-subtitle:first-child { margin-top: 0; }

.sn-priv-switch {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.sn-priv-switch:has(input:checked) { border-color: rgba(79, 70, 229, .45); background: var(--sn-soft, rgba(79, 70, 229, .08)); }
.sn-priv-switch input { position: absolute; opacity: 0; pointer-events: none; }
.sn-priv-switch-ui {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    margin-top: 2px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .2s;
}
.sn-priv-switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s;
}
.sn-priv-switch input:checked + .sn-priv-switch-ui { background: var(--primary); }
.sn-priv-switch input:checked + .sn-priv-switch-ui::after { transform: translateX(18px); }
.sn-priv-switch input:focus-visible + .sn-priv-switch-ui { box-shadow: 0 0 0 3px rgba(79, 70, 229, .25); }
.sn-priv-switch-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sn-priv-switch-text small { color: var(--muted); font-size: 13px; line-height: 1.4; }

.sn-priv-list {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    overflow: hidden;
}
.sn-priv-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
}
.sn-priv-list > * + * { border-top: 1px solid var(--border); }
.sn-priv-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sn-priv-row-text small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.sn-priv-row select {
    flex: 0 0 auto;
    min-width: 170px;
    padding: 9px 34px 9px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center / 14px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.sn-priv-row select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }

.sn-priv-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 12px 42px;
    font-size: 13.5px;
    color: var(--muted);
    cursor: pointer;
    border-top: 0 !important;
    margin-top: -6px;
}

.sn-priv-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 22px 0 6px;
    font-size: 14px;
}
.sn-priv-preview > span { color: var(--muted); margin-right: 4px; }
.sn-priv + .settings-link-card, .sn-priv .settings-link-card { margin-top: 18px; }

/* ---------- Профиль ---------- */
.sn-closed-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--sn-soft, rgba(79, 70, 229, .08));
    text-decoration: none;
}
.sn-info-hidden { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.sn-locked-page .profile-restricted { max-width: 560px; margin: 0 auto; }

/* Полоса «Так вашу страницу видит …» */
.sn-preview-bar {
    position: sticky;
    top: var(--sn-header-h, 64px);
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    max-width: 1200px;
    margin: 12px auto 0;
    padding: 10px 16px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    box-shadow: 0 6px 20px rgba(79, 70, 229, .3);
    font-size: 14px;
}
.sn-preview-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sn-preview-actions a {
    padding: 5px 11px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}
.sn-preview-actions a:hover { background: rgba(255, 255, 255, .3); }
.sn-preview-actions .sn-preview-exit { background: #fff; color: #4f46e5; }

/* В предпросмотре прячем кнопки владельца у записей */
body.sn-privacy-preview .action-edit,
body.sn-privacy-preview .action-delete,
body.sn-privacy-preview .action-pin,
body.sn-privacy-preview .post-comments-form { display: none !important; }
/* 1.3.28: кнопки профиля в предпросмотре — видны, но не нажимаются */
.sn-preview-btn { cursor: default; pointer-events: none; }

/* ---------- Тёмная тема ---------- */
html.theme-dark .sn-priv-switch-ui { background: #475569; }
html.theme-dark .sn-priv-row select {
    background-color: rgba(15, 23, 42, .6);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
}
html.theme-dark .sn-priv-row select option { background: #1e293b; color: #e2e8f0; }

@media (max-width: 768px) {
    .sn-priv-row { flex-wrap: wrap; }
    .sn-priv-row select { flex: 1 1 100%; min-width: 0; font-size: 16px; }
    .sn-priv-sub { padding-left: 16px; }
    .sn-preview-bar { margin: 8px; top: calc(var(--sn-header-h, 57px) + 4px); }
}

/* 1.3.22: пометка у даты рождения, когда год скрыт */
.sn-bday-note { color: var(--sn-muted, #8b95a7); font-size: 12px; font-weight: 400; }
