/* Detection Carousel Styles */
.detection-carousel {
  background-color: var(--card-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.carousel-header h3 {
  margin: 0;
  color: var(--primary-color);
}

.image-counter {
  color: var(--secondary-color);
  font-weight: 600;
}

.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.carousel-content {
  flex: 1;
  display: flex;
  justify-content: center;
  max-height: 600px;
  overflow: hidden;
}

.main-image {
  max-width: 100%;
  max-height: 600px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.carousel-control {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  margin: 0 1rem;
  transition: background-color 0.3s;
  min-width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-control:hover {
  background: rgba(0, 0, 0, 0.9);
}

.carousel-control:disabled {
  background: rgba(0, 0, 0, 0.3);
  cursor: not-allowed;
}

.thumbnails-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.thumbnail {
  width: 80px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s, transform 0.2s;
  flex-shrink: 0;
}

.thumbnail:hover {
  transform: scale(1.05);
  border-color: var(--secondary-color);
}

.thumbnail.active {
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-footer {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: #666;
}

/* Task List Thumbnails */
.task-thumbnail {
  width: 40px;
  height: 30px;
  border-radius: 4px;
  overflow: hidden;
  margin-left: 0.5rem;
  border: 1px solid var(--border-color);
}

.task-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-row {
  display: flex;
  align-items: center;
}

.task-row td {
  position: relative;
}

.task-status-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Processing indicator improvements */
.processing-indicator {
  text-align: center;
  padding: 2rem;
  background-color: rgba(243, 156, 18, 0.05);
  border-radius: 8px;
  border-left: 4px solid var(--warning-color);
}

.processing-indicator p {
  margin-top: 1rem;
  color: var(--warning-color);
  font-weight: 600;
}

/* Carousel section spacing */
.carousel-section {
  margin-bottom: 2rem;
}

/* Result files list improvements */
.result-files .file-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.result-files .file-item {
  display: flex;
  align-items: center;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border-color);
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.file-name {
  font-weight: 600;
  color: var(--primary-color);
}

.download-link, .view-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.875rem;
  margin-right: 1rem;
}

.download-link:hover, .view-link:hover {
  text-decoration: underline;
}

/* Error icon styling */
.error-icon {
  margin-left: 0.5rem;
  font-size: 0.875rem;
}

/* Mobile responsiveness for carousel */
@media (max-width: 768px) {
  .carousel-container {
    flex-direction: column;
  }

  .carousel-control {
    margin: 0.5rem 0;
  }

  .thumbnails-container {
    justify-content: flex-start;
  }

  .thumbnail {
    width: 60px;
    height: 45px;
  }

  .main-image {
    max-height: 400px;
  }

  .task-thumbnail {
    display: none; /* Hide thumbnails on mobile for task list */
  }
}