/* ============ Card ============ */
.tms-vp .tms-vp__media,
.tms-vp .tms-vp__media:hover,
.tms-vp .tms-vp__media:focus {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: #141416;
	color: inherit;
	box-shadow: none;
	text-transform: none;
	line-height: 0;
	transform: none;
	aspect-ratio: var(--tms-vp-ratio, 16 / 9);
}
.tms-vp .tms-vp--r-9-16 { --tms-vp-ratio: 9 / 16; }
.tms-vp .tms-vp--r-4-5  { --tms-vp-ratio: 4 / 5; }
.tms-vp .tms-vp--r-1-1  { --tms-vp-ratio: 1 / 1; }

.tms-vp .tms-vp__media:focus-visible {
	outline: 3px solid #ED1E5A;
	outline-offset: 3px;
}

.tms-vp .tms-vp__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}
.tms-vp .tms-vp__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 100%);
	pointer-events: none;
}
.tms-vp .tms-vp__media:hover img { transform: scale(1.05); }

.tms-vp .tms-vp__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	width: 62px;
	height: 62px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	transform: translate(-50%, -50%);
	transition: transform .3s ease;
	box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.tms-vp .tms-vp__play svg {
	width: 42%;
	height: 42%;
	margin-left: 6%;
	fill: #ED1E5A;
}
.tms-vp .tms-vp__media:hover .tms-vp__play { transform: translate(-50%, -50%) scale(1.1); }

.tms-vp .tms-vp__title {
	margin: 14px 0 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
	transition: color .3s ease;
}

/* ============ Popup ============ */
html.tms-vpm-lock { overflow: hidden; }

.tms-vpm {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
}
.tms-vpm.is-open { opacity: 1; visibility: visible; }

.tms-vpm__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 8, 10, .9);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.tms-vpm__panel {
	position: relative;
	width: min(960px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: #121214;
	border-radius: 14px;
	box-shadow: 0 30px 80px rgba(0,0,0,.5);
	transform: translateY(18px) scale(.98);
	transition: transform .35s ease;
}
.tms-vpm.is-open .tms-vpm__panel { transform: none; }

.tms-vpm__video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}
.tms-vpm .tms-vpm__video iframe {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	border: 0 !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.tms-vpm__body {
	padding: 24px 28px 28px;
}
.tms-vpm__body::before {
	content: "";
	display: block;
	width: 36px;
	height: 3px;
	margin-bottom: 14px;
	border-radius: 2px;
	background: #ED1E5A;
}
.tms-vpm .tms-vpm__title {
	margin: 0 0 10px;
	font-size: clamp(18px, 2.2vw, 24px);
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}
.tms-vpm .tms-vpm__desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: #b9b9c2;
}

.tms-vpm .tms-vpm__close,
.tms-vpm .tms-vpm__close:hover,
.tms-vpm .tms-vpm__close:focus {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.6);
	cursor: pointer;
	box-shadow: none;
}
.tms-vpm .tms-vpm__close:hover { background: #ED1E5A; }
.tms-vpm .tms-vpm__close svg { width: 20px; height: 20px; fill: #fff; }

.tms-vpm .tms-vpm__fallback {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	padding: 12px 22px;
	border-radius: 999px;
	background: #ED1E5A;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transform: translate(-50%, -50%);
}

/* Vertical videos: video on one side, text on the other */
.tms-vpm__panel.is-portrait {
	width: auto;
	max-width: min(940px, 100%);
	display: grid;
	grid-template-columns: auto minmax(260px, 1fr);
	align-items: center;
}
.tms-vpm__panel.is-portrait.no-text { grid-template-columns: auto; }
.tms-vpm__panel.is-portrait .tms-vpm__video {
	width: auto;
	height: min(82vh, 760px);
}
.tms-vpm__panel.tms-vpm--r-9-16 .tms-vpm__video { aspect-ratio: 9 / 16; }
.tms-vpm__panel.tms-vpm--r-4-5  .tms-vpm__video { aspect-ratio: 4 / 5; }
.tms-vpm__panel.tms-vpm--r-1-1  .tms-vpm__video { aspect-ratio: 1 / 1; }
.tms-vpm__panel.is-portrait .tms-vpm__body { padding: 32px; }

@media (max-width: 767px) {
	.tms-vpm { padding: 12px; }
	.tms-vpm__panel { max-height: calc(100vh - 24px); }
	.tms-vpm__body { padding: 20px; }
	.tms-vpm__panel.is-portrait {
		display: block;
		width: 100%;
	}
	.tms-vpm__panel.is-portrait .tms-vpm__video {
		height: 62vh;
		margin: 0 auto;
	}
	.tms-vpm__panel.is-portrait .tms-vpm__body { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.tms-vp .tms-vp__media img,
	.tms-vp .tms-vp__play,
	.tms-vpm,
	.tms-vpm__panel { transition: none; }
}
