/* Meu Feed do Instagram
 * Herda fonte e cores do tema. Para personalizar, sobrescreva as variáveis:
 * .mfi-feed { --mfi-radius: 0; --mfi-accent: #000; }
 */

.mfi-feed {
	--mfi-radius: 6px;
	--mfi-accent: currentColor;
	--mfi-overlay: rgba(0, 0, 0, 0.62);
	margin: 1.5em 0;
}

.mfi-feed .mfi-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Cabeçalho */
.mfi-feed .mfi-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.mfi-feed .mfi-profile {
	display: flex;
	align-items: center;
	gap: 12px;
	color: inherit;
	text-decoration: none;
}

.mfi-feed .mfi-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}

.mfi-feed .mfi-profile-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.mfi-feed .mfi-username {
	font-weight: 600;
}

.mfi-feed .mfi-name {
	font-size: 0.875em;
	opacity: 0.7;
}

.mfi-feed .mfi-follow {
	display: inline-block;
	padding: 0.5em 1.1em;
	border: 1.5px solid var(--mfi-accent);
	border-radius: 999px;
	color: inherit;
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

.mfi-feed .mfi-follow:hover {
	background-color: var(--mfi-accent);
	color: #fff;
}

/* Grade */
.mfi-feed .mfi-grid {
	display: grid;
	grid-template-columns: repeat(var(--mfi-cols, 3), minmax(0, 1fr));
	gap: var(--mfi-gap, 8px);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 600px) {
	.mfi-feed .mfi-grid {
		grid-template-columns: repeat(var(--mfi-cols-mobile, 3), minmax(0, 1fr));
	}
}

.mfi-feed .mfi-item {
	margin: 0;
	padding: 0;
}

.mfi-feed .mfi-link {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--mfi-radius);
	background: rgba(127, 127, 127, 0.15);
	color: #fff;
	text-decoration: none;
}

.mfi-feed .mfi-link img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.mfi-feed .mfi-link:focus-visible {
	outline: 2px solid var(--mfi-accent);
	outline-offset: 3px;
}

/* Ícone de vídeo / carrossel */
.mfi-feed .mfi-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 22px;
	height: 22px;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.mfi-feed .mfi-badge svg {
	width: 100%;
	height: 100%;
	fill: #fff;
}

/* Legenda */
.mfi-feed .mfi-caption {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 12px;
	background: linear-gradient(to top, var(--mfi-overlay) 0%, transparent 70%);
	font-size: 0.85em;
	line-height: 1.4;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.mfi-feed .mfi-link:hover .mfi-caption,
.mfi-feed .mfi-link:focus-visible .mfi-caption {
	opacity: 1;
}

.mfi-feed .mfi-link:hover img,
.mfi-feed .mfi-link:focus-visible img {
	transform: scale(1.04);
}

/* Em telas de toque ou colunas pequenas a legenda não cabe bem */
@media (hover: none), (max-width: 600px) {
	.mfi-feed .mfi-caption {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mfi-feed .mfi-link img,
	.mfi-feed .mfi-caption,
	.mfi-feed .mfi-follow {
		transition: none;
	}
	.mfi-feed .mfi-link:hover img,
	.mfi-feed .mfi-link:focus-visible img {
		transform: none;
	}
}

/* Aviso visível apenas para administradores */
.mfi-admin-notice {
	padding: 12px 16px;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
	color: #1d2327;
	font-size: 14px;
}
