/* ==========================================================================
   360 Property Tour — front-end styles
   Tweak the CSS variables below to match your site's branding.
   ========================================================================== */

.tst-tour-wrap {
	--tst-accent: #c9a35d;      /* accent color, e.g. gold for a "premium" feel */
	--tst-dark: #0d0f12;        /* overlay / scrim color */
	--tst-radius: 18px;         /* corner rounding */
	--tst-height: 550px;

	width: 100%;
	max-width: 100%;
}

.tst-tour-viewer {
	position: relative;
	width: 100%;
	height: var(--tst-height);
	border-radius: var(--tst-radius);
	overflow: hidden;
	background: #111;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* --- Poster / preview state (shown before the user clicks play) --- */

.tst-poster {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	transition: transform 0.6s ease;
}

.tst-tour-viewer:hover .tst-poster {
	transform: scale(1.03);
}

.tst-poster-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 14px;
	background: linear-gradient(
		to top,
		rgba(13, 15, 18, 0.75) 0%,
		rgba(13, 15, 18, 0.15) 45%,
		rgba(13, 15, 18, 0.45) 100%
	);
	padding: 24px;
}

.tst-poster-title {
	color: #fff;
	font-size: clamp(20px, 3vw, 30px);
	font-weight: 600;
	letter-spacing: 0.3px;
}

.tst-poster-caption {
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

.tst-play-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 6px;
	padding: 14px 28px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(6px);
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.4px;
	cursor: pointer;
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.tst-play-btn:hover {
	background: var(--tst-accent);
	border-color: var(--tst-accent);
	transform: translateY(-2px);
}

.tst-play-icon {
	display: inline-flex;
	font-size: 12px;
}

/* Pulsing ring behind the play button, purely decorative */
.tst-poster::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.6);
	transform: translate(-50%, -50%);
	animation: tst-pulse 2.4s ease-out infinite;
	pointer-events: none;
}

@keyframes tst-pulse {
	0% {
		transform: translate(-50%, -50%) scale(0.6);
		opacity: 0.8;
	}
	100% {
		transform: translate(-50%, -50%) scale(2.2);
		opacity: 0;
	}
}

/* --- Active viewer state (Photo Sphere Viewer injects its own canvas) --- */

.tst-tour-viewer.tst-active .tst-poster {
	display: none;
}

.tst-tour-viewer .psv-container {
	border-radius: var(--tst-radius);
}

/* --- Loading spinner shown briefly while the panorama loads --- */

.tst-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tst-dark);
	z-index: 5;
}

.tst-loading::after {
	content: '';
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: var(--tst-accent);
	animation: tst-spin 0.9s linear infinite;
}

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

/* --- Responsive tweaks --- */

@media (max-width: 782px) {
	.tst-tour-viewer {
		height: min(var(--tst-height), 70vh);
		border-radius: 12px;
	}

	.tst-play-btn {
		padding: 12px 22px;
		font-size: 14px;
	}
}
