/*
 * NK360TOUR public viewer.
 *
 * Every rule starts with .nk360-tour so it outranks typical theme and page-builder
 * rules such as "button", ".elementor-kit-5 button" or ".entry-content img"
 * (two classes beat one class plus an element). Buttons, images and the scene
 * list are reset first, because themes style those elements globally.
 */

.nk360-tour {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
	gap: 12px;
	width: 100%;
	align-items: start;
	box-sizing: border-box;
}

.nk360-tour *,
.nk360-tour *::before,
.nk360-tour *::after {
	box-sizing: border-box;
}

/* ---- Theme-proof resets ---- */

.nk360-tour .nk360-public-scene-list,
.nk360-tour .nk360-public-scene-button,
.nk360-tour .nk360-public-marker {
	all: unset;
	box-sizing: border-box;
}

.nk360-tour img.nk360-public-floorplan-image {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 6px;
	box-shadow: none;
	opacity: 1;
	filter: none;
}

/* Pannellum's own text and controls must not inherit theme typography. */
.nk360-tour .pnlm-container {
	letter-spacing: normal;
	text-transform: none;
	line-height: normal;
	text-align: left;
}

.nk360-tour .pnlm-container span,
.nk360-tour .pnlm-container div {
	letter-spacing: inherit;
	text-transform: inherit;
}

.nk360-tour .pnlm-tooltip span {
	font-size: 13px;
	line-height: 1.4;
}

.nk360-tour .pnlm-container a,
.nk360-tour .pnlm-container a:hover,
.nk360-tour .pnlm-container a:focus {
	color: inherit;
	text-decoration: none;
	border: 0;
	box-shadow: none;
	background: none;
}

.nk360-tour .pnlm-render-container canvas {
	max-width: none;
	max-height: none;
	margin: 0;
}

.nk360-tour .pnlm-grab {
	cursor: grab !important;
}

.nk360-tour .pnlm-grabbing {
	cursor: grabbing !important;
}

/* ---- Layout ---- */

.nk360-tour .nk360-viewer {
	grid-column: 1;
	grid-row: 1 / span 2;
	width: 100%;
	height: 60vh;
	min-height: 360px;
	max-height: 640px;
	margin: 0;
	border-radius: 6px;
	overflow: hidden;
	will-change: transform;
}

.nk360-tour .nk360-public-scene-list {
	grid-column: 2;
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 240px;
	overflow-y: auto;
	margin: 0;
	padding: 0;
	background: none;
}

.nk360-tour .nk360-public-scene-button {
	display: block;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	box-shadow: none;
	color: #1d2327;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.nk360-tour .nk360-public-scene-button:hover,
.nk360-tour .nk360-public-scene-button:focus {
	border-color: #2271b1;
	background: #fff;
	color: #1d2327;
}

.nk360-tour .nk360-public-scene-button:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.nk360-tour .nk360-public-scene-button[aria-current="true"],
.nk360-tour .nk360-public-scene-button[aria-current="true"]:hover,
.nk360-tour .nk360-public-scene-button[aria-current="true"]:focus {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff;
	font-weight: 600;
}

.nk360-tour .nk360-public-floorplan {
	grid-column: 2;
	position: relative;
	min-width: 0;
	margin: 0;
}

.nk360-tour .nk360-public-marker {
	position: absolute;
	display: block;
	width: 22px;
	height: 22px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #2271b1;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
	transform: translate(-50%, -50%);
	cursor: pointer;
	appearance: none;
}

.nk360-tour .nk360-public-marker:hover,
.nk360-tour .nk360-public-marker:focus {
	background: #135e96;
	color: inherit;
}

.nk360-tour .nk360-public-marker:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.nk360-tour .nk360-public-marker.is-selected,
.nk360-tour .nk360-public-marker.is-selected:hover,
.nk360-tour .nk360-public-marker.is-selected:focus {
	background: #d63638;
	z-index: 2;
}

.nk360-tour .nk360-public-scene-description {
	grid-column: 1;
	margin: 0;
	white-space: pre-line;
	font-size: 14px;
	line-height: 1.7;
}

.nk360-tour .nk360-public-information {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
}

.nk360-tour .nk360-public-information > :first-child,
.nk360-tour .nk360-public-information .nk360-tour-info > :first-child {
	margin-top: 0;
}

.nk360-tour.nk360-no-floorplan .nk360-viewer,
.nk360-tour.nk360-no-floorplan .nk360-public-scene-list,
.nk360-tour.nk360-no-floorplan .nk360-public-scene-description {
	grid-column: 1 / -1;
}

.nk360-tour.nk360-no-floorplan .nk360-viewer {
	grid-row: auto;
}

/* Without a floor plan the scene list sits under the panorama: show it as one row of chips. */
.nk360-tour.nk360-no-floorplan .nk360-public-scene-list {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
	max-height: none;
	overflow: visible;
}

.nk360-tour.nk360-no-floorplan .nk360-public-scene-button {
	width: auto;
	padding: 7px 16px;
	border-radius: 999px;
	font-size: 14px;
	white-space: nowrap;
}

@media (max-width: 782px) {
	.nk360-tour {
		grid-template-columns: minmax(0, 1fr);
	}

	.nk360-tour .nk360-viewer,
	.nk360-tour .nk360-public-scene-list,
	.nk360-tour .nk360-public-floorplan,
	.nk360-tour .nk360-public-scene-description,
	.nk360-tour .nk360-public-information {
		grid-column: 1;
		grid-row: auto;
	}

	.nk360-tour .nk360-viewer {
		height: 48vh;
		min-height: 280px;
	}
}
