/* Full-size profile-picture preview, used from the public profile header. */
.profile-avatar--viewable {
    cursor: default;
}

.profile-avatar-preview {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: inherit;
}

.profile-avatar--viewable .profile-avatar-preview {
    cursor: zoom-in;
}

.profile-avatar-preview:focus-visible {
    outline: 3px solid var(--primary, #0ea5e9);
    outline-offset: 3px;
}

.profile-avatar-viewer {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    background: rgb(0 0 0 / 92%);
    box-sizing: border-box;
}

.profile-avatar-viewer::backdrop {
    background: rgb(0 0 0 / 92%);
}

.profile-avatar-viewer .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.profile-avatar-viewer-image {
    display: block;
    max-width: min(92vw, 680px);
    max-height: 82dvh;
    margin: 6dvh auto 0;
    border-radius: 8px;
    object-fit: contain;
}

.profile-avatar-viewer-close {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 18%);
    color: #fff;
    cursor: pointer;
    place-items: center;
}

.profile-avatar-viewer-close:hover,
.profile-avatar-viewer-close:focus-visible {
    background: rgb(255 255 255 / 30%);
}

.profile-avatar-viewer-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.5;
}

@media (max-width: 700px) {
    .profile-avatar-viewer {
        padding: 16px;
    }

    .profile-avatar-viewer-image {
        max-width: 92vw;
        max-height: 84dvh;
        margin-top: 8dvh;
    }
}
