/* Millend Facebook Feed — card grid */

.mfb-feed {
	--mfb-cols: 3;
	--mfb-cols-tablet: 2;
	--mfb-cols-mobile: 1;
	--mfb-gap: 1rem;
	--mfb-card-bg: #ffffff;
	--mfb-card-radius: 0.75rem;
	--mfb-card-padding: 1.25rem;
	--mfb-text: inherit;
	--mfb-muted: #65676b;
	--mfb-accent: #1877f2;
	--mfb-message-size: 0.9375rem;
	--mfb-ratio: auto;

	color: var(--mfb-text);
	font-size: var(--mfb-message-size);
	line-height: 1.45;
}

.mfb-grid {
	display: grid;
	grid-template-columns: repeat(var(--mfb-cols), minmax(0, 1fr));
	grid-auto-rows: max-content;
	align-items: start;
	gap: var(--mfb-gap);
}

@media (max-width: 1024px) {
	.mfb-grid { grid-template-columns: repeat(var(--mfb-cols-tablet), minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.mfb-grid { grid-template-columns: repeat(var(--mfb-cols-mobile), minmax(0, 1fr)); }
}

.mfb-card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	background: var(--mfb-card-bg);
	border-radius: var(--mfb-card-radius);
	padding: var(--mfb-card-padding);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

/* Header row: avatar + page name + date */
.mfb-card__header {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}

.mfb-card__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.mfb-card__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mfb-card__author {
	font-weight: 600;
	color: var(--mfb-text);
	font-size: 0.9375rem;
	line-height: 1.2;
}

.mfb-card__date {
	font-size: 0.8125rem;
	color: var(--mfb-muted);
	text-decoration: none;
	line-height: 1.2;
	margin-top: 2px;
}

.mfb-card__date:hover {
	text-decoration: underline;
	color: var(--mfb-accent);
}

/* Message text */
.mfb-card__message {
	font-size: var(--mfb-message-size);
	white-space: normal;
	word-break: break-word;
}

.mfb-card__message a {
	color: var(--mfb-accent);
}

.mfb-card__more {
	background: none;
	border: none;
	padding: 0;
	margin-top: 0.25rem;
	font-size: inherit;
	color: var(--mfb-muted);
	font-weight: 500;
	cursor: pointer;
}

.mfb-card__more:hover { color: var(--mfb-accent); }

/* Media region */
.mfb-card__media {
	display: block;
	border-radius: calc(var(--mfb-card-radius) * 0.75);
	overflow: hidden;
	position: relative;
	margin: 0 calc(var(--mfb-card-padding) * -1);
	width: calc(100% + var(--mfb-card-padding) * 2);
}

.mfb-card__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--mfb-ratio);
	object-fit: cover;
}

.mfb-card__media[href]:hover img { opacity: 0.95; }

/* Album grid */
.mfb-media--album {
	display: grid;
	gap: 2px;
	aspect-ratio: 1 / 1;
}
.mfb-media--album[data-count="1"] { grid-template-columns: 1fr; }
.mfb-media--album[data-count="2"] { grid-template-columns: 1fr 1fr; }
.mfb-media--album[data-count="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.mfb-media--album[data-count="3"] .mfb-album__tile:first-child { grid-row: span 2; }
.mfb-media--album[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.mfb-album__tile {
	position: relative;
	display: block;
	overflow: hidden;
}
.mfb-album__tile img {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
}
.mfb-album__tile--more::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}
.mfb-album__overflow {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 600;
	z-index: 1;
}

/* Video */
.mfb-media--video video {
	width: 100%;
	height: auto;
	display: block;
	background: #000;
}

.mfb-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	padding-left: 4px;
}

/* Link preview */
.mfb-media--link {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: calc(var(--mfb-card-radius) * 0.5);
	overflow: hidden;
	margin: 0;
	width: 100%;
}

.mfb-link__image img {
	width: 100%;
	aspect-ratio: 1.91 / 1;
	object-fit: cover;
	display: block;
}

.mfb-link__body {
	padding: 0.75rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	background: #f0f2f5;
}

.mfb-link__domain {
	font-size: 0.75rem;
	text-transform: uppercase;
	color: var(--mfb-muted);
	letter-spacing: 0.02em;
}

