/* Papatto 360 Tour フロント表示 */

/* Pannellum標準のぼやけたカーソル画像をブラウザ標準の手カーソルに置き換え */
.pnlm-grab {
	cursor: grab !important;
}

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

.pt-tour {
	display: flex;
	gap: 12px;
	width: 100%;
	align-items: flex-start;
}

/* 左：360度ビューア */
.pt-tour-pano {
	flex: 1 1 58%;
	min-width: 0;
	height: 60vh;
	min-height: 360px;
	max-height: 640px;
	border-radius: 6px;
	overflow: hidden;
}

.pt-tour.pt-no-plan .pt-tour-pano {
	flex-basis: 100%;
}

/* 右：間取り図 */
.pt-tour-plan {
	flex: 1 1 42%;
	min-width: 0;
	position: relative;
}

.pt-tour-plan img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
}

/* 視界方向コーン（現在地マーカーから視界の向きを表示） */
.pt-dir-cone {
	position: absolute;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background: conic-gradient(from -30deg, rgba(214, 54, 56, 0.38) 0deg 60deg, transparent 60deg 360deg);
	transform: translate(-50%, -50%);
	pointer-events: none;
	z-index: 1;
}

/* 間取り図上のマーカー */
.pt-tour-marker {
	position: absolute;
	width: 20px;
	height: 20px;
	padding: 0;
	border-radius: 50%;
	background: #2271b1;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
	transform: translate(-50%, -50%);
	cursor: pointer;
	transition: background 0.2s;
	appearance: none;
	-webkit-appearance: none;
	line-height: 0;
}

.pt-tour-marker:hover {
	background: #135e96;
}

.pt-tour-marker.pt-current {
	background: #d63638;
	z-index: 2;
	cursor: grab;
	touch-action: none;
}

.pt-tour-marker.pt-current:active {
	cursor: grabbing;
}

.pt-tour-marker.pt-current::after {
	content: "";
	position: absolute;
	inset: -6px;
	border: 2px solid rgba(214, 54, 56, 0.55);
	border-radius: 50%;
	animation: pt-pulse 1.6s ease-out infinite;
}

@keyframes pt-pulse {
	0% {
		transform: scale(0.7);
		opacity: 1;
	}

	100% {
		transform: scale(1.3);
		opacity: 0;
	}
}

/* シーン名ラベルは方向インジケーターと重なるため、ホバー時のみ表示 */
.pt-tour-marker span {
	display: none;
	position: absolute;
	top: -2em;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 12px;
	line-height: 1.5;
	padding: 1px 7px;
	border-radius: 3px;
	pointer-events: none;
	z-index: 3;
}

.pt-tour-marker:hover span,
.pt-tour-marker:focus span {
	display: block;
}

/* パノラマ上の導線矢印アイコン（クリックでシーン移動） */
.pt-hs-arrow {
	width: 40px;
	height: 40px;
	cursor: pointer;
	background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='rgba(20,20,20,0.55)' stroke='white' stroke-width='2'/%3E%3Cpath d='M20 9.5L29 20.5H23.5V30H16.5V20.5H11Z' fill='white'/%3E%3C/svg%3E") no-repeat center / contain;
}

.pt-hs-arrow:hover {
	filter: brightness(1.35);
}

/* 上下階への導線矢印（上矢印＝上の階へ、下矢印＝下の階へ） */
.pt-hs-arrow-up,
.pt-hs-arrow-down {
	width: 40px;
	height: 40px;
	cursor: pointer;
}

.pt-hs-arrow-up {
	background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='rgba(20,20,20,0.55)' stroke='white' stroke-width='2'/%3E%3Cpath d='M12 20L20 12L28 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 28L20 20L28 28' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.pt-hs-arrow-down {
	background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='rgba(20,20,20,0.55)' stroke='white' stroke-width='2'/%3E%3Cpath d='M12 12L20 20L28 12' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 20L20 28L28 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.pt-hs-arrow-up:hover,
.pt-hs-arrow-down:hover {
	filter: brightness(1.35);
}

/* 階タブ */
.pt-tour-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 8px;
}

.pt-tour-tab {
	padding: 6px 18px;
	border: 1px solid #ccc;
	border-radius: 6px 6px 0 0;
	background: #f0f0f1;
	color: #50575e;
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.pt-tour-tab.pt-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
	font-weight: 600;
}

.pt-tour-plan-body {
	position: relative;
}

/* 情報スポットのポップアップ */
.pt-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.pt-popup-overlay.pt-popup-open {
	display: flex;
}

.pt-popup {
	position: relative;
	background: #fff;
	color: #1d2327;
	border-radius: 8px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 20px 24px;
	box-sizing: border-box;
}

.pt-popup-close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #646970;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.pt-popup-close:hover {
	background: #f0f0f1;
	color: #1d2327;
}

.pt-popup-title {
	margin: 0 24px 12px 0;
	font-size: 18px;
	line-height: 1.4;
}

.pt-popup-image {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	margin: 0 0 12px;
}

.pt-popup-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
	white-space: pre-line;
}

/* スマホでは縦積み */
@media (max-width: 782px) {
	.pt-tour {
		flex-direction: column;
	}

	.pt-tour-pano {
		width: 100%;
		height: 48vh;
		min-height: 280px;
	}

	.pt-tour-plan {
		width: 100%;
	}
}
