/**
 * Ashley 3D Product Viewer - front-end styles.
 *
 * @package Ashley_3D_Viewer
 */

.a3dv-wrap {
	margin: 16px 0;
}

/* Full-width, square-cornered button. */
.a3dv-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 15px 24px;
	border: none;
	border-radius: 0;
	background-color: #f68c2c;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.a3dv-btn:hover,
.a3dv-btn:focus {
	background-color: #e07a1c;
}

.a3dv-btn svg {
	flex: 0 0 auto;
}

/* Modal overlay. */
.a3dv-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background-color: rgba(20, 16, 10, 0.75);
}

.a3dv-modal.is-open {
	display: flex;
}

.a3dv-box {
	position: relative;
	width: min(900px, 96vw);
	height: min(80vh, 720px);
	max-height: 90vh;
	background-color: #f4f1ea;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.a3dv-stage,
.a3dv-stage model-viewer {
	width: 100%;
	height: 100%;
	background-color: transparent;
}

/* Close button. */
.a3dv-close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 3;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background-color: rgba(36, 31, 26, 0.85);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.a3dv-close:hover {
	background-color: #241f1a;
}

/* Loading + "not available" states. */
.a3dv-loader,
.a3dv-msg {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	z-index: 2;
	padding: 0 20px;
	text-align: center;
	color: #6f685d;
	font-size: 15px;
}

.a3dv-loader::before {
	content: "";
	display: block;
	width: 34px;
	height: 34px;
	margin: 0 auto 12px;
	border: 3px solid #d8d2c6;
	border-top-color: #f68c2c;
	border-radius: 50%;
	animation: a3dv-spin 0.8s linear infinite;
}

.a3dv-msg {
	color: #241f1a;
	font-weight: 600;
}

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

/* Full-screen popup on small screens. */
@media (max-width: 600px) {

	.a3dv-box {
		width: 100%;
		height: 100%;
		max-height: none;
		border-radius: 0;
	}

	.a3dv-btn {
		padding: 14px 18px;
		font-size: 14px;
	}
}
