/* Only for client users (owners and staff), not for us — nginx adds this file when the
   logged-in email isn't in $svc_staff_page (nginx.conf). These pages are ours to set up;
   nginx also refuses their changes from client users, so hiding them here is just the menu.
   `li li`: the Settings group itself also links to /settings/general. See PLAN.md (2026-10-27). */

/* Settings: Account settings, Automation, Agent Bots */
aside li li:has(> a[href*="/settings/general"]),
aside li li:has(> a[href*="/settings/automation"]),
aside li li:has(> a[href*="/settings/agent-bots"]) {
  display: none !important;
}

/* The administrator's card (client.js → /_svc/notices): subscription and review reminders.
   Bottom corner, above Chatwoot's own content; Swivto's blue. */
#svc-notice {
  position: fixed;
  z-index: 9999;
  bottom: 16px;
  inset-inline-start: 16px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 14px;
  background: #ffffff;
  color: #0b1220;
  box-shadow: 0 16px 40px rgb(11 18 32 / 0.25);
  font-size: 14px;
  line-height: 1.7;
  direction: rtl;
}
#svc-notice p {
  margin: 0 0 12px;
}
#svc-notice .svc-notice-title {
  font-weight: 700;
  margin-bottom: 4px;
}
#svc-notice .svc-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#svc-notice a,
#svc-notice button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #0639e1;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
#svc-notice .svc-primary {
  background: #0639e1;
  color: #ffffff;
}
#svc-notice .svc-secondary {
  background: #ffffff;
  color: #0639e1;
}
#svc-notice.svc-urgent {
  border-inline-start: 4px solid #b42318;
}
/* The same card and floating row on Chatwoot's dark theme: white boxes glared there.
   Text 14.12:1, the outline button 8.84:1, Swivto's blue kept on the main button (7.84:1). */
.dark #svc-notice {
  background: #1c2024;
  color: #edeef0;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
}
.dark #svc-notice .svc-secondary {
  background: transparent;
  border-color: #5a78f0;
  color: #a9bcff;
}
.dark #svc-notice.svc-urgent {
  border-inline-start-color: #f97066;
}

/* Over the reply box when Meta stopped this WhatsApp number's replies (client.js). Red means
   stopped here, as on the card above; measured on its own tint: 9.06:1 light, 11.34:1 dark. */
#svc-wa-stopped {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 8px 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border-inline-start: 4px solid #b42318;
  background: #fef3f2;
  color: #7a271a;
  font-size: 13px;
  line-height: 1.6;
  direction: rtl;
}
#svc-wa-stopped a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
#svc-wa-stopped a:hover {
  background: rgb(180 35 24 / 0.1);
}
#svc-wa-stopped a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
@media (pointer: coarse) {
  #svc-wa-stopped a {
    min-height: 44px;
  }
}
.dark #svc-wa-stopped {
  border-inline-start-color: #f97066;
  background: #3a1614;
  color: #fecdca;
}
.dark #svc-wa-stopped a:hover {
  background: rgb(254 205 202 / 0.12);
}

/* "إعدادات البوت" (client.js → /_svc/owner): administrators only. A row in Chatwoot's sidebar
   styled by its own classes; this is only the fallback when the sidebar can't be found:
   bottom corner on the sidebar's side, above the profile row. */
#svc-owner-settings svg {
  flex: none;
}
#svc-owner-settings.svc-float {
  position: fixed;
  z-index: 9998;
  bottom: 68px;
  inset-inline-start: 12px;
  min-height: 44px;
  padding: 0 14px;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid #1d4ed8;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  direction: rtl;
  box-shadow: 0 4px 14px rgb(11 18 32 / 0.12);
}
#svc-owner-settings.svc-float:hover {
  background: #eef2fd;
}
.dark #svc-owner-settings.svc-float {
  border-color: #5a78f0;
  background: #1c2024;
  color: #a9bcff;
}
.dark #svc-owner-settings.svc-float:hover {
  background: #272c33;
}
#svc-owner-settings.svc-float:focus-visible,
#svc-owner-settings a:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

/* "Done with this customer?" (client.js), bottom on the other side from the administrator's
   card so both can show; same look and the same dark-theme colours. */
#svc-close-ask {
  position: fixed;
  z-index: 9999;
  bottom: 16px;
  inset-inline-end: 16px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: #ffffff;
  color: #0b1220;
  box-shadow: 0 16px 40px rgb(11 18 32 / 0.25);
  font-size: 14px;
  line-height: 1.6;
  direction: rtl;
}
#svc-close-ask p {
  margin: 0 0 10px;
}
#svc-close-ask .svc-close-title {
  font-weight: 700;
  margin-bottom: 2px;
}
#svc-close-ask .svc-close-text {
  color: #4b5565;
}
#svc-close-ask .svc-close-actions {
  display: flex;
  gap: 8px;
}
#svc-close-ask button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #0639e1;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
#svc-close-ask .svc-primary {
  background: #0639e1;
  color: #ffffff;
}
#svc-close-ask .svc-secondary {
  background: #ffffff;
  color: #0639e1;
}
#svc-close-ask button:focus-visible {
  outline: 2px solid #0639e1;
  outline-offset: 2px;
}
.dark #svc-close-ask {
  background: #1c2024;
  color: #edeef0;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
}
.dark #svc-close-ask .svc-close-text {
  color: #b0b4ba;
}
.dark #svc-close-ask .svc-secondary {
  background: transparent;
  border-color: #5a78f0;
  color: #a9bcff;
}
