/* The static public pages (#63): the photo viewer and upload rows js/public-pages.js builds, and
   the bits the pages share. Theme tokens only, so both themes work. */

.pp-viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
}

.pp-viewer-figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pp-viewer-figure img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 6px;
}

.pp-viewer-figure figcaption {
    color: #e5e5e5;
    font-size: 13px;
    text-align: center;
    white-space: pre-wrap;
}

.pp-viewer button {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 999px;
    width: 44px;
    height: 44px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.pp-viewer button:hover { background: rgba(255, 255, 255, 0.24); }
.pp-viewer-close { top: 12px; right: 12px; }
.pp-viewer-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.pp-viewer-next { right: 8px; top: 50%; transform: translateY(-50%); }
.pp-viewer.single .pp-viewer-prev,
.pp-viewer.single .pp-viewer-next { display: none; }

@media (max-width: 600px) {
    .pp-viewer { padding: 56px 8px; }
    .pp-viewer-prev, .pp-viewer-next { top: auto; bottom: 8px; transform: none; }
}

/* A photo link that wraps a thumbnail. */
a.pp-photo { display: block; cursor: zoom-in; }

form.pp-sending button[type="submit"] { opacity: 0.6; pointer-events: none; }

.pp-upload-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.pp-upload-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 8px;
}

.pp-upload-name {
    font-size: 13px;
    color: var(--fg-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pp-upload-error {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--fault-500);
}
