.gallery_image{
	cursor: pointer; 
}

.velisoft-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border: 5px solid transparent;
	border-top-color: rgba(0, 0, 0, 0.9);
}

#fullscreen_container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 9999;
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

#fullscreen_content {
	position: relative;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: transform 0s ease-out;
	will-change: transform;
}

#carousel_wrapper {
	overflow: hidden;
	width: 100%;
	max-width: 1600px;
	margin: 0 auto;
	position: relative;
	display: flex;
	align-items: center;
	flex-grow: 1;
	min-height: 0;
	cursor: grab;
	padding: 0 20px;
	box-sizing: border-box;
}

#carousel_wrapper.dragging,
#fullscreen_container.dragging #carousel_wrapper {
	cursor: grabbing !important;
}

#carousel_wrapper.no-select {
	cursor: grabbing;
}

#carousel_slider {
	display: flex;
	transition: transform 0.4s ease;
	will-change: transform;
	align-items: center;
	width: 100%;
	height: auto;
	min-width: 0;
	flex-wrap: nowrap;
}

#carousel_slider img {
	flex-shrink: 0;
	border-radius: 8px;
	user-select: none;
	display: block;
	object-fit: contain;
	max-height: 80vh;
	margin: 0 10px;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-o-user-select: none;
	width: auto;
	height: auto;
}

#carousel_slider .carousel_image {
	flex-grow: 0;
	flex-shrink: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	height: auto;
	box-sizing: border-box;
	flex-basis: 100%;
	transition: all 0.8s ease;
	max-width: 80%;
}

#carousel_slider .carousel_image.prev_clone,
#carousel_slider .carousel_image.next_clone {
	opacity: 0.7;
	filter: brightness(0.7);
}

#carousel_slider .carousel_image.current_active {
	opacity: 1;
	filter: brightness(1);
}

.nav_button {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	font-size: 2.5rem;
	color: white;
	background: transparent;
	border: none;
	cursor: pointer;
	user-select: none;
	z-index: 10;
	transition: color 0.3s;
}

#full-buttons_container {
	position: absolute;
	top: 20px;
	right: 20px;
	display: flex;
	align-items: center;
	gap: 25px;
	z-index: 10001;
}

#fullerscreen_button,
#play_button,
#closing_button,
#zoom_button {
	background: rgba(0, 0, 0, 0.4);
	border: none;
	border-radius: 50%;
	width: 45px;
	height: 45px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.2s ease;
	color: white;
	padding: 0;
}

#fullerscreen_button:hover,
#play_button:hover,
#closing_button:hover,
#zoom_button:hover {
	background: rgba(0, 0, 0, 0.7);
	transform: scale(1.05);
}

#fullerscreen_button svg,
#play_button svg,
#closing_button svg,
#zoom_button svg {
	display: block;
	width: 60%;
	height: 60%;
}

#fullerscreen_button svg path,
#play_button svg polygon,
#closing_button svg path,
#closing_button svg line {
	fill: currentColor;
	stroke: currentColor;
}

@media screen and (max-width: 768px) {
	#full-buttons_container {
		top: 10px;
		right: 10px;
		gap: 10px;
	}

	#fullerscreen_button,
	#play_button,
	#closing_button {
		width: 38px;
		height: 38px;
	}

	#fullerscreen_button svg,
	#play_button svg,
	#closing_button svg {
		width: 60%;
		height: 60%;
	}
}

#prev_button {
	left: 30px;
	display: block;
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	padding-right: 6px;
}

#next_button {
	right: 30px;
	display: block;
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	padding-left: 3px;
}

#next_button:hover,
#prev_button:hover {
	background-color: rgba(0, 0, 0, 0.7);
}

.nav_button:hover {
	color: #ddd;
}

#fullscreen_title {
	margin-top: 15px;
	font-size: 1.1rem;
	min-height: 1.4rem;
}

#single_image_area {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100vh;
	max-width: 1600px;
	box-sizing: border-box;
}

#single_fullscreen_image {
	width: 100%;
	height: 90vh;
	object-fit: contain;
	border-radius: 8px;
	display: block;
	margin: 0 auto;
	padding-top: 70px;
}

#single_fullscreen_title {
	margin-top: 15px;
	font-size: 1.1rem;
	min-height: 1.4rem;
	color: white;
	text-align: center;
}

#carousel_area {
	display: none;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

#autoplay_progress_bar_container {
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	width: 200px;
	height: 4px;
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 2px;
	overflow: hidden;
	z-index: 1000;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

#autoplay_progress_bar_container.active {
	opacity: 1;
}

#autoplay_progress_bar {
	height: 100%;
	width: 0%;
	background-color: #fff;
	border-radius: 2px;
	transform-origin: left;
}

#play_button .play-icon {
	display: block;
}
#play_button .pause-icon {
	display: none;
}
#play_button.active .play-icon {
	display: none;
}
#play_button.active .pause-icon {
	display: block;
}

#zoom_button .zoom-in-icon {
	display: block;
}
#zoom_button .zoom-out-icon {
	display: none;
}
#zoom_button.active .zoom-in-icon {
	display: none;
}
#zoom_button.active .zoom-out-icon {
	display: block;
}

.zoomed {
	will-change: transform;
	touch-action: none; 
	cursor: grab;
}

