/* Verstka YouTube Modal */

/* Триггеры: по левому клику — попап, по «открыть в новой вкладке» — страница поста */
.vm-youtube-modal-trigger {
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}
.vm-youtube-modal-trigger:hover {
	color: inherit;
	text-decoration: none;
}

.post-style-youtube-pic .vm-youtube-modal-trigger {
	display: block;
	padding-top: 56.038%;
	position: relative;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center center;
	border-radius: 14px;
	overflow: hidden;
}

.post-style-youtube-pic .vm-youtube-modal-trigger .post-style-youtube-pic-inner {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center center;
	border-radius: 14px;
}

/* На главной карточка уже стилизована через .post-list-background */
.post-list-background.vm-youtube-modal-trigger {
	cursor: pointer;
}

.vm-yt-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.vm-yt-modal[hidden] {
	display: none !important;
}

.vm-yt-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.vm-yt-modal__box {
	position: relative;
	width: 100%;
	max-width: 1280px;
}

.vm-yt-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s;
}

.vm-yt-modal__close:hover {
	background: rgba(0, 0, 0, 0.8);
}

.vm-yt-modal__close::before,
.vm-yt-modal__close::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 20px;
	height: 2px;
	background: #fff;
	border-radius: 1px;
}

.vm-yt-modal__close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.vm-yt-modal__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.vm-yt-modal__video-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.vm-yt-modal__iframe {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* Нижняя панель канала — как на референсе */

.vm-yt-modal__channel-bar {
	padding: 20px 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

.vm-yt-modal__channel-bar-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 14px 20px;
	background: linear-gradient(180deg, #1B1B1B 0%, #131313 100%);
	border-radius: 12px;
	flex-wrap: wrap;
}

.vm-yt-modal__channel-badge {
	display: flex;
	align-items: center;
	gap: 14px;
}

/* Ссылка на канал (лого + название и подписчики) */
.vm-yt-modal__channel-link {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: inherit;
	flex: 1;
	min-width: 0;
}

.vm-yt-modal__channel-link:hover {
	color: inherit;
	text-decoration: none;
}

.vm-yt-modal__channel-logo {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5c518;
}

.vm-yt-modal__channel-logo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vm-yt-modal__channel-logo-placeholder {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
	letter-spacing: -0.02em;
}

.vm-yt-modal__channel-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.vm-yt-modal__channel-name {
	font-family: SteinbeckRegular, sans-serif;
	font-size: 16px;
	color: #fff;
	line-height: 1.2;
}

.vm-yt-modal__channel-name a:hover {
	color: #EDFF45 !important;
	background: none !important;
}

.vm-yt-modal__channel-subs {
	font-family: SteinbeckRegular, sans-serif;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	line-height: 1.2;
}

.vm-yt-modal__subscribe {
	font-family: SteinbeckRegular, sans-serif !important;
	font-weight: normal;
	-webkit-border-radius: 8px;
	-moz-border-radius: 8px;
	border-radius: 8px;
	background: #EDFF45;
	color: #1B1B1B;
	padding: 7px 17px 7px 17px;
	-webkit-text-stroke: 0 !important;
	text-align: center;
}

.vm-yt-modal__subscribe:hover {
	background: #f0fc69;
}

@media (max-width: 720px) {
	.vm-yt-modal {
		padding: 10px;
	}

	.vm-yt-modal__channel-bar-inner {
		flex-direction: column;
	}

	.vm-yt-modal__channel-logo {
		width: 40px;
		height: 40px;
	}

	.vm-yt-modal__channel-logo-placeholder {
		font-size: 14px;
	}

	.vm-yt-modal__channel-name {
		font-size: 14px;
	}

	.vm-yt-modal__channel-subs {
		font-size: 12px;
	}

	.vm-yt-modal__subscribe {
		padding: 8px 16px;
		font-size: 13px;
		width: 100%;
	}
}

/* Страница поста с видео: iframe и блок канала как в попапе */
.vm-single-youtube-video {
	max-width: 1280px;
	margin: 2em auto;
}
.vm-single-youtube-video .vm-yt-single-video-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 12px;
	box-shadow: none !important;
}
.vm-single-youtube-video .vm-yt-single-video-wrap .vm-yt-modal__iframe {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	border: none;
	min-height: initial !important;
}
.vm-single-youtube-video .vm-yt-single-channel-bar {
	padding-top: 20px;
}
