/* Stylesheet: Fieldservice timeline visualization */

.timeline-container {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  background: #ffffff;
  overflow: hidden;
}

.timeline-hours {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  background: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-hour {
  padding: 0.75rem 0;
  text-align: center;
  color: rgba(33, 37, 41, 0.6);
  position: relative;
}

.timeline-hour::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 8px;
  background: rgba(33, 37, 41, 0.1);
}

.timeline-body {
  max-height: 70vh;
  overflow-y: auto;
}

.timeline-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.timeline-row:last-child {
  border-bottom: none;
}

.timeline-technician {
  padding: 1rem 1.25rem;
  background: rgba(248, 249, 250, 0.75);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.timeline-technician .technician-name {
  font-weight: 600;
  color: #212529;
}

.timeline-technician .technician-meta {
  font-size: 0.8rem;
  color: rgba(33, 37, 41, 0.6);
}

.timeline-events {
  position: relative;
  padding: 1rem 0.75rem;
  min-height: calc(var(--lanes, 1) * 2.75rem);
}

.timeline-event {
  position: absolute;
  height: 2.25rem;
  border-radius: 0.6rem;
  padding: 0.35rem 0.6rem;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 12px 18px -14px rgba(33, 37, 41, 0.55);
  top: calc(var(--lane, 0) * 2.75rem);
}

.timeline-event .event-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-event .event-time {
  font-weight: 400;
  opacity: 0.85;
}

.timeline-event .badge-today {
  background: #ffc107;
  color: #212529;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-event--open { background: #6c757d; }
.timeline-event--scheduled { background: #0d6efd; }
.timeline-event--en-route { background: #0dcaf0; color: #212529; }
.timeline-event--on-site { background: #ffc107; color: #212529; }
.timeline-event--in-progress { background: #fd7e14; }
.timeline-event--done { background: #198754; }
.timeline-event--cancelled { background: #dc3545; }

.timeline-empty-state {
  padding: 2rem;
  text-align: center;
  color: rgba(33, 37, 41, 0.55);
}

@media (max-width: 992px) {
  .timeline-row {
    grid-template-columns: 160px 1fr;
  }
}
