/* ============================================================
   BYC 2026 - before/after compare slider (.sm-cmp). Markup from
   byc2026_compare() (parts-2026.php), behaviour in byc-compare.js.
   Loaded on the Sierra Map page and on blog posts with [byc_compare].
   ============================================================ */
.sm-cmp{--pos:50%;position:relative;aspect-ratio:16/9;border:1px solid var(--line-strong);border-radius:10px;overflow:hidden;
  background:#07070a;user-select:none;-webkit-user-select:none;touch-action:pan-y;cursor:ew-resize}
.sm-cmp img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.sm-cmp-a{clip-path:inset(0 calc(100% - var(--pos)) 0 0)}
.sm-cmp-tag{position:absolute;top:14px;z-index:2;font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:#fff;background:rgba(10,10,12,.7);backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.18);border-radius:4px;padding:6px 10px}
.sm-cmp-tag.l{left:14px}
.sm-cmp-tag.r{right:14px}
.sm-cmp-tag.acc{border-color:rgba(var(--accent-rgb,242,32,46),.6)}
.sm-cmp-h{position:absolute;top:0;bottom:0;left:var(--pos);width:2px;margin-left:-1px;background:#fff;z-index:2;
  box-shadow:0 0 12px rgba(0,0,0,.6)}
.sm-cmp-k{position:absolute;top:50%;left:50%;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;background:#fff;color:#000;
  display:grid;place-items:center;box-shadow:0 4px 20px rgba(0,0,0,.5)}
.sm-cmp-k svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
/* the range input only serves the keyboard / screen readers; the pointer drags the box */
.sm-cmp-in{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;bottom:0;left:0}
.sm-cmp:has(.sm-cmp-in:focus-visible) .sm-cmp-k{outline:2px solid var(--accent);outline-offset:3px}
/* "Full size": the wrap goes full screen (or a fixed overlay where element full screen is missing, iPhone);
   the box keeps the screenshots' ratio, as large as the screen allows, the handle stays on the image */
/* body.byc-2026 .sm-cmp button: beats the theme's global button styles (font size, red background on hover/focus) */
body.byc-2026 .sm-cmp button.sm-cmp-x{position:absolute;right:14px;bottom:14px;z-index:3;display:inline-flex;align-items:center;gap:8px;
  cursor:pointer;margin:0;font-family:var(--mono);font-size:11px;font-weight:400;line-height:1;letter-spacing:.12em;
  text-transform:uppercase;color:#fff;background:rgba(10,10,12,.75);backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.22);
  border-radius:4px;padding:8px 10px;box-shadow:none;min-height:0}
body.byc-2026 .sm-cmp button.sm-cmp-x:hover,body.byc-2026 .sm-cmp button.sm-cmp-x:focus{color:#fff;background:rgba(10,10,12,.88);border-color:rgba(255,255,255,.5)}
body.byc-2026 .sm-cmp button.sm-cmp-x:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sm-cmp-x svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sm-cmp-x .c,.sm-cmp-wrap.is-big .sm-cmp-x .o{display:none}
.sm-cmp-wrap.is-big .sm-cmp-x .c{display:inline}
.sm-cmp-wrap:fullscreen{background:#000;display:grid;place-items:center}
.sm-cmp-wrap.is-max{position:fixed;inset:0;z-index:100000;background:#000;display:grid;place-items:center}
.sm-cmp-wrap.is-big .sm-cmp{width:min(100vw,calc(100vh * var(--ar)));border:0;border-radius:0}
html.sm-noscroll{overflow:hidden}
.sm-cmp-cap{font-family:var(--mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--text-faint);margin:12px 0 0}
/* in a blog post: full reading width (byc-content.css hugs figures with fit-content
   and sizes every .prose img to height:auto, both wrong for the stacked slider pictures) */
.prose figure.byc-cmp-fig{width:100% !important;margin:32px 0}
.prose .sm-cmp img{height:100% !important;max-width:none;box-sizing:border-box}
@media(max-width:640px){
  .sm-cmp{border-radius:8px}
  .sm-cmp-tag{top:10px;font-size:10px;letter-spacing:.1em;padding:5px 8px}
  .sm-cmp-tag.l{left:10px}
  .sm-cmp-tag.r{right:10px}
}
