/* Timeline link styling */
.timeline-link {
  color: var(--color-secondary);
  text-decoration: underline;
  margin-right: 10px;
  font-weight: 500;
  transition: color 0.2s;
}

.timeline-link:hover {
  color: var(--color-primary);
  text-decoration: none;
}
/* Updates Page - Code-style Timeline */

/* Timeline Container */
.timeline-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 700px;
  height: calc(100vh - 160px); /* Respeta header + footer */
  overflow-y: scroll;
  overflow-x: hidden;
  padding: var(--space-md) 0;
  z-index: var(--z-ui);
 
}

/* Webkit scrollbar styling */
.timeline-container::-webkit-scrollbar {
  width: 4px;
}

.timeline-container::-webkit-scrollbar-track {
  background: transparent;
}

.timeline-container::-webkit-scrollbar-thumb {
  background-color: var(--color-secondary);
  border-radius: 0;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
  background-color: #fff;
}

/* Timeline - centered content */
.timeline {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* Timeline Item - marker + title + date layout */
.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--space-xs);
  cursor: pointer;
  background: var(--color-background);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  padding: var(--space-xs) var(--space-sm);
}

.timeline-item:hover {
  background: var(--color-overlay);
  border-radius: var(--radius-sm);
}

/* Timeline Marker - code-style arrow */
.timeline-marker {
  color: var(--color-primary);
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: bold;
  margin-right: var(--space-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.timeline-item:hover .timeline-marker {
  color: var(--color-primary);
  transform: translateX(4px);
}

.timeline-item[data-expanded="true"] .timeline-marker {
  color: var(--color-primary);
  transform: rotate(90deg) translateX(2px);
}

/* Timeline Title - variable name style */
.timeline-title {
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  flex: 1;
}

.timeline-item:hover .timeline-title {
  color: var(--color-primary);
}

.timeline-date-incoming {
  display: flex;
  align-items: center;
  color: #ba4aee;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  background: #1f002e;
  border: 1px solid #47006b;
  padding: 0.2em 0.6em;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-medium);
  margin-left: var(--space-md);
  white-space: nowrap;
  line-height: 1; 
}
.timeline-date-done {
  display: flex;
  align-items: center;
  color: #00ceb2;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  background: #002e26;
  border: 1px solid #006b6b;
  padding: 0.2em 0.6em;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-medium);
  margin-left: var(--space-md);
  white-space: nowrap;
  line-height: 1; 
}
/* Timeline Description - comment style */
.timeline-description {
  display: none;
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.4;
  margin-top: var(--space-xs);
  padding-left: calc(var(--space-xs) + var(--space-sm) + var(--space-xs));
  border-left: 1px solid var(--color-border);
}

.timeline-item[data-expanded="true"] {
  flex-wrap: wrap;
  align-items: flex-start;
}

.timeline-item[data-expanded="true"] .timeline-title {
  flex: 1;
}

.timeline-item[data-expanded="true"] .timeline-date {
  order: 3;
  margin-left: var(--space-md);
}

.timeline-item[data-expanded="true"] .timeline-description {
  display: block;
  order: 4;
  flex-basis: 100%;
  margin-top: var(--space-xs);
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 50px;
  }
}

/* Allow text selection */
.timeline-container, .timeline-container * {
  user-select: text !important;
}

/* Responsive - Mobile 500px and below */
@media (max-width: 500px) {
  .timeline-container {
    top: 80px !important;
    height: calc(100vh - 80px) !important; /* No footer on mobile */
    width: 95%;
    padding: var(--space-sm) 0;
  }
  
  .timeline {
    font-size: var(--text-sm);
  }
  
  .timeline-date {
    font-size: var(--text-xs);
    margin-left: var(--space-sm);
  }
  
  .timeline-title {
    font-size: var(--text-sm);
  }
  
  .timeline-description {
    font-size: var(--text-xs);
    padding-left: calc(var(--space-sm) + var(--space-xs));
    border-left: 1px solid var(--color-border);
  }
}

/* Mobile - 400px and below */
@media (max-width: 400px) {
  .timeline-container {
    width: 98%;
  }
  
  .timeline-item {
    padding: var(--space-xs);
  }
  
  .timeline-marker {
    margin-right: var(--space-xs);
  }
  
  .timeline-date {
    margin-left: var(--space-xs);
  }
  
  .timeline-description {
    padding-left: calc(var(--space-xs) + var(--space-xs));
    border-left: 1px solid var(--color-border);
  }
}

/* Very Small Mobile - 300px and below */
@media (max-width: 300px) {
  .timeline-container {
    top: 80px !important;
    height: calc(100vh - 80px) !important;
    padding: var(--space-xs) 0;
  }
  
  .timeline {
    font-size: var(--text-xs);
    line-height: 1.4;
  }
  
  .timeline-item {
    margin-bottom: var(--space-xs);
    padding: 2px var(--space-xs);
  }
  
  .timeline-date {
    font-size: 0.7rem;
  }
  
  .timeline-title {
    font-size: var(--text-xs);
  }
  
  .timeline-description {
    font-size: 0.7rem;
    padding-left: var(--space-xs);
    border-left: 1px solid var(--color-border);
  }
}

/* Ultra Small Mobile - 200px and below */
@media (max-width: 200px) {
  .timeline-container {
    top: 70px !important;
    height: calc(100vh - 70px) !important;
    width: 99%;
    padding: 4px 0;
  }
  
  .timeline {
    font-size: 0.6rem;
    line-height: 1.3;
  }
  
  .timeline-item {
    padding: 2px 4px;
    margin-bottom: 4px;
  }
  
  .timeline-date {
    font-size: 0.5rem;
    margin-left: 4px;
  }
  
  .timeline-marker {
    font-size: 0.6rem;
    margin-right: 4px;
  }
  
  .timeline-title {
    font-size: 0.6rem;
  }
  
  .timeline-description {
    font-size: 0.5rem;
    padding-left: 8px;
    border-left: 1px solid var(--color-border);
    line-height: 1.2;
  }
}
