/* ExcFlow CRM — Agenda v2.2 — Tooltip, Popover, Card limpo, Exclusão
   Complementa agenda.css e agenda-v2.css (não substitui). */

/* ─── Card limpo dentro da célula ────────────────────────────────────────── */
.agenda-evento.ag-card-v22 {
  display: block;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.3;
  background: rgba(196,113,74,0.15);
  border-left: 2px solid #c4714a;
  border-radius: 4px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background .12s ease, transform .12s ease;
  /* Crítico: trunca dentro da célula, não estoura */
  max-width: 100%;
  overflow: hidden;
}
.agenda-evento.ag-card-v22 .agenda-evento-titulo {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: rgba(245,241,232,0.95);
}
.agenda-evento.ag-card-v22:hover {
  background: rgba(196,113,74,0.28);
  transform: translateX(1px);
}

/* Variações por categoria preservadas */
.agenda-evento.ag-card-v22.ag-cat-visita        { background: rgba(120,168,210,0.15); border-left-color: #78a8d2; }
.agenda-evento.ag-card-v22.ag-cat-visita:hover  { background: rgba(120,168,210,0.28); }
.agenda-evento.ag-card-v22.ag-cat-almoco        { background: rgba(212,176,98,0.15); border-left-color: #d4b062; }
.agenda-evento.ag-card-v22.ag-cat-almoco:hover  { background: rgba(212,176,98,0.28); }
.agenda-evento.ag-card-v22.ag-cat-visita-cliente { background: rgba(196,113,74,0.18); border-left-color: #c4714a; }
.agenda-evento.ag-card-v22.ag-cat-visita-cliente:hover { background: rgba(196,113,74,0.32); }
.agenda-evento.ag-card-v22.ag-status-cancelada { opacity: 0.4; text-decoration: line-through; }
.agenda-evento.ag-card-v22.ag-status-realizada { background: rgba(120,168,108,0.18); border-left-color: #78a86c; }
.agenda-evento.ag-card-v22.ag-modalidade-coletivo::before {
  content: '◉'; font-size: 8px; margin-right: 4px; color: rgba(245,241,232,0.7);
}

/* ─── Tooltip (hover) ────────────────────────────────────────────────────── */
.agenda-tooltip-v22 {
  position: absolute;
  z-index: 9000;
  background: #1c1c1c;
  border: 1px solid rgba(196,113,74,0.4);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55);
  padding: 0;
  pointer-events: none;        /* Tooltip não captura mouse — não interrompe hover do card */
  display: none;
  font-family: inherit;
}

/* ─── Popover (clique único) ─────────────────────────────────────────────── */
.agenda-popover-v22 {
  position: absolute;
  z-index: 9100;
  background: #1c1c1c;
  border: 1px solid rgba(196,113,74,0.55);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.65);
  padding: 0;
  display: none;
  font-family: inherit;
  animation: agPopIn .12s ease-out;
}
@keyframes agPopIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Conteúdo compartilhado (tooltip + popover) ─────────────────────────── */
.ag-det-card {
  padding: 12px 14px;
  color: rgba(245,241,232,0.92);
  font-size: 12px;
  line-height: 1.45;
}
.ag-det-titulo {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(245,241,232,0.97);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.ag-det-meta {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-bottom: 8px;
}
.ag-det-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(245,241,232,0.07);
  color: rgba(245,241,232,0.78);
  text-transform: capitalize;
  letter-spacing: 0;
}
.ag-det-pill-coletivo { background: rgba(120,168,210,0.18); color: #9bc4dd; }
.ag-det-pill-exclusivo { background: rgba(196,113,74,0.18); color: #d18a64; }
.ag-det-pill-status-agendada  { background: rgba(120,168,108,0.16); color: #95c283; }
.ag-det-pill-status-realizada { background: rgba(120,168,108,0.25); color: #b8e5a0; }
.ag-det-pill-status-cancelada { background: rgba(220,90,90,0.18); color: #f0a8a8; }
.ag-det-pill-status-reagendada { background: rgba(212,176,98,0.20); color: #e9c478; }

.ag-det-linha {
  font-size: 12px;
  margin: 5px 0;
  color: rgba(245,241,232,0.85);
}
.ag-det-linha strong {
  color: rgba(245,241,232,0.65);
  font-weight: 500;
  margin-right: 4px;
}
.ag-det-arq-lista {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 4px;
}
.ag-det-arq {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  padding: 2px 7px;
  background: rgba(196,113,74,0.13);
  border-radius: 10px;
  color: rgba(245,241,232,0.9);
}
.ag-det-arq em {
  font-style: normal;
  font-family: 'JetBrains Mono', monospace;
  color: #c4714a;
  font-weight: 700;
  font-size: 10px;
}
.ag-det-criador {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(196,113,74,0.08);
  border-left: 2px solid rgba(196,113,74,0.4);
  border-radius: 4px;
  font-size: 11px;
}
.ag-det-acoes {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(245,241,232,0.08);
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ag-det-btn-edit,
.ag-det-btn-del {
  font-family: inherit;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .12s ease;
  border: 1px solid transparent;
}
.ag-det-btn-edit {
  background: rgba(196,113,74,0.15);
  color: rgba(245,241,232,0.9);
  border-color: rgba(196,113,74,0.35);
}
.ag-det-btn-edit:hover { background: rgba(196,113,74,0.28); }
.ag-det-btn-del {
  background: rgba(220,90,90,0.1);
  color: #e87;
  border-color: rgba(220,90,90,0.3);
}
.ag-det-btn-del:hover { background: rgba(220,90,90,0.22); color: #f0a8a8; }
.ag-det-dica {
  margin-top: 8px;
  font-size: 10px;
  color: rgba(245,241,232,0.4);
  font-style: italic;
}

/* ─── Modal de exclusão definitiva ──────────────────────────────────────── */
.ag-modal-exclusao .agenda-modal-card {
  border-top: 3px solid rgba(220,90,90,0.6);
}
.ag-excl-alerta {
  padding: 10px 14px;
  border-radius: 7px;
  background: rgba(220,90,90,0.10);
  border: 1px solid rgba(220,90,90,0.28);
  color: rgba(245,241,232,0.92);
  font-size: 12px;
  line-height: 1.5;
}
.ag-excl-evento-box {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 7px;
  background: rgba(28,28,28,0.6);
  border: 1px solid rgba(245,241,232,0.08);
}
.ag-excl-evento-titulo {
  font-weight: 600;
  font-size: 13px;
  color: rgba(245,241,232,0.95);
  margin-bottom: 3px;
}
.ag-excl-evento-meta {
  font-size: 11px;
  color: rgba(245,241,232,0.55);
}
.ag-btn-perigoso {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 7px;
  cursor: pointer;
  background: linear-gradient(135deg, #c45a5a, #a13e3e);
  color: #fff;
  border: 1px solid rgba(220,90,90,0.5);
  transition: all .15s ease;
}
.ag-btn-perigoso:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,90,90,0.35);
}
.ag-btn-perigoso:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(245,241,232,0.08);
  color: rgba(245,241,232,0.4);
  border-color: rgba(245,241,232,0.12);
}
