/* Einfacher Instagram-Feed – Darstellung im Stil des bisherigen Smash-Balloon-Feeds */
.eif-feed {
	--eif-cols: 4;
	--eif-cols-t: 2;
	--eif-cols-m: 2;
	--eif-gap: 10px;
	--eif-load-bg: #333;
	--eif-load-fg: #fff;
	--eif-follow-bg: #408bd1;
	--eif-follow-fg: #fff;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
	clear: both;
}
.eif-feed *,
.eif-feed *::before,
.eif-feed *::after { box-sizing: border-box; }

/* Kopfzeile (optional) */
.eif-feed .eif-header { margin: 0 0 12px; }
.eif-feed .eif-header-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none !important; color: inherit !important; border: 0 !important; box-shadow: none !important; }
.eif-feed .eif-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; display: block; margin: 0; }
.eif-feed .eif-header-text { display: flex; flex-direction: column; line-height: 1.25; }
.eif-feed .eif-header-name { font-weight: 700; font-size: 16px; }
.eif-feed .eif-header-user { font-size: 13px; opacity: .7; }

/* Raster */
.eif-feed .eif-grid {
	display: grid;
	grid-template-columns: repeat(var(--eif-cols), minmax(0, 1fr));
	gap: var(--eif-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
/* Spalten richten sich nach der verfügbaren Breite des Feeds (Tablet ≤ 800 px, Handy ≤ 480 px). */
@supports (container-type: inline-size) {
	.eif-feed { container-type: inline-size; container-name: eif; }
	@container eif (max-width: 800px) {
		.eif-grid { grid-template-columns: repeat(var(--eif-cols-t), minmax(0, 1fr)) !important; }
	}
	@container eif (max-width: 480px) {
		.eif-grid { grid-template-columns: repeat(var(--eif-cols-m), minmax(0, 1fr)) !important; }
	}
}
@supports not (container-type: inline-size) {
	@media (max-width: 800px) {
		.eif-feed .eif-grid { grid-template-columns: repeat(var(--eif-cols-t), minmax(0, 1fr)); }
	}
	@media (max-width: 480px) {
		.eif-feed .eif-grid { grid-template-columns: repeat(var(--eif-cols-m), minmax(0, 1fr)); }
	}
}

.eif-feed .eif-item { position: relative; margin: 0; padding: 0; min-width: 0; }
.eif-feed .eif-item.eif-hidden { display: none; }
.eif-feed .eif-item.eif-appear { animation: eif-fade .35s ease both; }
@keyframes eif-fade { from { opacity: 0; } to { opacity: 1; } }

.eif-feed .eif-link {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f1f1f1;
	border: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
	line-height: 0;
	outline-offset: 2px;
}
@supports not (aspect-ratio: 1 / 1) {
	.eif-feed .eif-link { height: 0; padding-bottom: 100%; }
}
.eif-feed .eif-link img {
	position: absolute;
	inset: 0;
	top: 0; left: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	object-fit: cover;
	display: block;
	transition: filter .25s ease, transform .35s ease;
}
.eif-feed .eif-noimg,
.eif-feed .eif-item.eif-broken .eif-link::after {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #b5b5b5;
}
.eif-feed .eif-noimg svg { width: 32px; height: 32px; }
.eif-feed .eif-item.eif-broken img { visibility: hidden; }

/* Symbole für Videos und Alben */
.eif-feed .eif-icon {
	display: none;
	position: absolute;
	top: 8px;
	right: 8px;
	color: #fff;
	line-height: 0;
	filter: drop-shadow(0 0 3px rgba(0, 0, 0, .55));
	pointer-events: none;
	z-index: 2;
}
.eif-feed.eif-show-icons .eif-icon { display: block; }

/* Hover-Effekte */
.eif-feed.eif-hover-darken .eif-link:hover img,
.eif-feed.eif-hover-darken .eif-link:focus-visible img { filter: brightness(.75); }

.eif-feed .eif-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	background: rgba(0, 0, 0, .62);
	color: #fff;
	opacity: 0;
	transition: opacity .25s ease;
	z-index: 3;
	line-height: 1.4;
	font-size: 13px;
	text-align: center;
}
.eif-feed .eif-overlay-text {
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}
.eif-feed.eif-hover-caption .eif-link:hover .eif-overlay,
.eif-feed.eif-hover-caption .eif-link:focus-visible .eif-overlay { opacity: 1; }
@media (hover: none) {
	.eif-feed .eif-overlay { display: none; }
}

/* Buttons */
.eif-feed .eif-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	text-align: center;
}
.eif-feed .eif-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 0;
	margin: 0;
	padding: 7px 14px;
	border: 0 !important;
	border-radius: 4px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: box-shadow .2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.eif-feed .eif-btn:hover,
.eif-feed .eif-btn:focus-visible { box-shadow: inset 0 0 20px 20px rgba(255, 255, 255, .25); }
.eif-feed .eif-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.eif-feed .eif-load,
.eif-feed .eif-load:hover,
.eif-feed .eif-load:focus { background: var(--eif-load-bg) !important; color: var(--eif-load-fg) !important; }
.eif-feed .eif-follow,
.eif-feed .eif-follow:hover,
.eif-feed .eif-follow:focus,
.eif-feed .eif-follow:visited { background: var(--eif-follow-bg) !important; color: var(--eif-follow-fg) !important; }
.eif-feed .eif-follow .eif-cam { width: 15px; height: 15px; flex: 0 0 auto; }

/* Hinweis für Administrator:innen, wenn noch nichts angezeigt werden kann */
.eif-admin-hint {
	padding: 12px 16px;
	border: 1px dashed #c3c4c7;
	border-left: 4px solid #d63638;
	background: #fff;
	color: #1d2327;
	font-size: 14px;
	line-height: 1.5;
}
.eif-admin-hint small { opacity: .7; }
