/* Client-side background remover editor */
.br-checker {
  background-color: #f1f5f9 !important;
  background-image:
    repeating-linear-gradient(45deg, #cbd5e1 25%, transparent 25%, transparent 75%, #cbd5e1 75%, #cbd5e1),
    repeating-linear-gradient(45deg, #cbd5e1 25%, #f1f5f9 25%, #f1f5f9 75%, #cbd5e1 75%, #cbd5e1) !important;
  background-position: 0 0, 8px 8px !important;
  background-size: 16px 16px !important;
}
.br-canvas-wrap {
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  height: min(58vh, 520px) !important;
  min-height: 320px !important;
  max-height: 560px !important;
  border-radius: 1rem !important;
  border: 1px solid #e2e8f0 !important;
  touch-action: none;
  cursor: crosshair;
  background-color: #f8fafc;
}
.br-canvas-wrap.tool-pan { cursor: grab; }
.br-canvas-wrap.tool-pan.panning { cursor: grabbing; }
.br-canvas-wrap.tool-magic { cursor: cell; }
.br-main-canvas,
.br-overlay-canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  max-width: none !important;
  height: auto !important;
}
.br-brush-cursor {
  position: absolute;
  pointer-events: none;
  border: 2px solid rgba(15, 118, 110, 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 5;
}
.br-brush-cursor.eraser-mode { border-color: #ef4444; }
.br-brush-cursor.restore-mode { border-color: #3b82f6; }
.br-tool-btn {
  background: #fff;
  border-color: #e2e8f0 !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.br-tool-btn.active {
  background: #0f766e !important;
  color: #fff !important;
  border-color: #0f766e !important;
}
.br-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.25s ease;
  font-size: 0.875rem;
  font-weight: 700;
}
.br-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.br-progress {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.br-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: #0f766e;
  transition: width 0.2s ease;
}
#br-editor-screen.tool-hidden,
#br-upload-screen.tool-hidden,
#br-brush-settings.tool-hidden,
#br-magic-settings.tool-hidden,
#br-progress-wrap.tool-hidden {
  display: none !important;
}
