/* Copyright © 2026 Michael A. Bennett. All rights reserved. */
/* Member profiles: the editor (/membership/manage) and the public profile (/members/{id}).
   Loaded after theme.css, whose tokens it uses. */

/* ---------- Avatar (both pages) ---------- */

.profile-avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    background: #2b3030;
    color: var(--accent);
    font-size: 3rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-avatar--sm {
    width: 88px;
    height: 88px;
    font-size: 2rem;
}

/* ---------- Editor ---------- */

.profile-section {
    background: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.profile-section h2 {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-section h2 > i {
    color: var(--accent-strong);
}

.profile-section .form-label {
    font-weight: 600;
}

.profile-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.25rem 1rem;
}

.profile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.profile-toggle:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

/* forms.css positions every .form-check-input absolutely (for classic checkboxes); the editor's
   switches stay in normal flow so they sit inside the card */
.profile-section .form-switch .form-check-input {
    position: static;
}

.profile-toggle .form-switch {
    padding-left: 0;
}

.profile-toggle .form-switch .form-check-input {
    float: none;
    margin: 0;
}

/* Off state: a darker outline and knob so an unchecked switch reads clearly on the white card */
.profile-section .form-switch .form-check-input:not(:checked):not(:focus) {
    border-color: #adb5bd;
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%236c757d'/%3e%3c/svg%3e");
}

/* ---------- Public profile ---------- */

.member-head {
    background: var(--surface-dark);
    color: var(--text-on-dark);
    padding: 3rem 0 2.5rem;
}

.member-name {
    font-size: 2.25rem;
    font-weight: 300;
    color: #ffffff;
    margin: 0 0 0.25rem;
}

.member-meta {
    color: var(--text-on-dark-muted);
}

.member-meta i {
    color: var(--accent);
}

.member-bio {
    color: var(--text-on-dark-muted);
    max-width: 46rem;
    margin: 1.5rem 0 0;
    white-space: pre-line;
}

.member-label {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin: 1.75rem 0 0.75rem;
}

.member-chips {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.member-chips .chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--accent);
    color: #ffffff;
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
}

.member-chips .chip i {
    color: var(--accent);
}

.member-owner-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid var(--accent);
    color: var(--text-on-dark-muted);
    padding: 0.75rem 1rem;
    margin-top: 2rem;
}

/* Owner-only "Edit profile" button: right of the name on desktop, below it on phones */
.member-edit-btn {
    white-space: nowrap;
    flex-shrink: 0;
}
