@charset "UTF-8";
/**
 *	=========================================================================
 *	AW IMAGE VIEWER — стили модалки просмотра картинки
 *	=========================================================================
 *	Логика: assets/design/js/aw_image_viewer.js
 *
 *	Единственная галерея сайта: lightgallery.min.css убран из view_index_head.tpl
 *	вместе с самим плагином.
 *
 *	Файл не входит в сборку Prepros (_DESIGN/_prepros/_scss) — подключается
 *	отдельно в view_index_head.tpl, поэтому пересборка style.css его не трогает.
 */

/*	=========================================================================
	1. Подсказка на картинке: по ней можно кликнуть
	========================================================================= */

/*	Классы js-lightgallery* остались в шаблонах от убранного плагина
	(модалка «Маркировки», /qrcode, ajax-модалка «Подробнее») — по ним
	открывается этот просмотрщик, значит и курсор нужен тот же. */
.js-img_zoom,
.app_content__product-image-gallery a,
.js-lightgallery-white a,
.js-lightgallery a,
.ajax-js-lightgallery-white a {
	cursor: zoom-in;
}

.js-img_zoom {
	position: relative;
}

/*	Плашка «Нажмите, чтобы увеличить». Рисуется псевдоэлементом с z-index,
	чтобы лежать поверх .zoomImg — оверлея плагина jquery.zoom. */
.js-img_zoom::after {
	content: "Нажмите, чтобы увеличить";
	position: absolute;
	z-index: 5;
	right: 8px;
	bottom: 8px;
	max-width: calc(100% - 16px);
	padding: 6px 10px 6px 30px;
	border-radius: 4px;
	background: rgba(9, 107, 151, 0.92) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4M11 8v6M8 11h6'/%3E%3C/svg%3E") no-repeat 8px center;
	background-size: 15px 15px;
	color: #fff;
	font-size: 12px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.js-img_zoom:hover::after,
.js-img_zoom:focus-within::after {
	opacity: 1;
	transform: translateY(0);
}

/*	=========================================================================
	2. Сам просмотрщик
	========================================================================= */

.aw-iv {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	/*	Выше bootstrap-модалки (1050): просмотр вызывается в том числе
		из модалки «Подробнее» и из модалки «Маркировки». */
	z-index: 20000;
	display: none;
}

.aw-iv.isOpen {
	display: block;
}

.aw-iv__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(12, 16, 20, 0.94);
	animation: awIvFade 0.2s ease both;
}

.aw-iv__panel {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	animation: awIvIn 0.24s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/*	--- шапка --- */

.aw-iv__bar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	color: #eef2f5;
}

.aw-iv__title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 600;
	color: #eef2f5;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aw-iv__close {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	color: #eef2f5;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.aw-iv__close svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.aw-iv__close:hover,
.aw-iv__close:focus-visible {
	background: #ff9f00;
	border-color: #ff9f00;
	color: #10151a;
	outline: none;
}

/*	--- сцена с картинкой --- */

.aw-iv__stage {
	position: relative;
	flex: 1 1 auto;
	overflow: hidden;
	margin: 0 16px;
	touch-action: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.aw-iv__img {
	position: absolute;
	top: 0;
	left: 0;
	transform-origin: 0 0;
	max-width: none;
	max-height: none;
	-webkit-user-drag: none;
	user-select: none;
	will-change: transform;
}

.aw-iv.isLoading .aw-iv__img,
.aw-iv.isError .aw-iv__img {
	visibility: hidden;
}

.aw-iv.isZoomed .aw-iv__stage {
	cursor: grab;
}

.aw-iv.isZoomed.isDragging .aw-iv__stage {
	cursor: grabbing;
}

.aw-iv__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	border: 3px solid rgba(255, 255, 255, 0.18);
	border-top-color: #ff9f00;
	border-radius: 50%;
	display: none;
	animation: awIvSpin 0.8s linear infinite;
}

.aw-iv.isLoading .aw-iv__spinner {
	display: block;
}

.aw-iv__error {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	display: none;
	text-align: center;
	color: #c9d2d9;
	font-size: 15px;
}

.aw-iv.isError .aw-iv__error {
	display: block;
}

/*	--- панель управления --- */

.aw-iv__tools {
	flex: 0 0 auto;
	align-self: center;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 14px 16px 0;
	padding: 6px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
}

.aw-iv__btn {
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #eef2f5;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.aw-iv__btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
}

.aw-iv__btn:hover,
.aw-iv__btn:focus-visible {
	background: #ff9f00;
	color: #10151a;
	outline: none;
}

.aw-iv__zoom {
	min-width: 62px;
	text-align: center;
	color: #eef2f5;
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.aw-iv__hint {
	flex: 0 0 auto;
	padding: 10px 16px 14px;
	text-align: center;
	color: rgba(238, 242, 245, 0.5);
	font-size: 12px;
	line-height: 1.4;
}

/*	Пока просмотр открыт — страница под ним не прокручивается */
body.aw-iv-lock {
	overflow: hidden;
}

/*	=========================================================================
	3. Анимации и адаптив
	========================================================================= */

@keyframes awIvFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes awIvIn {
	from { opacity: 0; transform: scale(0.985); }
	to   { opacity: 1; transform: none; }
}

@keyframes awIvSpin {
	to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
	.aw-iv__bar {
		padding: 10px 12px;
		/*	Чёлка / статус-бар на телефонах */
		padding-top: calc(10px + env(safe-area-inset-top, 0px));
	}

	.aw-iv__title { font-size: 14px; }
	.aw-iv__stage { margin: 0 8px; }

	/*	Подсказку на мобильном прячем, и нижний отступ панели держать становится
		нечему — плашка управления прилипает к краю экрана. Поэтому отступ задаём
		ей самой, с запасом под жестовую полосу iOS. */
	.aw-iv__tools {
		margin: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
	}

	/*	Пальцем нужна цель покрупнее, чем курсором */
	.aw-iv__btn   { min-width: 44px; height: 44px; }
	.aw-iv__close { width: 44px; height: 44px; }
	.aw-iv__zoom  { min-width: 56px; }

	.aw-iv__hint { display: none; }

	.js-img_zoom::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.aw-iv__backdrop,
	.aw-iv__panel {
		animation: none;
	}

	.aw-iv__spinner {
		animation-duration: 2.4s;
	}

	.js-img_zoom::after {
		transition: none;
	}
}
