/**
 * Hispaniola FineArt – styles for the components that replaced the old
 * jQuery plugins, plus small fixes for current browsers / WordPress.
 */

:root {
	--bg-track: #0c0c0c;
	--bg-thumb: #eaeaea;
	--bg-tip-bg: #0c0c0c;
	--bg-tip-color: #c0c0c0;
	--bg-lb-bg: #000;
	--bg-lb-color: #c0c0c0;
}
.skin-light {
	--bg-track: #2e2e2e;
	--bg-thumb: #eaeaea;
	--bg-tip-bg: #fff;
	--bg-tip-color: #4f4f4f;
	--bg-lb-bg: #fcfcfc;
	--bg-lb-color: #4b4b4b;
}

/* Accessibility helpers */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 100000;
	padding: 10px;
	background: var(--bg-tip-bg);
	color: var(--bg-tip-color);
}

/* Native scrolling instead of jScrollPane (same colours as before) */
.scroll-pane {
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var(--bg-thumb) var(--bg-track);
	overscroll-behavior: contain;
}
.scroll-pane::-webkit-scrollbar { width: 6px; }
.scroll-pane::-webkit-scrollbar-track { background: var(--bg-track); }
.scroll-pane::-webkit-scrollbar-thumb { background: var(--bg-thumb); }
.page_block,
.page-footer {
	position: relative;
}

/* Tooltip (replaces qTip) */
.bg-tooltip {
	position: fixed;
	z-index: 100001;
	min-width: 100px;
	padding: 6px;
	text-align: center;
	pointer-events: none;
	background: var(--bg-tip-bg);
	color: var(--bg-tip-color);
	line-height: 1.4;
	opacity: 0;
	transition: opacity .1s;
}
.bg-tooltip.is-visible { opacity: 1; }
.bg-tooltip::before {
	content: '';
	position: absolute;
	top: -10px;
	left: 0;
	border-style: solid;
	border-width: 10px 15px 0 0;
	border-color: transparent var(--bg-tip-bg) transparent transparent;
	transform: scaleX(-1);
}

/* Slider (replaces carouFredSel) */
#gallery {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	width: max-content;
}
#gallery img {
	float: none;
	flex: 0 0 auto;
	max-width: none;
}
#slider div.caroufredsel_wrapper {
	width: max-content;
	position: relative;
}
#thumbnails_cont {
	position: relative;
}
#thumbnails {
	display: flex;
	flex-wrap: nowrap;
	width: max-content !important;
	will-change: transform;
}
#thumbnails a {
	float: none;
	flex: 0 0 auto;
}
#thumbnails a img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Background video */
#bg-videos {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: 1;
}
#bg-videos .bg-video {
	position: absolute;
	top: 0;
	left: 0;
	border: 0;
	background: var(--bg-page-color, #000);
	transition: opacity .8s;
}
#bg-videos #player_overlay,
#bg-videos #player_overlay2 {
	z-index: 2;
}
#bg-audio { display: none; }

/* Hide the cursor after inactivity on fullscreen pages */
body.bg-idle,
body.bg-idle * { cursor: none !important; }

/* Lightbox (replaces Fancybox) */
.bg-lightbox .goverlay { background: rgba(0, 0, 0, .92); }
.bg-lightbox-light .goverlay { background: rgba(252, 252, 252, .95); }
.bg-lightbox .gslide-description {
	background: var(--bg-lb-bg) !important;
	color: var(--bg-lb-color);
}
.bg-lightbox .gdesc-inner { padding: 10px 14px; }
.bg-lightbox .bg-lb-title {
	font-size: 12px;
	line-height: 18px;
	color: var(--bg-lb-color);
}
.bg-lightbox .gallery-share {
	margin-top: 6px;
	display: flex;
	gap: 4px;
}
.bg-lightbox .gslide-image img { box-shadow: none; }
.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev { background-color: rgba(0, 0, 0, .55); }
.glightbox-clean .gclose:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover { background-color: rgba(0, 0, 0, .85); }

/* Description popup (replaces SimpleModal) */
#simplemodal-overlay { background-color: #000; }
#simplemodal-container {
	box-sizing: content-box;
	margin: 0;
	height: auto;
	width: 434px;
	max-width: calc(100vw - 108px);
	padding: 25px 34px;
}
#simplemodal-container .simplemodal-data { padding: 6px; }
#simplemodal-container .simplemodal-data p { padding: 0; }
#simplemodal-container a.modalCloseImg {
	display: block;
	width: 41px;
	height: 41px;
	z-index: 3200;
	position: absolute;
	top: -20px;
	right: -20px;
	cursor: pointer;
	background-position: 0 0;
	transition: background-position .4s ease;
}
#simplemodal-container a.modalCloseImg:hover { background-position: 0 -41px; }
#simplemodal-overlay { cursor: pointer; }

/* Contact form */
button.butt {
	border: 0;
	font: inherit;
	font-size: 11px;
	color: inherit;
	background-repeat: no-repeat;
	background-position: right center;
}
button.butt:disabled { opacity: .5; cursor: wait; }
.bg-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
input[type=search],
input[type=email],
input[type=url],
input[type=number] {
	-webkit-appearance: none;
	appearance: none;
}

/* Responsive images in content (block editor) */
.entry img,
.wp-block-image img {
	max-width: 100%;
	height: auto;
}
.entry .wp-block-gallery,
.entry .wp-block-image,
.entry figure {
	margin: 0 0 20px 0;
}
.entry .wp-block-embed iframe { max-width: 100%; }
.entry .wp-block-gallery a[href] { cursor: zoom-in; }

/* Filter: active entry */
#portfolio-filter a.current { text-decoration: underline !important; }

/* Search form field (was type="text") */
#searchform input[type=search] { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0s !important;
		animation-duration: 0s !important;
	}
}
