.modal-preview-media-lock {
	overflow: hidden;
}

.modal-preview-media-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.96);
	z-index: 1000001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 0;
}

.modal-preview-media-close {
	position: fixed;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: rgba(25, 25, 25, 0.82);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
	z-index: 2;
}

.modal-preview-media-close:hover,
.modal-preview-media-close:focus-visible {
	background: rgba(255, 184, 0, 0.9);
	transform: scale(1.04);
	outline: none;
}

.modal-preview-media-nav {
	position: fixed;
	left: 0;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	display: none;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	pointer-events: none;
	z-index: 2;
}

.modal-preview-media-nav-btn {
	pointer-events: auto;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(20, 20, 20, 0.78);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.modal-preview-media-nav-btn:hover,
.modal-preview-media-nav-btn:focus-visible {
	background: rgba(255, 184, 0, 0.92);
	transform: scale(1.05);
	outline: none;
}

.modal-preview-media-track {
	width: 100%;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-ms-overflow-style: none;
	scrollbar-width: none;
	scroll-snap-type: x mandatory;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0;
	padding: 0;
	scroll-behavior: smooth;
	touch-action: pan-x;
	cursor: grab;
}

.modal-preview-media-track::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

.modal-preview-media-track.is-dragging {
	cursor: grabbing;
}

.modal-preview-media-item {
	position: relative;
	width: 100vw;
	min-width: 100vw;
	height: 100%;
	min-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	scroll-snap-align: center;
	padding: 48px 0 68px;
	box-sizing: border-box;
}

.modal-preview-media-stage {
	position: relative;
	width: 100%;
	height: 100%;
	max-height: calc(100vh - 150px);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.modal-preview-media-index {
	position: absolute;
	top: 12px;
	left: 14px;
	z-index: 3;
	font-size: 0.74rem;
	color: #f3f3f3;
	background: rgba(24, 24, 24, 0.78);
	padding: 5px 9px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-preview-media-player {
	width: 100%;
	height: 100%;
	max-width: 100vw;
	max-height: 100vh;
	object-fit: contain;
	display: block;
	opacity: 0;
	transition: opacity 0.22s ease;
	background: #000000;
}

.modal-preview-media-player.is-image {
	transition: opacity 0.22s ease, transform 0.2s ease;
	transform-origin: center center;
	cursor: zoom-in;
}

.modal-preview-media-player.is-video {
	background: #000;
}

.modal-preview-media-item.is-ready .modal-preview-media-player {
	opacity: 1;
}

.modal-preview-media-item.is-ready .modal-preview-media-loader {
	opacity: 0;
	pointer-events: none;
}

.modal-preview-media-item.has-error::after {
	content: 'Media indisponible';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	color: #ffffff;
	font-size: 0.92rem;
	letter-spacing: 0.2px;
}

.modal-preview-media-loader {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.22s ease;
}

.modal-preview-media-toolbar {
	position: absolute;
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%);
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 7px;
	border-radius: 999px;
	background: rgba(12, 12, 12, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(4px);
	max-width: calc(100vw - 24px);
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	z-index: 3;
}

.modal-preview-media-toolbar::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.modal-preview-media-control-btn {
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	height: 34px;
	min-width: 34px;
	padding: 0 10px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 0.74rem;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.modal-preview-media-control-btn:hover,
.modal-preview-media-control-btn:focus-visible {
	background: rgba(255, 184, 0, 0.9);
	border-color: rgba(255, 184, 0, 0.95);
	color: #111;
	transform: translateY(-1px);
	outline: none;
}

.modal-preview-media-control-btn i {
	font-size: 0.84rem;
}

.modal-preview-media-spinner {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.22);
	border-top-color: #ffb800;
	animation: modalPreviewMediaSpin 0.85s linear infinite;
}

@keyframes modalPreviewMediaSpin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

@media (min-width: 668px) {
	.modal-preview-media-nav {
		display: flex;
	}
}

@media (max-width: 668px) {
	.modal-preview-media-overlay {
		padding: 0;
	}

	.modal-preview-media-item {
		height: 100vh;
		min-height: 100vh;
		padding: 40px 0 62px;
	}

	.modal-preview-media-stage {
		max-height: calc(100vh - 120px);
	}

	.modal-preview-media-index {
		top: 10px;
		left: 10px;
	}

	.modal-preview-media-close {
		top: 10px;
		right: 10px;
	}

	.modal-preview-media-nav {
		display: none;
	}

	.modal-preview-media-toolbar {
		left: 10px;
		right: 10px;
		transform: none;
		max-width: none;
	}
}