/* Menu entries for paid (enterprise) features we don't sell. Chatwoot community shows
   them as upsells even when the account feature is off, so we hide them here.
   Matched by link address: if an update renames a route, the entry comes back —
   check the menu after every Chatwoot update. See PLAN.md (2026-10-27). */

/* Sidebar: Captain, Calls, Help Center */
aside li:has(> a[href*="/captain/"]),
aside li:has(> div > a[href*="/captain/"]),
aside li:has(> a[href$="/calls"]),
aside li:has(> div > a[href$="/calls"]),
aside li:has(> a[href*="/portals/"]),
aside li:has(> div > a[href*="/portals/"]),

/* Reports: SLA */
aside li:has(> a[href*="/reports/sla"]),
aside li:has(> div > a[href*="/reports/sla"]),

/* Settings: Audit Logs, Custom Roles, SLA, Conversation Workflow, Security (SAML) */
aside li:has(> a[href*="/settings/audit-logs"]),
aside li:has(> div > a[href*="/settings/audit-logs"]),
aside li:has(> a[href*="/settings/custom-roles"]),
aside li:has(> div > a[href*="/settings/custom-roles"]),
aside li:has(> a[href*="/settings/sla"]),
aside li:has(> div > a[href*="/settings/sla"]),
aside li:has(> a[href*="/settings/conversation-workflow"]),
aside li:has(> div > a[href*="/settings/conversation-workflow"]),
aside li:has(> a[href*="/settings/security"]),
aside li:has(> div > a[href*="/settings/security"]),

/* Not paid, just not used: CSAT report (off for our clients — a template message on
   WhatsApp), "Active" contacts (website only), Chatwoot's English docs and changelog */
aside li:has(> a[href*="/reports/csat"]),
aside li:has(> div > a[href*="/reports/csat"]),
aside li:has(> a[href*="/contacts/active"]),
aside li:has(> div > a[href*="/contacts/active"]),
a[href^="https://www.chatwoot.com/hc/user-guide"],
a[href^="https://www.chatwoot.com/changelog"] {
  display: none !important;
}

/* Super Admin (/super_admin) — only we see it, but keep it to what we use.
   Instance-wide Agent Bots and Platform Apps (we use per-account bots) */
li:has(> a[href="/super_admin/agent_bots"]),
li:has(> a[href="/super_admin/platform_apps"]),

/* Settings: keep General, Messenger, Instagram, WhatsApp Embedded */
li:has(> a[href$="config=saml"]), a[href$="config=saml"],
li:has(> a[href$="config=captain"]), a[href$="config=captain"],
li:has(> a[href$="config=email"]), a[href$="config=email"],
li:has(> a[href$="config=tiktok"]), a[href$="config=tiktok"],
li:has(> a[href$="config=google"]), a[href$="config=google"],
li:has(> a[href$="config=microsoft"]), a[href$="config=microsoft"],
li:has(> a[href$="config=stripe"]), a[href$="config=stripe"],
li:has(> a[href$="config=linear"]), a[href$="config=linear"],
li:has(> a[href$="config=notion"]), a[href$="config=notion"],
li:has(> a[href$="config=slack"]), a[href$="config=slack"],
li:has(> a[href$="config=shopify"]), a[href$="config=shopify"],
/* ...and the sidebar groups left empty by that (Product, Authentication) */
div:has(> ul > li > a[href$="config=saml"]),
div:has(> ul > li > a[href$="config=google"]),
/* Settings overview: "Included" (no links) and "Locked" (upgrade links) lists, billing button */
div:has(> h2.mb-3):not(:has(a)),
div:has(> h2.mb-3):has(a[href*="chatwoot.com/billing"]),
a[href*="chatwoot.com/billing"],

/* Accounts: Captain models tab, and Limits (enforced by enterprise code — CLAUDE.md) */
#tab-captain, #tab-captain-models,
/* Suspending a shop: we only ever do it for an unpaid subscription */
#account_suspension_category option[value="spam"],
#account_suspension_category option[value="other"],
#panel-overview .grid > section:first-child,
#panel-general > *:has(#account_limits_agents) {
  display: none !important;
}
