/* ── Contacts Page ─────────────────────────────────────────── */
.contacts-tabs {
  display: flex; gap: var(--space-1); margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.contacts-tab {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm); font-weight: 600; color: var(--text-muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; margin-bottom: -1px; transition: all var(--transition);
}
.contacts-tab:hover { color: var(--text-primary); }
.contacts-tab.active { color: var(--accent-violet-light); border-bottom-color: var(--accent-violet); }

.contacts-count-badge {
  background: var(--accent-violet-dim); color: var(--accent-violet-light);
  border-radius: 100px; padding: 1px 6px;
  font-size: var(--text-xs); font-weight: 700;
}

.contacts-checkbox {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--accent-violet);
}

tr.row-selected { background: rgba(124,58,237,0.07); }
tr.row-selected:hover { background: rgba(124,58,237,0.12) !important; }

/* ── Compose Modal ─────────────────────────────────────────── */
.contacts-compose-modal {
  max-width: 680px; max-height: 90vh; display: flex; flex-direction: column;
}
.contacts-compose-modal .modal-body { flex: 1; overflow-y: auto; }

.contacts-recipients-box {
  display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-3);
  min-height: 52px; max-height: 140px; overflow-y: auto;
}
.contacts-recipient-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-violet-dim); border: 1px solid rgba(124,58,237,0.3);
  color: var(--accent-violet-light); border-radius: 100px;
  padding: 3px 10px 3px 10px; font-size: var(--text-xs); font-weight: 600;
}
.contacts-chip-remove {
  background: none; border: none; cursor: pointer;
  color: var(--accent-violet-light); display: flex; align-items: center;
  padding: 0; opacity: 0.7; transition: opacity var(--transition);
}
.contacts-chip-remove:hover { opacity: 1; }

.contacts-format-toggle {
  display: inline-flex; gap: 2px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px;
}
.contacts-format-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: var(--text-xs); font-weight: 600;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  background: none; color: var(--text-muted); transition: all var(--transition);
}
.contacts-format-btn.active {
  background: var(--accent-violet); color: white;
  box-shadow: 0 2px 8px rgba(124,58,237,0.35);
}
.contacts-format-btn:hover:not(.active) { color: var(--text-primary); background: var(--bg-card); }

.contacts-compose-body {
  min-height: 200px; resize: vertical; font-family: var(--font-mono, monospace);
  font-size: var(--text-sm); line-height: 1.6;
}
.contacts-compose-html { font-family: var(--font-mono, 'Courier New', monospace); font-size: 12px; }

.contacts-html-preview {
  margin-top: var(--space-3); background: white; color: #111;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-4); max-height: 300px; overflow-y: auto;
}
.contacts-html-rendered { font-size: 14px; line-height: 1.7; }

/* ── History list in detail modal ──────────────────────────── */
.contacts-history-list { display: flex; flex-direction: column; gap: var(--space-2); }
.contacts-history-item {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4);
  transition: border-color var(--transition);
}
.contacts-history-item:hover { border-color: var(--border-hover); }

/* ── Badge extras ──────────────────────────────────────────── */
/* .badge-violet is defined once in seo.css (shared component). */
.badge-blue {
  background: rgba(59,130,246,0.12); color: var(--blue-soft);
  border: 1px solid rgba(59,130,246,0.3);
}
.badge-yellow {
  background: rgba(245,158,11,0.12); color: var(--orange-soft);
  border: 1px solid rgba(245,158,11,0.3);
}

/* Spinner is defined once in animations.css (.spinner + .spinner-lg). */

@media (max-width: 768px) {
  .contacts-compose-modal { max-width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}
