/* Designed by Kapil Pidhwani: Image Background Remover — checkerboard stage, compare slider, Restore/Erase brush; shared layout lives in main.css */
.bgr-tall { height: 380px; }
.media-preview-img.bgr-show { display: block; }
.media-empty-placeholder[hidden], .bgr-stage[hidden], #opt-bg-color[hidden], .bgr-brush-row[hidden], .bgr-range[hidden], .bgr-cursor[hidden], #seg-tool[hidden] { display: none; }
.bgr-head { display: flex; align-items: center; gap: 0.6rem; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.bgr-stage { --x: 0%; position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; touch-action: none;
  background-color: #fff; background-image: linear-gradient(45deg, #d9d9d9 25%, transparent 25%), linear-gradient(-45deg, #d9d9d9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d9d9d9 75%), linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.bgr-stage.bgr-painting { cursor: none; }
.bgr-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.bgr-cmp { clip-path: inset(0 calc(100% - var(--x)) 0 0); pointer-events: none; }
.bgr-range { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; margin: 0; height: var(--touch, 44px); opacity: 0; cursor: ew-resize; }
.bgr-range:focus-visible { opacity: 1; }
.bgr-stage::before { content: ''; position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; background: var(--brand); box-shadow: 0 0 0 1px rgba(255,255,255,.7); pointer-events: none; }
.bgr-stage.bgr-painting::before { display: none; }
.bgr-cursor { position: absolute; transform: translate(-50%, -50%); border: 2px solid var(--brand); border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.8), inset 0 0 0 1px rgba(255,255,255,.8); pointer-events: none; }
.bgr-brush-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; min-width: 0; }
.bgr-brush-row .range-slider-clean { flex: 1; min-width: 0; }
#opt-bg-color { width: 2.4rem; height: 2rem; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; cursor: pointer; }
