/* margin-left/right must stay auto -- this element also carries the site's
   .container class, which centers via margin:0 auto; a plain "20px 0"
   shorthand here zeroes that out and pins the whole section to the left
   edge instead of centering it like every other homepage section. */
.cms-instagram-section { margin: 20px auto; }

/* .trendingcollection (shared site class) sets display:flex on this h3, which
   makes text-align:center a no-op -- flex lays out its content via
   justify-content, not text-align. justify-content:center is what actually
   centers it. */
.cms-instagram-title {
	text-align: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 15px;
}

/* Pre-owlCarousel-init fallback layout only, for the brief window before
   instagram-feed.js calls owlCarousel(). Once it does, owl adds its own
   .owl-loaded class -- but that rule ties with this one on specificity (one
   class each), and this stylesheet happens to load later, so without the
   !important override below this flex/wrap declaration kept winning even
   after owl took over. The result: owl's internal .owl-stage (2424px wide,
   holding all slides side by side) rendered inside a flex container instead
   of owl's expected block container, so the stage's width math broke and
   pushed the whole carousel off-screen. */
.cms-instagram-strip {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.cms-instagram-strip.owl-loaded {
	display: block !important;
}

.cms-instagram-strip.owl-carousel .owl-nav button {
	font-size: 24px !important;
}

.cms-instagram-tile {
	position: relative;
	width: 180px;
	max-width: 100%;
}

.cms-instagram-link {
	display: block;
	position: relative;
	aspect-ratio: 9 / 16;
	border-radius: 8px;
	overflow: hidden;
	background: #f2f2f2;
}

.cms-instagram-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cms-instagram-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	color: #c13584;
	background: linear-gradient(135deg, #feda75, #d62976, #4f5bd5);
}

.cms-instagram-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	pointer-events: none;
}

/* FsLightbox custom-source content: sized to the reel's own 9:16, capped so
   it never overflows the viewport (no auto-height message channel with a
   plain iframe, so a fixed box + letterbox is the deliberate tradeoff).

   display:none on the bare class hides it on the page (otherwise the
   consent-gate text renders directly under every tile, outside the
   lightbox). But FsLightbox doesn't clone this node -- it MOVES the actual
   element into its own overlay and appends its own "fslightbox-source"
   class to it, then polls the node's offsetWidth/offsetHeight in a
   setTimeout loop to detect "loaded" (see handleCustomLoad in
   fslightbox.js). display:none always reports 0x0, so leaving it
   display:none once inside the lightbox makes that poll spin forever --
   the loading spinner never clears. The .fslightbox-source override below
   is what makes the moved node visible/measurable once FsLightbox owns it. */
.cms-instagram-hidden-src {
	display: none;
	width: 400px;
	max-width: 100%;
	max-height: 90vh;
	margin: 0 auto;
	background: #000;
}

.cms-instagram-hidden-src.fslightbox-source {
	display: block;
}

.cms-instagram-iframe {
	width: 100%;
	height: 640px;
	max-height: 90vh;
	border: 0;
}

.cms-instagram-consent-gate {
	padding: 30px 20px;
	text-align: center;
	color: #fff;
	background: #111;
}

.cms-instagram-consent-btn {
	margin-top: 12px;
	padding: 10px 20px;
	border: 0;
	border-radius: 4px;
	background: #d62976;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 480px) {
	.cms-instagram-tile { width: 130px; }
}
