/* demo — welkomst-avatar (nov 2026). Hoort bij theme/sections/ctxr-avatar.php en
 * theme/static/js/avatar-ar.js. Kleuren uit ctxr-skin.css (--ctxr-*).
 * Volgorde in één kolom: introtekst, het 3D-venster (Start AR rechtsonder), en de QR-code pas na een klik op een computer. */
.avatar-intro {
	display: flex; flex-direction: column; gap: 18px;
	padding: 32px; background: var(--ctxr-wine, #5e1e43); color: #fff;
	scroll-margin-top: 80px;
}
/* Intro op de donkerpaarse CTXR-achtergrond, tekst wit */
.avatar-intro h2, .avatar-intro .avatar-lede { color: #fff; }
.avatar-intro .home-section-kicker { color: #efdbe1; }
.avatar-text, .avatar-stage, .avatar-cta { width: 100%; max-width: 760px; margin: 0 auto; }
.avatar-text h2 { margin: 6px 0 10px; }
.avatar-lede { font-size: 1.05rem; line-height: 1.55; margin: 0; }
.avatar-lede + .avatar-lede { margin-top: 12px; }
.avatar-note { min-height: 1.2em; margin: 0; font-weight: 600; color: var(--ctxr-signal, #ffde17); }
.avatar-note:empty { display: none; }
.avatar-cta:has(> .avatar-note:empty) { display: none; }
.avatar-small { font-size: .85rem; color: var(--ctxr-rose, #8f6f84); margin: 8px 0 0; }

/* QR-code naar #ar: popup over het 3D-venster, pas na een klik op Start AR op een computer */
.avatar-qr {
	position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
	padding: 16px; border-radius: 16px; background: rgba(46,15,34,.45);
}
.avatar-qr[hidden] { display: none; }
.avatar-qr-card {
	position: relative; display: flex; align-items: center; gap: 16px; max-width: 440px; color: var(--ctxr-ink, #2e0f22);
	padding: 18px 44px 18px 18px; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(46,15,34,.3);
}
.avatar-qr-card img { flex: none; display: block; width: 160px; height: 160px; image-rendering: pixelated; }
.avatar-qr-card p { margin: 0; font-size: .95rem; line-height: 1.45; }
.avatar-qr-close {
	position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%;
	background: var(--ctxr-signal, #ffde17); color: var(--ctxr-ink, #2e0f22); font-size: 15px; cursor: pointer;
}

.avatar-view { position: relative; }
.avatar-canvas {
	display: block; width: 100%; height: 460px; cursor: pointer; touch-action: pan-y;
	border-radius: 16px; background: radial-gradient(circle at 50% 85%, #fff 0, var(--ctxr-paper, #fbf7f9) 60%);
}
.avatar-canvas:active { cursor: grabbing; }
.avatar-canvas:focus-visible { outline: 2px solid var(--ctxr-signal, #ffde17); outline-offset: 3px; }
.avatar-subs {
	position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); width: max-content; max-width: 90%; margin: 0;
	padding: 6px 12px; border-radius: 10px; background: rgba(46,15,34,.82); color: #fff;
	font-weight: 500; text-align: center; line-height: 1.4; pointer-events: none;
}
.avatar-subs:empty { display: none; }
/* Start AR rechtsonder in het 3D-venster */
.avatar-ar-start { position: absolute; right: 12px; bottom: 12px; margin: 0; }
/* Knoppen in het 3D-venster: start/pauze en opnieuw */
.avatar-controls { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; }
.avatar-controls[hidden] { display: none; }
.avatar-controls button, .avatar-ar-controls button {
	min-height: 40px; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
	background: rgba(46,15,34,.85); color: #fff; font: 600 14px/1 var(--font-body, system-ui);
}
.avatar-controls button[aria-pressed="true"], .avatar-ar-controls button[aria-pressed="true"] {
	background: var(--ctxr-signal, #ffde17); color: var(--ctxr-ink, #2e0f22);
}
.avatar-hint { margin: 8px 0 0; text-align: center; font-size: .85rem; color: var(--ctxr-rose, #8f6f84); }
.avatar-credit { width: 100%; max-width: 760px; margin: 0 auto; font-size: .72rem; line-height: 1.45; color: var(--ctxr-rose, #8f6f84); }
.avatar-credit p { margin: 0 0 4px; }
.avatar-credit a { color: inherit; }

/* Zonder model (nog niet gehost, of het laden mislukt): alleen de tekst blijft staan. */
.avatar-intro.is-empty .avatar-stage,
.avatar-intro.is-empty .avatar-cta,
.avatar-intro.is-empty .avatar-credit { display: none; }

/* De AR-sessie: schermvullend */
.avatar-ar-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 2147482000; background: #000; }
.avatar-ar-overlay { position: fixed; inset: 0; z-index: 2147482001; pointer-events: none; }
/* Het toestemmingsvenster van de 8th Wall engine (z-index 888) moet boven het AR-canvas staan. */
.prompt-box-8w { z-index: 2147482002 !important; }
.avatar-ar-bottom {
	position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%);
	width: min(92vw, 440px); display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.avatar-ar-subs {
	margin: 0; padding: 6px 12px; border-radius: 10px; background: rgba(46,15,34,.82); color: #fff;
	font: 500 16px/1.4 var(--font-body, system-ui); text-align: center;
}
.avatar-ar-subs:empty { display: none; }
.avatar-ar-controls { display: flex; gap: 10px; pointer-events: auto; }
.avatar-ar-controls[hidden] { display: none; }
.avatar-ar-controls button { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.avatar-ar-status {
	width: 100%; box-sizing: border-box; margin: 0; padding: 10px 14px; border-radius: 14px;
	background: rgba(46,15,34,.85); color: #fff; font: 500 15px/1.4 var(--font-body, system-ui); text-align: center;
}
.avatar-ar-status:empty { display: none; }
.avatar-ar-close {
	position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; pointer-events: auto;
	width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ctxr-signal, #ffde17);
	color: var(--ctxr-ink, #2e0f22); font-size: 20px; cursor: pointer;
}

@media (max-width: 800px) {
	.avatar-intro { padding: 20px 16px; }
	.avatar-canvas { height: 400px; }
}
@media (max-width: 520px) {
	.avatar-qr-card { flex-direction: column; text-align: center; padding: 18px; }
	.avatar-qr-card img { width: 140px; height: 140px; }
}
