/**
 * WebXR App Shell – Styles (App-Hülle)
 * Eigenständiges Stylesheet: Fonts, Off-Canvas, Menü, QR-Block.
 * Corporate Fonts wie root/index.html (Senckenberg, Romie).
 *
 * Shared-Version: Gilt für beide App-Varianten (app-off-location + app-on-location).
 * Pfade relativ zu shared/ → fonts/ liegt direkt hier.
 */
@charset "UTF-8";

/* -------------------------------------------------------------------------
   Corporate Fonts (lokal in shared/fonts/)
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "Senckenberg";
  src: url("./fonts/SenckenbergVariable.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Romie";
  src: url("./fonts/Romie-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Romie";
  src: url("./fonts/Romie-MediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: fallback;
}

/* -------------------------------------------------------------------------
   Basis & aus index.html ausgelagerte Styles
   ------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  min-height: 100vh;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(to bottom, #1f1f1f, #000000);
  font-family: "Senckenberg", "Romie", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-shell__main {
  background-image: radial-gradient(circle, #4a4a4a, #1a1a1a);
}

/* -------------------------------------------------------------------------
   Geo-Dispatcher (Root index.html) — Loading- und Fallback-UI
   ------------------------------------------------------------------------- */
.geo-dispatcher {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  padding-top: calc(2rem + env(safe-area-inset-top, 0px));
  padding-left: calc(2rem + env(safe-area-inset-left, 0px));
  padding-right: calc(2rem + env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  max-width: 100%;
  color: #fff;
}

.geo-dispatcher__logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.geo-dispatcher__status {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.geo-dispatcher__spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: geo-spin 0.8s linear infinite;
}

@keyframes geo-spin {
  to { transform: rotate(360deg); }
}

.geo-dispatcher__fallback {
  display: none;
}

.geo-dispatcher__fallback.is-visible {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.geo-dispatcher__fallback p {
  margin: 0 auto 1.5rem;
  max-width: 90vw;
  opacity: 0.9;
}

.geo-dispatcher__buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
}

.geo-dispatcher__btn {
  display: inline-block;
  min-width: 220px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.geo-dispatcher__btn:hover,
.geo-dispatcher__btn:focus-visible {
  background: #e0e0e0;
  color: #000;
}

.geo-dispatcher__btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.geo-dispatcher__btn--secondary:hover,
.geo-dispatcher__btn--secondary:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.geo-dispatcher__loading.is-hidden {
  display: none;
}

/* -------------------------------------------------------------------------
   CSS-Variablen
   ------------------------------------------------------------------------- */
:root {
  --app-menu-highlight: #87A7E7;
  --app-offcanvas-bg: #1a1a1a;
  --app-offcanvas-width: min(320px, 85vw);
  --app-burger-size: 48px;
  --app-burger-gap: 0.75rem;
  --font-size-menu-level-1: 1.25rem;
  --font-size-menu-level-2: 1rem;
}

/* -------------------------------------------------------------------------
   App Shell Wrapper
   ------------------------------------------------------------------------- */
.app-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  isolation: isolate;
}

.app-shell__main {
  position: relative;
  z-index: 0;
  width: 100%;
  min-height: 100vh;
}

/* needle-engine: keine festen left/top, damit Positionierung flexibel bleibt */
.app-shell__main > needle-engine.desktop-session-active.loading-finished {
  left: unset;
  top: unset;
}

/* -------------------------------------------------------------------------
   Menu Toggle (ein Button: Burger ↔ X, SVG-Animation nach Bedarf)
   ------------------------------------------------------------------------- */
.app-shell__menu-toggle {
  position: fixed;
  top: var(--app-burger-gap, 0.75rem);
  right: var(--app-burger-gap, 0.75rem);
  z-index: 1002;
  width: var(--app-burger-size);
  height: var(--app-burger-size);
  padding: 0;
  border: none;
  background: #00000050;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.app-shell__menu-toggle-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}

.app-shell__menu-toggle-line {
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-box: view-box;
  vector-effect: non-scaling-stroke;
}

.app-shell__menu-toggle-line--top {
  transform-origin: 16px 8px;
}

.app-shell__menu-toggle-line--mid {
  transform-origin: 16px 16px;
}

.app-shell__menu-toggle-line--bot {
  transform-origin: 16px 24px;
}

.app-shell--menu-open .app-shell__menu-toggle-line--top {
  transform: translate(0, 8px) rotate(45deg);
}

.app-shell--menu-open .app-shell__menu-toggle-line--mid {
  opacity: 0;
}

.app-shell--menu-open .app-shell__menu-toggle-line--bot {
  transform: translate(0, -8px) rotate(-45deg);
}

/* -------------------------------------------------------------------------
   Off-Canvas Backdrop
   ------------------------------------------------------------------------- */
.app-shell__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.app-shell--menu-open .app-shell__backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* -------------------------------------------------------------------------
   Off-Canvas Panel (von links)
   ------------------------------------------------------------------------- */
.app-shell__offcanvas {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1001;
  width: var(--app-offcanvas-width);
  max-width: 100%;
  background: var(--app-offcanvas-bg);
  background-color: rgba(0, 0, 0, 1);
  color: #fff;
  opacity: 0.75;
  border: 1px solid rgba(0, 0, 0, 1);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.app-shell--menu-open .app-shell__offcanvas {
  transform: translateX(0);
}

/* Sektion 1: Logo */
.app-shell__offcanvas-logo {
  padding: 1rem 1rem 0.5rem;
  flex-shrink: 0;
}

.app-shell__offcanvas-logo svg {
  width: 100%;
  max-width: 200px;
  height: auto;
  fill: #fff;
}

.app-shell__offcanvas-logo a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

/* Sektion 2: Headline */
.app-shell__offcanvas-headline {
  margin-top: 0;
  margin-bottom: 20px;
  padding: 0 1rem 1rem;
  font-family: "Senckenberg", "Romie", inherit;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Sektion 2a: Sprachumschalter DE | CS (Logik in app-function.js, Texte in app-texte.js) */
.app-shell__lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  margin: -12px 0 12px;
  padding: 0 1rem;
  flex-shrink: 0;
  font-family: "Senckenberg", "Romie", inherit;
  font-size: var(--font-size-menu-level-2, 1rem);
}

.app-shell__lang-btn {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  margin: 0;
  padding: 0 0.5rem;
  text-align: left;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.6);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Erster Knopf bündig mit Headline und Menütexten (linke Kante) */
.app-shell__lang-btn:first-child {
  padding-left: 0;
}

.app-shell__lang-btn:hover,
.app-shell__lang-btn:focus-visible {
  color: #fff;
}

.app-shell__lang-btn.is-active {
  color: var(--app-menu-highlight);
}

.app-shell__lang-divider {
  color: rgba(255, 255, 255, 0.35);
}

/* Sektion 3: Text-Menü (2 Ebenen) */
.app-shell__offcanvas-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem 1rem;
}

.app-shell__menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-shell__menu-list--level2 {
  padding-left: 1rem;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.app-shell__menu-item {
  margin: 0;
  padding: 0;
}

.app-shell__menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: #fff;
  text-decoration: none;
  font-family: "Senckenberg", "Romie", inherit;
  font-size: var(--font-size-menu-level-1, 1.25rem);
  -webkit-tap-highlight-color: transparent;
}

.app-shell__menu-link:hover,
.app-shell__menu-link:focus {
  color: var(--app-menu-highlight);
}

.app-shell__menu-link.is-active {
  color: var(--app-menu-highlight);
}

.app-shell__menu-link--level2 {
  font-size: var(--font-size-menu-level-2, 1rem);
  padding: 0.35rem 0;
  padding-left: 0.5rem;
}

/* Button-Reset: cam-btn-Elemente visuell identisch zu bisherigen <a>-Links */
button.app-shell__menu-link--level2 {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0.35rem 0;
  padding-left: 0.5rem;
  text-align: left;
  width: 100%;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

button.app-shell__menu-link--level2:hover,
button.app-shell__menu-link--level2:focus-visible {
  color: var(--app-menu-highlight, #87A7E7);
}

button.app-shell__menu-link--level2.is-active {
  color: var(--app-menu-highlight, #87A7E7);
}

.app-shell__menu-chevron {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.app-shell__menu-item.is-open .app-shell__menu-chevron {
  transform: rotate(45deg);
}

/* Submenu (Kamerapositionen) – initial ausgeblendet */
.app-shell__menu-sublist {
  display: none;
}

.app-shell__menu-item.is-open .app-shell__menu-sublist {
  display: block;
}

/* -------------------------------------------------------------------------
   QR-Block (eigener Anzeige-Block unter dem Textmenü, nur Desktop)
   ------------------------------------------------------------------------- */
.app-shell__qr-block {
  display: none;
  padding: 1rem 1rem 1.5rem;
  flex-shrink: 0;
  border-top: 0px solid rgba(255, 255, 255, 0.15);
}

body.device-desktop .app-shell__qr-block {
  display: block;
}

.app-shell__qr-text {
  font-family: "Senckenberg", "Romie", inherit;
  font-size: 14px;
  font-weight: 300;
  margin: 0 0 0.75rem;
  opacity: 0.9;
  padding-left: 0;
  padding-right: 0;
}

.app-shell__qr-image {
  display: block;
  width: 95%;

  background: none;
  padding: 0.5rem 0;
  border-radius: 0.25rem;
}

.app-shell__qr-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* -------------------------------------------------------------------------
   Geräteabhängige Blöcke (App Neustart / Custom AR / QR)
   ------------------------------------------------------------------------- */
/* App Neustart, Start AR …, Hutberg-Text: nur bei AR-fähigem Gerät (body.device-ar-capable) */
.app-shell__menu-item.app-shell__menu-item--neustart {
  display: none;
}

body.device-ar-capable .app-shell__menu-item.app-shell__menu-item--neustart {
  display: list-item;
}

.app-shell__menu-item.app-shell__ar-block--custom-ar {
  display: none;
}

body.device-ar-capable .app-shell__menu-item.app-shell__ar-block--custom-ar {
  display: list-item;
}

/* AR-Hinweistext (nur app-on-location: unter „Start AR on location") */
.app-shell__ar-hint {
  display: none;
  margin: 0.5rem 0 0;
  padding-left: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
}

body.device-ar-capable .app-shell__ar-hint {
  display: block;
}

/* AR-Label-Farben: beide Varianten — off (rot) für app-off-location, on (grün) für app-on-location */
.ar-mode-label--off {
  color: #FF4444;
  font-weight: 700;
}

.ar-mode-label--on {
  color: #44CC44;
  font-weight: 700;
}

/* Button-Reset: Custom-AR-Trigger visuell wie Menü-Link Level-1 */
button.app-shell__ar-trigger {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-size: var(--font-size-menu-level-1, 1.25rem);
  cursor: pointer;
  padding: 0.35rem 0;
  padding-left: 0;
  text-align: left;
  width: 100%;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

button.app-shell__ar-trigger:hover,
button.app-shell__ar-trigger:focus-visible {
  color: var(--app-menu-highlight, #87A7E7);
}

body.device-desktop .app-shell__menu-item.app-shell__ar-block--qr {
  display: list-item;
}

.app-shell__menu-link--external {
  /* Link zu App-Store o. Ä. */
}

/* -------------------------------------------------------------------------
   Sektion 4: Footer (Impressum)
   ------------------------------------------------------------------------- */
.app-shell__offcanvas-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  margin-top: auto;
}

.app-shell__offcanvas-footer .app-shell__menu-link {
  font-size: var(--font-size-menu-level-2, 1rem);
  opacity: 0.9;
}

.app-shell__offcanvas-footer .app-shell__menu-link.is-active {
  opacity: 1;
}

.app-shell__menu-link--hidden {
  display: none;
}

/* -------------------------------------------------------------------------
   Performance-Debug-Overlay ausblenden
   ------------------------------------------------------------------------- */

#debug-overlay {
  display: none !important;
}

/* -------------------------------------------------------------------------
   Eigenen Sprachknopf der Needle-Szene ausblenden (edbyto_HotspotLanguageSwitch).
   Die Sprache wird im App-Menü umgeschaltet (.app-shell__lang-switch).
   ------------------------------------------------------------------------- */

#edbyto-language-switch {
  display: none !important;
}
