/* Public photo gallery (X.WebBase GalleryPage). A site restyles it with its own stylesheet - e.g. .wbgal-head as a title band, .wbgal-wrap as its container. */

.wbgal-wrap { max-width: 1170px; margin: 0 auto; padding: 0 16px; }
.wbgal-head h1 { padding: 1.5rem 0 1rem; }
.wbgal-body { padding-top: 1.5rem; padding-bottom: 3rem; }

.wbgal-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 2rem; }
.wbgal-chip { font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #666; background: #fff;
  border: 1px solid #ddd; padding: 10px 14px; cursor: pointer; border-radius: 2px; }
.wbgal-chip:hover { color: #000; }
.wbgal-chip.active { background: #333; border-color: #333; color: #fff; }

.wbgal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.wbgal-grid a { display: block; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 3px; background: #eee; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.wbgal-grid a[hidden] { display: none; } /* the display:block above would otherwise beat the UA [hidden] rule */
.wbgal-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.wbgal-grid a:hover img { transform: scale(1.04); }

/* Lightbox: a native <dialog>. No display: rule here - the UA's dialog:not([open]) must stay in charge of hiding it.
   xbase.css also styles every <dialog> (shadow, border, min-width), so those are reset explicitly. */
.wbgal-lightbox { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; border: 0; padding: 0; background: transparent;
  box-shadow: none; min-width: 0; max-width: 94vw; max-height: 94vh; overflow: visible; }
.wbgal-lightbox::backdrop { background: rgba(0, 0, 0, 0.85); }
.wbgal-lightbox figure { margin: 0; }
.wbgal-lightbox img { display: block; max-width: 94vw; max-height: 86vh; margin: 0 auto; }
.wbgal-lightbox figcaption { color: #fff; text-align: center; padding-top: 8px; font-size: 14px; }
.wbgal-credit { display: block; opacity: .7; font-size: 12px; padding-top: 2px; }
.wbgal-lightbox button { position: absolute; background: none; border: 0; color: #fff; line-height: 1; cursor: pointer; }
.wbgal-close { top: -38px; right: 0; font-size: 34px; }
.wbgal-prev, .wbgal-next { top: 45%; font-size: 48px; padding: 8px 12px; background: rgba(0, 0, 0, 0.35); }
.wbgal-prev { left: -6px; }
.wbgal-next { right: -6px; }

@media (max-width: 800px) {
  .wbgal-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