.carousel_image, #single_fullscreen_image {
	cursor: zoom-in;
	transition: transform 0.2s ease-out;
	transform-origin: center center;
}

.carousel_image.zoomed, #single_fullscreen_image.zoomed {
	cursor: grab;
}

.nav_button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
#thumbnail_container.disabled {
	pointer-events: none;
	opacity: 0.5;
}
#play_button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

#imageCounter {
	position: absolute;
	top: 10px;
	left: 10px;
	background-color: rgba(0, 0, 0, 0.5);
	color: white;
	padding: 5px 10px;
	border-radius: 5px;
	font-family: Arial, sans-serif;
	font-size: 16px;
	z-index: 1002;
	display: flex;
	align-items: center;
	gap: 5px;
}

@media screen and (max-width: 768px) {
	#fullscreen_content {
		max-width: 100vw;
		max-height: 100vh;
		padding: 10px;
	}

	#carousel_wrapper {
		max-width: 100%;
		height: auto;
		overflow: visible;
		margin: 0;
		cursor: grab;
		padding: 0 10px;
	}

	#carousel_slider {
		width: 100%;
		justify-content: flex-start;
	}

	#carousel_slider img {
		margin: 0 5px;
		min-height: unset;
		min-width: unset;
		max-width: 80vw; /* Allow space for side images */
	}

	#carousel_slider .carousel_image {
		margin: 0 2px;
		min-width: 80vw; /* Show 80% width so sides are visible */
		max-width: 80vw;
		flex-shrink: 0;
	}

	#carousel_slider .carousel_image.prev_clone,
	#carousel_slider .carousel_image.next_clone {
		transform: scale(0.9);
		filter: brightness(0.6);
		opacity: 0.7;
	}

	#carousel_slider .carousel_image.current_active {
		transform: scale(1);
		filter: brightness(1);
		opacity: 1;
	}
	
	#next_button, #prev_button, .nav_button{
		display: none !important;
	}
}

#thumbnail_container {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 15px;
	padding: 0 10px;
	max-width: 1000px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	position: relative;
	z-index: 5;
}

#thumbnail_container::-webkit-scrollbar {
	display: none;
}

.thumbnail_image {
	width: 40px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	margin: 0 5px;
	cursor: pointer;
	border: 2px solid transparent;
	transition: transform 0.3s ease, margin 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
	transform: scaleX(0.9);
	transform-origin: center center;
	flex-shrink: 0;
	opacity: 0.7;
}

.thumbnail_image:hover {
	opacity: 1;
	border-color: rgba(255, 255, 255, 0.5);
}

.thumbnail_image.active {
	opacity: 1;
	transform: scaleX(1.6);
	margin: 0 20px;
	z-index: 2;
}

#fullscreen_notification {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 10px 20px;
	border-radius: 5px;
	font-size: 1rem;
	z-index: 10002;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0s linear 0.3s;
	white-space: nowrap;
}

#fullscreen_notification.show {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s ease, visibility 0s linear 0s;
}

@media screen and (max-width: 768px) {
	.thumbnail_image {
		width: 50px;
		height: 50px;
		margin: 0 3px;
	}

	#thumbnail_container {
		padding: 0 5px;
	}
}

@media screen and (max-width: 480px) {
	#carousel_slider .carousel_image {
		margin: 0 2px;
		min-width: 85vw; /* Slightly larger on very small screens */
		max-width: 85vw;
	}
	#carousel_slider .carousel_image.prev_clone,
	#carousel_slider .carousel_image.next_clone {
		transform: scale(0.85);
		filter: brightness(0.5);
		opacity: 0.6;
	}
	
	#carousel_slider .carousel_image.current_active {
		transform: scale(1);
		filter: brightness(1);
		opacity: 1;
	}
}

@media screen and (max-width: 400px) {
	#carousel_wrapper {
		padding: 0 5px;
	}

	#carousel_slider img {
		max-width: 90vw;
	}
	
	#carousel_slider .carousel_image {
		min-width: 90vw;
		max-width: 90vw;
	}
}

@media screen and (max-width: 400px){
	.thumbnail_image {
		width: 25px;
		height: 40px;
		object-fit: cover;
		border-radius: 4px;
		margin: 0 5px;
		cursor: pointer;
		border: 2px solid transparent;
		transition: transform 0.3s ease, margin 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
		transform: scaleX(0.9);
		transform-origin: center center;
		flex-shrink: 0;
		opacity: 0.7;
		margin: 0;
	}

	.thumbnail_image:hover {
		opacity: 1;
		border-color: rgba(255, 255, 255, 0.5);
	}

	.thumbnail_image.active {
		opacity: 1;
		transform: scaleX(1.6);
		margin: 0 5px;
		z-index: 2;
	}

	#imageCounter {
		top: 18px;
		font-size: 80%;
	}

	#fullerscreen_button svg,
	#play_button svg,
	#closing_button svg,
	#zoom_button svg {
		display: block;
		width: 60%;
		height: 60%;
	}

	#fullerscreen_button,
	#play_button,
	#closing_button,
	#zoom_button {
		width: 25px;
		height: 25px;
	}

	#full-buttons_container {
		top: 18px;
		right: 20px;
	}
}
