/* Run Details Transcript Styles */
#runDetailsModal .modal-dialog {
  max-width: 95%;
  margin: 1rem auto;
}

#runTranscriptBox {
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

#runTranscriptBox .msg-body ul {
  margin: 0;
  padding: 0;
}

/* Smooth scrolling */
#runTranscriptBox {
  scroll-behavior: smooth;
}

/* Message animations */
#runTranscriptBox .sender,
#runTranscriptBox .repaly {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* User message styles */
#runTranscriptBox .sender i.bx-user-circle {
  margin-top: 4px;
}

/* Agent message styles with gradient */
#runTranscriptBox .repaly .gradient-message {
  position: relative;
  overflow: hidden;
}

#runTranscriptBox .repaly .gradient-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Tool badge hover effect */
#runTranscriptBox .repaly [style*="background: #fff3e0"] {
  transition: all 0.2s ease;
}

#runTranscriptBox .repaly [style*="background: #fff3e0"]:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(245, 124, 0, 0.2);
}

/* Collapse button styling */
#runTranscriptBox .btn-link {
  color: #667eea;
  transition: color 0.2s ease;
}

#runTranscriptBox .btn-link:hover {
  color: #764ba2;
}

/* Sidebar scrollbar styling */
#runDetailsModal .col-md-4::-webkit-scrollbar {
  width: 6px;
}

#runDetailsModal .col-md-4::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#runDetailsModal .col-md-4::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

#runDetailsModal .col-md-4::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Transcript scrollbar styling */
#runTranscriptBox::-webkit-scrollbar {
  width: 8px;
}

#runTranscriptBox::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#runTranscriptBox::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

#runTranscriptBox::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Card hover effects in sidebar */
#runDetailsModal .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#runDetailsModal .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Badge pulse animation for status */
#runDetailsModal .badge {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Message bubble shadows */
#runTranscriptBox .sender p {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}

#runTranscriptBox .sender p:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Step indicator hover */
#runTranscriptBox .badge:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #runDetailsModal .modal-dialog {
    max-width: 100%;
    margin: 0;
  }

  #runDetailsModal .row.g-0 {
    height: auto !important;
  }

  #runDetailsModal .col-md-4,
  #runDetailsModal .col-md-8 {
    border-right: none !important;
    border-bottom: 2px solid #eee;
  }
}

/* Loading state */
#runTranscriptBox .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

/* Timeline dots for conversation flow */
#runTranscriptBox ul::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, #e0e0e0 10%, #e0e0e0 90%, transparent 100%);
  z-index: -1;
}

/* Tool details collapse animation */
.collapse {
  transition: all 0.3s ease-in-out;
}

/* Enhanced time badges */
#runTranscriptBox .time i {
  vertical-align: middle;
  margin-top: -2px;
}

/* Accent line for messages */
#runTranscriptBox .sender > div::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, #667eea, transparent);
  border-radius: 2px;
}

#runTranscriptBox .repaly > div::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -8px;
  width: 40px;
  height: 2px;
  background: linear-gradient(to left, #764ba2, transparent);
  border-radius: 2px;
}
