.preview-container {
  position: relative;
  margin-bottom: 1rem;
}

.preview-image {
  height: 200px;
  object-fit: contain;
  padding: 10px;
}

.preview-video {
  height: 200px;
  width: 100%;
  object-fit: contain;
  padding: 10px;
}

.remove-file {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

#validationRules {
  font-size: 0.9rem;
}

.card {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  border: none;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.card-text {
  font-size: 0.8rem;
  color: #666;
}

#fileCounter {
  background-color: #e3f2fd;
  color: #0d47a1;
  border-color: #90caf9;
}

.alert {
  margin-bottom: 1rem;
}

.alert:empty {
  display: none;
}

/* Navigation buttons styling */
.nav-buttons {
  padding: 10px 0;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 30px;
}

.nav-buttons .btn {
  min-width: 120px;
  font-weight: 500;
}

/* Active button state */
.nav-buttons .btn.active {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Add these styles to your existing CSS */
.input-group .form-control.is-valid,
.input-group .form-control.is-invalid {
  z-index: 0;
}

.form-text {
  margin-top: 0.25rem;
  font-size: 0.875em;
}

.text-success {
  color: #198754 !important;
}

.text-danger {
  color: #dc3545 !important;
}

/* Spinner for validate button */
.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Update input group styles */
.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  background-color: #fff; /* Ensure white background */
  opacity: 1; /* Ensure full opacity */
  cursor: text; /* Show text cursor */
}

.input-group .form-control:focus {
  z-index: 1; /* Ensure focus ring is visible */
  position: relative;
}

.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Remove any disabled styling */
.form-control:not(:disabled) {
  background-color: #fff;
  opacity: 1;
}

.form-control::placeholder {
  color: #6c757d;
  opacity: 0.65;
}

.image-container {
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}

.card-img-top {
  object-fit: contain;
  max-height: 100%;
  width: auto;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#imagesGrid {
  margin: 20px -8px;
}

.image-preview {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
}

.image-preview img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.image-preview:hover .image-actions {
  opacity: 1;
}

.image-actions .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: #333;
}

.card-body {
  background: #fff;
}

.col-md-2 {
  padding: 0 8px;
}

/* Add loading animation */
.image-preview.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.image-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.image-preview video::-webkit-media-controls-start-playback-button {
  display: none;
}

/* Bulk Upload Progress Styles */
.upload-progress {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress {
  height: 20px;
  background-color: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  background-color: #007bff;
  transition: width 0.5s ease;
}

.progress-bar.bg-success {
  background-color: #28a745;
}

.progress-bar.bg-warning {
  background-color: #ffc107;
}

.upload-status {
  margin-top: 10px;
}

.upload-stats {
  background: #ffffff;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.upload-stats p {
  font-size: 14px;
}

.upload-stats i {
  margin-right: 8px;
}

/* General styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Navigation buttons */
.nav-buttons .btn {
  padding: 10px 20px;
  border-radius: 5px;
  margin-right: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-buttons .btn.active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Form styling */
.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
  font-weight: 500;
}

/* Asset Cards */
.image-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-img-top {
  height: 150px;
  object-fit: contain;
  transition: transform 0.3s;
}

.image-preview:hover .card-img-top {
  transform: scale(1.05);
}

.image-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  padding: 5px;
  display: flex;
  justify-content: space-around;
  opacity: 0;
  transition: opacity 0.3s;
}

.image-preview:hover .image-actions {
  opacity: 1;
}

#viewImagesSection .card {
  transition: all 0.3s;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 100%;
}

#viewImagesSection .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

#viewImagesSection .card-body {
  padding: 10px;
}

#viewImagesSection .card-title {
  font-weight: 600;
  margin-bottom: 5px;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  gap: 10px;
}

#loadMoreBtn {
  padding: 8px 20px;
  background-color: #0275d8;
  border: none;
  border-radius: 5px;
  color: white;
  font-weight: 500;
  transition: background-color 0.3s;
}

#loadMoreBtn:hover {
  background-color: #0269c2;
}

#loadMoreBtn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

#paginationInfo {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Loading indicator */
#loadingIndicator {
  display: flex;
  align-items: center;
  color: #0275d8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #viewImagesSection .col-md-2 {
    width: 50%;
  }

  .nav-buttons .btn {
    margin-bottom: 10px;
    width: 100%;
  }
}

@media (max-width: 576px) {
  #viewImagesSection .col-md-2 {
    width: 100%;
  }
}

/* Modal styles */
.modal-content {
  border-radius: 8px;
  overflow: hidden;
}

.modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.modal-title {
  font-weight: 600;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

/* Asset details table */
.table {
  margin-bottom: 0;
}

.table th {
  width: 130px;
  font-weight: 600;
}

/* Badge styles */
.badge {
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 4px;
}

/* Status badge styles */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.status-in-progress {
  color: #fff;
  background-color: #007bff;
  background-image: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
  animation: pulse 2s infinite;
}

.status-completed {
  color: #fff;
  background-color: #28a745;
  background-image: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.status-pending {
  color: #212529;
  background-color: #ffc107;
  background-image: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
}

.status-error {
  color: #fff;
  background-color: #dc3545;
  background-image: linear-gradient(135deg, #dc3545 0%, #e35d6a 100%);
}

.status-partial-failure {
  color: #fff;
  background-color: #fd7e14;
  background-image: linear-gradient(135deg, #fd7e14 0%, #ff9a3c 100%);
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Job Tracking System styles */
.progress-tracker {
  margin: 30px 0;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 30px;
}

.progress-steps::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 4px;
  width: 100%;
  background-color: #e9ecef;
  z-index: 0;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.progress-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 24%;
  transition: transform 0.3s ease;
}

.progress-step:hover {
  transform: translateY(-5px);
}

.step-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #fff;
  border: 4px solid #e9ecef;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  font-size: 24px;
  color: #6c757d;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.step-text {
  font-size: 14px;
  color: #6c757d;
  text-align: center;
  font-weight: 600;
  transition: color 0.3s ease;
}

.step-count {
  font-size: 12px;
  color: #6c757d;
  margin-top: 3px;
  background-color: #f8f9fa;
  padding: 2px 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.step-active .step-icon {
  border-color: #0d6efd;
  color: #0d6efd;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
}

.step-active .step-text {
  color: #0d6efd;
}

.step-active .step-count {
  background-color: #e7f1ff;
  color: #0d6efd;
  font-weight: 600;
}

.step-completed .step-icon {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
}

.step-completed .step-text {
  color: #0d6efd;
}

.step-completed .step-count {
  background-color: #e7f1ff;
  color: #0d6efd;
  font-weight: 600;
}

.step-error .step-icon {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2);
}

.step-error .step-text {
  color: #dc3545;
}

.step-error .step-count {
  background-color: #f8d7da;
  color: #dc3545;
  font-weight: 600;
}

.progress-completed .progress-steps::before {
  background: linear-gradient(to right, #0d6efd 0%, #0d6efd 100%);
}

.progress-partial .progress-steps::before {
  background: linear-gradient(
    to right,
    #0d6efd 0%,
    #0d6efd 50%,
    #e9ecef 50%,
    #e9ecef 100%
  );
}

/* Reference table styling */
#referenceTable {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

#referenceTable thead th {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 12px 15px;
  font-weight: 600;
  color: #343a40;
}

#referenceTable tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

#referenceTable tbody tr:last-child td {
  border-bottom: none;
}

#referenceTable .btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

#referenceTable .btn-primary {
  background-image: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border: none;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.25);
}

#referenceTable .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
  background-image: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
}

#referenceTable .btn-outline-secondary {
  border-color: #6c757d;
}

#referenceTable .btn-outline-secondary:hover {
  transform: translateY(-2px);
  background-color: #f8f9fa;
  color: #343a40;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Asset tracking table styling */
#assetTrackingTable {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

#assetTrackingTable thead th {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 12px 15px;
  font-weight: 600;
  color: #343a40;
}

#assetTrackingTable tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

#assetTrackingTable tbody tr:last-child td {
  border-bottom: none;
}

#assetTrackingTable .table-danger {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Modal styling */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
  padding: 15px 20px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
  padding: 15px 20px;
}

/* Stats badges */
.stats-summary .badge {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 50px;
  margin: 0 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.stats-summary .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Toast notifications */
#toast-container .toast {
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  opacity: 1;
}

#toast-container .toast-body {
  padding: 12px 15px;
  font-weight: 500;
}

#toast-container .btn-close {
  opacity: 0.8;
}

/* Animated progress bar */
.progress {
  overflow: visible;
}

.progress-bar {
  position: relative;
  overflow: visible;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 50px 50px;
  animation: progressAnimation 2s linear infinite;
  border-radius: inherit;
}

@keyframes progressAnimation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

/* Asset Status Section Styles */
.entity-id-list {
  max-height: 600px;
  overflow-y: auto;
}

.entity-id-list .list-group-item {
  border-left: none;
  border-right: none;
  padding: 10px 15px;
  transition: all 0.2s ease;
}

.entity-id-list .list-group-item:hover {
  background-color: #f8f9fa;
}

.entity-id-list .list-group-item.active {
  background-color: #e7f1ff;
  color: #0d6efd;
  border-color: #dee2e6;
  font-weight: 500;
}

.asset-card {
  transition: all 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.asset-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-img-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.asset-card:hover .card-img-overlay {
  opacity: 1;
}

.card-preview {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.highlight-pulse {
  animation: highlight-pulse 1.5s ease;
}

@keyframes highlight-pulse {
  0% {
    background-color: #ffffff;
  }
  50% {
    background-color: #e7f1ff;
  }
  100% {
    background-color: #ffffff;
  }
}

/* Asset Type Tabs */
#assetTypeTabs .nav-link {
  color: #495057;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 0;
  border: none;
  border-bottom: 3px solid transparent;
}

#assetTypeTabs .nav-link:hover {
  border-bottom-color: #dee2e6;
}

#assetTypeTabs .nav-link.active {
  color: #0d6efd;
  background-color: transparent;
  border-bottom-color: #0d6efd;
}

/* Asset Preview Modal */
#assetPreviewModal .modal-body {
  padding: 20px;
}

#assetPreviewModal .asset-details img,
#assetPreviewModal .asset-details video {
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-height: 60vh;
}

/* Status badges for assets */
.status-completed,
.status-processed,
.status-validated {
  background-color: #06d6a0;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-pending,
.status-waiting,
.status-updated {
  background-color: #7209b7;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-error,
.status-failed {
  background-color: #ef476f;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-in-progress,
.status-created,
.status-uploaded,
.status-processing {
  background-color: #4cc9f0;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-unknown {
  background-color: #6c757d;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
