/* ============================================================================
   OmniFlow - CSS Customizado (White Label)
   Versão: 2.0.0 | Data: 2026-02-02
   
   CORES:
   - Primária: #ED1E79 (Rosa)
   - Secundária: #F7931E (Laranja)
   - Hover: #C01862 (Rosa escuro)
   
   PERSISTÊNCIA: Este arquivo é servido via Nginx (externo ao container)
   ============================================================================ */

/* ============================================================================
   1. VARIÁVEIS CSS GLOBAIS
   ============================================================================ */
:root {
  --color-woot: #ED1E79 !important;
  --w-500: #ED1E79 !important;
  --w-600: #C01862 !important;
  --w-700: #A0145A !important;
  --w-400: #F04D94 !important;
  --w-300: #F47DB0 !important;
  --color-primary: #ED1E79 !important;
  --color-primary-dark: #C01862 !important;
  --color-primary-light: #F04D94 !important;
  --brand-color: #ED1E79 !important;
  --woot-color: #ED1E79 !important;
}

/* ============================================================================
   2. BOTÕES PRIMÁRIOS
   ============================================================================ */
.button,
.btn,
.button--primary,
.woot-button.primary,
.woot-button--primary,
.login-button,
.auth-button,
.primary-button,
.nice-button,
button[type="submit"],
input[type="submit"],
.login-box__submit button,
.login-submit button,
.auth-submit button {
  background-color: #ED1E79 !important;
  border-color: #ED1E79 !important;
  color: white !important;
}

.button:hover,
.btn:hover,
.button--primary:hover,
.woot-button.primary:hover,
button[type="submit"]:hover {
  background-color: #C01862 !important;
  border-color: #C01862 !important;
}

.button:active,
.button--primary:active,
button[type="submit"]:active {
  background-color: #A0145A !important;
  border-color: #A0145A !important;
}

.button:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: #ED1E79 !important;
  outline-color: #ED1E79 !important;
  box-shadow: 0 0 0 2px rgba(237, 30, 121, 0.2) !important;
}

/* ============================================================================
   3. ITENS DE MENU ATIVOS
   ============================================================================ */
.active,
.selected,
.is-active,
.is-selected,
.router-link-active {
  background-color: rgba(237, 30, 121, 0.1) !important;
  color: #ED1E79 !important;
  border-left-color: #ED1E79 !important;
}

.conversation-item.active,
.sidebar-item.active,
.nav-item.active,
.secondary-sidebar .menu-item.active,
.primary-sidebar__item.active {
  background-color: rgba(237, 30, 121, 0.15) !important;
  color: #ED1E79 !important;
  border-left: 4px solid #ED1E79 !important;
}

.active span,
.active .label,
.is-active span,
.sidebar-item.active span {
  color: #ED1E79 !important;
}

a.active,
a:active {
  color: #ED1E79 !important;
}

/* ============================================================================
   4. BADGES E ELEMENTOS UI
   ============================================================================ */
.badge,
.badge--primary,
.label--primary {
  background-color: #ED1E79 !important;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: #ED1E79 !important;
  border-color: #ED1E79 !important;
}

.progress-bar,
.progress-bar-fill {
  background-color: #ED1E79 !important;
}

.tabs .tab.is-active,
.woot-tabs .tab.is-active {
  border-bottom-color: #ED1E79 !important;
  color: #ED1E79 !important;
}

/* ============================================================================
   5. WIDGET DE CHAT
   ============================================================================ */
.widget-bubble,
.chat-bubble,
.launcher,
.woot-widget-bubble {
  background-color: #ED1E79 !important;
}

.woot-widget-holder {
  --primary-color: #ED1E79 !important;
}

/* ============================================================================
   6. CONVERSAS E MENSAGENS
   ============================================================================ */
.conversation-panel .user-thumbnail,
.conversation-panel .status-badge.online {
  border-color: #ED1E79 !important;
}

/* ============================================================================
   7. DROPDOWN E MODAIS
   ============================================================================ */
