/* Timeline View Styles */

.timeline-container {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.timeline-scroll {
  overflow-x: auto;
  position: relative;
}

.timeline-grid {
  position: relative;
  min-height: 200px;
}

/* Header */
.timeline-header {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.7rem;
  color: #64748b;
}

.timeline-header-cell {
  text-align: center;
  padding: 4px;
  border-right: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.timeline-header-cell--weekend {
  background: #f8fafc;
}

/* Program group header */
.timeline-group {
  padding: 6px 12px;
  font-weight: 600;
  font-size: 0.85rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334155;
}

.timeline-group:hover {
  background: #f1f5f9;
}

.timeline-group svg {
  transition: transform 0.15s;
  flex-shrink: 0;
}

.timeline-group--collapsed svg {
  transform: rotate(-90deg);
}

/* Project rows */
.timeline-row {
  position: relative;
  height: 36px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
}

.timeline-row:hover {
  background: #fafbfc;
}

/* Sticky label */
.timeline-label {
  position: sticky;
  left: 0;
  z-index: 2;
  background: white;
  min-width: 150px;
  max-width: 150px;
  padding: 0 12px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid #e2e8f0;
  height: 100%;
  display: flex;
  align-items: center;
  color: #334155;
}

.timeline-row:hover .timeline-label {
  background: #fafbfc;
}

.timeline-label--wide {
  min-width: 190px;
  max-width: 190px;
}

/* Bar area */
.timeline-bar-area {
  position: relative;
  flex: 1;
  height: 100%;
}

/* Project bar */
.timeline-bar {
  position: absolute;
  height: 24px;
  top: 6px;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 0.7rem;
  color: white;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity 0.15s;
  font-weight: 500;
}

.timeline-bar:hover {
  opacity: 0.85;
}

/* State colors */
.timeline-bar--option {
  background: #eab308;
}

.timeline-bar--review {
  background: #f97316;
}

.timeline-bar--active {
  background: #22c55e;
}

.timeline-bar--done {
  background: #78716c;
}

/* Activity bar */
.timeline-bar--activity {
  background: #3b82f6;
  overflow: hidden;
}

.timeline-bar-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #1d4ed8;
  border-radius: 4px 0 0 4px;
  pointer-events: none;
}

.timeline-bar-text {
  position: relative;
  z-index: 1;
}

/* User avatars next to bar */
.timeline-avatars {
  position: absolute;
  top: 8px;
  display: flex;
  gap: 2px;
}

.timeline-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.6rem;
  font-weight: 600;
}

/* Today line */
.timeline-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ef4444;
  z-index: 10;
  pointer-events: none;
}

/* Empty state */
.timeline-empty {
  padding: 48px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}
