/* hyp/visita-3d — protótipo linhas 215–284 (#TourVirtual), spec 17. */

/*
 * No protótipo a banda navy encosta ao mapa (#RelacaoTerritorial). Sem o mapa antes (ex.: bloco do mapa
 * removido), fica a 104px da secção anterior, a margem que o mapa teria.
 */
.hyp-v3d {
	background: var(--hyp-navy);
	margin-top: 104px;
	padding: 92px 0;
}

.hyp-mapa + .hyp-v3d {
	margin-top: 0;
}

/* Foco visível sobre fundo escuro; nos cartões brancos volta à cor normal. */
.hyp-v3d :focus-visible {
	outline-color: #ffffff;
}

.hyp-v3d .hyp-v3d__guide-card :focus-visible,
.hyp-v3d .hyp-v3d__dialog :focus-visible {
	outline-color: var(--hyp-focus);
}

/* ---------- Cabeçalho ---------- */
.hyp-v3d .hyp-v3d__head {
	max-width: 760px;
}

.hyp-v3d .hyp-sh__title {
	color: #ffffff;
}

.hyp-v3d .hyp-sh__lead {
	color: rgba(255, 255, 255, 0.78);
	margin-top: 20px;
}

/* ---------- Moldura ---------- */
.hyp-v3d .hyp-v3d__frame {
	position: relative;
	margin-top: 44px;
	border-radius: var(--hyp-r-lg);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: #012a55;
}

.hyp-v3d .hyp-v3d__bar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	flex-wrap: wrap;
}

.hyp-v3d .hyp-v3d__bar-title {
	font-size: 12px;
	line-height: normal;
	color: rgba(255, 255, 255, 0.62);
	font-weight: 400;
}

.hyp-v3d .hyp-v3d__actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.hyp-v3d .hyp-v3d__btn {
	--hyp-btn-radius: var(--hyp-r-pill);
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 7px 14px;
	font-family: inherit;
	font-size: 11.5px;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}

.hyp-v3d .hyp-v3d__btn[hidden] {
	display: none;
}

.hyp-v3d .hyp-v3d__btn .hyp-icon {
	font-size: 16px;
}

.hyp-v3d .hyp-v3d__btn--ghost {
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 400;
}

.hyp-v3d .hyp-v3d__btn--ghost:hover {
	border-color: var(--hyp-orange);
	color: #ffffff;
}

.hyp-v3d .hyp-v3d__btn--solid {
	border: 1px solid var(--hyp-orange);
	background: var(--hyp-orange);
	color: var(--hyp-on-orange);
	font-weight: 600;
}

.hyp-v3d .hyp-v3d__btn--solid:hover {
	background: var(--hyp-orange-hover);
}

/* ---------- Área da visita (16/9) ---------- */
.hyp-v3d .hyp-v3d__stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	min-height: clamp(280px, 46vw, 560px);
}

.hyp-v3d .hyp-v3d__embed {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border: 0;
}

.hyp-v3d .hyp-v3d__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	text-align: center;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.55);
}

/* ---------- Guia "Como explorar" ---------- */
.hyp-v3d .hyp-v3d__guide {
	position: absolute;
	inset: 0;
	background: rgba(0, 31, 63, 0.72);
	display: flex;
	padding: 20px;
	/* No telemóvel o palco é baixo (~240px úteis): se o cartão não couber, rola em vez de ficar cortado
	   (o botão "Começar" tem de ser sempre alcançável — a visita está inerte enquanto o guia está aberto). */
	overflow-y: auto;
	overscroll-behavior: contain;
}

.hyp-v3d .hyp-v3d__guide[hidden] {
	display: none;
}

.hyp-v3d .hyp-v3d__guide-card {
	margin: auto; /* centra quando cabe; quando não cabe, começa no topo (ao contrário de align-items: center) */
	background: #ffffff;
	border-radius: var(--hyp-r-lg);
	padding: clamp(24px, 3vw, 36px);
	width: min(440px, 100%);
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.hyp-v3d .hyp-v3d__label {
	font-size: 11px;
	line-height: normal;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hyp-orange);
	font-weight: 600;
}

.hyp-v3d .hyp-v3d__steps {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hyp-v3d .hyp-v3d__step {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 0;
}

.hyp-v3d .hyp-v3d__step-n {
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--hyp-navy);
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	line-height: normal;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hyp-v3d .hyp-v3d__step-label {
	font-size: 15.5px;
	line-height: normal;
	color: var(--hyp-navy);
	font-weight: 500;
}

.hyp-v3d .hyp-v3d__start {
	--hyp-btn-radius: var(--hyp-r-pill);
	margin: 6px 0 0;
	border: none;
	background: var(--hyp-navy);
	color: #ffffff;
	padding: 13px 28px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}

.hyp-v3d .hyp-v3d__start:hover {
	background: var(--hyp-orange);
	color: var(--hyp-on-orange);
}

/* ---------- Legenda e nota ---------- */
.hyp-v3d .hyp-v3d__legend {
	display: flex;
	gap: 26px;
	flex-wrap: wrap;
	margin: 0;
	padding: 20px clamp(18px, 2.4vw, 28px);
	list-style: none;
}

.hyp-v3d .hyp-v3d__legend-item {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 0;
	font-size: 12.5px;
	line-height: normal;
	color: rgba(255, 255, 255, 0.7);
	font-weight: 300;
}

.hyp-v3d .hyp-v3d__swatch {
	flex: none;
	width: 11px;
	height: 11px;
	border-radius: 3px;
}

.hyp-v3d .hyp-v3d__swatch--ponto {
	border-radius: 50%;
}

.hyp-v3d .hyp-v3d__nota {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
	font-weight: 300;
	line-height: 1.7;
	margin-top: 20px;
	max-width: 880px;
}

/* ---------- Janela "Sobre esta simulação" (<dialog> modal) ---------- */
.hyp-v3d .hyp-v3d__dialog {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 20px;
	border: 0;
	background: transparent;
	color: inherit;
	overflow: visible;
}

.hyp-v3d .hyp-v3d__dialog[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.hyp-v3d .hyp-v3d__dialog::backdrop {
	background: rgba(0, 31, 63, 0.6);
}

.hyp-v3d .hyp-v3d__dialog-card {
	position: relative;
	width: min(680px, 100%);
	max-height: 86vh;
	overflow-y: auto;
	background: #ffffff;
	border-radius: var(--hyp-r-lg);
	padding: clamp(26px, 4vw, 44px);
	animation: hyp-v3d-fade 0.28s ease;
}

@keyframes hyp-v3d-fade {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.hyp-v3d .hyp-v3d__dialog-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.hyp-v3d .hyp-v3d__dialog-title {
	font-size: clamp(22px, 3vw, 28px);
	line-height: normal;
	margin-top: 10px;
}

.hyp-v3d .hyp-v3d__close {
	--hyp-btn-radius: 50%;
	flex: none;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--hyp-border-card);
	background: #ffffff;
	cursor: pointer;
	font-family: inherit;
	font-size: 17px;
	line-height: normal;
	color: var(--hyp-navy);
	box-shadow: none;
}

.hyp-v3d .hyp-v3d__dialog-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 24px;
}

.hyp-v3d .hyp-v3d__dialog-body p {
	font-size: 14.5px;
	line-height: 1.8;
	color: #5a5a5a;
	font-weight: 300;
}

@media (prefers-reduced-motion: reduce) {
	.hyp-v3d .hyp-v3d__dialog-card {
		animation: none;
	}
}