.mfb-link__title {
	font-size: 1rem;
	color: var(--mfb-text);
	line-height: 1.3;
}

.mfb-link__desc {
	font-size: 0.8125rem;
	color: var(--mfb-muted);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Engagement row */
.mfb-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding-top: 0.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mfb-card__footer .mfb-card__permalink {
	align-self: auto;
	white-space: nowrap;
	margin-left: auto;
}

.mfb-card__engagement {
	display: flex;
	gap: 1rem;
	font-size: 0.8125rem;
	color: var(--mfb-muted);
}

.mfb-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
}

.mfb-stat svg {
	width: 16px;
	height: 16px;
}

.mfb-stat--reactions svg { fill: var(--mfb-accent); }
.mfb-stat--comments svg,
.mfb-stat--shares svg { color: var(--mfb-muted); }

/* Permalink — right-aligned in column layout (Theme 1 cards + lightbox card). */
.mfb-card__permalink {
	align-self: flex-end;
	font-size: 0.875rem;
	color: var(--mfb-accent);
	text-decoration: none;
	font-weight: 500;
}

.mfb-card__permalink:hover { text-decoration: underline; }

.mfb-card__permalink span {
	margin-left: 0.25em;
	transition: transform 0.15s ease;
	display: inline-block;
}

.mfb-card__permalink:hover span { transform: translateX(2px); }

/* =========================================================
   Theme 2 — Uniform-size cards + Lightbox
   Same chrome as Theme 1 but every card is the same height so the grid is tidy.
   Overflowing message / full media lives in the lightbox.
   ========================================================= */

.mfb-theme-tiles .mfb-grid {
	align-items: stretch;
	grid-auto-rows: 1fr;
}

