/* Bang Instagram Feed */
.bangig {
	--bangig-cols: 3;
	--bangig-cols-m: 2;
	--bangig-gap: 8px;
	--bangig-radius: 0;
	--bangig-accent: #0095f6;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
}
.bangig *,
.bangig *::before,
.bangig *::after {
	box-sizing: inherit;
}
/* If the shortcode was pasted with inline code formatting, the browser rebuilds
   a <code> element inside our markup. Make it vanish so tiles stay grid items. */
.bangig code {
	display: contents;
	font: inherit;
	color: inherit;
	background: none;
	padding: 0;
	margin: 0;
	border: 0;
}

/* Grid */
.bangig__grid {
	display: grid;
	grid-template-columns: repeat(var(--bangig-cols), minmax(0, 1fr));
	gap: var(--bangig-gap);
	margin: 0;
	padding: 0;
}
@media (max-width: 640px) {
	.bangig__grid {
		grid-template-columns: repeat(var(--bangig-cols-m), minmax(0, 1fr));
	}
}

.bangig__item {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--bangig-radius);
	background: #efefef;
	color: #fff;
	text-decoration: none;
	outline-offset: 2px;
}
@supports not (aspect-ratio: 1 / 1) {
	.bangig__item::before {
		content: "";
		display: block;
		padding-top: 100%;
	}
}
.bangig__item img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transition: transform 0.45s ease;
}
.bangig__item:hover img,
.bangig__item:focus-visible img {
	transform: scale(1.04);
}

/* Type badge */
.bangig__badge {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 20px;
	height: 20px;
	pointer-events: none;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}
.bangig__badge svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: #fff;
}
@media (max-width: 640px) {
	.bangig__badge {
		top: 6px;
		right: 6px;
		width: 16px;
		height: 16px;
	}
}

/* Hover overlay */
.bangig__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 6px;
	padding: 12px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0) 100%);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}
.bangig__item:hover .bangig__overlay,
.bangig__item:focus-visible .bangig__overlay {
	opacity: 1;
}
.bangig__stats {
	display: flex;
	gap: 14px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}
.bangig__stats span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.bangig__stats svg {
	width: 15px;
	height: 15px;
	fill: #fff;
	color: #fff;
}
.bangig__caption {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13px;
	line-height: 1.45;
}
@media (max-width: 640px) {
	.bangig__overlay {
		padding: 8px;
	}
	.bangig__caption {
		-webkit-line-clamp: 2;
		font-size: 12px;
	}
}

/* Header */
.bangig__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 0 0 18px;
}
.bangig__header .bangig__button {
	margin-left: auto;
}
.bangig__avatar-link {
	flex: 0 0 auto;
	line-height: 0;
}
.bangig__avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.bangig__identity {
	min-width: 0;
	flex: 1 1 auto;
}
.bangig__name {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	line-height: 1.25;
}
.bangig__verified svg {
	width: 16px;
	height: 16px;
	fill: var(--bangig-accent);
	display: block;
}
.bangig__handle {
	display: inline-block;
	font-size: 14px;
	color: inherit;
	opacity: 0.7;
	text-decoration: none;
}
.bangig__handle:hover {
	opacity: 1;
	text-decoration: underline;
}
.bangig__meta {
	margin-top: 4px;
	font-size: 13px;
	opacity: 0.75;
}
.bangig__meta strong {
	font-weight: 600;
}
.bangig__dot {
	margin: 0 2px;
}

/* Buttons */
.bangig__button {
	display: inline-block;
	flex: 0 0 auto;
	padding: 9px 18px;
	border-radius: 8px;
	background: var(--bangig-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.2s ease;
}
.bangig__button:hover,
.bangig__button:focus-visible {
	background: #1877f2;
	color: #fff;
	text-decoration: none;
}
.bangig__follow {
	display: flex;
	justify-content: center;
	margin-top: 18px;
}

/* Fallback and admin notice */
.bangig__fallback {
	margin: 0;
	text-align: center;
}
.bangig__notice {
	margin: 0;
	padding: 12px 16px;
	border: 1px dashed #b32d2e;
	border-radius: 6px;
	color: #b32d2e;
	font-size: 14px;
	line-height: 1.45;
}
