/* ===========================================================================
   Waseed - custom UI overrides for Chatwoot
   ---------------------------------------------------------------------------
   Served by nginx from /var/www/waseed-custom/custom.css and injected into
   every dashboard page with sub_filter. It lives entirely OUTSIDE the Docker
   container, so `docker compose down/up`, image pulls and Chatwoot upgrades
   never touch it.

   SELECTOR STRATEGY - this is what makes it upgrade-safe:
     - Anchor on ROUTE PATHS (href) and SEMANTIC ICON CLASSES (i-woot-*,
       i-lucide-*). Both are tied to what a thing *is*, so they survive
       redesigns.
     - NEVER anchor on Tailwind utility classes (bg-n-solid-1, rounded-2xl,
       ...). Those churn on almost every release.
     - Each rule carries two independent selectors (route + icon). If a future
       version changes one, the other still hides the element.

   Worst case on a breaking upgrade: a hidden item becomes visible again.
   Nothing breaks, nothing errors - you just re-check the selector.

   To re-enable something: comment out its block and hard-refresh (Cmd/Ctrl
   + Shift + R). No restart, no rebuild.
   =========================================================================== */


/* ---------------------------------------------------------------------------
   1. Sidebar > Calls
   Route: /app/accounts/:id/calls      Icon: i-lucide-phone
   Note: this item is shown by `isOnChatwootCloud || isEnterprise`, so it has
   no feature flag to switch off - CSS is the only clean lever.
   --------------------------------------------------------------------------- */
nav li:has(a[href*="/calls"]),
nav li:has(.i-lucide-phone) {
  display: none !important;
}


/* ---------------------------------------------------------------------------
   2. Sidebar > Help Center  (Portals group, incl. Articles/Categories/Locales)
   Route: /app/accounts/:id/portals    Icon: i-lucide-library-big
   TEMPORARY - remove this block when the Help Center is ready to launch.
   The child links stay in the DOM even when the group is collapsed (v-show,
   not v-if), so this matches whether the group is open or closed.
   --------------------------------------------------------------------------- */
nav li:has(a[href*="/portals"]),
nav li:has(.i-lucide-library-big) {
  display: none !important;
}


/* ---------------------------------------------------------------------------
   3. Channel picker > SMS
   Settings > Inboxes > Add inbox. Icon class comes straight from the channel
   definition in ChannelList.vue (key: 'sms', icon: 'i-woot-sms') and is
   rendered verbatim onto a <span> by the Icon component.
   --------------------------------------------------------------------------- */
button:has(.i-woot-sms) {
  display: none !important;
}


/* ---------------------------------------------------------------------------
   4. WhatsApp provider picker > Twilio
   Settings > Inboxes > Add inbox > WhatsApp. Leaves "WhatsApp Cloud" (Meta)
   as the only provider. Icon from Whatsapp.vue (icon: 'i-woot-twilio').
   --------------------------------------------------------------------------- */
button:has(.i-woot-twilio) {
  display: none !important;
}
