/* =============================================================
   allpics.css — public userpic gallery view.

   Each "pair" cell holds an image on the left and the keywords +
   comment text on the right (legacy 2-up look). The pairs live in
   a CSS Grid so wide screens auto-fit more pairs across without
   the user having to ask. A `cols=N` override forces an exact
   column count via inline style on the grid.

   Theme via the same `--ups-*` CSS custom properties as the
   editor and userpic picker so per-scheme palettes carry over.
   ============================================================= */

.allpics-wrap {
        margin: 0 0 0 50px; /* matches the legacy left-indent */
}

@media (max-width: 600px) {
        .allpics-wrap { margin-left: 0; }
}

/* ----- Pair grid ----- */
.allpics-grid {
        display: grid;
        /* auto-fit so wide viewports get 3+ pairs across; 360px
           min keeps the image + text legible without squishing. */
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
        gap: 8px 32px; /* row gap, then column gap (legacy used a 50px spacer) */
        margin: 12px 0;
}

.allpics-pair {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 5px;
        min-width: 0;
}

.allpics-img {
        flex: 0 0 auto;
        text-align: center;
}

.allpics-img img {
        display: inline-block;
        max-width: 120px;
        max-height: 120px;
}

.allpics-text {
        flex: 1 1 auto;
        min-width: 0;
        word-wrap: break-word;
        color: var(--ups-text, #000);
        line-height: 1.4;
}

/* ----- Footer (page + per-page + columns links) ----- */
.allpics-footer {
        margin: 1.5em 0 0.5em;
        padding-top: 0.75em;
        border-top: 1px solid var(--ups-border, #d0d0d0);
        font-size: 11px;
        color: var(--ups-text-muted, #555);
        line-height: 1.6;
}

.allpics-footer a {
        color: var(--ups-text-muted, #555);
        text-decoration: underline;
}

.allpics-footer a:hover {
        color: var(--ups-accent, #555);
}

.allpics-footer strong {
        color: var(--ups-text, #000);
        font-weight: bold;
}

.allpics-pages {
        margin-bottom: 0.4em;
}

.allpics-prefs {
        opacity: 0.85;
}

.allpics-count {
        font-style: italic;
}
