/* Точки на фото. */

.ddt-ix-hs__layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.ddt-ix-hs__pin {
	position: absolute;
	left: var(--x, 50%);
	top: var(--y, 50%);
	transform: translate(-50%, -50%);
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #16191c;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
	cursor: pointer;
	pointer-events: auto;
	transition: transform .2s var(--ddt-ix-ease, ease), background-color .2s ease, color .2s ease;
}

.ddt-ix-hs__pinicon {
	display: grid;
	place-items: center;
}

.ddt-ix-hs__pin .ddt-ix__icon {
	width: 18px;
	height: 18px;
}

.ddt-ix-hs__pin.is-type-play .ddt-ix__icon,
.ddt-ix-hs__pin.is-type-media .ddt-ix__icon {
	fill: currentColor;
	stroke: none;
}

.ddt-ix-hs__pin:hover,
.ddt-ix-hs__pin:focus-visible,
.ddt-ix-hs__pin[aria-expanded="true"] {
	transform: translate(-50%, -50%) scale(1.14);
	background: var(--ddt-ix-accent);
	color: #fff;
}

.ddt-ix-hs__pin:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* Пульсуюче кільце — щоб точку помітили. */
.ddt-ix-hs.is-pin-pulse .ddt-ix-hs__pin::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid currentColor;
	opacity: 0;
	animation: ddt-ix-pulse 2.6s var(--ddt-ix-ease, ease-out) infinite;
	pointer-events: none;
}

.ddt-ix-hs.is-pin-pulse .ddt-ix-hs__pin[aria-expanded="true"]::after { animation: none; }

@keyframes ddt-ix-pulse {
	0% { transform: scale(.7); opacity: .8; }
	70% { transform: scale(1.5); opacity: 0; }
	100% { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.ddt-ix-hs.is-pin-pulse .ddt-ix-hs__pin::after { animation: none; opacity: .5; }
}

/* Панель із текстом. */
.ddt-ix-hs__panel {
	position: absolute;
	z-index: 6;
	width: max-content;
	max-width: min(300px, 76%);
	padding: 14px 16px;
	border-radius: var(--ddt-ix-radius, 10px);
	background: var(--ddt-ix-bg, #fff);
	color: var(--ddt-ix-fg, #23282d);
	box-shadow: var(--ddt-ix-shadow, 0 6px 24px rgba(0, 0, 0, .2));
	font-size: 14px;
	line-height: 1.55;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s var(--ddt-ix-ease, ease);
}

.ddt-ix-hs__panel[data-open] {
	opacity: 1;
	transform: none;
}

.ddt-ix-hs__title {
	margin: 0 0 .35em;
	font-size: 15px;
	line-height: 1.3;
	color: var(--headings-color, inherit);
}

.ddt-ix-hs__text p { margin: 0 0 .6em; }
.ddt-ix-hs__text p:last-child { margin-bottom: 0; }

.ddt-ix-hs__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: .6em;
	font-weight: 600;
	color: var(--ddt-ix-accent);
	text-decoration: none;
}

.ddt-ix-hs__link:hover { text-decoration: underline; }

.ddt-ix-hs__close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 28px;
	height: 28px;
	display: none;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	opacity: .6;
}

.ddt-ix-hs__close:hover,
.ddt-ix-hs__close:focus,
.ddt-ix-hs__close:active {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: inherit;
	opacity: 1;
}

.ddt-ix-hs__close .ddt-ix__icon { width: 15px; height: 15px; }
.ddt-ix-hs.is-touch .ddt-ix-hs__close { display: grid; }

/* Відео / друге фото. Розмір і місце рахує JS із реальних пропорцій файлу. */
.ddt-ix-hs__media,
.ddt-ix-hs__zoom {
	position: absolute;
	z-index: 5;
	left: 0;
	top: 0;
	overflow: hidden;
	border-radius: var(--ddt-ix-radius, 10px);
	box-shadow: var(--ddt-ix-shadow, 0 6px 24px rgba(0, 0, 0, .28));
	opacity: 0;
	transform: scale(.97);
	transition: opacity .3s ease, transform .3s var(--ddt-ix-ease, ease);
	pointer-events: none;
	cursor: zoom-out;
}

.ddt-ix-hs__media.is-cover,
.ddt-ix-hs__zoom.is-cover {
	border-radius: 0;
	box-shadow: none;
}

.ddt-ix-hs__media.is-on,
.ddt-ix-hs__zoom.is-on {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.ddt-ix-hs__media video,
.ddt-ix-hs__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}

.ddt-ix-hs__zoom {
	background-repeat: no-repeat;
}

/* Хрестик у кутку — щоб було видно, що це закривається. */
.ddt-ix-hs__shut {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	transition: opacity .2s ease;
}

.ddt-ix-hs__shut:hover,
.ddt-ix-hs__shut:focus,
.ddt-ix-hs__shut:active {
	background: rgba(0, 0, 0, .68);
	border: 0;
	box-shadow: none;
	color: #fff;
}

.ddt-ix-hs__shut svg { width: 14px; height: 14px; }

.ddt-ix-hs__media.is-on .ddt-ix-hs__shut,
.ddt-ix-hs__zoom.is-on .ddt-ix-hs__shut,
.ddt-ix-hs__shut:focus-visible { opacity: 1; }

/* Точка, з якої зараз іде звук. */
.ddt-ix-hs__pin.is-playing {
	background: var(--ddt-ix-accent);
	color: #fff;
}

.ddt-ix-hs__pin.is-playing::after {
	animation-duration: 1.2s;
	opacity: 1;
}

/* На дотикових екранах панель стає нижнім аркушем. */
.ddt-ix-hs.is-touch .ddt-ix-hs__panel[data-open] {
	position: fixed;
	z-index: 99999;
	left: 12px;
	right: 12px;
	bottom: 12px;
	top: auto;
	width: auto;
	max-height: 55vh;
	overflow: auto;
	padding-right: 40px;
}

/* Запасний список — тільки коли ядро не працює. */
html.ddt-ix-js .ddt-ix-hs__list { display: none; }

.ddt-ix-hs__list {
	margin: .8em 0 0;
	padding-left: 1.2em;
	font-size: .92em;
	color: var(--ddt-ix-muted);
}
