/**
 * VID Testimonial - front-end styles
 * Author: Tarak Vora (https://www.tarakvora.in)
 */

.vidt-wrap {
	--vidt-accent: #1d4ed8;
	--vidt-pulse: rgba(255, 255, 255, 0.55);
	display: flex;
	justify-content: center;
	width: 100%;
}

.vidt-wrap *,
.vidt-modal * {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ *
 * Card
 * ------------------------------------------------------------------ */
.vidt-card {
	position: relative;
	width: 100%;
	max-width: 360px;
	border-radius: 22px;
	overflow: hidden;
	background: #0b1020;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
	isolation: isolate;
}

.vidt-card--lift:hover {
	transform: translateY(-6px);
}

.vidt-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}

.vidt-media > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vidt-card--lift:hover .vidt-media > img {
	transform: scale(1.04);
}

.vidt-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 15, 35, 0) 40%, rgba(10, 15, 35, 0.72) 100%);
	pointer-events: none;
	z-index: 1;
}

/* Corner badge */
.vidt-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 3;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #0b1020;
	background: #ffffff;
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

/* ------------------------------------------------------------------ *
 * Play trigger + button
 * ------------------------------------------------------------------ */
.vidt-trigger {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.vidt-trigger:focus {
	outline: none;
}

.vidt-play {
	position: relative;
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--vidt-accent);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease, color 0.3s ease;
}

.vidt-play svg {
	width: 26px;
	height: 26px;
	transform: translateX(2px);
}

.vidt-play i {
	font-size: 26px;
	line-height: 1;
	transform: translateX(2px);
}

.vidt-trigger:hover .vidt-play,
.vidt-trigger:focus-visible .vidt-play {
	transform: scale(1.08);
}

.vidt-trigger:focus-visible {
	outline: 3px solid var(--vidt-accent);
	outline-offset: 4px;
	border-radius: 22px;
}

.vidt-play--pulse::before,
.vidt-play--pulse::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 0 var(--vidt-pulse);
	animation: vidt-pulse 2.6s cubic-bezier(0.25, 0.6, 0.3, 1) infinite;
	pointer-events: none;
}

.vidt-play--pulse::after {
	animation-delay: 1.3s;
}

@keyframes vidt-pulse {
	0% {
		box-shadow: 0 0 0 0 var(--vidt-pulse);
		opacity: 0.9;
	}
	70% {
		box-shadow: 0 0 0 28px rgba(255, 255, 255, 0);
		opacity: 0;
	}
	100% {
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
		opacity: 0;
	}
}

/* ------------------------------------------------------------------ *
 * Caption
 * ------------------------------------------------------------------ */
.vidt-caption {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.vidt-caption--overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 20px;
	pointer-events: none;
}

.vidt-caption--below {
	padding: 16px 18px 18px;
	background: #0b1020;
}

.vidt-name {
	color: #ffffff;
	font-weight: 700;
	font-size: 17px;
	line-height: 1.25;
}

.vidt-role {
	color: rgba(255, 255, 255, 0.82);
	font-size: 13px;
	line-height: 1.35;
}

.vidt-stars {
	display: inline-flex;
	gap: 2px;
	color: #f5b301;
	font-size: 14px;
	letter-spacing: 1px;
}

.vidt-star {
	opacity: 0.28;
}

.vidt-star.is-on {
	opacity: 1;
}

/* ------------------------------------------------------------------ *
 * Modal / popup
 * ------------------------------------------------------------------ */
.vidt-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	transition: opacity 0.28s ease;
}

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

.vidt-modal.vidt-open {
	opacity: 1;
}

.vidt-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 12, 28, 0.82);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	cursor: pointer;
}

.vidt-modal-box {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 94vh;
	display: flex;
	flex-direction: column;
	background: #0b1020;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
	transform: translateY(0) scale(1);
	transition: transform 0.32s cubic-bezier(0.2, 0.85, 0.25, 1), opacity 0.32s ease;
}

.vidt-modal--landscape .vidt-modal-box {
	max-width: min(900px, 94vw);
}

.vidt-modal--portrait .vidt-modal-box {
	width: auto;
	max-width: 94vw;
}

/* Entrance animations */
.vidt-anim-zoom .vidt-modal-box {
	opacity: 0;
	transform: scale(0.9);
}

.vidt-anim-fade .vidt-modal-box {
	opacity: 0;
	transform: none;
}

.vidt-anim-slide .vidt-modal-box {
	opacity: 0;
	transform: translateY(40px);
}

.vidt-modal.vidt-open .vidt-modal-box {
	opacity: 1;
	transform: none;
}

.vidt-modal-head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px;
	flex: 0 0 auto;
}

.vidt-modal-heads {
	flex: 1;
	min-width: 0;
}

.vidt-modal-title {
	margin: 0;
	color: #ffffff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	word-wrap: break-word;
}

.vidt-modal-sub {
	margin: 4px 0 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
	line-height: 1.4;
}

.vidt-modal-close {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.12);
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.vidt-modal-close svg {
	width: 16px;
	height: 16px;
}

.vidt-modal-close:hover,
.vidt-modal-close:focus-visible {
	background: #ffffff;
	color: #0b1020;
	transform: rotate(90deg);
	outline: none;
}

.vidt-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 12px 14px;
}

.vidt-video {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	background: #000000;
	border-radius: 12px;
	overflow: hidden;
}

.vidt-modal--portrait .vidt-video {
	height: min(72vh, 720px);
	width: auto;
	aspect-ratio: 9 / 16;
	max-width: 100%;
}

.vidt-modal--landscape .vidt-video {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.vidt-video iframe,
.vidt-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}

.vidt-video-skeleton {
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, #10162b 8%, #1b2440 18%, #10162b 33%);
	background-size: 220% 100%;
	animation: vidt-shimmer 1.4s linear infinite;
}

@keyframes vidt-shimmer {
	to {
		background-position-x: -220%;
	}
}

.vidt-empty {
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	text-align: center;
	padding: 24px;
	margin: 0;
}

/* Scroll lock */
html.vidt-lock,
html.vidt-lock body {
	overflow: hidden !important;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 480px) {
	.vidt-modal {
		padding: 14px;
	}

	.vidt-modal--portrait .vidt-video {
		height: min(68vh, 620px);
	}

	.vidt-modal-title {
		font-size: 16px;
	}
}

/* ------------------------------------------------------------------ *
 * Reduced motion
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.vidt-card,
	.vidt-media > img,
	.vidt-play,
	.vidt-modal,
	.vidt-modal-box,
	.vidt-modal-close {
		transition: none !important;
	}

	.vidt-play--pulse::before,
	.vidt-play--pulse::after,
	.vidt-video-skeleton {
		animation: none !important;
	}
}
