/**
 * assets/css/welcome.css
 *
 * Welcome-Modal und Tap-to-Start-Overlay
 *
 * @version   1.0.0
 * @date      2026-04-26
 * @author    Mauric Rene Oberlaender <rene.oberlaender@mronet.at>
 * @co-author Claude (Anthropic AI)
 */
/* ==========================================================
   welcome.css — Welcome- und Terms-Modal
   ========================================================== */

.welcome-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  transition: opacity 0.3s ease;
}
.welcome-backdrop.fade-out { opacity: 0; pointer-events: none; }

/* ==========================================================
   Tap-to-Start-Overlay — erscheint bei QR-/Direktlink-Aufrufen,
   weil Browser Audio-Autoplay vor erster User-Interaktion blockieren.
   Skulpturen-Foto bleibt sichtbar, Hinweis als zentrale Pille.
   ========================================================== */
#tapToStartOverlay {
  position: fixed;
  inset: 0;
  background: #0a0604;
  z-index: 200;
  cursor: pointer;
  overflow: hidden;
  animation: tapFadeIn 0.4s ease;
  transition: opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
#tapToStartOverlay.fade-out { opacity: 0; pointer-events: none; }

#tapToStartOverlay .tap-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* Kein Verlauf mehr — Pille trägt eigenen Hintergrund. Optional dezenter Dim für besseren Foto-Kontrast. */
#tapToStartOverlay .tap-photo-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

#tapToStartOverlay .tap-hint-row {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(20, 12, 8, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill, 999px);
  color: #fff;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  animation: tapPillPulse 1.8s ease-in-out infinite;
}

#tapToStartOverlay .tap-icon {
  flex-shrink: 0;
  color: #fff;
  display: flex;
  align-items: center;
}

#tapToStartOverlay .tap-hint-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

@keyframes tapFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes tapPillPulse {
  0%, 100% { transform: translateX(-50%) scale(1);    box-shadow: 0 6px 24px rgba(0,0,0,0.5); }
  50%      { transform: translateX(-50%) scale(1.04); box-shadow: 0 6px 32px rgba(0,0,0,0.65); }
}

.welcome-card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 380px;
  color: var(--color-text);
}

.welcome-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 22px;
  text-align: center;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
  font-size: 15px;
  font-weight: 500;
}
.lang-toggle .lbl {
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}
.lang-toggle .lbl.inactive { color: rgba(42, 24, 16, 0.4); }

.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  background: var(--color-narzisse);
  border-radius: var(--radius-pill, 15px);
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.22s;
}
.toggle-switch.en .knob { transform: translateX(26px); }

.welcome-text {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 16px;
}

.terms-link {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 18px;
}
.terms-link a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
}
.terms-link a:active { opacity: 0.7; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  cursor: pointer;
  user-select: none;
}
.checkbox {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-narzisse);
  border-radius: var(--radius-pill, 5px);
  background: rgba(201, 146, 94, 0.15);
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}
.checkbox.checked { background: var(--color-narzisse); }
.checkbox svg {
  width: 14px;
  height: 14px;
  color: #FFFFFF;
  opacity: 0;
  transition: opacity 0.12s;
}
.checkbox.checked svg { opacity: 1; }

.checkbox-row .lbl-text {
  font-size: 14px;
  line-height: 1.45;
}

.confirm-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  background: #BBBBBB;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  cursor: not-allowed;
  transition: background 0.15s, transform 0.1s;
}
.confirm-btn.active {
  background: var(--color-narzisse);
  cursor: pointer;
}
.confirm-btn.active:active {
  transform: scale(0.97);
  background: var(--color-narzisse-2);
}

/* === Terms Modal === */
.terms-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 8, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.terms-modal.show { display: flex; }

.terms-card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.terms-header {
  display: flex;
  justify-content: flex-end;
  padding: 14px 14px 0;
}
.terms-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0.5px solid var(--color-border-2);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}
.terms-close svg { width: 18px; height: 18px; }

.terms-content {
  padding: 6px 26px 26px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.terms-content h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
}
.terms-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 8px;
  text-align: center;
}
.terms-content p {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.terms-content strong { font-weight: 600; }

/* ==========================================================
   Branding-Logo im Welcome-Backdrop (admin/branding.php)
   ========================================================== */
.welcome-logo {
  position: absolute;
  top: 24px;
  z-index: 10;
  max-height: 60px;
  max-width: 200px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  pointer-events: none;
}
.welcome-logo-top-left   { left: 24px; }
.welcome-logo-top-center { left: 50%; transform: translateX(-50%); }
.welcome-logo-top-right  { right: 24px; }

@media (max-width: 600px) {
  .welcome-logo {
    top: 16px;
    max-height: 48px;
    max-width: 140px;
  }
  .welcome-logo-top-left   { left: 16px; }
  .welcome-logo-top-right  { right: 16px; }
}


/* === App Logo (always visible, above welcome backdrop and main app) === */
.app-logo-link {
  position: fixed;
  top: 12px;
  width: 44px;
  height: 44px;
  z-index: 9999;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
}
.app-logo-link:hover {
  transform: scale(1.05);
}
.app-logo {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}
.app-logo-top-left   { left: 12px; }
.app-logo-top-center { left: 50%; transform: translateX(-50%); }
.app-logo-top-right  { right: 12px; }

@media (min-width: 768px) {
  .app-logo-link {
    top: 18px;
    width: 56px;
    height: 56px;
  }
  .app-logo-top-left  { left: 18px; }
  .app-logo-top-right { right: 18px; }
}
