/* Job Dashboard Specific Styles */

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  border-radius: 9999px;
}

.status-badge-pending {
  background-color: #e5e7eb;
  color: #374151;
}

.status-badge-ready {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-badge-scheduled {
  background-color: #fef3c7;
  color: #92400e;
}

.status-badge-processing {
  background-color: #e0e7ff;
  color: #4338ca;
}

.status-badge-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge-failed {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* Performance charts */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Job details */
.job-args-container {
  max-height: 300px;
  overflow-y: auto;
  background-color: #f3f4f6;
  border-radius: 0.375rem;
  padding: 1rem;
}

.job-error-container {
  max-height: 300px;
  overflow-y: auto;
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 0.375rem;
  padding: 1rem;
}

.job-error-container pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: #b91c1c;
}

/* Tab styles */
.tab-navigation {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
}

.tab-item {
  padding: 0.75rem 1.25rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: #6b7280;
  font-weight: 500;
  transition: all 0.2s ease-out;
}

.tab-item:hover:not(.tab-active) {
  color: #4b5563;
  border-bottom-color: #e5e7eb;
}

.tab-item.tab-active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

/* Tab content animations */
[data-job-dashboard-tab-content] {
  transition: opacity 0.2s ease-out;
}

[data-job-dashboard-tab-content].hidden {
  opacity: 0;
  display: none;
}

[data-job-dashboard-tab-content]:not(.hidden) {
  opacity: 1;
  display: block;
}

/* Button states */
.refresh-button {
  transition: background-color 0.2s ease-in-out;
}

.refresh-button.refresh-active {
  background-color: #dc2626;
}

.refresh-button.refresh-active:hover {
  background-color: #b91c1c;
}

.refresh-button:not(.refresh-active) {
  background-color: #4f46e5;
}

.refresh-button:not(.refresh-active):hover {
  background-color: #4338ca;
}

/* Auto-refresh indicator */
.refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.refresh-indicator-dot {
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 50%;
  background-color: #10b981;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Responsive adjustments */
@media (max-width: 640px) {
  .job-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Job detail page */
.job-metadata-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .job-metadata-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .job-metadata-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
