/* Timeline Status Panel */
.timeline-status-panel {
  background: var(--card-background, #ffffff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.timeline-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.timeline-status-header h6 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #333333);
}

.timeline-state-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-state-badge.state-unassembled {
  background: #f0f0f0;
  color: #666666;
}

.timeline-state-badge.state-assembling {
  background: #fff3cd;
  color: #856404;
  animation: pulse 1.5s ease-in-out infinite;
}

.timeline-state-badge.state-assembled {
  background: #d4edda;
  color: #155724;
}

.timeline-state-badge.state-stale {
  background: #f8d7da;
  color: #721c24;
}

.timeline-state-badge.state-user_editing {
  background: #cce5ff;
  color: #004085;
}

.timeline-status-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.timeline-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #666666);
}

.timeline-stat i {
  font-size: 1rem;
  color: var(--primary-color, #007bff);
}

.timeline-stat span {
  font-weight: 500;
}

.timeline-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 0.75rem;
  color: var(--text-muted, #999999);
}

.timeline-empty-state i {
  font-size: 2.5rem;
  opacity: 0.5;
}

.timeline-empty-state p {
  margin: 0;
  font-size: 0.875rem;
}

.timeline-assembled-info {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light, #f0f0f0);
}

.timeline-assembled-info small {
  font-size: 0.75rem;
}

.timeline-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-assemble-timeline,
.btn-reassemble-timeline,
.btn-view-timeline {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-assemble-timeline {
  background: var(--primary-color, #007bff);
  color: white;
}

.btn-assemble-timeline:hover {
  background: var(--primary-hover, #0056b3);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.btn-reassemble-timeline {
  background: #ffc107;
  color: #212529;
}

.btn-reassemble-timeline:hover {
  background: #e0a800;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 193, 7, 0.2);
}

.btn-view-timeline {
  background: #28a745;
  color: white;
  cursor: default;
}

.btn-view-timeline:disabled {
  opacity: 0.8;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .timeline-status-panel {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .timeline-status-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timeline-status-header h6 {
  color: var(--color-text-primary);
}

[data-theme="dark"] .timeline-stat {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .timeline-stat i {
  color: var(--primary-color);
}

[data-theme="dark"] .timeline-empty-state {
  color: var(--color-text-muted);
}

[data-theme="dark"] .timeline-assembled-info {
  border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .timeline-assembled-info small {
  color: var(--color-text-muted);
}

[data-theme="dark"] .timeline-state-badge.state-unassembled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
}

[data-theme="dark"] .timeline-state-badge.state-assembling {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

[data-theme="dark"] .timeline-state-badge.state-assembled {
  background: rgba(40, 167, 69, 0.2);
  color: #6ee787;
}

[data-theme="dark"] .timeline-state-badge.state-stale {
  background: rgba(220, 53, 69, 0.2);
  color: #f85149;
}

[data-theme="dark"] .timeline-state-badge.state-user_editing {
  background: rgba(0, 123, 255, 0.2);
  color: #58a6ff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .timeline-actions {
    flex-direction: column;
  }
}