.mfb-tile-card {
	height: 100%;
	cursor: pointer;
	gap: 0.75rem;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mfb-tile-card:hover {
	transform: var(--mfb-tile-hover, translateY(-1px));
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.mfb-tile-card:focus-visible {
	outline: 2px solid var(--mfb-accent);
	outline-offset: 2px;
}

/* Body region: message or centered image, capped at --mfb-tile-body-max so
   every card ends up the same height. Shorter content just leaves whitespace. */
.mfb-tile__body {
	flex: 1;
	min-height: 0;
	max-height: var(--mfb-tile-body-max, 10rem);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.mfb-tile__message {
	font-size: var(--mfb-message-size);
	line-height: 1.45;
	word-break: break-word;
	overflow: hidden;
}

/* When the tile footer is hidden there's no "See more" cue to explain the
   cutoff, so fade the last ~2em of the body to avoid a hard mid-glyph clip.
   Content that fits comfortably in the body gets no visible fade — the
   gradient only covers the bottom band of the flex container. */
.mfb-tile-card--no-footer .mfb-tile__body {
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2em), transparent 100%);
	        mask-image: linear-gradient(to bottom, #000 calc(100% - 2em), transparent 100%);
}

.mfb-tile__message a {
	color: var(--mfb-accent);
	pointer-events: none; /* links open the lightbox via tile click */
}

.mfb-tile__more {
	display: inline-block;
	margin-top: 0.25rem;
	color: var(--mfb-muted);
	font-size: 0.8125rem;
	font-weight: 500;
	pointer-events: none;
}

.mfb-tile__image {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.mfb-tile__image img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Combined engagement + permalink row */
.mfb-tile__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.6rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 0.8125rem;
	color: var(--mfb-muted);
	margin-top: auto;
}

.mfb-tile__stats {
	display: inline-flex;
	gap: 0.9rem;
	align-items: center;
}

.mfb-tile__footer .mfb-card__permalink {
	align-self: auto;
	white-space: nowrap;
	/* Keep pinned to the right edge even when stats are hidden (sole flex child). */
	margin-left: auto;
}

/* ---------- Lightbox ---------- */
/* Host is a plain wrapper reparented to <body>; fixed-position child floats out. */
.mfb-lightbox-host { display: contents; }
.mfb-lightbox-host[hidden] { display: none; }

/* Lightbox host carries the element's CSS vars (inline style) — apply them to
   the card that gets cloned into the lightbox. Without these rules, the
   cloned article inherits from whatever page context it landed in and the
   user's `lightbox_text` / `lightbox_message_size` settings never show. */
.mfb-lightbox .mfb-card {
	color: var(--mfb-text);
	font-size: var(--mfb-message-size);
}
.mfb-lightbox .mfb-card__author,
.mfb-lightbox .mfb-card__message {
	color: var(--mfb-text);
}

.mfb-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2147483000; /* top of the stacking pile; some page builders use 99999+ */
	background: var(--mfb-lightbox-bg, rgba(0, 0, 0, 0.82));
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.mfb-lightbox[hidden] { display: none; }

.mfb-lightbox__content {
	position: relative;
	max-width: min(640px, 100%);
	max-height: 100%;
	width: 100%;
	overflow: auto;
	background: var(--mfb-card-bg, #fff);
	border-radius: var(--mfb-card-radius, 0.75rem);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	animation: mfb-lightbox-in 0.18s ease;
	/* Let the pointer drag handler catch horizontal swipes without the browser hijacking them for native scroll. */
	touch-action: pan-y;
	cursor: grab;
}

.mfb-lightbox__content:active { cursor: grabbing; }

@keyframes mfb-lightbox-in {
	from { opacity: 0; transform: scale(0.98); }
	to   { opacity: 1; transform: scale(1); }
}

.mfb-lightbox__content .mfb-card {
	box-shadow: none;
	border-radius: 0;
	padding: var(--mfb-card-padding);
	/* Internal gaps (header ↔ media ↔ message ↔ footer) track the card padding
	   so edges and gutters share the same rhythm. */
	gap: var(--mfb-card-padding);
}

/* When the profile header is hidden AND the first visible child is media
   (image/video/album/link preview), drop the top padding so the media sits
   flush with the top edge. Text-only posts keep their padding — otherwise
   the message is slammed against the top edge with no breathing room. */
.mfb-lightbox-host--no-header .mfb-lightbox__content .mfb-card:has(> .mfb-card__media:first-child) {
	padding-top: 0;
}

/* Lightbox-only typography bump + color overrides. Tile-card sizes stay
   compact; the lightbox has room for slightly more generous text. */
.mfb-lightbox .mfb-card__author { font-size: 1.0625rem; }
.mfb-lightbox .mfb-card__date   { font-size: 0.9375rem; }

/* Footer row — "View on Facebook" + likes — share one size driven by the
   lightbox_footer_size control. Icons scale with the text (em-based). */
.mfb-lightbox .mfb-card__engagement,
.mfb-lightbox .mfb-card__permalink {
	font-size: var(--mfb-lightbox-footer-size, var(--text-xs, 0.8125rem));
}
.mfb-lightbox .mfb-stat svg {
	width: 1.2em;
	height: 1.2em;
}

.mfb-lightbox .mfb-card__permalink {
	color: var(--mfb-lightbox-permalink, var(--mfb-accent));
}
.mfb-lightbox .mfb-stat--reactions svg {
	fill: var(--mfb-lightbox-reaction, var(--mfb-accent));
}

.mfb-lightbox__content .mfb-card__media {
	margin: 0 calc(-1 * var(--mfb-card-padding));
	width: calc(100% + 2 * var(--mfb-card-padding));
	border-radius: 0;
}

/* Kill inner-media border radius inside the lightbox — the outer card keeps
   its own radius, but images, videos, album tiles, link-card images all go
   edge-to-edge with no rounding. */
.mfb-lightbox__content .mfb-card__media,
.mfb-lightbox__content .mfb-card__media img,
.mfb-lightbox__content .mfb-card__media video,
.mfb-lightbox__content .mfb-card__media iframe,
.mfb-lightbox__content .mfb-album__tile,
.mfb-lightbox__content .mfb-album__tile img,
.mfb-lightbox__content .mfb-link__image,
.mfb-lightbox__content .mfb-link__image img {
	border-radius: 0 !important;
}

/* FB videos/reels rendered as iframe (plugins/video.php). FB's player has
   fixed chrome (title/share/controls) that reads horizontally, so 16:9 gives
   the tightest frame without huge black space. Portrait reels letterbox
   inside — acceptable tradeoff vs the previous 9:16 container which left a
   massive empty area below landscape content. `max-height` caps desktop. */
.mfb-media--embed {
	aspect-ratio: 16 / 9;
	max-height: 70vh;
	background: #000;
	overflow: hidden;
}
.mfb-media--embed iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.mfb-lightbox__content .mfb-card__message {
	font-size: var(--mfb-message-size);
}

.mfb-lightbox__close,
.mfb-lightbox__nav {
	position: absolute;
	/* Sit above the card — otherwise tall posts scroll past and hide the chrome. */
	z-index: 10;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(8px);
	transition: background 0.15s ease, transform 0.15s ease;
	padding: 0;
}

.mfb-lightbox__close svg,
.mfb-lightbox__nav svg {
	display: block;
}

.mfb-lightbox__close:hover,
.mfb-lightbox__nav:hover { background: rgba(255, 255, 255, 0.30); }

.mfb-lightbox__nav:hover { transform: translateY(-50%) scale(1.05); }

.mfb-lightbox__close:focus-visible,
.mfb-lightbox__nav:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.mfb-lightbox__close {
	top: 1rem;
	right: 1rem;
	width: 48px;
	height: 48px;
}

.mfb-lightbox__close svg {
	width: 22px;
	height: 22px;
}

.mfb-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 64px;
	height: 64px;
}

.mfb-lightbox__nav svg {
	width: 34px;
	height: 34px;
}

.mfb-lightbox__nav--prev { left: 1.25rem; }
.mfb-lightbox__nav--next { right: 1.25rem; }

@media (max-width: 640px) {
	.mfb-lightbox { padding: 0; }
	.mfb-lightbox__content {
		border-radius: 0;
		max-width: 100%;
		max-height: 100%;
		height: 100%;
		/* Reserve space at the bottom for the floating nav chrome so the last
		   card row (stats + permalink) isn't hidden behind them. */
		padding-bottom: 5rem;
	}
	/* Keep the profile header pinned while the rest of the card scrolls, so
	   the user always sees "who posted what" even on a tall post. `top` is
	   set so the sticky edge sits flush with the card's inner top padding. */
	.mfb-lightbox__content .mfb-card__header {
		position: sticky;
		top: 0;
		z-index: 3;
		margin: calc(-1 * var(--mfb-card-padding)) calc(-1 * var(--mfb-card-padding)) 0;
		padding: var(--mfb-card-padding);
		background: var(--mfb-card-bg);
		border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	}
	.mfb-lightbox__nav {
		top: auto;
		bottom: 1rem;
		transform: none;
		width: 52px;
		height: 52px;
		z-index: 20;
	}
	.mfb-lightbox__close { z-index: 20; }
	.mfb-lightbox__nav:hover { transform: none; }
	.mfb-lightbox__nav svg { width: 28px; height: 28px; }
	.mfb-lightbox__nav--prev { left: 1rem; }
	.mfb-lightbox__nav--next { right: 1rem; }
}

/* Body lock while lightbox open */
.mfb-lightbox-open { overflow: hidden; }

/* Respect user motion preferences — disable hover transforms + lightbox entry animation. */
@media (prefers-reduced-motion: reduce) {
	.mfb-tile-card,
	.mfb-lightbox__close,
	.mfb-lightbox__nav,
	.mfb-card__permalink span {
		transition: none;
	}
	.mfb-tile-card:hover {
		transform: none;
	}
	.mfb-lightbox__content {
		animation: none;
	}
	.mfb-lightbox__nav:hover { transform: translateY(-50%); }
}

/* Empty state */
.mfb-empty {
	padding: 1.5rem;
	background: #fff8e1;
	border-radius: 0.5rem;
	text-align: center;
	font-size: 0.875rem;
}

/* =========================================================
   Album index + single-album grid
   ========================================================= */

.mfb-albums-feed,
.mfb-album-feed {
	--mfb-album-ratio: 4/3;
}

.mfb-album-card {
	padding: 0;
	gap: 0;
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mfb-album-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
}

.mfb-album-card:focus-visible {
	outline: 2px solid var(--mfb-accent);
	outline-offset: 2px;
}

.mfb-album-card__cover {
	position: relative;
	aspect-ratio: var(--mfb-album-ratio);
	background: #0a0a0a;
	overflow: hidden;
}

.mfb-album-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.mfb-album-card:hover .mfb-album-card__cover img {
	transform: scale(1.03);
}

.mfb-album-card__cover-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.25);
	font-size: 3rem;
}

