/* M8.1e.2a: Activity Timeline im vorhandenen Anrufhistorie-Rahmen. */
.activity-timeline-panel {
  position: static;
  inset: auto;
  z-index: auto;
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  max-height: none;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  backdrop-filter: none;
}

.activity-timeline-panel[hidden] {
  display: none !important;
}

.activity-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  border: 0;
}

.activity-timeline-heading-wrap {
  min-width: 0;
}

.activity-timeline-title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.22;
}

.activity-timeline-subtitle {
  margin: 0.18rem 0 0;
  color: var(--muted, #667085);
  font-size: 0.84rem;
  line-height: 1.3;
}

.activity-timeline-refresh,
.activity-timeline-load-older {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.activity-timeline-refresh {
  flex: 0 0 auto;
  padding: 0.42rem 0.62rem;
  font-size: 0.75rem;
}

.activity-timeline-refresh:hover,
.activity-timeline-load-older:hover {
  background: rgba(15, 23, 42, 0.05);
}

.activity-timeline-status {
  margin: 0.75rem 0 0;
  padding: 0.9rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.04);
  color: var(--muted, #667085);
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
}

.activity-timeline-status.is-error {
  background: rgba(190, 58, 58, 0.08);
  color: #9f2d2d;
}

/* Etwa zehn kompakte Einträge sichtbar; weitere Einträge intern scrollbar. */
.activity-timeline-list {
  min-height: 0;
  max-height: 34rem;
  overflow-y: auto;
  margin-top: 0.7rem;
  padding: 0 0.35rem 0 0;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.activity-timeline-date-divider {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 0.4rem 0.2rem;
  background: rgba(250, 250, 249, 0.97);
  color: var(--muted, #667085);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.activity-timeline-item {
  display: grid;
  grid-template-columns: 3.35rem 1.8rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  min-height: 3.25rem;
  padding: 0.68rem 0.18rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.activity-timeline-time {
  padding-top: 0.14rem;
  color: var(--muted, #667085);
  font-size: 0.82rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.activity-timeline-marker {
  display: grid;
  width: 1.62rem;
  height: 1.62rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.8rem;
  font-weight: 800;
}

.activity-timeline-item.tone-success .activity-timeline-marker {
  background: rgba(33, 150, 83, 0.14);
  color: #167743;
}

.activity-timeline-item.tone-info .activity-timeline-marker {
  background: rgba(47, 111, 178, 0.14);
  color: #275f9a;
}

.activity-timeline-item.tone-warning .activity-timeline-marker {
  background: rgba(190, 130, 20, 0.15);
  color: #8e6211;
}

.activity-timeline-item.tone-danger .activity-timeline-marker {
  background: rgba(190, 58, 58, 0.13);
  color: #a33030;
}

.activity-timeline-item-title {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.28;
}

.activity-timeline-details {
  margin: 0.18rem 0 0;
  color: var(--muted, #667085);
  font-size: 0.84rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.activity-timeline-footer {
  padding: 0.65rem 0 0;
  border: 0;
}

.activity-timeline-load-older {
  width: 100%;
  padding: 0.62rem 0.75rem;
  font-size: 0.84rem;
}

.activity-timeline-load-older[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .activity-timeline-list {
    max-height: 28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-timeline-list,
  .activity-timeline-item {
    scroll-behavior: auto;
  }
}

/* M8.1e.2b: Der komplette bisherige Anrufhistorie-Rahmen wird ersetzt. */
#activity-timeline-panel {
  grid-column: 1 / -1;
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
}
