/* zgallery.css — loaded via zMeta.zBrush: [zgallery] -> /styles/zgallery.css
   Teaching goal: a media-heavy grid (zList/%item of zImage + title + caption)
   plus a file-upload zDialog — this file only skins the grid/card surface;
   the Add-Photo dialog rides the base theme's field styling untouched. */

:root {
    --zg-bg: #f4f5f7;
    --zg-ink: #1c2033;
    --zg-muted: #8a8f9c;
    --zg-line: rgba(28, 32, 51, 0.08);
}

body {
    background: var(--zg-bg);
}

#zVaF-content {
    max-width: 1080px;
    margin: 48px auto;
    padding: 0 16px;
}

#zVaF-content > h1 {
    text-align: center;
    margin-bottom: 28px;
}

.zGallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.zGallery-card {
    background: #fff;
    border: 1px solid var(--zg-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(28, 32, 51, 0.08);
    display: flex;
    flex-direction: column;
}

.zGallery-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.zGallery-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--zg-ink);
    margin: 12px 16px 2px;
}

.zGallery-caption {
    font-size: 0.85rem;
    color: var(--zg-muted);
    margin: 0 16px 16px;
    flex: 1;
}

.zGallery-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 12px 12px;
}

.zGallery-edit,
.zGallery-delete {
    padding: 4px 12px;
    font-size: 0.78rem;
    border-radius: 8px;
    opacity: 0.7;
}

.zGallery-edit:hover,
.zGallery-delete:hover {
    opacity: 1;
}

.zGallery-add {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 32px auto 0;
    padding: 12px 0;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

@media (max-width: 640px) {
    .zGallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }

    #zVaF-content {
        margin: 24px auto;
    }
}
