/* Native gallery tiles; the full-size viewer is supplied by WordPress. */
.wp-block-gallery.fpc-photo-gallery {
  --wp--style--gallery-gap-default: 16px;
  gap: 16px;
  margin-block: 28px;
}
.wp-block-gallery.fpc-photo-gallery .wp-block-image {
  overflow: hidden;
  border-radius: 12px;
  flex-grow: 0;
}
.wp-block-gallery.fpc-photo-gallery .wp-block-image img {
  cursor: zoom-in;
}
.wp-block-gallery.fpc-photo-gallery .wp-block-image:focus-within {
  outline: 3px solid var(--brand, #2264c4);
  outline-offset: 4px;
}
@media (max-width: 600px) {
  .wp-block-gallery.fpc-photo-gallery {
    --wp--style--gallery-gap-default: 12px;
    gap: 12px;
    margin-block: 24px;
  }
}

.page-content > .wp-block-gallery.fpc-photo-gallery {
  width: min(1200px, calc(100% - 96px));
  margin-inline: auto;
}
@media (max-width: 600px) {
  .page-content > .wp-block-gallery.fpc-photo-gallery {
    width: calc(100% - 40px);
  }
}
.fpc-photo-gallery .lightbox-trigger {
  min-width: 44px;
  min-height: 44px;
}
.wp-lightbox-overlay .wp-lightbox-navigation-button,
.wp-lightbox-overlay .wp-lightbox-close-button {
  min-height: 44px;
}
/* Shared enlarged viewer, with a visible current-photo thumbnail. */
.single-fpc_home .home-listing-gallery {
  margin-block: 0;
}
.fpc-gallery-viewer .wp-lightbox-close-icon,
.fpc-gallery-viewer .wp-lightbox-close-text,
.fpc-gallery-viewer .wp-lightbox-navigation-icon,
.fpc-gallery-viewer .wp-lightbox-navigation-text {
  display: none !important;
}
.fpc-gallery-viewer .fpc-gallery-control-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fpc-gallery-viewer .wp-lightbox-close-button,
.fpc-gallery-viewer .wp-lightbox-navigation-button {
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 12px;
  border-radius: 50%;
  color: #142c47;
  box-shadow: 0 0 0 1px #d6e0e5;
}
.fpc-gallery-viewer .wp-lightbox-close-button {
  top: 16px;
  right: 20px;
}
.fpc-gallery-viewer .wp-lightbox-navigation-button-prev {
  left: 16px;
}
.fpc-gallery-viewer .wp-lightbox-navigation-button-next {
  right: 16px;
}
.fpc-gallery-viewer.active .lightbox-image-container {
  top: 72px !important;
  left: 80px !important;
  width: calc(100% - 160px) !important;
  height: calc(100% - 216px) !important;
  transform: none !important;
  animation: none !important;
}
.fpc-gallery-viewer.active .lightbox-image-container figure,
.fpc-gallery-viewer.active .lightbox-image-container img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  object-fit: contain !important;
  transform: none !important;
  animation: none !important;
}
.fpc-gallery-count {
  position: absolute;
  top: 24px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  color: #142c47;
  font: 600 16px/24px var(--font, sans-serif);
  z-index: 10000000;
}
.fpc-gallery-thumbnails {
  position: absolute;
  z-index: 10000000;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  max-width: calc(100% - 40px);
  padding: 5px;
  overflow-x: auto;
}
.fpc-gallery-thumbnails[hidden] {
  display: none;
}
.fpc-gallery-thumbnail {
  flex: 0 0 88px;
  width: 88px;
  height: 64px;
  padding: 3px;
  border: 3px solid transparent;
  border-radius: 9px;
  background: #edf3f6;
  cursor: pointer;
}
.fpc-gallery-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.fpc-gallery-thumbnail[aria-current="true"] {
  border-color: #2264c4;
  background: #e6f5fa;
}
.fpc-gallery-thumbnail:focus-visible {
  outline: 3px solid #142c47;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .fpc-gallery-viewer.active .lightbox-image-container {
    left: 12px !important;
    width: calc(100% - 24px) !important;
    height: calc(100% - 256px) !important;
  }
  .fpc-gallery-viewer .wp-lightbox-navigation-button-prev,
  .fpc-gallery-viewer .wp-lightbox-navigation-button-next {
    top: auto;
    bottom: 112px;
  }
  .fpc-gallery-thumbnails {
    gap: 6px;
    bottom: 20px;
  }
  .fpc-gallery-thumbnail {
    flex-basis: 64px;
    width: 64px;
    height: 52px;
  }
}

.fpc-gallery-control-icon { display: none; }
.fpc-gallery-viewer .fpc-gallery-control-icon { display: block; }
.fpc-gallery-count[hidden] { display: none; }
.fpc-gallery-viewer .fpc-gallery-thumbnail {
  border: 3px solid transparent;
  background: #edf3f6;
}
.fpc-gallery-viewer .fpc-gallery-thumbnail[aria-current="true"] {
  border-color: #2264c4;
  background: #e6f5fa;
}
@media (max-width: 600px) {
  .single-fpc_home .home-listing-gallery.has-nested-images > figure.wp-block-image {
    width: 100% !important;
  }
}
