/**
 * Loading Overlay Styles
 * Full-screen overlay with spinner animation for task loading states
 */

/* Loading Overlay Container */
.task-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.task-loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Loading Content Card */
.task-loading-content {
  background: #ffffff;
  padding: 32px 48px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  min-width: 280px;
  max-width: 90%;
}

/* Spinner Animation */
.task-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: task-loading-spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes task-loading-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Loading Text */
.task-loading-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  line-height: 1.5;
}

.task-loading-task-name {
  color: #3b82f6;
  font-weight: 600;
  word-break: break-word;
}

/* Status Message */
.task-loading-status {
  font-size: 14px;
  color: #6b7280;
  margin-top: 8px;
  min-height: 20px;
}

/* Status Variants */
.task-loading-status.cached {
  color: #10b981;
  font-weight: 500;
}

.task-loading-status.error {
  color: #ef4444;
  font-weight: 500;
}

.task-loading-status.loading {
  color: #3b82f6;
}

/* Error Section */
.task-loading-error {
  margin-top: 16px;
  display: none;
}

.task-loading-error.visible {
  display: block;
}

/* Retry Button */
.task-loading-retry {
  margin-top: 12px;
  padding: 10px 20px;
  background: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.1s ease;
}

.task-loading-retry:hover {
  background: #2563eb;
}

.task-loading-retry:active {
  transform: scale(0.98);
}

.task-loading-retry:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .task-loading-content {
    padding: 24px 32px;
    margin: 16px;
  }
  
  .task-loading-spinner {
    width: 40px;
    height: 40px;
  }
}
