/**
 * visore.css — il 360 a schermo pieno e l'invito che lo apre.
 */

/* ── L'invito sopra la copertina ─────────────────────── */

.pt-invito360 {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: linear-gradient(to bottom, rgba(28, 28, 24, 0) 40%, rgba(28, 28, 24, .35));
	border: none;
	cursor: pointer;
	color: #fff;
	font-family: inherit;
	width: 100%;
	transition: background .25s;
	padding: 0;
}

.pt-invito360:hover {
	background: linear-gradient(to bottom, rgba(28, 28, 24, .1) 30%, rgba(28, 28, 24, .5));
}

.pt-invito360__cerchio {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	backdrop-filter: blur(6px);
	border: 1.5px solid rgba(255, 255, 255, .7);
	transition: transform .25s, background .25s;
}

.pt-invito360:hover .pt-invito360__cerchio {
	transform: scale(1.08);
	background: rgba(255, 255, 255, .26);
}

.pt-invito360__testo {
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: .02em;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.pt-invito360:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -6px;
}

/* Il cerchio pulsa piano, quanto basta a farsi notare. */
.pt-invito360__cerchio::after {
	content: '';
	position: absolute;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, .5);
	animation: pt-invito-pulsa 3s ease-out infinite;
	pointer-events: none;
}

@keyframes pt-invito-pulsa {
	0%   { transform: scale(1);   opacity: .7; }
	70%  { transform: scale(1.5); opacity: 0; }
	100% { opacity: 0; }
}

/* Versione piccola, per le anteprime */
.pt-invito360--piccolo .pt-invito360__cerchio {
	width: 38px;
	height: 38px;
	border-width: 1.2px;
}

.pt-invito360--piccolo .pt-invito360__cerchio svg {
	width: 17px;
	height: 17px;
}

.pt-invito360--piccolo .pt-invito360__cerchio::after {
	width: 38px;
	height: 38px;
}

.pt-invito360--piccolo .pt-invito360__testo {
	display: none;
}

/* ── Il visore a schermo pieno ───────────────────────── */

.pt-visore {
	position: fixed;
	inset: 0;
	z-index: 99000;
	display: none;
}

.pt-visore.aperto {
	display: block;
}

body.pt-visore-aperto {
	overflow: hidden;
}

.pt-visore__fondo {
	position: absolute;
	inset: 0;
	background: rgba(12, 12, 10, .94);
}

.pt-visore__corpo {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pt-visore__tela {
	width: 100%;
	height: 100%;
}

.pt-visore__tela .pnlm-container {
	background: transparent !important;
}

.pt-visore__stato {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	color: rgba(255, 255, 255, .82);
	font-size: 14px;
	text-align: center;
	padding: 28px;
	pointer-events: none;
}

.pt-visore__stato[hidden] {
	display: none;
}

.pt-visore__stato p {
	margin: 0;
}

.pt-visore__stato.errore {
	color: #f3b0a0;
}

.pt-visore__aiuto {
	color: rgba(255, 255, 255, .5);
	font-size: 12.5px;
	max-width: 320px;
}

.pt-visore__rotella {
	width: 30px;
	height: 30px;
	border: 2.5px solid rgba(255, 255, 255, .18);
	border-top-color: rgba(255, 255, 255, .8);
	border-radius: 50%;
	animation: pt-visore-gira .8s linear infinite;
}

@keyframes pt-visore-gira {
	to { transform: rotate(360deg); }
}

.pt-visore__titolo {
	position: absolute;
	top: 22px;
	left: 24px;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
	max-width: calc(100% - 100px);
	pointer-events: none;
}

.pt-visore__chiudi {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .25);
	background: rgba(255, 255, 255, .12);
	backdrop-filter: blur(8px);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .18s;
}

.pt-visore__chiudi:hover {
	background: rgba(255, 255, 255, .24);
}

.pt-visore__chiudi:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.pt-visore__suggerimento {
	position: absolute;
	bottom: 34px;
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	background: rgba(28, 28, 24, .76);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 20px;
	border-radius: 22px;
	opacity: 0;
	transition: opacity .3s, transform .3s;
	pointer-events: none;
}

.pt-visore__suggerimento.visibile {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ── Schermi stretti ─────────────────────────────────── */

@media (max-width: 640px) {

	.pt-invito360__cerchio {
		width: 52px;
		height: 52px;
	}

	.pt-invito360__cerchio::after {
		width: 52px;
		height: 52px;
	}

	.pt-invito360__testo {
		font-size: 12.5px;
	}

	.pt-visore__titolo {
		top: 16px;
		left: 16px;
		font-size: 13.5px;
		max-width: calc(100% - 80px);
	}

	.pt-visore__chiudi {
		top: 12px;
		right: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pt-invito360__cerchio::after { animation: none; }
	.pt-visore__suggerimento { transition-duration: .01ms; }
}

/* ── Riquadro video ──────────────────────────────────── */

.pt-visore--video .pt-visore__tela {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 20px 20px;
}

.pt-visore__cornice {
	width: min(1180px, 100%);
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 16px 60px rgba(0, 0, 0, .55);
}

.pt-visore__cornice iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

@media (max-width: 640px) {
	.pt-visore--video .pt-visore__tela { padding: 62px 12px 12px; }
}
