/* Project Timeline Styles */
.project-timeline {
  background: var(--color-white);
  border-radius: 15px;
  padding: 30px;
  margin: 30px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.project-timeline h3 {
  font-size: var(--font-20);
  font-weight: 700;
  color: var(--typo-secondary);
  margin: 0 0 25px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-timeline h3::before {
  content: "⏱️";
  font-size: 24px;
}

/* Timeline Container */
.timeline-container {
  position: relative;
  padding-left: 30px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--border-color));
}

/* Timeline Item */
.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  top: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.timeline-content {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  border-left: 4px solid var(--color-primary);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transform: translateX(5px);
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--bg-light);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 10px;
}

.timeline-header h4 {
  font-size: var(--font-16);
  font-weight: 600;
  color: var(--typo-secondary);
  margin: 0;
  line-height: 1.4;
}

.timeline-timestamp {
  font-size: var(--font-xs);
  color: var(--text-color);
  font-weight: 500;
  white-space: nowrap;
  background: rgba(239, 115, 16, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
}

.timeline-description {
  font-size: var(--font-small);
  color: var(--text-color);
  line-height: 1.5;
  margin: 0 0 15px 0;
}

.timeline-actor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actor-badge {
  font-size: var(--font-xs);
  padding: 4px 10px;
  border-radius: 15px;
  font-weight: 600;
  text-transform: capitalize;
}

.actor-badge.freelancer {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.actor-badge.client {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.actor-badge.system {
  background: rgba(107, 114, 128, 0.1);
  color: #4b5563;
}

/* Timeline Line */
.timeline-line {
  position: absolute;
  left: -32px;
  top: 37px;
  bottom: -30px;
  width: 2px;
  background: var(--border-color);
  z-index: 1;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

/* Loading State */
.timeline-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px;
  text-align: center;
}

.timeline-loading .spinner-border {
  width: 2rem;
  height: 2rem;
  border-width: 0.25em;
  border-color: var(--color-primary);
  border-right-color: transparent;
  animation: spinner-border 0.75s linear infinite;
  margin-bottom: 15px;
}

.timeline-loading p {
  color: var(--text-color);
  font-size: var(--font-small);
  margin: 0;
}

/* Error State */
.timeline-error {
  text-align: center;
  padding: 40px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
}

.timeline-error h4 {
  color: #dc2626;
  margin-bottom: 10px;
  font-size: var(--font-16);
}

.timeline-error p {
  color: #991b1b;
  font-size: var(--font-small);
  margin: 0;
}

/* Cancellation Summary */
.cancellation-summary {
  margin-top: 30px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 25px;
}

.cancellation-summary h4 {
  font-size: var(--font-16);
  font-weight: 700;
  color: #dc2626;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cancellation-summary h4::before {
  content: "📋";
  font-size: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #fecaca;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item .label {
  font-size: var(--font-small);
  font-weight: 600;
  color: #7f1d1d;
}

.summary-item .value {
  font-size: var(--font-small);
  font-weight: 500;
  color: #991b1b;
}

.summary-item .value.refund-processed {
  color: #16a34a;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 991px) {
  .timeline-container {
    padding-left: 25px;
  }
  
  .timeline-marker {
    left: -35px;
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .timeline-content {
    padding: 15px;
  }
  
  .timeline-content::before {
    left: -10px;
    top: 15px;
    border-right-width: 6px;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .project-timeline {
    padding: 20px;
    margin: 20px 0;
  }
  
  .timeline-container {
    padding-left: 20px;
  }
  
  .timeline-marker {
    left: -30px;
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .timeline-content {
    padding: 12px;
  }
  
  .timeline-content::before {
    left: -8px;
    top: 12px;
    border-right-width: 4px;
  }
  
  .cancellation-summary {
    padding: 15px;
    margin-top: 20px;
  }
  
  .summary-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 8px 0;
  }
}

@media (max-width: 576px) {
  .timeline-container::before {
    left: 12px;
  }
  
  .timeline-marker {
    left: -27px;
    width: 20px;
    height: 20px;
    font-size: 8px;
  }
  
  .timeline-content {
    padding: 10px;
  }
  
  .timeline-header h4 {
    font-size: var(--font-small);
  }
  
  .timeline-timestamp {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .timeline-description {
    font-size: var(--font-xs);
  }
  
  .actor-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* Animation */
@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Print Styles */
@media print {
  .project-timeline {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .timeline-content:hover {
    transform: none;
    box-shadow: none;
  }
  
  .timeline-marker {
    box-shadow: none;
  }
}