/* ==========================================================================
   Tour virtual Matterport en modal (assets/js/tour-virtual.js)
   El disclaimer vive dentro de .tv-modal__stage, que es lo que se pone en
   pantalla completa, por eso sigue visible en fullscreen.
   ========================================================================== */

html.tv-modal-open {
	overflow: hidden;
}

.tv-modal {
	--tv-red: var(--red-galilea, #e13029);
	--tv-ink: #242323;
	width: min(1280px, calc(100vw - 48px));
	max-width: none;
	height: min(820px, calc(100dvh - 48px));
	max-height: none;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var(--tv-ink);
	color: #fff;
	overflow: hidden;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
	font-family: Lato, Arial, sans-serif;
}

.tv-modal::backdrop {
	background: rgba(15, 14, 14, .82);
}

.tv-modal__box {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.tv-modal__bar {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	padding: 8px 8px 8px 20px;
}

.tv-modal__title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tv-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.tv-modal__btn:hover {
	background: rgba(255, 255, 255, .12);
}

.tv-modal__btn:focus-visible {
	outline: 3px solid var(--tv-red);
	outline-offset: 2px;
}

.tv-modal__btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tv-modal__stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	background: #000;
}

.tv-modal__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* En la misma fila que los controles de Matterport, en el hueco entre ambas botoneras:
   la izquierda llega a ~250px (con los botones de destacados/reproducir) y la derecha
   ocupa ~90px; la fila está centrada a ~40px del borde inferior.
   left/right delimitan ese hueco; width: fit-content + margin auto ajustan el recuadro
   al texto y lo centran dentro del hueco. pointer-events: none para no bloquear el tour. */
.tv-modal__disclaimer {
	position: absolute;
	left: 268px;
	right: 110px;
	bottom: 24px;
	width: fit-content;
	margin: 0 auto;
	padding: 6px 14px;
	border-radius: 6px;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
	pointer-events: none;
	user-select: none;
}

.tv-modal__stage:fullscreen .tv-modal__disclaimer {
	font-size: 15px;
}

@media screen and (max-width: 768px) {
	.tv-modal {
		width: 100vw;
		height: 100dvh;
		border-radius: 0;
	}

	.tv-modal__bar {
		padding-left: 16px;
	}

	.tv-modal__fs-label {
		display: none;
	}

	/* En teléfono los controles ocupan todo el ancho inferior: el recuadro usa todo el ancho
	   disponible y considera la barra de inicio del iPhone. */
	.tv-modal__disclaimer,
	.tv-modal__stage:fullscreen .tv-modal__disclaimer {
		bottom: calc(64px + env(safe-area-inset-bottom, 0px));
		left: 12px;
		right: 12px;
		width: auto;
		padding: 8px 12px;
		background: rgba(0, 0, 0, .6);
		font-size: 13px;
	}
}