.mfb-album-card__count-badge {
	position: absolute;
	bottom: 0.5rem;
	right: 0.5rem;
	padding: 0.25rem 0.6rem;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 999px;
	backdrop-filter: blur(6px);
}

.mfb-album-card__body {
	padding: 0.85rem var(--mfb-card-padding);
	display: flex;
	flex-direction: column;
	gap: var(--space-s, 0.5rem);
}

.mfb-album-card__footer {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.mfb-album-card__title {
	margin: 0 !important;
	font-size: var(--mfb-album-title-size, 1rem) !important;
	font-weight: 600;
	line-height: 1.3;
	color: var(--mfb-text);
	word-break: break-word;
}

.mfb-album-card__meta {
	font-size: 0.8125rem;
	color: var(--mfb-muted);
}

.mfb-album-card__permalink {
	padding: 0;
}

/* Single-album embedded grid — pure photo thumbs, click opens gallery */
.mfb-album-feed__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.mfb-album-feed__title {
	margin: 0 !important;
	font-size: 1.25rem !important;
	font-weight: 600;
}

.mfb-album-grid {
	grid-auto-rows: 1fr;
	align-items: stretch;
}

.mfb-album-photo {
	padding: 0;
	margin: 0;
	border: 0;
	background: #0a0a0a;
	border-radius: calc(var(--mfb-card-radius) * 0.5);
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 1 / 1;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	position: relative;
}

.mfb-album-photo:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mfb-album-photo:focus-visible {
	outline: 2px solid var(--mfb-accent);
	outline-offset: 2px;
}

.mfb-album-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* =========================================================
   Gallery lightbox — photos only (reuses existing overlay chrome)
   ========================================================= */

.mfb-gallery .mfb-gallery__stage {
	position: relative;
	max-width: min(1200px, 100%);
	max-height: 100%;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 4rem;
	gap: 1rem;
}

.mfb-gallery {
	background: var(--mfb-lightbox-bg, rgba(0, 0, 0, 0.92));
	color: var(--mfb-lightbox-text, #fff);
}

.mfb-gallery__figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
	max-height: 100%;
	min-height: 0;
}

.mfb-gallery__image {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 8rem);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 0.5rem;
	background: #000;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	animation: mfb-lightbox-in 0.18s ease;
	touch-action: pan-y;
	cursor: grab;
	user-select: none;
	-webkit-user-drag: none;
}

