/* ============================================
   post-zoom.css — zoom screen for posted pages (post-zoom.js)
   Look B: a blurred, darkened copy of the page behind it.
   ============================================ */

.sb-pz {
  position: fixed;
  inset: 0;
  z-index: 3000;
  color: #fff;
  opacity: 0;
  transition: opacity .18s ease;
  font-family: 'Poppins', sans-serif;
  -webkit-user-select: none;
  user-select: none;
}
.sb-pz--open { opacity: 1; }

.sb-pz-bg {
  position: absolute;
  inset: -40px;
  background-color: #0b0a10;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(.42) saturate(1.2);
  opacity: var(--sb-pz-fade, 1);
  transition: opacity .2s ease;
}

.sb-pz-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
}
.sb-pz-stage.sb-pz-zoomed { cursor: grab; }
.sb-pz-stage.sb-pz-dragging { cursor: grabbing; }

.sb-pz-img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  transform-origin: center;
  transform: scale(.96);
  pointer-events: none;
  -webkit-user-drag: none;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
}
.sb-pz--desktop .sb-pz-img { border-radius: 10px; }
.sb-pz-img.sb-pz-anim { transition: transform .24s cubic-bezier(.2,.8,.2,1); }

.sb-pz-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  pointer-events: none;
}
.sb-pz-top > * { pointer-events: auto; }
.sb-pz-spacer { width: 40px; pointer-events: none !important; }

.sb-pz-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(20,18,28,.62);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sb-pz-btn:hover { background: rgba(20,18,28,.8); }

.sb-pz-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(20,18,28,.62);
  border-radius: 999px;
  padding: 4px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sb-pz-pct { min-width: 50px; text-align: center; }
.sb-pz-pill button {
  border: 0;
  background: transparent;
  color: #fff;
  font: 700 13px 'Poppins', sans-serif;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.sb-pz-pill button:hover { background: rgba(255,255,255,.16); }
.sb-pz-pill .sb-pz-fit { background: rgba(255,255,255,.2); }
.sb-pz-pill [hidden] { display: none !important; }
.sb-pz-btn:focus-visible, .sb-pz-pill button:focus-visible { outline: 2px solid #14B8A6; outline-offset: 2px; }

.sb-pz-hint {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: rgba(0,0,0,.5);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .4s ease;
}
.sb-pz-hint--gone { opacity: 0; }

/* Stickers (kind: 'sticker'): no box or rounded corners around the art,
   a shadow that follows its outline, and its name underneath. The blurred
   copy behind is the sticker itself, so it sits smaller in the middle. */
.sb-pz--sticker .sb-pz-img,
.sb-pz--sticker.sb-pz--desktop .sb-pz-img {
  box-shadow: none;
  border-radius: 0;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.45));
}
.sb-pz--sticker .sb-pz-bg {
  background-size: 70%;
  background-repeat: no-repeat;
}
.sb-pz-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pinching right on a post: its overlays fade out until it springs back. */
.sb-pz-fade { transition: opacity .15s ease; }
.sb-pz-pinching .sb-pz-fade { opacity: 0 !important; pointer-events: none; }

/* Desktop: the post opens the zoom screen on click. */
.sb-pz-clickable { cursor: zoom-in; }
.sb-pz-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font: 700 12px 'Poppins', sans-serif;
  padding: 6px 10px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
  z-index: 2;
}
.sb-pz-clickable:hover .sb-pz-chip { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .sb-pz, .sb-pz-img.sb-pz-anim, .sb-pz-hint { transition: none; }
}
