.pp-lightbox {
    display: none;  /* hidden by default, set to "grid" when revealed */
    grid-template-rows: 4rem 1fr;
    position: fixed;
    z-index: 1;  /* on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--colour-primary-bg);  /* solid colour fallback */
    background-color: var(--colour-primary-bg-opq);  /* slightly opaque */
}

.pp-lightbox-content {
    margin: 0 auto 0 auto;
    /*display: block;*/
    /*min-height: 0;*/
    width: 100%;
    max-width: 1280px;
    max-height: calc(100vh - 8rem);
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.3s;
    animation-name: zoom;
    animation-duration: 0.3s;
    text-align: center;
}

@container pp-site-container (min-width: 850px) {
    .pp-lightbox-content {
        width: calc(100% - 8rem);
    }
}

.pp-lightbox-label {
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0.5em 1em;
    color: var(--colour-primary-fg);
    transition: 0.3s;
    text-align: center;
    overflow-wrap: break-word;
}

@-webkit-keyframes zoom {
    from {-webkit-transform:scale(0)}
    to {-webkit-transform:scale(1)}
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.pp-lightbox-buttonbar {
    display: flex;
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: var(--colour-more-subdued-fg);
    margin: 0.5em 1em 0 1em;
    gap: 1em;
    justify-content: flex-end;
    align-items: center;
    transition: 0.3s;
}

.pp-lightbox-title {
    flex-grow: 1;
    text-align: left;
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
}

@container pp-site-container (min-width: 850px) {
    .pp-lightbox-title {
        padding-left: 3.6rem;
        font-size: 1.4rem;
    }
}

button.pp-lightbox-close {
    flex: 0;
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 2rem;
    font-weight: bold;
    text-align: right;
    color: var(--colour-more-subdued-fg);
    transition: 0.3s;
}

button.pp-lightbox-close:hover, button.pp-lightbox-close:active {
    color: var(--colour-primary-fg);
    text-decoration: none;
    cursor: pointer;
}

.pp-gallery-image:hover {
    cursor: pointer;
}


button.pp-lightbox-download {
    flex-shrink: 0;
    -webkit-mask-image: url('/assets/icons/download.svg');
    mask-image: url('/assets/icons/download.svg');
    background-color: var(--colour-subdued-fg);
    background-repeat: no-repeat;
    background-size: cover;
    transition: all 0.3s ease;
    height: 1.2rem;
    width: 1.2rem;
}

button.pp-lightbox-download:hover {
    background-color: var(--colour-primary-fg);
    cursor: pointer;
}
