@import url("./colors.css");

.profile-photo-trigger {
    display: block;
    width: fit-content;
    border-radius: 50%;
    cursor: zoom-in;
}

.profile-photo-trigger img {
    display: block;
}

.profile-photo-trigger:focus-visible {
    outline: 3px solid var(--ui-focus);
    outline-offset: 4px;
}

html:has(.profile-photo-dialog[open]) {
    overflow: hidden;
}

/* Fixed photo-viewer surface; these colors are independent of the site theme. */
.profile-photo-dialog {
    box-sizing: border-box;
    width: min(48rem, calc(100vw - 2rem));
    max-width: none;
    max-height: calc(100dvh - 2rem);
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #17191d;
    color: #fff;
    box-shadow: 0 16px 64px rgba(0, 0, 0, .3);
}

.profile-photo-dialog::backdrop {
    background: rgba(0, 0, 0, .8);
}

.profile-photo-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .75rem .5rem 1rem;
}

.profile-photo-dialog__header h2 {
    margin: 0;
    font-size: 1rem;
}

.profile-photo-dialog__close {
    flex: 0 0 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.profile-photo-dialog__close:hover {
    background: rgba(255, 255, 255, .12);
}

.profile-photo-dialog__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

.profile-photo-dialog__image {
    display: block;
    width: 100%;
    max-height: calc(100dvh - 6rem);
    object-fit: contain;
}
