/* The managed widget contributes the same content-sized box as the gallery
 * container it replaces. All three-column spacing remains in elementor.css. */
:where(.gb-elementor-document) .elementor-widget-gb-managed-gallery {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.gb-elementor-document .elementor-widget.elementor-widget-gb-managed-gallery > .elementor-widget-container {
  height: auto;
}

/* Small selections omit unused columns while keeping the original profiles. */
:where(.gb-elementor-document) .elementor-widget-gb-managed-gallery .view-grid[data-gb-gallery-columns="1"] {
  grid-template-columns: 1fr;
}

:where(.gb-elementor-document) .elementor-widget-gb-managed-gallery .view-grid[data-gb-gallery-columns="2"] {
  grid-template-columns: 1.15fr .8fr;
}

@media (max-width: 600px) {
  :where(.gb-elementor-document) .elementor-widget-gb-managed-gallery .view-grid[data-gb-gallery-columns="2"] {
    grid-template-columns: 1fr 1fr;
  }
}
