/* =============================================================
   uv-bg-remove.css — Styles for background-removal UI (Sprint 9.3)
   - Progress overlay shown on the photo container during processing
   - First-time confirm modal (backdrop + dialog)
   ============================================================= */

/* ------------------------------------------------------------------
   Progress overlay — centered spinner + percentage label
   Positioned absolutely inside the photo container (which gets
   position:relative set by the JS when the overlay is attached).
   ------------------------------------------------------------------ */
.uv-bgr-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.52);
  border-radius: inherit;
  z-index: 20;
  pointer-events: none;
}

.uv-bgr-overlay__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: uv-bgr-spin 0.75s linear infinite;
}

@keyframes uv-bgr-spin {
  to { transform: rotate(360deg); }
}

.uv-bgr-overlay__pct {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1;
  min-width: 3ch;
  text-align: center;
}

/* ------------------------------------------------------------------
   Confirm modal — backdrop + dialog
   ------------------------------------------------------------------ */
.uv-bgr-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  /* Subtle fade-in */
  animation: uv-bgr-fade-in 0.15s ease;
}

@keyframes uv-bgr-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.uv-bgr-dialog {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 24px 20px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  animation: uv-bgr-slide-up 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes uv-bgr-slide-up {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.uv-bgr-dialog__title {
  margin: 0 0 10px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

.uv-bgr-dialog__body {
  margin: 0 0 20px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #444444;
}

.uv-bgr-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.uv-bgr-dialog__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.12s, background-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.uv-bgr-dialog__btn:focus-visible {
  outline: 2px solid #0070f3;
  outline-offset: 2px;
}

.uv-bgr-dialog__btn--secondary {
  background: #f0f0f0;
  color: #333333;
}

.uv-bgr-dialog__btn--secondary:hover {
  background: #e2e2e2;
}

.uv-bgr-dialog__btn--primary {
  background: #1a1a1a;
  color: #ffffff;
}

.uv-bgr-dialog__btn--primary:hover {
  background: #333333;
}

/* ------------------------------------------------------------------
   Disabled / hidden state for the menu item when WASM unsupported.
   Applied via JS: element.classList.add('uv-bgr-unsupported')
   ------------------------------------------------------------------ */
.uv-bgr-unsupported {
  display: none !important;
}
