/**
 * Social Video Embed Manager - Frontend styles
 */

.svem-embed {
	position: relative;
	width: var(--svem-container-width, auto);
	height: var(--svem-container-height, auto);
	max-width: 100%;
	margin: 1.5em 0;
	background-color: var(--svem-container-bg, transparent);
	overflow: hidden;
}

.svem-embed--instagram {
	overflow: visible;
}

.svem-embed--facebook {
	overflow: visible;
}

.svem-facebook-embed,
.svem-facebook-embed .fb-video,
.svem-facebook-embed .fb-post {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

.svem-embed iframe,
.svem-embed .svem-snapchat-embed,
.svem-embed .svem-facebook-embed > iframe {
	display: block;
	width: var(--svem-iframe-width, 100%) !important;
	height: var(--svem-iframe-height, 100%) !important;
	max-width: 100%;
	margin: 0 auto;
}

.svem-embed--responsive {
	position: relative;
	width: 100%;
	/* padding-bottom:125.25%; */
	height: 0; 
	overflow: hidden;
}

.svem-embed--responsive .svem-iframe,
.svem-embed--responsive iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}

.svem-embed--twitter.svem-embed--responsive
 {
    height: 0;
    overflow: hidden;
    /* padding-bottom: 120.25% !important; */
}
.svem-embed--instagram.svem-embed--responsive
 {
    height: 0;
    overflow: hidden;
    /* padding-bottom: 152% !important; */
}
.svem-embed--snapchat.svem-embed--responsive {
	height: 0;
	overflow: hidden;
}

.svem-embed--instagram.svem-embed--responsive:has(.svem-iframe--instagram-reel) {
	padding-bottom: 155.78%;
}

.svem-embed--instagram.svem-embed--responsive:has(.svem-iframe--instagram-tv) {
	padding-bottom: 56.25%;
}

.svem-embed--instagram.svem-embed--responsive:has(.svem-iframe--instagram-post) {
	padding-bottom: 100%;
}

.svem-iframe {
	display: block;
	max-width: 100%;
	margin: 0 auto;
	border: 0;
}

.svem-instagram-embed,
.svem-twitter-embed {
	margin: 0 auto !important;
}

.svem-snapchat-embed {
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fffc00;
	border-radius: 8px;
	overflow: hidden;
}

.svem-snapchat-embed a {
	color: #000;
	text-decoration: none;
	font-weight: 600;
	padding: 1rem;
}

.svem-block-wrapper {
	margin: 1.5em 0;
}

.svem-block-wrapper.alignwide {
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-left: auto;
	margin-right: auto;
}

.svem-block-wrapper.alignfull {
	max-width: none;
	width: 100%;
}

.svem-block-wrapper.aligncenter {
	text-align: center;
}

.svem-block-wrapper.aligncenter .svem-embed {
	margin-left: auto;
	margin-right: auto;
}

@media (max-width: 768px) {
	.svem-embed {
		width: var(--svem-container-width-mobile, 100%) !important;
		max-width: 100%;
		height: var(--svem-container-height-mobile, var(--svem-container-height, auto));
		margin: 1em 0;
		background-color: var(--svem-container-bg-mobile, var(--svem-container-bg, transparent));
	}

	.svem-embed iframe,
	.svem-embed .svem-snapchat-embed,
	.svem-embed .svem-facebook-embed > iframe {
		width: var(--svem-iframe-width-mobile, 100%) !important;
		max-width: 100%;
		height: var(--svem-iframe-height-mobile, var(--svem-iframe-height, 100%)) !important;
	}

	.svem-embed--instagram {
		height: 600px !important;
		overflow: visible;
	}

	.svem-embed--instagram iframe {
		width: var(--svem-iframe-width-mobile, 100%) !important;
		height: 600px !important;
		min-height: 600px;
	}

	.svem-embed--youtube {
		width: 100% !important;
		height: auto !important;
		aspect-ratio: 16 / 9;
		overflow: hidden;
	}

	.svem-embed--youtube iframe {
		width: 100% !important;
		height: 100% !important;
		min-height: 0;
	}

	.svem-embed--twitter,
	.svem-embed--threads,
	.svem-embed--facebook {
		width: 100% !important;
		height: auto !important;
		overflow: visible;
	}

	.svem-embed--twitter iframe,
	.svem-embed--threads iframe,
	.svem-embed--facebook iframe,
	.svem-embed--facebook .svem-facebook-embed > span iframe {
		width: 100% !important;
		height: var(--svem-iframe-height-mobile, 600px) !important;
		min-height: var(--svem-iframe-height-mobile, 600px);
	}

	.svem-embed--facebook .svem-facebook-embed .fb-video,
	.svem-embed--facebook .svem-facebook-embed .fb-post {
		min-height: var(--svem-iframe-height-mobile, 600px);
	}

	.svem-embed--responsive {
		padding-bottom: 56.25%;
	}
}