.dropdown-menu__item:active,
.dropdown-menu__item.is-active {
  background: #ED1E79 !important;
}

/* ============================================================================
   8. LINKS
   ============================================================================ */
a {
  color: #ED1E79;
}

a:hover {
  color: #C01862;
}

/* ============================================================================
   9. TOGGLE/SWITCH
   ============================================================================ */
.toggle-button.active,
.switch input:checked + .slider {
  background-color: #ED1E79 !important;
}

/* ============================================================================
   ==========================================================================
   SEÇÃO: OCULTAR FUNCIONALIDADES PAGAS / PAYWALL / ENTERPRISE
   ==========================================================================
   ============================================================================ */

/* --------------------------------------------------------------------------
   10.1 MENU CAPITÃO/CAPTAIN/COPILOT NA SIDEBAR
   -------------------------------------------------------------------------- */
[href*="/captain"],
[href*="/copilot"],
[href*="captain"],
a[data-key="CAPTAIN"],
a[data-key="captain"],
.sidebar-item[data-key="captain"],
.primary-sidebar__item[data-key="captain"],
nav a[href*="captain"],
.secondary-sidebar a[href*="captain"],
aside a[href*="captain"],
.sidebar a[href*="captain"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Ocultar item pai do menu Captain */
li:has(a[href*="captain"]),
.sidebar-item:has(a[href*="captain"]),
.menu-item:has(a[href*="captain"]) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.2 BANNERS E CTAs DE UPGRADE
   -------------------------------------------------------------------------- */
.upgrade-banner,
.upgrade-cta,
.upsell-banner,
.paywall-banner,
.enterprise-paywall,
.premium-banner,
.pro-banner,
[class*="paywall"],
[class*="upgrade-banner"],
[class*="enterprise-cta"],
[class*="upsell"],
[class*="PayWall"],
[class*="Paywall"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --------------------------------------------------------------------------
   10.3 BOTÕES "ATUALIZAR AGORA" / "UPGRADE NOW"
   -------------------------------------------------------------------------- */
button[data-action="upgrade"],
.upgrade-button,
.btn-upgrade,
.button--upgrade,
a[href*="/upgrade"],
a[href*="/billing"],
a[href*="/pricing"],
[class*="upgrade-button"],
[class*="UpgradeButton"],
button:contains("Atualizar"),
button:contains("Upgrade"),
a:contains("Atualizar agora"),
a:contains("Upgrade now") {
  display: none !important;
  visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   10.4 BADGES ENTERPRISE/PREMIUM/PRO
   -------------------------------------------------------------------------- */
.badge--enterprise,
.badge--premium,
.badge--pro,
.enterprise-badge,
.premium-badge,
.pro-badge,
[class*="enterprise-label"],
[class*="premium-label"],
[class*="pro-label"],
[class*="EnterpriseBadge"],
[class*="PremiumBadge"],
span[class*="enterprise"],
span[class*="premium"] {
  display: none !important;
  visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   10.5 MENSAGENS DE PAYWALL (CAPTAIN ESPECÍFICO)
   -------------------------------------------------------------------------- */
[class*="CAPTAIN"],
[class*="Captain"],
.captain-paywall,
.captain-enterprise-only,
.captain-upgrade,
[data-testid*="captain"],
[data-testid*="paywall"] {
  display: none !important;
}

/* Textos específicos de paywall */
p:contains("CAPTAIN.ENTERPRISE_PAYWALL"),
p:contains("Atualize para usar o Capitão"),
p:contains("Upgrade to use Captain"),
p:contains("AVAILABLE_ON"),
span:contains("ENTERPRISE_PAYWALL"),
div:contains("Atualize seu plano para ter acesso") {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.6 MODAIS DE UPGRADE
   -------------------------------------------------------------------------- */
.modal--upgrade,
.upgrade-modal,
[class*="upgrade-modal"],
[class*="UpgradeModal"],
[data-modal="upgrade"],
[data-modal="paywall"],
.paywall-modal {
  display: none !important;
  visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   10.7 RECURSOS PREMIUM NO MENU (SLA, Audit Logs, Custom Roles)
   -------------------------------------------------------------------------- */
[href*="/sla"],
[href*="/audit-logs"],
[href*="/audit_logs"],
[href*="/custom-roles"],
[href*="/custom_roles"],
[data-feature="sla"],
[data-feature="audit_logs"],
[data-feature="custom_roles"],
.sla-menu-item,
.audit-logs-menu,
.custom-roles-menu {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.7.1 OCULTAR APENAS O SUBMENU SECURITY (não o menu Configurações)
   -------------------------------------------------------------------------- */
/* Link direto para security - APENAS quando termina em /security */
a[href$="/security"],
a[href$="/settings/security"],
a[href="/app/accounts/1/settings/security"] {
  display: none !important;
  visibility: hidden !important;
}

/* Ocultar APENAS o item <li> que contém link para security */
.secondary-menu li:has(> a[href$="/security"]),
.settings-menu li:has(> a[href$="/security"]),
.sub-menu li:has(> a[href$="/security"]) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.8 NOTIFICAÇÕES DE UPGRADE
   -------------------------------------------------------------------------- */
.notification--upgrade,
.alert--upgrade,
.upgrade-notification,
[class*="upgrade-alert"],
[class*="UpgradeNotification"],
.toast--upgrade {
  display: none !important;
  visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   10.9 SEÇÃO ENTERPRISE/PRICING NO SETTINGS
   -------------------------------------------------------------------------- */
[href*="/enterprise"],
[href*="/pricing"],
.enterprise-settings,
.pricing-section,
[class*="EnterpriseSection"],
[class*="PricingCard"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.10 FEATURE LOCKED / BLOQUEADA
   -------------------------------------------------------------------------- */
.feature-locked,
.feature--premium,
.feature--enterprise,
.feature--pro,
[class*="feature-locked"],
[class*="locked-feature"],
[class*="FeatureLocked"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.11 TOOLTIPS DE UPGRADE
   -------------------------------------------------------------------------- */
.tooltip--upgrade,
[class*="upgrade-tooltip"],
.premium-tooltip,
.enterprise-tooltip {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.12 CARDS DE PLANOS
   -------------------------------------------------------------------------- */
.plan-card,
.pricing-card,
[class*="PlanCard"],
[class*="PricingCard"],
.subscription-card {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.13 ÍCONES DE CADEADO (LOCKED)
   -------------------------------------------------------------------------- */
.icon-lock,
.locked-icon,
[class*="lock-icon"],
svg[data-icon="lock"]:not([class*="password"]) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   10.14 CONTAINERS COM TEXTO ENTERPRISE_PAYWALL
   -------------------------------------------------------------------------- */
div[class*="enterprise"],
div[class*="Enterprise"],
section[class*="paywall"],
section[class*="Paywall"],
article[class*="upgrade"],
article[class*="Upgrade"] {
  display: none !important;
}

/* ==========================================================================
   SEÇÃO 11: PÁGINAS ESPECÍFICAS - SELETORES AGRESSIVOS
   ========================================================================== */

/* --------------------------------------------------------------------------
   11.1 PÁGINA /settings/security - Ocultar botões de upgrade
   -------------------------------------------------------------------------- */
/* Botões com texto de upgrade em qualquer contexto */
.settings-container button.button,
.settings-content button.button,
.security-settings button,
.settings-page button {
  /* Verificar se é botão de upgrade via JS */
}

/* Ocultar seções inteiras de upgrade no settings */
.settings-content > div:has(button:contains("Atualizar")),
.settings-content > section:has(button:contains("Upgrade")),
.security-view > div:has(.upgrade),
.settings-wrapper > div:has([class*="upgrade"]) {
  display: none !important;
}

/* Botões woot com texto de upgrade */
button.woot-button:has(span:contains("Atualizar")),
button.woot-button:has(span:contains("Upgrade")),
a.woot-button:has(span:contains("Atualizar")),
a.woot-button:has(span:contains("Upgrade")) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   11.2 PÁGINA /captain/assistants - Ocultar toda a página
   -------------------------------------------------------------------------- */
/* Redirecionar ou ocultar conteúdo da página captain */
.captain-page,
.captain-view,
.captain-content,
.captain-assistants,
[class*="captain-"],
[class*="Captain"] {
  display: none !important;
}

/* Ocultar sidebar item que leva ao captain */
.primary-sidebar a[href*="captain"],
.secondary-sidebar a[href*="captain"],
.sidebar-menu a[href*="captain"],
.navigation a[href*="captain"],
nav a[href*="captain"],
a.sidebar__item[href*="captain"],
.sidebar__item:has(a[href*="captain"]) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Ocultar o pai do item de menu captain */
.primary-sidebar__item:has(a[href*="captain"]),
.sidebar-item:has(a[href*="captain"]),
li:has(a[href*="captain"]),
div:has(> a[href*="captain"]) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   11.3 BOTÕES ESPECÍFICOS DE UPGRADE (Tailwind classes comuns)
   -------------------------------------------------------------------------- */
/* Botões com classes comuns do Chatwoot */
button.button.clear.outline,
button.button.clear.success,
button.button.nice.success,
a.button.nice.success {
  /* Não ocultar todos, apenas os de upgrade - tratado via JS */
}

/* Ocultar qualquer elemento com data-testid de upgrade */
[data-testid*="upgrade"],
[data-testid*="paywall"],
[data-testid*="enterprise"],
[data-testid*="premium"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   11.4 TEXTOS HARDCODED DE PAYWALL (via atributos)
   -------------------------------------------------------------------------- */
/* Elementos que contêm chaves de tradução */
[data-i18n*="UPGRADE"],
[data-i18n*="PAYWALL"],
[data-i18n*="ENTERPRISE"],
[data-i18n*="PREMIUM"],
[data-translate*="upgrade"],
[data-translate*="paywall"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   11.5 CARDS E CONTAINERS DE FEATURE BLOQUEADA
   -------------------------------------------------------------------------- */
.feature-card:has(.upgrade),
.feature-box:has(.premium),
.card:has([class*="paywall"]),
.panel:has([class*="upgrade"]),
.box:has([class*="enterprise"]) {
  display: none !important;
}

/* Ocultar containers de onboarding/upsell */
.onboarding-banner,
.upsell-card,
.promotion-banner,
.trial-banner,
.upgrade-prompt,
.enterprise-prompt {
  display: none !important;
}

/* --------------------------------------------------------------------------
   11.6 ÍCONES E LABELS DE FEATURES PAGAS
   -------------------------------------------------------------------------- */
/* Ícones de sparkle/star que indicam premium */
.icon-premium,
.icon-enterprise,
.icon-sparkle,
.premium-icon,
.enterprise-icon,
svg.premium,
svg.enterprise,
i.premium,
i.enterprise {
  display: none !important;
}

/* Labels/tags de features */
.tag--premium,
.tag--enterprise,
.label--premium,
.label--enterprise,
span.premium,
span.enterprise {
  display: none !important;
}

/* --------------------------------------------------------------------------
   11.7 SEÇÃO DE BILLING/SUBSCRIPTION
   -------------------------------------------------------------------------- */
.billing-section,
.subscription-section,
.plan-section,
[class*="billing"],
[class*="subscription"]:not([class*="webhook"]) {
  /* Cuidado para não ocultar webhook subscriptions */
}

/* Ocultar links de billing */
a[href*="billing"],
a[href*="subscription"],
a[href*="pricing"],
a[href*="plans"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   11.8 HELPER CLASSES PARA JAVASCRIPT
   -------------------------------------------------------------------------- */
/* Classes que o JS pode adicionar para ocultar */
.omniflow-hidden,
.paywall-hidden,
.upgrade-hidden {
  display: none !important;
  visibility: hidden !important;
}

/* ============================================================================
   FIM - CUSTOMIZAÇÃO OMNIFLOW v2.1.0
   ============================================================================ */
