/**
 * Wayflo Tours – PWA Frontend Styles
 */

/* ============================================================
   PWA-BAR (oben rechts, kompakt)
============================================================ */
.wayflo-pwa-bar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}
.wayflo-pwa-bar > * { pointer-events: auto; }

.wayflo-pwa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--wayflo-primary, #2a7c6f);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--wayflo-font-body, 'Outfit', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 8px 20px rgba(42, 124, 111, 0.15);
  transition: all 200ms ease;
  white-space: nowrap;
}
.wayflo-pwa-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.wayflo-pwa-btn:active {
  transform: translateY(0);
}

.wayflo-pwa-btn-secondary {
  background: #ffffff;
  color: var(--wayflo-primary, #2a7c6f);
  border: 1px solid rgba(42, 124, 111, 0.2);
}
.wayflo-pwa-btn-secondary.is-saved {
  background: var(--wayflo-accent, #b8956a);
  color: #ffffff;
  border-color: transparent;
  cursor: default;
}
.wayflo-pwa-btn.is-loading {
  opacity: 0.85;
  cursor: progress;
}

.wayflo-pwa-btn svg { flex-shrink: 0; }

/* ============================================================
   OFFLINE-BANNER (oben, full width)
============================================================ */
.wayflo-offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #1a1815;
  color: #fbbf24;
  font-family: var(--wayflo-font-body, 'Outfit', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.02em;
  animation: wayflo-offline-slide-down 320ms ease;
}
@keyframes wayflo-offline-slide-down {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* ============================================================
   OFFLINE-MODE: UI-Anpassungen
   Wenn offline und Karte nicht ladbar → Hinweis statt grauer Box
============================================================ */
body.wayflo-is-offline #vsf-tour-map::after {
  content: attr(data-offline-msg, 'Karte offline nicht verfügbar');
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--wayflo-font-body, 'Outfit', sans-serif);
  font-size: 13px;
  color: #6b6357;
  background: #f5f0e8;
  padding: 20px;
  z-index: 5;
}

/* Auf Mobile: Bar oben mittig statt rechts (kollidiert sonst mit Map-Controls) */
@media (max-width: 600px) {
  .wayflo-pwa-bar {
    top: auto;
    bottom: 16px;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    align-items: center;
  }
  .wayflo-pwa-btn {
    font-size: 11.5px;
    padding: 7px 12px;
  }
}

/* Wenn die Tour gestartet wurde (App-Modus aktiv), PWA-Bar verstecken */
body:has(#vsf-tour-container:not(.vsf-hidden)) .wayflo-pwa-bar {
  display: none;
}
