/* ==========================================================================
   System Settings.app Styling (Appearance, Wallpaper & About This Mac)
   ========================================================================== */

.settings-layout {
    display: flex;
    overflow: hidden;
    height: 100%;
}

.settings-sidebar {
    width: 170px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--window-border);
    padding: 15px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-user-card img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.settings-user-card strong {
    font-size: 12px;
    color: #fff;
    display: block;
}

.settings-user-card span {
    font-size: 10px;
    color: #888;
}

.settings-pane-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.settings-pane h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.theme-options-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.theme-option {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.theme-preview {
    width: 90px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-option.active .theme-preview {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.theme-option span {
    font-size: 12px;
    color: #ccc;
}

.dark-preview {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-preview {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.accent-colors-row {
    display: flex;
    gap: 10px;
}

.accent-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: transform 0.15s;
}

.accent-dot:hover {
    transform: scale(1.15);
}

.accent-dot.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.wallpaper-card {
    cursor: pointer;
    text-align: center;
}

.wallpaper-thumb {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    border: 2px solid transparent;
    background-size: cover;
    background-position: center;
    margin-bottom: 5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wallpaper-card.active .wallpaper-thumb {
    border-color: var(--accent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent);
}

.wallpaper-card span {
    font-size: 11px;
    color: #aaa;
}

.about-mac-dialog {
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
    padding: 10px 0;
}

.about-mac-dialog h2 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.spec-table {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-name {
    color: #888;
}

.spec-val {
    color: #fff;
    font-weight: 500;
}

/* ── Sidebar icons: macOS draws each pane's glyph on a coloured tile ───── */
.settings-sidebar .settings-ico {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: inline-grid;
    place-items: center;
    font-size: 10.5px;
    color: #fff;
    background: var(--ico, #8e8e93);
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

/* ── Grouped rows with macOS switches ───────────────────────────────────── */
.settings-group {
    background: rgba(255, 255, 255, 0.04);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 14px;
    cursor: pointer;
}

.settings-row + .settings-row { border-top: 0.5px solid rgba(255, 255, 255, 0.07); }

.settings-row span { display: flex; flex-direction: column; gap: 2px; }
.settings-row strong { font-size: 13px; font-weight: 500; color: #fff; }
.settings-row small { font-size: 11.5px; color: rgba(255, 255, 255, 0.5); line-height: 1.4; }

.mac-switch {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mac-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s var(--ease-macos);
}

.mac-switch:checked { background: var(--accent); }
.mac-switch:checked::after { transform: translateX(16px); }
.mac-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.settings-prose { padding: 14px 16px; }
.settings-prose p { font-size: 12.5px; line-height: 1.6; color: rgba(255, 255, 255, 0.78); }
.settings-prose p + p { margin-top: 8px; }
.settings-prose strong { color: #fff; font-weight: 600; }
.settings-footnote { font-size: 11.5px; color: rgba(255, 255, 255, 0.5); }

.app-pill-btn.danger { color: #ff6961; border-color: rgba(255, 105, 97, 0.35); }
.app-pill-btn.danger:hover { background: rgba(255, 69, 58, 0.15); }

/* ── About This Mac ─────────────────────────────────────────────────────── */
.about-mac-portrait {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    margin-bottom: 12px;
}
.about-mac-sub { color: rgba(255, 255, 255, 0.55); font-size: 12px; margin: 2px 0 16px; }
.about-mac-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

/* Preferences applied to the desktop */
body.hide-widgets .desktop-widgets-column { display: none !important; }
body.no-dock-magnify .dock-item:hover,
body.no-dock-magnify .dock-item:hover + .dock-item,
body.no-dock-magnify .dock-item:has(+ .dock-item:hover),
body.no-dock-magnify .dock-item:hover + .dock-item + .dock-item,
body.no-dock-magnify .dock-item:has(+ .dock-item + .dock-item:hover) { transform: none; }
