/* Mountain Mantra Virtual Tour - front end
 *
 * The tour skin already owns all four corners of the viewer: logo top left,
 * menu top right, navigation bar along the bottom, VR button bottom right.
 * Nothing here is allowed to sit on top of the iframe once the tour is
 * running, so the optional fullscreen control lives in a bar underneath it.
 */

.mmvt-wrap {
	--mmvt-height: 80vh;
	--mmvt-height-mobile: 65vh;
	--mmvt-radius: 0px;
	--mmvt-accent: #a76221;
	--mmvt-accent-dark: #7d3b1b;

	position: relative;
	width: 100%;
	margin: 0;
}

.mmvt-frame {
	position: relative;
	width: 100%;
	height: var(--mmvt-height);
	min-height: 320px;
	background: #f3ede6;
	border-radius: var(--mmvt-radius);
	overflow: hidden;
	isolation: isolate;
}

.mmvt-iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #ffffff;
}

/* Poster shown until the visitor starts the tour. */

.mmvt-poster {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: #241a12;
	cursor: pointer;
	overflow: hidden;
	-webkit-appearance: none;
	appearance: none;
}

/* A class selector beats the browser default for [hidden], so say it here. */
.mmvt-poster[hidden] {
	display: none;
}

.mmvt-poster img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.75;
	transition: transform 0.6s ease, opacity 0.4s ease;
}

.mmvt-poster:hover img,
.mmvt-poster:focus-visible img {
	transform: scale(1.03);
	opacity: 0.9;
}

.mmvt-poster-inner {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	pointer-events: none;
	text-align: center;
	padding: 20px;
}

.mmvt-play {
	position: relative;
	display: block;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: var(--mmvt-accent);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	transition: transform 0.25s ease, background-color 0.25s ease;
}

.mmvt-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	width: 0;
	height: 0;
	transform: translate(-50%, -50%);
	border-left: 22px solid #ffffff;
	border-top: 13px solid transparent;
	border-bottom: 13px solid transparent;
}

.mmvt-poster:hover .mmvt-play,
.mmvt-poster:focus-visible .mmvt-play {
	transform: scale(1.08);
	background: var(--mmvt-accent-dark);
}

.mmvt-label {
	display: block;
	max-width: 24ch;
	color: #ffffff;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* Loading state, shown between the click and the tour's own preloader. */

.mmvt-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 46px;
	height: 46px;
	margin: -23px 0 0 -23px;
	border: 3px solid rgba(167, 98, 33, 0.25);
	border-top-color: var(--mmvt-accent);
	border-radius: 50%;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.mmvt-wrap.is-loading .mmvt-spinner {
	opacity: 1;
	visibility: visible;
	animation: mmvt-spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.mmvt-wrap.is-loading .mmvt-spinner {
		animation-duration: 2.4s;
	}

	.mmvt-poster img,
	.mmvt-play {
		transition: none;
	}
}

/* Optional fullscreen control. Sits below the viewer, never over it, because
   the tour's own menu already has a fullscreen button of its own. */

.mmvt-bar {
	display: flex;
	justify-content: flex-end;
	padding-top: 10px;
}

.mmvt-fullscreen {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 9px 15px;
	border: 1px solid rgba(0, 0, 0, 0.16);
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.mmvt-fullscreen:hover,
.mmvt-fullscreen:focus-visible {
	background: var(--mmvt-accent);
	border-color: var(--mmvt-accent);
	color: #ffffff;
}

.mmvt-fullscreen-icon {
	position: relative;
	display: block;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-radius: 2px;
	flex: 0 0 auto;
}

.mmvt-fullscreen-icon::before,
.mmvt-fullscreen-icon::after {
	content: "";
	position: absolute;
	width: 5px;
	height: 5px;
	background: currentColor;
}

.mmvt-fullscreen-icon::before {
	top: -2px;
	left: -2px;
}

.mmvt-fullscreen-icon::after {
	right: -2px;
	bottom: -2px;
}

/* Fullscreen layout. The wrapper itself becomes the fullscreen element so the
   theme's sticky header can never sit over the tour. The bar is hidden there;
   Escape exits, which is what browsers prompt for anyway. */

.mmvt-wrap:fullscreen,
.mmvt-wrap:-webkit-full-screen {
	width: 100vw;
	height: 100vh;
	background: #000000;
}

.mmvt-wrap:fullscreen .mmvt-frame,
.mmvt-wrap:-webkit-full-screen .mmvt-frame {
	height: 100%;
	min-height: 0;
	border-radius: 0;
}

.mmvt-wrap:fullscreen .mmvt-bar,
.mmvt-wrap:-webkit-full-screen .mmvt-bar {
	display: none;
}

@media (max-width: 767px) {
	.mmvt-frame {
		height: var(--mmvt-height-mobile);
	}

	.mmvt-play {
		width: 64px;
		height: 64px;
	}

	.mmvt-play::after {
		border-left-width: 18px;
		border-top-width: 11px;
		border-bottom-width: 11px;
	}

	.mmvt-label {
		font-size: 15px;
	}
}
