/**
 * Frontend 360 Viewer Styles
 */

.woocommerce-product-gallery,
.woocommerce div.product .images,
.product .images {
	position: relative !important;
	overflow: hidden !important;
	z-index: 1;
}

.wc-360-viewer-button-wrapper {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 100;
	pointer-events: none;
}

.wc-360-viewer-button-wrapper .wc-360-viewer-button {
	pointer-events: all;
}

/* Ensure button is visible on gallery wrapper */
.woocommerce-product-gallery__wrapper {
	position: relative;
}

.wc-360-viewer-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	border: 2px solid #fff;
	border-radius: 25px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.3s ease;
	backdrop-filter: blur(5px);
}

.wc-360-viewer-button:hover {
	background: rgba(0, 0, 0, 0.9);
	transform: scale(1.05);
}

.wc-360-viewer-button .wc-360-icon {
	font-size: 18px;
	font-weight: bold;
}

.wc-360-viewer-button .wc-360-text {
	display: inline-block;
}

/* 360 Viewer Wrapper */
.wc-360-viewer-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	z-index: 1;
}

/* Ensure button wrapper is visible in 360 mode */
.wc-360-viewer-wrapper ~ .wc-360-viewer-button-wrapper,
.woocommerce-product-gallery .wc-360-viewer-button-wrapper {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 100;
	pointer-events: none;
}

.woocommerce-product-gallery .wc-360-viewer-button-wrapper .wc-360-viewer-button {
	pointer-events: all;
}

/* Ensure gallery maintains its size when in 360 mode */
.woocommerce-product-gallery .wc-360-viewer-wrapper {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

/* Back button styles removed - using same button as 360 button */

.wc-360-viewer-container {
	width: 100%;
	height: 100%;
	min-height: 500px;
	position: relative;
	background: #f5f5f5;
	border-radius: 4px;
	overflow: hidden;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-direction: row;
	z-index: 1;
}

.wc-360-viewer-container img {
	max-width: 100% !important;
	max-height: 100% !important;
	height: auto !important;
	width: auto !important;
	display: block !important;
	margin: 0 !important;
	object-fit: contain !important;
	vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
	.wc-360-viewer-button-wrapper {
		top: 10px;
		right: 10px;
	}

	.wc-360-viewer-button {
		padding: 8px 12px;
		font-size: 12px;
	}

	.wc-360-viewer-button .wc-360-text {
		display: inline-block;
	}

	.wc-360-viewer-wrapper {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
		min-height: 400px;
		height: 100%;
	}

	.wc-360-viewer-container {
		height: 100% !important;
		min-height: 400px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex-direction: row !important;
	}

	.wc-360-viewer-container img {
		max-width: 100% !important;
		max-height: 100% !important;
		width: auto !important;
		height: auto !important;
		object-fit: contain !important;
		margin: auto !important;
		display: block !important;
	}
}