.mfb-gallery__image:active { cursor: grabbing; }

.mfb-gallery__caption {
	color: inherit;
	font-size: 0.875rem;
	line-height: 1.4;
	text-align: center;
	max-width: 56ch;
	opacity: 0.92;
}

.mfb-gallery__caption:empty {
	display: none;
}

.mfb-gallery__counter {
	position: absolute;
	top: 1rem;
	left: 50%;
	transform: translateX(-50%);
	color: inherit;
	font-size: 0.8125rem;
	opacity: 0.75;
	letter-spacing: 0.02em;
}

.mfb-gallery__image.is-loading {
	opacity: 0.5;
	filter: blur(2px);
}

.mfb-gallery__image.is-error {
	opacity: 0.3;
}

@media (max-width: 640px) {
	.mfb-gallery .mfb-gallery__stage {
		padding: 0 1rem;
	}
	.mfb-gallery__image {
		max-height: calc(100vh - 10rem);
	}
	.mfb-gallery__counter { top: 0.6rem; }
}

/* Reduce motion: drop album hover transforms and gallery animation. */
@media (prefers-reduced-motion: reduce) {
	.mfb-album-card,
	.mfb-album-photo,
	.mfb-album-card__cover img {
		transition: none;
	}
	.mfb-album-card:hover,
	.mfb-album-photo:hover,
	.mfb-album-card:hover .mfb-album-card__cover img {
		transform: none;
	}
	.mfb-gallery__image { animation: none; }
}
