/* app.asyncly.ai: desktop-only controls hidden in the web app.
   The web host writes data-asyncly-client="web" on <html> before first paint
   (scripts/web-app/web-app-html.mjs). The desktop never sets it, so none of these
   rules apply there. Hide what a browser can never do (this computer's folders,
   windows, AI sign-ins, local engine features); keep controls that will be served
   from Platform and refuse in plain words until then. The bridge methods behind
   each control are sorted in bridge-sort.json. */

/* Top bar and toolbar. */
:root[data-asyncly-client="web"] :is(
  #provider-connect,                 /* connects an AI on this computer */
  #provider-usage,                   /* usage of this computer's AI sign-ins */
  #starter-ai-balance,               /* Asyncly-funded AI, desktop only */
  #activity-button,                  /* Stats come from the local engine */
  .help-inbox-menu,                  /* Help inbox is stored by the local engine; Platform feedback isn't wired yet */
  #personal-planning-window-button,  /* opens a separate native window */
  #workspace-header-tools-shell,     /* Automations, Library and templates run on the local engine */
  #company-modal-tools-shell         /* the Project view's Tools: Systems and Automations, also local */
) {
  display: none !important;
}

/* Projects: folders and checkouts on this computer, and native windows. */
:root[data-asyncly-client="web"] :is(
  .company-window-button,                        /* opens a Project in a separate native window */
  [data-add-workspace-existing],                 /* "Open folder…" */
  [data-new-project-action="open-folder"],       /* "Use code or files already on this Mac" */
  [data-add-project-repository],                 /* "Add Repository/Folder" */
  [data-project-context-add-code],               /* "Add repository or folder…", "Add code folder" */
  [data-project-settings-agent-changes],         /* task worktree policy for local checkouts */
  [data-project-setup-section-target="environment"] /* checks this computer's toolchains */
) {
  display: none !important;
}

/* With "Open a folder" gone, "Start your own" takes the whole row. */
:root[data-asyncly-client="web"] .new-project-ways {
  grid-template-columns: minmax(0, 1fr);
}

/* New-thread composer: worktrees are local checkouts, and scheduled sends run on
   the local engine. Only hidden here; the composer itself is unchanged. */
:root[data-asyncly-client="web"] :is(
  .new-thread-worktree-trigger,
  .run-sheet-row:has(> [data-new-thread-worktree-choices]),
  [data-schedule-prompt]
) {
  display: none !important;
}

/* Settings: sections and rows about this computer. */
:root[data-asyncly-client="web"] :is(
  [data-settings-section-target="computers"], [data-settings-open-section="computers"],
  [data-settings-section-target="providers"], [data-settings-open-section="providers"],
  [data-settings-section-target="calls"], [data-settings-open-section="calls"],
  /* Your setup edits the desktop's first-run answers. The web app has no first-run
     setup and can't save them yet (updateOnboardingJourney answers empty), so a
     change would silently snap back. Show it again once Platform keeps them. */
  [data-settings-section-target="setup"], [data-settings-open-section="setup"],
  #account-settings-mobile-status,              /* the mobile relay runs on a desktop */
  #account-settings-reset-button,               /* resets this computer's local profile */
  .local-voice-power-toggle,                    /* on-device voice model */
  label[for="keep-on-top-toggle"],              /* native window setting */
  label[for="notifications-toggle"],            /* native notifications */
  [data-settings-payment-vault-body],           /* card details kept on this computer */
  #settings-current-version-button,             /* the desktop's installed version */
  #settings-update-button,
  label[for="auto-download-updates-toggle"]
) {
  display: none !important;
}
