/**
 * Living Timeline Styles
 * Community content chronological view
 */

.timeline-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.timeline-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-primary, #1f2937);
}

.timeline-build-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--color-primary, #14b8a6);
  color: white;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
}

.timeline-build-btn:hover {
  opacity: 0.9;
}

/* Filters */
.timeline-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.timeline-filter {
  padding: 0.375rem 0.875rem;
  border-radius: 1.5rem;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-bg-primary, #fff);
  color: var(--color-text-secondary, #6b7280);
  font-size: 0.8rem;
  cursor: pointer;
}

.timeline-filter.active {
  background: var(--color-primary, #14b8a6);
  color: white;
  border-color: var(--color-primary, #14b8a6);
}

/* Decade nav */
.timeline-decades {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.timeline-decade {
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: var(--color-bg-secondary, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  font-size: 0.75rem;
  color: var(--color-text-secondary, #6b7280);
  cursor: default;
}

.timeline-decade-count {
  font-weight: 600;
  color: var(--color-primary, #14b8a6);
  margin-left: 0.25rem;
}

/* Year groups */
.timeline-year-group {
  margin-bottom: 2rem;
}

.timeline-year-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary, #1f2937);
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary, #14b8a6);
  display: inline-block;
}

/* Event cards */
.timeline-events {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  padding-left: 1.5rem;
}

.timeline-events::before {
  content: '';
  position: absolute;
  left: 0.375rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border, #e5e7eb);
}

.timeline-event {
  display: flex;
  gap: 0.875rem;
  background: var(--color-bg-primary, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.15s;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: -1.375rem;
  top: 1rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-primary, #14b8a6);
  border: 2px solid var(--color-bg-primary, #fff);
}

.timeline-event:hover {
  border-color: var(--color-primary, #14b8a6);
}

.timeline-event-thumb {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg-secondary, #f9fafb);
}

.timeline-event-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--color-bg-secondary, #f9fafb);
  flex-shrink: 0;
}

.timeline-event-content {
  flex: 1;
  min-width: 0;
}

.timeline-event-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary, #1f2937);
  margin: 0 0 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-event-excerpt {
  font-size: 0.8rem;
  color: var(--color-text-secondary, #6b7280);
  margin: 0 0 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-event-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: var(--color-text-tertiary, #9ca3af);
}

.timeline-event-type {
  font-weight: 500;
}

/* Empty + loading */
.timeline-empty,
.timeline-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-secondary, #6b7280);
}

.timeline-empty-hint {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.timeline-load-more {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 0.5rem;
  background: none;
  color: var(--color-primary, #14b8a6);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 1rem;
}

.timeline-load-more:hover {
  background: var(--color-bg-secondary, #f9fafb);
}

/* Mobile */
@media (max-width: 640px) {
  .timeline-event-thumb,
  .timeline-event-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }

  .timeline-events {
    padding-left: 1.25rem;
  }
}
