/* Builder additions on top of design/theme.css (brush ring, extra controls). */
.br-compare-stage.is-brushing { cursor: none; touch-action: none; }
.br-compare-stage.is-brushing #br-compare-result { clip-path: none; }
.br-compare-stage.is-brushing .br-compare-divider { display: none; }
.br-brush-ring { position: absolute; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000; pointer-events: none; z-index: 3; }
body[data-br-brush="remove"] .br-brush-ring { border-color: var(--br-danger, #f3b98e); }
body[data-br-brush="keep"] .br-brush-ring { border-color: var(--br-lime, #c8e6a0); }
.br-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
.br-check input { width: 20px; height: 20px; accent-color: var(--br-lime, #c8e6a0); }
.br-tool-note { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; color: var(--br-muted, #b9c9c8); }
#br-bg-image-label.is-on { border-color: var(--br-lime, #c8e6a0); box-shadow: inset 0 0 0 2px var(--br-lime, #c8e6a0); }
#br-compare-result:is(canvas) { max-width: 100%; }
@media (prefers-reduced-motion: reduce) { .br-brush-ring { transition: none; } }

/* The result layer sits on top of the original, so it needs its own checkerboard;
   otherwise transparent pixels would show the original photo underneath. */
canvas#br-compare-result {
  background-color: var(--br-check-b);
  background-image:
    linear-gradient(45deg, var(--br-check-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--br-check-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--br-check-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--br-check-a) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
/* The compare panel is taller than most screens once the toolbar is added, and a sticky
   grid item would slide over the batch panel below it. Keep it in normal flow. */
@media (min-width: 851px) {
  .br-compare-panel { position: static; }
}
/* Keep tall portraits on screen: the stage shrinks to the picture, capped at 72vh. */
#br-compare .br-compare-stage { width: fit-content; max-width: 100%; margin-inline: auto; }
#br-compare #br-compare-original { width: auto; max-width: 100%; max-height: 72vh; }
#br-download-format { min-width: 13.5rem; max-width: 100%; }
.br-swatch input[type="color"] { flex: 0 0 44px; min-width: 44px; }

/* Red team: keep hidden options hidden even when a display rule applies */
.br-tool [hidden] { display: none !important; }
