.wpcom-instagram-images {
	display: grid;
	gap: 0.5rem;
	grid-auto-columns: 1fr;
}

.wpcom-instagram-images::before,
.wpcom-instagram-images::after {
	content: none;
}

.wpcom-instagram-images a {
	display: block;
	margin: 4px 2px;
}

.wpcom-instagram-columns-2 a,
.wpcom-instagram-columns-3 a {
	display: inline-block;
	vertical-align: top;
}

.wpcom-instagram-columns-2 a {
	width: calc(50% - 8px);
}

.wpcom-instagram-columns-3 a {
	width: calc(33.3333% - 8px);
}

.wpcom-instagram-images .sq-bg-image {
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	height: 0;
	overflow: hidden;
	padding-bottom: 100%;
}

.wpcom-instagram-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.wpcom-instagram-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

@supports (display:grid) {

	.wpcom-instagram-images a {
		display: block;
		margin: 0;
	}

	.wpcom-instagram-columns-2 a,
	.wpcom-instagram-columns-3 a {
		width: auto;
	}
}
