/* Approved story photographs and the shared accessible photo dialog. */
.bella-story-images {
  margin: 20px 0;
}

.bella-story-images-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.bella-story-images-grid[data-count="1"] {
  grid-template-columns: minmax(0, 320px);
}

.bella-story-images-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bella-story-image {
  min-width: 0;
  margin: 0;
}

.bella-story-image-button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 2px solid #e4d5df;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f0f4;
  cursor: zoom-in;
  touch-action: manipulation;
}

.bella-story-image-button:hover {
  border-color: #9d456b;
}

.bella-story-image-button:focus-visible {
  outline: 3px solid #155e75;
  outline-offset: 4px;
}

.bella-story-image-button:disabled {
  cursor: default;
  opacity: 0.7;
}

.bella-story-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f6f0f4;
  border-radius: 8px;
}

.bella-story-image img[hidden],
.gallery-lightbox img[hidden] {
  display: none;
}

.bella-story-image figcaption,
.bella-story-images-hint {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: #594a56;
}

.gallery-lightbox .gallery-close {
  min-height: 44px;
  min-width: 80px;
  touch-action: manipulation;
}

.gallery-lightbox .gallery-close:focus-visible {
  outline: 3px solid #efb453;
  outline-offset: 3px;
}

.gallery-lightbox .bella-photo-caption,
.gallery-lightbox .bella-photo-status {
  max-width: min(82vw, 850px);
  margin: 10px auto 4px;
  color: #fff;
  font: 16px/1.5 Arial, sans-serif;
  overflow-wrap: anywhere;
}

.gallery-lightbox .bella-photo-status:empty {
  display: none;
}

.gallery-lightbox img {
  max-height: calc(92dvh - 150px);
}

@media (max-width: 560px) {
  .bella-story-images-grid,
  .bella-story-images-grid[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bella-story-images-grid[data-count="1"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 350px) {
  .bella-story-images-grid,
  .bella-story-images-grid[data-count="2"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

