/* #/locked — the real result, blurred, with the paywall as a bottom sheet. */

.screen-locked {
  background: var(--surface-muted);
}

.screen-locked .locked-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--surface-muted);
}

/* The server's preview is ~36px wide: scaled up and blurred (enough that no
   detail is readable, light enough to see the prank's shapes and colors), with
   a little zoom so the blurred edges never show. */
.screen-locked .locked-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(1.1);
  transform: scale(1.15);
  animation: fadeIn 0.5s ease both;
}

.screen-locked .locked-after {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* One sweep: the person's own photo, revealed top to bottom into the result. */
.screen-locked .locked-original {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeIn 0.3s ease both;
}
.screen-locked .locked-media.is-before .locked-after {
  clip-path: inset(0 0 100% 0);
}
.screen-locked .locked-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1;
  height: 3px;
  margin-top: -1px;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(123, 92, 250, 0.9);
  opacity: 0;
}

.screen-locked .locked-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 16, 14, 0.46) 0%,
    rgba(20, 16, 14, 0.12) 32%,
    rgba(20, 16, 14, 0) 55%,
    rgba(20, 16, 14, 0.3) 100%
  );
  pointer-events: none;
}

.screen-locked .locked-top {
  position: relative;
  z-index: 2;
  padding-left: var(--s-lg);
  padding-right: var(--s-lg);
}

.screen-locked .locked-top-row {
  display: flex;
  height: 36px;
  margin-bottom: var(--s-sm);
  transition: height 0.35s var(--ease-out), margin 0.35s var(--ease-out), opacity 0.2s ease;
}

.screen-locked .locked-leave {
  position: relative;
}
.screen-locked .locked-leave::after {
  content: '';
  position: absolute;
  inset: -4px;
}

.screen-locked .locked-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
  animation: fadeInUp 0.45s var(--ease-out) 0.1s both;
}

.screen-locked .locked-badge {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.screen-locked .locked-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.screen-locked .locked-sub {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
}

.screen-locked .locked-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin: var(--s-sm) auto 0;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  background: rgba(20, 16, 14, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fadeInUp 0.45s var(--ease-out) 0.2s both;
}
.screen-locked .locked-caption ion-icon {
  font-size: 13px;
}
.screen-locked .locked-caption-dot {
  opacity: 0.7;
}

.screen-locked .locked-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 var(--s-lg) calc(var(--safe-bottom) + var(--s-xl));
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out);
}
.screen-locked .locked-unlock {
  height: 60px;
  font-size: 17px;
}

/* ---------- Sheet ---------- */

.screen-locked .locked-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  max-height: 86%;
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.42s cubic-bezier(0.32, 1.18, 0.5, 1);
  will-change: transform;
}
.screen-locked .locked-sheet.dragging {
  transition: none;
}

.screen-locked.sheet-open .locked-sheet {
  transform: none;
}
.screen-locked:not(.sheet-open) .locked-sheet {
  transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  transition-duration: 0.3s;
}

/* Sheet open: the unlock button and the leave button step aside. */
.screen-locked.sheet-open .locked-bottom {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.screen-locked.sheet-open .locked-top-row {
  height: 0;
  margin-bottom: 6px;
  opacity: 0;
  pointer-events: none;
}

.paywall-sheet {
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(26, 28, 34, 0.14);
  touch-action: pan-y;
}

.paywall-sheet .sheet-grabber {
  flex-shrink: 0;
  width: 36px;
  height: 5px;
  margin: 8px auto 4px;
  border-radius: 3px;
  background: var(--border-strong);
}

/* Grab area (grabber + close row) is where the swipe-down starts. */
.paywall-sheet .upgrade-close-row {
  touch-action: none;
  cursor: grab;
}

.paywall-sheet .upgrade-scroll {
  flex: 0 1 auto;
  min-height: 0;
}

.paywall-sheet .upgrade-content,
.paywall-sheet.paywall .upgrade-content {
  min-height: 0;
  padding-top: 0;
  padding-bottom: var(--s-sm);
  justify-content: flex-start;
}

.paywall-sheet .segmented {
  background: var(--surface-muted);
}

@media (min-height: 800px) {
  .paywall-sheet.paywall .upgrade-content {
    padding-bottom: var(--s-md);
  }
}
