/*
 * ZKM arhiva - lightbox controls (Easy FancyBox 1.5.7 / FancyBox 1.3.7).
 * The original close button was a thin white cross on a white veil and the arrows only appeared
 * on mouse hover (never on touch). This gives a clear close button above the image and
 * always-visible previous/next arrows beside it. Geometry of the lightbox itself is untouched.
 */
#fancybox-wrap #fancybox-close,
#fancybox-wrap #fancybox-left-ico,
#fancybox-wrap #fancybox-right-ico {
	position: absolute !important;
	width: 44px !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 50%;
	background-color: #111 !important;
	background-repeat: no-repeat !important;
	background-position: center center !important;
	background-size: 18px 18px !important;
	box-shadow: 0 0 0 2px #fff, 0 2px 10px rgba(0, 0, 0, 0.35);
	opacity: 0.92;
	filter: none !important;
	cursor: pointer;
	z-index: 11110 !important;
	-webkit-tap-highlight-color: transparent;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}

/* X above the image, aligned with its right edge */
#fancybox-wrap #fancybox-close {
	top: -54px !important;
	right: 0 !important;
	left: auto !important;
	bottom: auto !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 3l12 12M15 3L3 15' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

/* arrows beside the image, vertically centred, visible without hover */
#fancybox-wrap #fancybox-left-ico,
#fancybox-wrap #fancybox-right-ico {
	top: 50% !important;
	margin-top: -22px !important;
	display: block !important;
}

#fancybox-wrap #fancybox-left-ico {
	left: -54px !important;
	right: auto !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M11.5 3L5.5 9l6 6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

#fancybox-wrap #fancybox-right-ico {
	right: -54px !important;
	left: auto !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M6.5 3l6 6-6 6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

#fancybox-wrap #fancybox-close:hover,
#fancybox-wrap #fancybox-left:hover #fancybox-left-ico,
#fancybox-wrap #fancybox-right:hover #fancybox-right-ico,
#fancybox-wrap #fancybox-close:focus,
#fancybox-wrap #fancybox-left:focus #fancybox-left-ico,
#fancybox-wrap #fancybox-right:focus #fancybox-right-ico {
	opacity: 1;
	background-color: #000 !important;
}

#fancybox-wrap #fancybox-close:focus-visible,
#fancybox-wrap #fancybox-left:focus-visible #fancybox-left-ico,
#fancybox-wrap #fancybox-right:focus-visible #fancybox-right-ico {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

/* the hover-only link areas must not clip the arrows that now sit outside the image */
#fancybox-wrap #fancybox-left,
#fancybox-wrap #fancybox-right {
	overflow: visible !important;
	visibility: visible !important;
}

@media (prefers-reduced-motion: reduce) {
	#fancybox-wrap #fancybox-close,
	#fancybox-wrap #fancybox-left-ico,
	#fancybox-wrap #fancybox-right-ico {
		transition: none;
	}
}
