/* ============================================
   timeline.css — Timeline Styling (Mobile-first)
   ============================================ */

/* Timeline container — wrapper do grupo de lesões */
.timeline-container {
  position: relative;
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
}

/* Seção de uma lesão (cabeçalho + cards) */
.lesao-section {
  margin-bottom: 2rem;
  padding: 1rem;
  border-left: 3px solid #0d6efd;
  padding-left: 1.5rem;
}

.lesao-header {
  font-weight: 600;
  font-size: 0.95rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

/* Card de avaliação na timeline */
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0;
  margin-bottom: 0.9rem;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: -18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(46, 111, 163, 0.45), rgba(46, 111, 163, 0.08));
}

.timeline-item:last-child::before {
  bottom: 36px;
}

.timeline-marker {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 0.35rem;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2e6fa3;
  border: 3px solid #dcecf8;
  box-shadow: 0 0 0 4px rgba(46, 111, 163, 0.08);
}

.timeline-panel {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1rem 0.95rem;
  border: 1px solid rgba(46, 111, 163, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 252, 0.96));
  box-shadow: 0 12px 26px rgba(25, 56, 82, 0.08);
}

/* Thumbnail da lesão */
.timeline-thumbnail {
  flex-shrink: 0;
  width: 72px;
  height: 92px;
  border-radius: 14px;
  object-fit: contain;
  border: 1px solid rgba(46, 111, 163, 0.12);
}

/* Conteúdo do card (texto, protocolo, badge) */
.timeline-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.timeline-date {
  font-size: 0.75rem;
  color: #5f7b91;
  margin-bottom: 0.38rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timeline-heading {
  color: #29475f;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: 0.45rem;
}

.timeline-protocol {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
  font-family: monospace;
  color: #355974;
  margin: 0 0 0.6rem;
  border-radius: 999px;
  background: rgba(220, 236, 248, 0.78);
  border: 1px solid rgba(46, 111, 163, 0.08);
  word-break: break-all;
}

.timeline-badge-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.timeline-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-item:hover .timeline-panel {
  box-shadow: 0 18px 32px rgba(25, 56, 82, 0.12);
  border-color: rgba(46, 111, 163, 0.16);
}

/* Estados vazios */
.timeline-empty {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
  background-color: #f8f9fa;
  border-radius: 6px;
}

/* Loading state */
.timeline-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #0d6efd;
}

/* Responsivo: tablet+ ajustes */
@media (min-width: 768px) {
  .timeline-item {
    margin-bottom: 1rem;
  }

  .timeline-panel {
    padding: 1.15rem;
  }

  .timeline-thumbnail {
    width: 78px;
    height: 98px;
  }
}

/* Responsivo: desktop+ ajustes */
@media (min-width: 992px) {
  .timeline-panel { padding: 1.25rem; }
}
