.ft-video-popup-block {
	margin: 24px 0;
}

.ft-video-popup-button {
	background-color: var(--wp--preset--color--primary-500);
	color: var(--wp--preset--color--white);
	text-decoration: none;
	padding: 16px 24px;
	font-size: 15px;
	font-weight: 700;
	line-height: 28px;
	letter-spacing: 0.03px;
	border: none;
  border-radius: 4px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}

.ft-video-popup-button:hover,
.ft-video-popup-button:focus-visible {
	background-color: var(--wp--preset--color--primary-600);
	color: var(--wp--preset--color--white);
	outline: none;
}

.ft-video-popup-poster-trigger {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	overflow: hidden;
	border-radius: 18px;
}

.ft-video-popup-poster-trigger img {
	display: block;
	width: 100%;
	height: auto;
}

.ft-video-popup-poster-trigger::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.28);
	transition: background 0.2s ease;
}

.ft-video-popup-poster-trigger:hover::after {
	background: rgba(0, 0, 0, 0.38);
}

.ft-video-popup-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary-500);
	font-size: 32px;
	line-height: 1;
	transform: translate(-50%, -50%);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.ft-video-popup-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ft-video-popup-modal.is-open {
	display: flex;
}

.ft-video-popup-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
}

.ft-video-popup-dialog {
	position: relative;
	z-index: 2;
	width: min(1000px, 100%);
	background: #000;
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.ft-video-popup-close {
	position: absolute;
	top: -48px;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.ft-video-popup-close:hover,
.ft-video-popup-close:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	outline: none;
}

.ft-video-popup-frame-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 18px;
	background: #000;
}

.ft-video-popup-frame-wrap iframe,
.ft-video-popup-frame-wrap video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

body.ft-video-popup-open {
	overflow: hidden;
}

.ft-video-popup-editor-url {
	margin-top: 12px;
	font-size: 13px;
	opacity: 0.75;
	word-break: break-all;
}

@media (max-width: 767px) {
	.ft-video-popup-button {
		padding: 12px 16px;
		font-size: 14px;
		font-weight: 600;
		line-height: 20px;
	}

	.ft-video-popup-modal {
		padding: 16px;
	}

	.ft-video-popup-close {
		top: -44px;
	}

	.ft-video-popup-play {
		width: 60px;
		height: 60px;
		font-size: 24px;
	}
}

/* ======================
 * Editor Styles
 ===================== */
.editor-styles-wrapper .ft-video-popup-block {
	margin: 24px 0;
}

.editor-styles-wrapper .ft-video-popup-block .wp-block-buttons {
	margin: 0;
}

.editor-styles-wrapper .ft-video-popup-block .wp-block-button {
	margin: 0;
}

.editor-styles-wrapper .ft-video-popup-button,
.editor-styles-wrapper .ft-video-popup-block .wp-block-button__link,
.editor-styles-wrapper .ft-video-popup-block .wp-element-button {
	background-color: var(--wp--preset--color--primary-500);
	color: var(--wp--preset--color--white);
	text-decoration: none;
	padding: 16px 24px;
	font-size: 15px;
	font-weight: 700;
	line-height: 28px;
	letter-spacing: 0.03px;
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.editor-styles-wrapper .ft-video-popup-button:hover,
.editor-styles-wrapper .ft-video-popup-block .wp-block-button__link:hover,
.editor-styles-wrapper .ft-video-popup-block .wp-element-button:hover {
	background-color: var(--wp--preset--color--primary-600);
	color: var(--wp--preset--color--white);
}

.editor-styles-wrapper .ft-video-popup-poster {
	position: relative;
	display: block;
	width: 100%;
	max-width: 900px;
	overflow: hidden;
	border-radius: 18px;
}

.editor-styles-wrapper .ft-video-popup-poster img {
	display: block;
	width: 100%;
	height: auto;
}

.editor-styles-wrapper .ft-video-popup-poster::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.28);
}

.editor-styles-wrapper .ft-video-popup-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary-500);
	font-size: 32px;
	line-height: 1;
	transform: translate(-50%, -50%);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.editor-styles-wrapper .ft-video-popup-editor-url {
	margin-top: 12px;
	font-size: 13px;
	opacity: 0.75;
	word-break: break-all;
}

@media (max-width: 767px) {
	.editor-styles-wrapper .ft-video-popup-button,
	.editor-styles-wrapper .ft-video-popup-block .wp-block-button__link,
	.editor-styles-wrapper .ft-video-popup-block .wp-element-button {
		padding: 12px 16px;
		font-size: 14px;
		font-weight: 600;
		line-height: 20px;
	}
}