/* LandDU photo viewer and comments sheet (assets/js/ld-viewer.js). LD-VIEWER, 24 Nov 2026.
   Kyle: "there's almost no way to X out of it ... it just feels like it's opening up a pop-up". 10:50pm: "Always include the X as well,
   even on desktop. Right now the X is way outside the viewer." */

html.ldv-locked,html.ldv-locked body{overscroll-behavior:none}

/* ---------- photo viewer ---------- */
.ldv{position:fixed;inset:0;z-index:1000000;--ldv-top:calc(60px + env(safe-area-inset-top,0px));--ldv-bot:calc(84px + env(safe-area-inset-bottom,0px));--ldv-side:0px;
	color:#fff;font-family:var(--ld-body,Inter,system-ui,sans-serif);-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
.ldv--one{--ldv-bot:calc(84px + env(safe-area-inset-bottom,0px))}
.ldv:not(:has(.ldv__bar)){--ldv-bot:calc(24px + env(safe-area-inset-bottom,0px))}
.ldv__bg{position:absolute;inset:0;background:#000;opacity:0;transition:opacity .26s ease}
.ldv.is-open .ldv__bg{opacity:1}
.ldv.is-closing .ldv__bg{opacity:0;transition-duration:.2s}
.ldv__stage{position:absolute;inset:0;overflow:hidden;touch-action:none}
.ldv__track{position:absolute;inset:0;display:flex;transition:transform .3s cubic-bezier(.2,.8,.2,1);will-change:transform}
.ldv__slide{position:relative;flex:0 0 100%;height:100%;display:flex;align-items:center;justify-content:center;
	padding:var(--ldv-top) var(--ldv-side) var(--ldv-bot);box-sizing:border-box}
.ldv__img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;transform-origin:50% 50%;
	-webkit-user-drag:none;-webkit-touch-callout:none;opacity:0;transition:opacity .2s ease}
.ldv.is-open .ldv__img{opacity:1}
.ldv.is-closing .ldv__img{opacity:0;transform:scale(.96)!important;transition:opacity .2s ease,transform .2s ease!important}
.ldv.is-zoomed .ldv__stage{cursor:grab}
.ldv.is-zoomed .ldv__top,.ldv.is-zoomed .ldv__bar,.ldv.is-zoomed .ldv__nav,.ldv.is-dragging .ldv__top,.ldv.is-dragging .ldv__bar,.ldv.is-dragging .ldv__nav{opacity:0;pointer-events:none}

/* the X: 44px tap area, solid dark chip with a white ring so it reads on any picture */
.ldv__x{position:absolute;z-index:3;top:calc(8px + env(safe-area-inset-top,0px));right:calc(8px + env(safe-area-inset-right,0px));
	width:44px!important;height:44px!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:rgba(20,22,34,.82)!important;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.3)!important;
	color:#fff!important;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .2s ease,background .15s ease}
.ldv__x svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
.ldv__x:hover{background:rgba(48,52,72,.95)!important}
.ldv__x:focus-visible,.ldv__nav:focus-visible,.ldv__act:focus-visible{outline:2px solid #fff;outline-offset:2px}
.ldv.is-open .ldv__x,.ldv.is-open .ldv__top,.ldv.is-open .ldv__bar,.ldv.is-open .ldv__nav{opacity:1}
.ldv__top{position:absolute;z-index:2;top:calc(8px + env(safe-area-inset-top,0px));left:calc(16px + env(safe-area-inset-left,0px));height:44px;display:flex;align-items:center;
	opacity:0;transition:opacity .2s ease;pointer-events:none}
.ldv__count{font:600 15px/1 var(--ld-body,Inter,sans-serif);letter-spacing:.02em;color:rgba(255,255,255,.92)}

.ldv__nav{position:absolute;z-index:2;top:50%;width:48px!important;height:48px!important;min-width:0!important;margin:-24px 0 0!important;border:0!important;border-radius:50%!important;padding:0!important;cursor:pointer;
	background:rgba(20,22,34,.72)!important;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.22)!important;color:#fff!important;display:none;align-items:center;justify-content:center;opacity:0;transition:opacity .2s ease,background .15s ease}
.ldv__nav svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.ldv__nav:hover{background:rgba(48,52,72,.95)!important}
.ldv__nav:disabled{opacity:0!important;pointer-events:none}
.ldv__nav--prev{left:20px}.ldv__nav--next{right:20px}
.ldv--one .ldv__nav{display:none!important}

/* the post's own Like and Comment, under the photo */
.ldv__bar{position:absolute;z-index:2;left:0;right:0;bottom:0;padding:10px 16px calc(12px + env(safe-area-inset-bottom,0px));display:flex;align-items:center;gap:12px;
	background:linear-gradient(to top,rgba(0,0,0,.9),rgba(0,0,0,.55) 70%,transparent);opacity:0;transition:opacity .2s ease}
.ldv__cap{flex:1 1 auto;min-width:0;font:400 14px/1.35 var(--ld-body,Inter,sans-serif);color:rgba(255,255,255,.88);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ldv__cap b{font-weight:600;color:#fff}
.ldv__acts{flex:0 0 auto;display:flex;gap:6px}
.ldv__act{display:flex;align-items:center;gap:6px;height:44px!important;min-width:0!important;margin:0!important;padding:0 14px!important;border:0!important;border-radius:22px!important;background:rgba(255,255,255,.12)!important;color:#fff!important;
	font:600 14px/1 var(--ld-body,Inter,sans-serif);cursor:pointer}
.ldv__act .i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ldv__act:hover{background:rgba(255,255,255,.2)!important}
.ldv__act.is-on{color:#8FB0FF!important}
.ldv__act--like.is-on .i{fill:currentColor}

@media (max-width:420px){.ldv__act span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.ldv__act{width:44px!important;padding:0!important;justify-content:center}}

/* wider screens: the picture sits in a dark frame with room above it for the count and the X, arrows at the sides, a click
   on the dark area closes. The X is placed by the script at the picture's top right corner. */
@media (min-width:721px){
	.ldv{--ldv-top:72px;--ldv-bot:96px;--ldv-side:88px}
	.ldv__bg{background:rgba(5,6,12,.94)}
	.ldv__nav{display:flex}
	.ldv__x{right:auto}
	.ldv__top{justify-content:flex-start}
	.ldv__bar{left:50%;right:auto;bottom:24px;transform:translateX(-50%);width:min(680px,calc(100% - 176px));padding:8px 8px 8px 18px;border-radius:30px;
		background:rgba(24,26,40,.88);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
	.ldv__img{border-radius:6px}
}

@media (prefers-reduced-motion:reduce){.ldv *,.ldv{transition:none!important;animation:none!important}}

/* ---------- comments: a bottom sheet on phones, a side panel on wider screens ---------- */
.bb-activity-model-wrapper.activity-theatre.ldv-sheet{position:fixed!important;inset:0!important;width:100%!important;max-width:none!important;height:100%!important;
	background:rgba(11,13,26,.5)!important;animation:ldvFade .22s ease both}
.bb-activity-model-wrapper.activity-theatre.ldv-sheet.is-closing{animation:ldvFadeOut .22s ease both}
.ldv-sheet #activity-modal{position:fixed!important;margin:0!important;max-width:none!important;max-height:none!important;background:#fff!important;
	display:flex!important;flex-direction:column!important;overflow:hidden!important;box-shadow:0 -10px 40px rgba(11,13,26,.18)!important;transition:transform .22s cubic-bezier(.2,.8,.2,1)}
.ldv-sheet #activity-modal .bb-modal-activity-header{position:relative!important;flex:0 0 auto!important;display:block!important;padding:18px 64px 12px 20px!important;
	border-bottom:1px solid var(--ld-line,#E3E7F1)!important;touch-action:none;cursor:grab}
.ldv-sheet #activity-modal .bb-modal-activity-header h2{margin:0!important;font:700 18px/1.25 var(--ld-heading,'Inter Tight',sans-serif)!important;color:var(--ld-ink,#0B0D1A)!important}
.ldv-sheet .ldv-sub{margin:4px 0 0!important;font:400 14px/1.35 var(--ld-body,Inter,sans-serif);color:var(--ld-ink-soft,#4a4f63);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ldv-sheet .ldv-sub:empty{display:none}
.ldv-sheet .ldv-grab{position:absolute;top:7px;left:50%;width:40px;height:5px;margin-left:-20px;border-radius:3px;background:#D5DAE6}
.ldv-sheet #activity-modal .bb-close-action-popup{position:absolute!important;top:10px!important;right:10px!important;width:44px!important;height:44px!important;margin:0!important;
	display:flex!important;align-items:center!important;justify-content:center!important;border-radius:50%!important;background:var(--ld-pearl,#F3F5FA)!important;color:var(--ld-ink,#0B0D1A)!important}
.ldv-sheet #activity-modal .bb-close-action-popup:hover{background:#E6EAF3!important}
.ldv-sheet #activity-modal .bb-close-action-popup:focus-visible{outline:2px solid var(--ld-electric,#3D6BFF)!important;outline-offset:2px}
.ldv-sheet #activity-modal .bb-close-action-popup [class*="bb-icon"]{font-size:22px!important;color:inherit!important}
.ldv-sheet #activity-modal .bb-modal-activity-body{flex:1 1 auto!important;min-height:0!important;height:auto!important;overflow-y:auto!important;overscroll-behavior:contain;
	-webkit-overflow-scrolling:touch;padding:8px 20px 16px!important}
/* the sheet is for the comments: the post itself is the line in the header */
.ldv-sheet #activity-modal .bb-modal-activity-body li.activity-item>:not(.activity-comments):not(.activity-content){display:none!important}
.ldv-sheet #activity-modal .bb-modal-activity-body li.activity-item>.activity-content>:not(.activity-comments){display:none!important}
.ldv-sheet #activity-modal .bb-modal-activity-body li.activity-item{padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;background:none!important;height:auto!important}
.ldv-sheet #activity-modal .bb-modal-activity-body li.activity-item>*,.ldv-sheet #activity-modal .bb-modal-activity-body li.activity-item>.activity-content>.activity-comments{display:block}
.ldv-sheet #activity-modal .bb-modal-activity-body .activity-comments{margin:0!important;padding:0!important;border:0!important}
.ldv-sheet .ldv-none{display:none;margin:28px 0;text-align:center;font:400 15px/1.4 var(--ld-body,Inter,sans-serif);color:var(--ld-ink-soft,#4a4f63)}
.ldv-sheet #activity-modal.ldv-empty .ldv-none{display:block}
.ldv-sheet #activity-modal .footer-overflow{flex:0 0 auto!important;max-height:45%!important;border-top:1px solid var(--ld-line,#E3E7F1);background:#fff}
.ldv-sheet #activity-modal .bb-modal-activity-footer{max-height:none!important;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))!important}

@media (max-width:720px){
	.ldv-sheet #activity-modal{left:0!important;right:0!important;top:auto!important;bottom:var(--ldv-kb,0px)!important;width:100%!important;
		height:calc(min(100dvh,var(--ldv-vh,100dvh)) - 56px)!important;border-radius:20px 20px 0 0!important;animation:ldvUp .3s cubic-bezier(.2,.8,.2,1) backwards}
	.ldv-sheet.is-closing #activity-modal{transform:translateY(100%)!important}
}
@media (min-width:721px){
	.ldv-sheet #activity-modal{top:0!important;right:0!important;bottom:0!important;left:auto!important;width:min(460px,100%)!important;height:100%!important;
		border-radius:18px 0 0 18px!important;box-shadow:-10px 0 40px rgba(11,13,26,.18)!important;animation:ldvLeft .3s cubic-bezier(.2,.8,.2,1) backwards}
	.ldv-sheet.is-closing #activity-modal{transform:translateX(100%)!important}
	.ldv-sheet .ldv-grab{display:none}
	.ldv-sheet #activity-modal .bb-modal-activity-header{padding:20px 64px 14px 24px!important;cursor:default}
	.ldv-sheet #activity-modal .bb-close-action-popup{top:14px!important;right:14px!important}
}
@keyframes ldvUp{from{transform:translateY(100%)}to{transform:none}}
@keyframes ldvLeft{from{transform:translateX(100%)}to{transform:none}}
@keyframes ldvFade{from{background:rgba(11,13,26,0)}to{background:rgba(11,13,26,.5)}}
@keyframes ldvFadeOut{from{background:rgba(11,13,26,.5)}to{background:rgba(11,13,26,0)}}
@media (prefers-reduced-motion:reduce){.ldv-sheet,.ldv-sheet #activity-modal{animation:none!important;transition:none!important}}
