/**
 * Mobile-Responsive Portfolio Lightbox Styles
 */

/* Lock body scrolling when open */
body.dtr-lightbox-open {
	overflow: hidden !important;
	touch-action: none;
}

/* Lightbox overlay */
.dtr-lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(10, 12, 16, 0.94);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s cubic-bezier(0.2, 0, 0.2, 1), visibility 0.28s ease;
	user-select: none;
	-webkit-user-select: none;
}

.dtr-lightbox-overlay.dtr-lightbox-visible {
	opacity: 1;
	visibility: visible;
}

/* Container */
.dtr-lightbox-container {
	position: relative;
	max-width: 90vw;
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: scale(0.92);
	transition: transform 0.28s cubic-bezier(0.2, 0, 0.2, 1);
}

.dtr-lightbox-visible .dtr-lightbox-container {
	transform: scale(1);
}

/* Image wrapper */
.dtr-lightbox-image-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 90vw;
	max-height: 80vh;
	overflow: hidden;
	border-radius: 6px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* The Image */
.dtr-lightbox-image {
	max-width: 90vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.dtr-lightbox-image.dtr-lightbox-loading {
	opacity: 0;
}

/* Spinner */
.dtr-lightbox-spinner {
	position: absolute;
	width: 44px;
	height: 44px;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: dtr-lightbox-spin 0.8s linear infinite;
	display: none;
}

.dtr-lightbox-image-wrap.is-loading .dtr-lightbox-spinner {
	display: block;
}

@keyframes dtr-lightbox-spin {
	to { transform: rotate(360deg); }
}

/* Caption bar */
.dtr-lightbox-caption-bar {
	width: 100%;
	margin-top: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.4;
	padding: 0 4px;
}

.dtr-lightbox-title {
	font-weight: 500;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 75%;
}

.dtr-lightbox-counter {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
	margin-left: auto;
	flex-shrink: 0;
}

/* Buttons (Touch Friendly: 48px x 48px minimum) */
.dtr-lightbox-btn {
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
	outline: none;
	padding: 0;
	z-index: 1000000;
	-webkit-tap-highlight-color: transparent;
}

.dtr-lightbox-btn:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.06);
}

.dtr-lightbox-btn:active {
	transform: scale(0.96);
}

.dtr-lightbox-btn svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	pointer-events: none;
}

/* Close Button */
.dtr-lightbox-close {
	position: fixed;
	top: 20px;
	right: 20px;
}

/* Prev / Next Arrows */
.dtr-lightbox-prev,
.dtr-lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
}

.dtr-lightbox-prev:hover {
	transform: translateY(-50%) scale(1.06);
}

.dtr-lightbox-next:hover {
	transform: translateY(-50%) scale(1.06);
}

.dtr-lightbox-prev {
	left: 20px;
}

.dtr-lightbox-next {
	right: 20px;
}

/* Mobile Devices Optimization */
@media (max-width: 767px) {
	.dtr-lightbox-container {
		max-width: 96vw;
		max-height: 90vh;
	}

	.dtr-lightbox-image-wrap {
		max-width: 96vw;
		max-height: 75vh;
	}

	.dtr-lightbox-image {
		max-width: 96vw;
		max-height: 75vh;
	}

	.dtr-lightbox-close {
		top: 14px;
		right: 14px;
		width: 42px;
		height: 42px;
	}

	.dtr-lightbox-prev {
		left: 10px;
		width: 42px;
		height: 42px;
		background: rgba(0, 0, 0, 0.4);
	}

	.dtr-lightbox-next {
		right: 10px;
		width: 42px;
		height: 42px;
		background: rgba(0, 0, 0, 0.4);
	}

	.dtr-lightbox-caption-bar {
		font-size: 13px;
		margin-top: 8px;
	}
}
