/* ══════════════════════════════════════════════════════════════════════
   EXPLORE KEYS — blurred discovery photos + the lock that opens them

   Loaded after friends-feed.css so `.ek-blurred` wins on
   `.persona-card__photo-bg` without needing !important.
   ══════════════════════════════════════════════════════════════════════ */

/* ── The blur itself ──────────────────────────────────────────────────
   scale(1.18) is not decoration: a blur samples past the element's edge,
   so an unscaled layer shows a soft transparent rim where the card
   background bleeds through. Scaling up pushes that rim out of view.
   The photo zone already clips (overflow:hidden), so nothing escapes. */
.persona-card__photo-bg.ek-blurred,
.ek-blurred {
    filter: blur(17px) saturate(0.82) brightness(0.88);
    transform: scale(1.18);
    transition: filter 0.55s ease, transform 0.55s ease;
    will-change: filter;
}

/* friends-feed.css presses the photo to scale(1.04) while the card is held
   (`.persona-card:active .persona-card__photo-bg`, specificity 0-3-0). That
   would win over the rule above and drop the blur back to a scale that
   exposes the soft rim on every tap. Restate it one notch higher. */
.persona-card:active .persona-card__photo-bg.ek-blurred {
    transform: scale(1.18);
}

/* Post-unlock: the same node, sharpened. Kept as its own class so the
   transition actually runs instead of snapping. */
.persona-card__photo-bg.ek-revealing,
.ek-revealing {
    filter: blur(0) saturate(1) brightness(1);
    transform: scale(1);
    transition: filter 0.55s ease, transform 0.55s ease;
}

/* ── Lock layer ───────────────────────────────────────────────────────
   Transparent to pointer events on purpose — tapping the photo still
   opens the profile. Only the button spends a key. */
.ek-lock {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Lift the cluster off the bottom edge so it never collides with the
       name + motto block sitting in `.persona-card__identity`. */
    padding-bottom: 30%;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.ek-lock--gone {
    opacity: 0;
    transform: scale(1.06);
}

.ek-lock-icn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(12, 8, 20, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.ek-lock-icn svg {
    width: 19px;
    height: 19px;
}

.ek-lock-btn {
    pointer-events: auto;
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    font-family: inherit;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ek-lock-btn:hover  { filter: brightness(1.07); }
.ek-lock-btn:active { transform: scale(0.95); box-shadow: 0 3px 12px rgba(233, 30, 99, 0.34); }
.ek-lock-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

/* ── Balance pill next to the "Discover profiles" heading ───────────── */
.ek-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    background: rgba(233, 30, 99, 0.16);
    border: 1px solid rgba(233, 30, 99, 0.4);
    vertical-align: middle;
    white-space: nowrap;
}

.ek-pill-icn { font-size: 11px; }
.ek-pill-n   { font-variant-numeric: tabular-nums; }

/* ── Profile modal ────────────────────────────────────────────────────
   The circular avatar keeps a gentler blur: a hard scale-up would push
   the image past the round clip and fray the ring. */
.shr-avatar.ek-blurred {
    filter: blur(9px) saturate(0.85);
    transform: none;
}

.shr-avatar.ek-locked-hint {
    cursor: pointer;
    position: relative;
}

/* Small key badge riding on the modal avatar so the blur reads as
   "lockable", not as a broken image. */
.shr-avatar.ek-locked-hint::after {
    content: '🔑';
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    filter: none;
}

/* ── Reduced motion ───────────────────────────────────────────────────
   The blur→sharp transition is the whole point of the reveal, so it is
   shortened rather than removed. */
@media (prefers-reduced-motion: reduce) {
    .ek-blurred,
    .ek-revealing,
    .ek-lock,
    .ek-lock-btn {
        transition-duration: 0.01ms;
    }
}
