/* Background task tray / toast / blocking-modal UI (services/BackgroundTaskService.js).
   Used to be injected at runtime via a JS-created <style> tag; moved here
   since CSP's styleSrc no longer allows unhashed inline <style>. */

.bg-task-tray {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.bg-task-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1f2937;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: bgTaskFadeIn 0.25s ease;
  max-width: 320px;
}
.bg-task-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bgTaskSpin 0.85s linear infinite;
  flex-shrink: 0;
}
.bg-task-toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.bg-task-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  max-width: 380px;
  animation: bgTaskFadeIn 0.25s ease;
}
.bg-task-toast-action {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  border-radius: 8px;
  padding: 4px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.bg-task-toast-action:hover {
  background: rgba(255, 255, 255, 0.3);
}
.bg-task-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: bgTaskFadeIn 0.2s ease;
}
.bg-task-modal {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 14px;
  padding: 28px 26px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}
.bg-task-modal-spinner {
  width: 44px;
  height: 44px;
  margin: 4px auto 18px;
  border: 4px solid #1b6fd8;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: bgTaskSpin 0.85s linear infinite;
}
.bg-task-modal-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}
.bg-task-modal-msg {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
}
.bg-task-modal-btn {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  background: #2a9d6e;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.bg-task-modal-btn:hover {
  background: #258a60;
}
@keyframes bgTaskSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes bgTaskFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
