/* ========================================== */
/* ESTILOS PERSONALIZADOS (style.css) */
/* ========================================== */

/* --- Estilos Base --- */
.jumbotron {
  background-color: #e9ecef;
  padding: 2rem;
}
.table th {
  white-space: nowrap;
}
.modal-body .form-group {
  margin-bottom: 1rem;
}

/* --- Badges de Posição --- */
.badge-status {
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge-apoia {
  background: #d4edda;
  color: #155724;
}
.badge-contrario {
  background: #f8d7da;
  color: #721c24;
}
.badge-nao-manifestado {
  background: #e2e3e5;
  color: #383d41;
}

/* --- Informações de Contato (Modal Ver Contato) --- */
.contato-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}
.contato-info-titulo {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}
.contato-info-valor {
  color: #666;
  font-size: 14px;
}
.contato-fonte {
  font-size: 11px;
  color: #999;
  font-style: italic;
}

/* --- Botões de Ação (WhatsApp, Instagram) --- */
.btn-acao-contato {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  vertical-align: middle;
}
.btn-whatsapp {
  background: #25d366;
  color: white !important;
}
.btn-whatsapp:hover {
  background: #20ba5a;
  color: white !important;
}
.btn-instagram {
  background: #e4405f;
  color: white !important;
}
.btn-instagram:hover {
  background: #d32f4f;
  color: white !important;
}
.btn-acao-contato svg {
  vertical-align: middle;
  margin-right: 4px;
  margin-top: -2px;
}

/* --- Lista de Assessores (Modal Ver Contato) --- */
.assessores-lista {
  margin-top: 10px;
}
.assessor-item {
  background: white;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 3px solid #667eea;
}

/* --- Itens da Lista de Envio (Modais de Campanha) --- */
.parlamentar-envio-item {
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e0e0e0;
  font-size: 0.9em;
}
.parlamentar-envio-item.enviado {
  background: #e9f5ec;
  border-color: #a3d9b1;
  opacity: 0.8;
}
.parlamentar-envio-item strong {
  font-weight: 600;
}
.parlamentar-envio-item span[style*="color: #28a745"] {
  margin-left: 5px;
}

/* --- Widget de Progresso (Tracking) --- */
/* --- Ícone de Copiar --- */
.position-relative {
  position: relative;
}
.copy-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  gap: 0.75rem;
}
.copy-group-header label {
  margin-bottom: 0;
}
.copy-btn {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(79, 70, 229, 0.32);
}
#aviso-lotes-email {
  font-size: 0.9em;
}
#aviso-lotes-email.aviso-lotes-destaque {
  background-color: #fff4d6;
  color: #8a4b00;
  padding: 0.6rem 0.75rem;
  border-left: 4px solid #ffb347;
  border-radius: 6px;
  font-weight: 600;
}
.email-copy-alert {
  border-left: 4px solid #f0ad4e;
  font-weight: 600;
}

/* --- Textareas Ocultos (para templates de campanha) --- */
.hidden-textarea {
  display: none;
}

/* ========================================== */
/* --- AJUSTE ESPAÇAMENTO, SITUAÇÃO E ABAS --- */
/* ========================================== */

/* --- Jumbotron (reduzido) --- */
.jumbotron {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
  margin-bottom: 1.5rem;
}
main.container {
  margin-top: 1rem !important;
}

/* --- Estilo para o Bloco .situacao-destaque --- */
.situacao-destaque {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  border-radius: 8px;
}

/* Reduzir tamanho da fonte e margens dentro da seção */
.situacao-destaque p,
.situacao-destaque ul,
.situacao-destaque li,
.situacao-destaque div[style*="background-color"] {
  font-size: 0.9em;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
.situacao-destaque p:first-of-type strong {
  color: #343a40;
}
.situacao-destaque ul {
  padding-left: 20px;
}

/* --- CORREÇÃO DE ABAS (SOLUÇÃO FINAL PARA EMPILHAMENTO E ESPAÇO) --- */

/* 1. Garante que o container das abas funcione com display: block */
#modalEnviarInfo .modal-body .tab-content {
  display: block !important;
  overflow: visible !important;
}

/* 2. Força o ESCONDIMENTO da aba inativa (sobrescreve flex/grid) */
#modalEnviarInfo .modal-body .tab-content > .tab-pane:not(.active) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 3. Garante que a aba ativa ocupe espaço normalmente e que não tenha padding extra */
#modalEnviarInfo .modal-body .tab-content > .tab-pane.active.show {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0; /* Remove padding superior/inferior que pode causar o espaço branco indesejado */
}

/* 4. Remove margem superior do primeiro elemento DENTRO da aba ativa para subir o conteúdo */
#modalEnviarInfo .tab-pane.active.show > *:first-child {
  margin-top: 0 !important;
}

/* ========================================== */
/* --- CORREÇÃO DE RESPONSIVIDADE (MOBILE) --- */
/* ========================================== */

@media (max-width: 575.98px) {
  .jumbotron {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  .jumbotron .display-4 {
    font-size: 2rem !important;
  }
  .jumbotron .lead {
    font-size: 1rem !important;
  }
  .jumbotron .featured-pauta-label {
    font-size: 0.9em !important;
  }
  .jumbotron .btn-lg {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
  }
}

/* ========================================== */
/* ESTILOS BASE (MANTIDOS) */
/* ========================================== */
.container {
  max-width: 1140px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}
.display-4 {
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1.2;
}
.lead {
  font-size: 1.25rem;
  font-weight: 300;
}
hr {
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}
.col-md-6 {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* ========================================== */
/* --- DESTAQUE FUNÇÃO (Estilo "Badge com Borda") --- */
/* ========================================== */

/* 1. Remove qualquer estilo de fundo da CÉLULA (td) */
td.funcao-destaque {
  background-color: transparent !important;
}

/* 2. Estilo base para o <span> que o JS cria */
.funcao-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.9em;
  border-radius: 15px; /* Formato "pill" */
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

/* 3. Estilo de DESTAQUE (conforme o seu pedido) */
.funcao-badge.funcao-destaque {
  color: #0c5460; /* Cor do texto Info (azul-escuro) */
  border: 2px solid #bee5eb; /* Borda Info (azul-claro) */
  background-color: #f1fafd; /* Fundo Info (extra-claro, quase branco) */
}

/* 4. Estilo para funções normais (não-destaque) */
.funcao-badge:not(.funcao-destaque) {
  color: #495057; /* Cor de texto padrão */
  background-color: #e9ecef; /* Fundo cinza padrão */
  border: 2px solid #e9ecef; /* Borda cinza (para manter o tamanho) */
}

/* 5. Ajuste para telemóvel (para o <small> de partido/uf) */
.d-md-none .funcao-badge {
  margin-bottom: 4px; /* Adiciona espaço abaixo do badge */
}
.d-md-none strong.funcao-destaque {
  font-weight: 700; /* Garante que o texto dentro do badge seja negrito */
}

@media (min-width: 768px) {
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
