/* Sign gallery grid (Sign Gallery page). Ported unchanged from legacy's application.css; the lightbox
   itself is rebuilt as a Stimulus controller driving a native <dialog> (see app/javascript/controllers/
   gallery_lightbox_controller.js) in place of legacy's magnific-popup jQuery plugin, but the thumbnail
   grid markup/CSS doesn't need to change for that. */

.snGallerySectionTitle {
  color: var(--sn-navy);
  font-size: 17px;
  margin: 24px 0 14px;
}
.snGallerySectionTitle:first-child {
  margin-top: 0;
}
.snGalleryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
a.snGalleryItem,
a.snGalleryItem:hover,
a.snGalleryItem:focus {
  text-decoration: none !important;
}
.snGalleryThumb {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(11, 30, 61, 0.10);
  aspect-ratio: 4 / 3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.snGalleryThumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(11, 30, 61, 0.22);
}
.snGalleryImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.snGalleryOverlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  background: linear-gradient(to top, rgba(11, 30, 61, 0.85) 0%, rgba(11, 30, 61, 0) 100%);
}
.snGalleryCaption {
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.snGalleryZoomIcon {
  flex: 0 0 auto;
  color: #ffffff;
  opacity: 0.85;
  font-size: 13px;
}
.snGalleryHint {
  color: var(--sn-gray);
  font-size: 13px;
  margin-top: 20px;
}

/* ---- Lightbox dialog (native <dialog>, replaces legacy's magnific-popup overlay) ---- */
.snLightbox {
  border: none;
  border-radius: 14px;
  padding: 0;
  max-width: min(90vw, 900px);
  max-height: 90vh;
  box-shadow: 0 12px 40px rgba(11, 30, 61, 0.35);
}
.snLightbox::backdrop {
  background: rgba(11, 30, 61, 0.75);
}
.snLightboxImg {
  display: block;
  max-width: min(90vw, 900px);
  max-height: 90vh;
  object-fit: contain;
}
.snLightboxClose {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}
