/*
 * CRELALA Core 0.43.0 – „An Ihrer Wand ansehen“ (includes/ArView.php): button under the gallery, QR dialog (computer),
 * start bar (phone opened from the QR code). Colours of the artwork page (crelala-modern work.css) with fallbacks.
 */

.crelala-ar {
	--ar-line: var(--cw-line-strong, rgba(255, 255, 255, 0.28));
	--ar-text: var(--cw-soft, #e2e2e2);
	--ar-muted: var(--cw-muted, #b4b4b4);
	--ar-red: var(--cm-red, #e30613);
	--ar-red-dark: var(--cm-red-dark, #c30511);
	--ar-panel: #2b2b2b;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 22px 0 4px;
	text-align: center;
}
.crelala-ar:not([data-mode]) { display: none; }   /* the button needs the script */

.crelala-ar__button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 10px 14px 10px 20px;
	border: 1px solid var(--ar-line);
	border-radius: 999px;
	background: transparent;
	color: var(--ar-text);
	font: inherit;
	font-size: 16px;
	font-weight: bold;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.22s ease, color 0.22s ease, background-color 0.22s ease;
}
.crelala-ar__button:hover { border-color: #ffffff; color: #ffffff; background: rgba(255, 255, 255, 0.05); }
.crelala-ar__button:focus-visible,
.crelala-ar__start:focus-visible,
.crelala-ar__close:focus-visible,
.crelala-ar__sheet-close:focus-visible { outline: 3px solid var(--cm-gold, #ffd700); outline-offset: 3px; }
.crelala-ar__icon { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--ar-red); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.crelala-ar__badge {
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--ar-red);
	color: #ffffff;
	font-size: 12px;
	letter-spacing: 0.08em;
}
.crelala-ar__hint { margin: 0; color: var(--ar-muted); font-size: 14px; line-height: 1.4; }
.crelala-ar:is([data-mode="ios"], [data-mode="android"]) .crelala-ar__hint-qr { display: none; }

/* ---------------------------------------------------------------- computer: dialog with the QR code */
.crelala-ar__dialog {
	box-sizing: border-box;
	width: min(420px, calc(100vw - 32px));
	padding: 34px 32px 26px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	background: var(--ar-panel);
	color: #ffffff;
	text-align: center;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.crelala-ar__dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(3px); }
.crelala-ar__close,
.crelala-ar__sheet-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ar-muted);
	font: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.crelala-ar__close:hover,
.crelala-ar__sheet-close:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.crelala-modern .crelala-ar__dialog h2.crelala-ar__title { margin: 0 0 10px; font-size: 24px; font-weight: 300; line-height: 1.3; color: #ffffff; }
.crelala-ar__dialog h2.crelala-ar__title::before { content: ""; display: block; width: 32px; height: 2px; margin: 0 auto 14px; background: var(--ar-red); }
.crelala-ar__dialog h2.crelala-ar__title::after { display: none; }
.crelala-ar__text { margin: 0 0 20px; color: var(--ar-text); font-size: 15px; line-height: 1.5; }
.crelala-ar__qr {
	width: 220px;
	height: 220px;
	margin: 0 auto 18px;
	padding: 12px;
	border-radius: 10px;
	background: #ffffff;
	color: #222222;
	font-size: 12px;
	overflow-wrap: anywhere;
}
.crelala-ar__qr svg { display: block; width: 100%; height: 100%; }
.crelala-ar__small { margin: 0; color: var(--ar-muted); font-size: 13px; line-height: 1.45; }

/* ---------------------------------------------------------------- phone from the QR code: start bar */
.crelala-ar__sheet {
	position: fixed;
	z-index: 100001;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	padding: 14px 52px 14px 16px;
	padding-bottom: max(14px, env(safe-area-inset-bottom));
	border-top: 2px solid var(--ar-red);
	background: var(--ar-panel);
	color: #ffffff;
	text-align: left;
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
	animation: crelala-ar-up 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.crelala-ar__sheet[hidden] { display: none; }
.crelala-ar__thumb { width: 52px; height: 52px; flex: none; object-fit: cover; border-radius: 6px; }
.crelala-ar__sheet-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 15px; line-height: 1.3; }
.crelala-ar__sheet-text span { color: var(--ar-muted); font-size: 13px; }
.crelala-ar__start {
	flex: none;
	margin-left: auto;
	min-height: 46px;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--ar-red);
	color: #ffffff;
	font: inherit;
	font-size: 15px;
	font-weight: bold;
	cursor: pointer;
}
.crelala-ar__start:hover { background: var(--ar-red-dark); }
.crelala-ar__sheet-close { top: 50%; right: 6px; transform: translateY(-50%); }
html.crelala-ar-sheet-open body { padding-bottom: 96px; }

@keyframes crelala-ar-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .crelala-ar__sheet { animation: none; } }
