/* Tab „Desktop-App" und Update-Popup — nur im Windows-Programm sichtbar
   (static/js/desktop_settings.js). Alles Übrige kommt aus settings.css. */
@layer channels {
    .desktop-progress {
        block-size: 4px;
        border-radius: 2px;
        background: var(--surface-canvas);
        overflow: hidden;
    }
    .desktop-progress[hidden] { display: none; }
    .desktop-progress > span {
        display: block;
        block-size: 100%;
        inline-size: 0;
        background: var(--accent);
        transition: inline-size var(--dur-fast) var(--ease-standard);
    }

    .desktop-restart-row[hidden],
    #desktop-discord-group[hidden],
    .alert-service-chip[hidden] { display: none; }

    /* Eine allgemeine :disabled-Regel holt die versteckte Checkbox sonst
       neben den Schalter zurück ("Im Tray starten" ohne Autostart). */
    #desktop-settings-panel .alert-toggle-v2 input:disabled { opacity: 0; }
    #desktop-settings-panel .alert-toggle-v2:has(input:disabled) {
        cursor: not-allowed;
        opacity: 0.45;
    }

    .desktop-ram {
        display: flex;
        flex-direction: column;
        font-family: var(--font-ui);
        font-size: var(--text-xs);
        color: var(--ink-secondary);
    }
    .desktop-ram-row {
        display: flex;
        justify-content: space-between;
        gap: var(--space-4);
        padding: var(--space-1) 0;
        font-variant-numeric: tabular-nums;
    }
    .desktop-ram-private {
        margin-inline-end: var(--space-3);
        color: var(--ink-muted);
    }
    .desktop-ram-total {
        margin-top: var(--space-1);
        padding-top: var(--space-2);
        border-top: 1px solid var(--line-subtle);
        color: var(--ink-primary);
        font-weight: var(--font-weight-medium);
    }

    .desktop-diag-table {
        inline-size: 100%;
        border-collapse: collapse;
        font-family: var(--font-ui);
        font-size: var(--text-xs);
        font-variant-numeric: tabular-nums;
        color: var(--ink-secondary);
    }
    .desktop-diag-table th {
        padding: var(--space-1) var(--space-2);
        text-align: end;
        font-weight: var(--font-weight-medium);
        color: var(--ink-muted);
        border-bottom: 1px solid var(--line-subtle);
    }
    .desktop-diag-table td {
        padding: var(--space-1) var(--space-2);
        text-align: end;
    }
    .desktop-diag-table th:first-child,
    .desktop-diag-table td:first-child {
        text-align: start;
        color: var(--ink-primary);
    }

    .desktop-analyze {
        margin: 0;
        padding: var(--space-3);
        max-block-size: 360px;
        overflow: auto;
        border: 1px solid var(--line-subtle);
        border-radius: var(--radius-control);
        background: var(--surface-canvas);
        font-family: var(--font-mono);
        font-size: var(--text-2xs);
        line-height: 1.5;
        color: var(--ink-secondary);
        white-space: pre;
        user-select: text;
    }
    .desktop-analyze[hidden] { display: none; }

    .desktop-update-toast {
        position: fixed;
        inset-block-end: var(--space-5);
        inset-inline-end: var(--space-5);
        z-index: var(--z-modal);
        inline-size: min(360px, calc(100vw - 2 * var(--space-5)));
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-4);
        border: 1px solid var(--line);
        border-radius: var(--radius-panel);
        background: var(--surface-panel);
        box-shadow: var(--shadow-lg);
        font-family: var(--font-ui);
        color: var(--ink-primary);
    }
    .desktop-update-toast strong {
        font-size: var(--text-sm);
        font-weight: var(--font-weight-medium);
    }
    .desktop-update-toast p {
        margin: var(--space-2) 0 var(--space-3);
        font-size: var(--text-xs);
        color: var(--ink-secondary);
    }
    .desktop-update-toast-actions {
        display: flex;
        justify-content: flex-end;
        gap: var(--space-2);
    }
}
