/* ============================================================
   ContactDetailPage – Layout & Komponenten
   ============================================================ */

/* ---- Navigation ---- */
.backLink {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  transition: color 0.15s;
}

.backLink:hover {
  color: var(--color-primary);
}

/* ---- Header ---- */
.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.headerLeft {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.nameRow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.name {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}

.nameCompany {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0.25rem 0 0;
}

/* ---- Status badges ---- */
.badgeActive {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1875rem 0.5rem;
  background: #dcfce7;
  color: #166534;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.badgeActive::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}

.badgeInactive {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1875rem 0.5rem;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.badgeInactive::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
}


/* ---- Card ---- */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
}

.cardTitle {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--color-text);
}

/* ---- Two-column info layout inside a card ---- */
.infoColumns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 2rem;
  align-items: start;
}

@media (max-width: 640px) {
  .infoColumns {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---- Info grid (label | value pairs) ---- */
.infoGrid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.5rem 0.75rem;
  font-size: 0.875rem;
  align-content: start;
}

.infoLabel {
  color: var(--color-text-muted);
  font-weight: 500;
  padding-top: 0.0625rem; /* optical alignment */
}

.infoValue {
  color: var(--color-text);
  word-break: break-word;
}

.empty {
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* ---- Address row (full-width below infoColumns) ---- */
.addressRow {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* ---- Tags ---- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--color-primary-light, #dbeafe);
  color: var(--color-primary, #1a56db);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---- Aktivitäten-Filter ---- */
.activityFilterBar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  padding: 0.625rem 0.875rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.activityFilterSelect {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
  height: 30px;
}

.activityFilterDate {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  height: 30px;
  width: 130px;
}

.activityFilterLabel {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.activityFilterReset {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.activityFilterReset:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.activityFilterCount {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---- Timeline (Zeitstrahl) ---- */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Verbindungslinie links */
.timeline::before {
  content: '';
  position: absolute;
  left: 15px; /* Mitte des 32px Icons */
  top: 24px;
  bottom: 16px;
  width: 2px;
  background: var(--color-border);
  pointer-events: none;
}

.timelineItem {
  position: relative;
  display: flex;
  gap: 0.875rem;
  padding: 0.625rem 0;
}

.timelineItem:last-child {
  padding-bottom: 0;
}

.timelineIcon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: border-color 0.15s;
}

/* Farbige Icon-Kreise pro Typ */
.timelineIconNote   { border-color: #94a3b8; color: #64748b; }
.timelineIconCall   { border-color: #22c55e; color: #16a34a; }
.timelineIconEmail  { border-color: #3b82f6; color: #2563eb; }
.timelineIconMeeting { border-color: #a855f7; color: #9333ea; }
.timelineIconTask   { border-color: #f59e0b; color: #d97706; }
.timelineIconFollowup { border-color: #ef4444; color: #dc2626; }

.timelineContent {
  flex: 1;
  min-width: 0;
  padding-top: 0.1875rem;
}

.timelineSubject {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.35;
}

.timelineMeta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.1875rem;
}

.timelineTypeBadge {
  display: inline-flex;
  align-items: center;
  padding: 0.0625rem 0.4375rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.timelineBadgeNote     { background: #f1f5f9; color: #64748b; }
.timelineBadgeCall     { background: #dcfce7; color: #16a34a; }
.timelineBadgeEmail    { background: #dbeafe; color: #2563eb; }
.timelineBadgeMeeting  { background: #f3e8ff; color: #9333ea; }
.timelineBadgeTask     { background: #fef9c3; color: #d97706; }
.timelineBadgeFollowup { background: #fee2e2; color: #dc2626; }

.timelineDate {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.timelineDesc {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-top: 0.3125rem;
  white-space: pre-wrap;
  line-height: 1.45;
}

.timelineEmpty {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ---- Notes ---- */
.notesText {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  line-height: 1.5;
  margin: 0;
}
