/**
 * Theme Builder Facebook Page Plugin / post embeds.
 */

.tb-facebook-embed {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

/* Elementor suite/shortcode columns use align-items:center; percentage-width
 * children collapse to 0. Stretch the shortcode shell like posts-split. */
.elementor-widget-shortcode:has(.tb-facebook-embed) {
	width: 100% !important;
	max-width: 100% !important;
	align-self: stretch !important;
}

.elementor-widget-shortcode:has(.tb-facebook-embed) .elementor-widget-container,
.elementor-widget-shortcode:has(.tb-facebook-embed) .elementor-shortcode {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.tb-facebook-embed .fb-page,
.tb-facebook-embed .fb-post,
.tb-facebook-embed .fb-video {
	width: 100%;
	max-width: 500px;
	margin: 0 auto;
}

.tb-facebook-embed--page .fb-page {
	min-height: var(--tb-fb-height, 500px);
}

.tb-facebook-embed .fb-page > span,
.tb-facebook-embed .fb-post > span,
.tb-facebook-embed .fb-video > span {
	max-width: 100% !important;
}

.tb-facebook-embed iframe {
	max-width: 100% !important;
}

.tb-facebook-embed--page iframe {
	min-height: var(--tb-fb-height, 500px) !important;
}

.tb-facebook-embed__fallback {
	margin: 0.75rem 0 0;
	text-align: center;
	font-size: 0.95rem;
}

.tb-facebook-embed.is-sdk-ready .tb-facebook-embed__fallback {
	display: none;
}

.tb-core-page__block-inner--facebook {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.tb-core-page__block-inner--facebook-split .tb-facebook-embed {
	align-items: stretch;
	width: 100%;
	margin: 0;
}

.tb-core-page__block-inner--facebook-split .tb-facebook-embed .fb-page,
.tb-core-page__block-inner--facebook-split .tb-facebook-embed .fb-post,
.tb-core-page__block-inner--facebook-split .tb-facebook-embed .fb-video {
	margin: 0;
	max-width: 100%;
}
