/* ── Itens ocultos do menu lateral ─────────────────────────────────────── */
li:has(span.i-woot-captain)      { display: none !important; }
li:has(span.i-lucide-megaphone)  { display: none !important; }
li:has(span.i-lucide-library-big){ display: none !important; }

/* ── Ocultar botões Ordenar Conversas e Alternar Layout ─────────────────── */
/* ConversationBasicFilter fica em <div> irmão após o wrapper do filtro      */
/* SwitchLayout fica em <button> irmão direto após o wrapper do filtro       */
div:has(> #toggleConversationFilterButton) ~ div,
div:has(> #toggleConversationFilterButton) ~ button:not(#cwi-btn) {
  display: none !important;
}

/* ── Elementos ocultados pelo script (fallback) ──────────────────────────── */
.cwi-hidden { display: none !important; }

/* ── Botão "+ Iniciar" nos tabs de conversa ─────────────────────────────── */
#cwi-btn {
  font-size: 11px;
  font-weight: 700;
  color: #1f93ff;
  background: transparent;
  border: 1.5px solid #1f93ff;
  border-radius: 20px;
  padding: 2px 10px;
  margin-left: 8px;
  cursor: pointer;
  line-height: 1.7;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  vertical-align: middle;
}
#cwi-btn:hover {
  background: #1f93ff;
  color: #fff;
}

/* ── Modal overlay ──────────────────────────────────────────────────────── */
#cwi-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
#cwi-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 32, 40, 0.55);
  backdrop-filter: blur(2px);
}
#cwi-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  width: 420px;
  max-width: 94vw;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Header */
#cwi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8edf2;
  font-size: 15px;
  font-weight: 700;
  color: #1c1e21;
}
#cwi-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #8899a6;
  font-size: 15px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
}
#cwi-close:hover { background: #f3f4f6; color: #3d4657; }

/* Body */
#cwi-body { padding: 20px; }
#cwi-sub  { font-size: 13px; color: #8899a6; margin-bottom: 16px; }

.cwi-lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin: 14px 0 5px;
}
.cwi-inp {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  color: #1c1e21;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cwi-inp:focus {
  border-color: #1f93ff;
  box-shadow: 0 0 0 3px rgba(31,147,255,0.15);
}
.cwi-sel {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.cwi-row { display: flex; gap: 8px; align-items: center; }
.cwi-pfx {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}

/* Preview */
#cwi-preview {
  display: none;
  margin-top: 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #0369a1;
  line-height: 1.55;
}
#cwi-preview strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0284c7;
  margin-bottom: 4px;
}

/* Botão Enviar */
#cwi-btn-enviar {
  margin-top: 18px;
  width: 100%;
  padding: 11px;
  background: #1f93ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
#cwi-btn-enviar:hover:not(:disabled) { background: #1a7fe0; }
#cwi-btn-enviar:disabled { background: #a0aec0; cursor: not-allowed; }

/* Resultado */
#cwi-result {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.cwi-ok  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.cwi-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
