.photos-grid * {
  box-sizing: border-box;
}

.photos-grid *:before,
.photos-grid *:after {
  box-sizing: inherit;
}

.photos-grid {
  display: flex;
  gap: 1rem;
}

.photos-grid img {
  backdrop-filter: invert(5%);
  -webkit-backdrop-filter: invert(5%);
}

.photos-grid.photos-grid--style-grid {
  flex-wrap: wrap;
}

.photos-grid--style-grid .photos-grid__item {
  display: block;
  width: auto;
  flex-grow: 1;
  position: relative;
}

.photos-grid--style-grid .photos-grid__item img {
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
}

/**
Masonry:
**/

.photos-grid.photos-grid--style-masonry {
  display: grid;
  gap: 1rem;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.photos-grid.photos-grid--visible-desktop {
  display: none;
}

.photos-grid__column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.photos-grid--style-masonry .photos-grid__item img {
  width: 100%;
  height: auto;
}

@media only screen and (min-width: 576px) {
  .photos-grid--style-grid .photos-grid__item {
    height: 40vh;
  }

  .photos-grid--style-grid .photos-grid__item img {
    width: auto;
    height: 100%;
  }

  .photos-grid.photos-grid--visible-desktop {
    display: grid;
  }

  .photos-grid.photos-grid--visible-mobile {
    display: none;
  }
}

/**
Custom, hard coded (for now), overrides for common themes.
**/

/**
Override max-width of theme "Marfa" #wrapper.
**/
#wrapper:has(> .photos-grid) {
  max-width: 100%;
}
.wrapper:has(> .photos-grid) {
  max-width: 100%;
}
