/* Video Reviews UDrive — frontend (fleet-reviews style) */

.vru-trigger-wrap {
	display: flex;
	justify-content: center;
	padding: 12px 0;
}

.vru-video-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-width: min(100%, 460px);
	padding: 10px 28px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 12px;
	background: linear-gradient(180deg, #1a2438 0%, #0c1018 55%, #060910 100%);
	color: #ffffff;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.vru-video-btn:hover,
.vru-video-btn:focus-visible {
	background: linear-gradient(180deg, #222e48 0%, #101828 55%, #0a0e16 100%);
	border-color: rgba(255, 255, 255, 0.65);
	color: #ffffff;
	outline: none;
}

.vru-video-btn__icon {
	display: block;
	width: 24px;
	height: 24px;
	object-fit: contain;
	flex-shrink: 0;
}

/* Modal */

.vru-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
}

.vru-modal[hidden] {
	display: none !important;
}

.vru-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 8, 16, 0.82);
	backdrop-filter: blur(4px);
}

.vru-modal__panel {
	position: relative;
	z-index: 1;
	width: min(100%, 960px);
	max-height: calc(100vh - 40px);
	overflow: hidden;
	border: 1px solid rgba(140, 175, 215, 0.35);
	border-radius: 16px;
	padding: 24px 24px 20px;
	background: linear-gradient(155deg, #1c3150 0%, #121f33 38%, #0a101c 72%, #060910 100%);
	box-shadow:
		inset 0 1px 0 rgba(180, 210, 255, 0.14),
		0 24px 64px rgba(0, 0, 0, 0.65);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

.vru-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	border: 1px solid rgba(140, 175, 215, 0.35);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	color: #e8b923;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.vru-modal__close:hover,
.vru-modal__close:focus-visible {
	background: rgba(232, 185, 35, 0.12);
	border-color: rgba(232, 185, 35, 0.55);
	outline: none;
}

body.vru-modal-open {
	overflow: hidden;
}

/* Carousel block */

.vru-reviews {
	--vru-gold: #e8b923;
	--vru-text: #ffffff;
	--vru-muted: rgba(255, 255, 255, 0.72);
	--vru-border: rgba(140, 175, 215, 0.35);
	--vru-video-max-h: min(calc(100vh - 240px), 480px);
	--vru-font: "Segoe UI", system-ui, -apple-system, sans-serif;
	font-family: var(--vru-font);
	color: var(--vru-text);
	max-width: 100%;
	margin: 0 auto;
	padding: 0 4px 2px;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.vru-reviews__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 12px;
	padding-right: 40px;
	flex-shrink: 0;
}

.vru-reviews__title {
	margin: 0;
	font-size: clamp(1.25rem, 3vw, 1.875rem);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.15;
}

.vru-reviews__nav {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

.vru-arrow-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	min-width: 48px;
	min-height: 48px;
	padding: 0;
	margin: 0;
	border: 1px solid var(--vru-border);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	color: var(--vru-gold);
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.2s, border-color 0.2s;
}

.vru-arrow-btn:hover,
.vru-arrow-btn:focus-visible {
	background: rgba(232, 185, 35, 0.12);
	border-color: rgba(232, 185, 35, 0.55);
	outline: none;
}

.vru-arrow-btn__chevron {
	display: block;
	width: 8px;
	height: 8px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	box-sizing: border-box;
}

.vru-arrow-btn--prev .vru-arrow-btn__chevron {
	transform: rotate(-135deg);
	margin-left: 2px;
}

.vru-arrow-btn--next .vru-arrow-btn__chevron {
	transform: rotate(45deg);
	margin-right: 2px;
}

.vru-carousel {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.vru-carousel__viewport {
	overflow: hidden;
	width: 100%;
	container-type: inline-size;
}

.vru-carousel__track {
	display: flex;
	align-items: stretch;
	gap: 20px;
	transition: transform 0.5s ease;
	will-change: transform;
}

.vru-carousel__track.vru-carousel__track--no-transition {
	transition: none;
}

.vru-video-card {
	flex: 0 0 calc((100cqw - 20px) / 2);
	min-width: 0;
	box-sizing: border-box;
	border: 1px solid var(--vru-border);
	border-radius: 14px;
	padding: 16px 16px 18px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	background: linear-gradient(155deg, #243a5c 0%, #162338 40%, #0c121e 100%);
	box-shadow:
		inset 0 1px 0 rgba(180, 210, 255, 0.14),
		0 8px 24px rgba(0, 0, 0, 0.35);
	position: relative;
	overflow: hidden;
}

.vru-video-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(180deg, rgba(120, 160, 220, 0.08) 0%, transparent 35%);
	pointer-events: none;
}

.vru-video-card__media,
.vru-video-card__caption,
.vru-video-card__author {
	position: relative;
	z-index: 1;
	width: 100%;
}

.vru-video-card__media {
	width: 100%;
	max-height: var(--vru-video-max-h);
	border-radius: 10px;
	overflow: hidden;
	background: #000;
	aspect-ratio: 9 / 16;
	flex-shrink: 0;
}

.vru-video-card__video {
	display: block;
	width: 100%;
	height: 100%;
	max-height: var(--vru-video-max-h);
	object-fit: cover;
	background: #000;
}

.vru-video-card__caption {
	margin: 12px 0 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--vru-text);
}

.vru-video-card__author {
	margin: 8px 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--vru-muted);
}

/* Tablet */
@media (max-width: 992px) {
	.vru-reviews {
		--vru-video-max-h: min(calc(100vh - 220px), 420px);
	}

	.vru-modal__panel {
		width: min(100%, 720px);
		padding: 20px 18px 18px;
	}
}

/* Mobile: fullscreen */
@media (max-width: 640px) {
	.vru-trigger-wrap {
		padding-left: 16px;
		padding-right: 16px;
	}

	.vru-video-btn {
		width: 100%;
		min-width: 0;
		padding: 16px 28px;
	}

	.vru-modal {
		padding: 0;
		align-items: stretch;
		justify-content: stretch;
	}

	.vru-modal__panel {
		width: 100%;
		height: 100dvh;
		max-height: 100dvh;
		min-height: 100dvh;
		border-radius: 0;
		border: none;
		padding:
			max(14px, env(safe-area-inset-top, 0px))
			max(14px, env(safe-area-inset-right, 0px))
			max(16px, env(safe-area-inset-bottom, 0px))
			max(14px, env(safe-area-inset-left, 0px));
		justify-content: flex-start;
	}

	.vru-modal__close {
		top: max(10px, env(safe-area-inset-top, 0px));
		right: max(10px, env(safe-area-inset-right, 0px));
	}

	.vru-reviews {
		padding: 0;
		flex: 1 1 auto;
		--vru-video-max-h: calc(100dvh - 148px);
		justify-content: flex-start;
	}

	.vru-reviews__header {
		flex-wrap: nowrap;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin-bottom: 14px;
		padding-right: 44px;
		flex-shrink: 0;
	}

	.vru-reviews__title {
		flex: 1 1 auto;
		min-width: 0;
		font-size: clamp(1.0625rem, 4.5vw, 1.375rem);
	}

	.vru-carousel {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.vru-carousel__viewport {
		flex: 1 1 auto;
		display: flex;
		align-items: stretch;
		min-height: 0;
	}

	.vru-carousel__track {
		align-items: stretch;
		height: 100%;
	}

	.vru-video-card {
		flex: 0 0 100cqw;
		height: 100%;
		padding: 12px 12px 14px;
		border-radius: 12px;
		justify-content: flex-start;
	}

	.vru-video-card__media {
		width: 100%;
		flex: 1 1 auto;
		min-height: 0;
		max-height: var(--vru-video-max-h);
		aspect-ratio: auto;
		height: auto;
	}

	.vru-video-card__video {
		max-height: none;
		height: 100%;
		min-height: 280px;
		object-fit: cover;
	}
}
