/**
 * Wayflo Tours – 3D Explore Mode CSS
 * Wayflo Brand: Teal #2a7c6f, Gold #b8956a
 */

/* ============================================================
   MAPBOX CONTAINER
============================================================ */
.wayflo-3d-map {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
  background: #0e0d0b;
}
.wayflo-3d-map.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.wayflo-3d-map.is-hidden {
  display: none;
}
.wayflo-3d-map .mapboxgl-canvas { outline: none; }

/* Mapbox interne Tweaks: Default-Controls in Wayflo-Stil */
.wayflo-3d-map .mapboxgl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  border-radius: 6px;
  font-family: 'Outfit', system-ui, sans-serif;
}
.wayflo-3d-map .mapboxgl-ctrl-attrib a { color: #2a7c6f; }

/* ============================================================
   2D / 3D TOGGLE
============================================================ */
.wayflo-3d-toggle {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: inline-flex;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 8px 20px rgba(42, 124, 111, 0.12);
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  border: 1px solid rgba(42, 124, 111, 0.12);
}

.wayflo-3d-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: #6b6357;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 999px;
  transition: all 180ms ease;
  font-family: inherit;
}
.wayflo-3d-toggle-btn svg { opacity: 0.7; transition: opacity 180ms ease; }
.wayflo-3d-toggle-btn:hover {
  color: #2a7c6f;
}
.wayflo-3d-toggle-btn:hover svg { opacity: 1; }

.wayflo-3d-toggle-btn.is-active {
  background: linear-gradient(135deg, #2a7c6f 0%, #236a5e 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(42, 124, 111, 0.3);
}
.wayflo-3d-toggle-btn.is-active svg { opacity: 1; }

/* ============================================================
   LIGHT-PRESET BAR
============================================================ */
.wayflo-3d-lightbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 25;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 10px 14px 12px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 12px 32px rgba(42, 124, 111, 0.15);
  border: 1px solid rgba(42, 124, 111, 0.1);
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  opacity: 0;
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wayflo-3d-lightbar.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.wayflo-3d-lightbar.is-hidden { display: none; }

.wayflo-3d-lightbar-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b8956a;
  font-weight: 600;
  margin-bottom: 6px;
  text-align: center;
}

.wayflo-3d-lightbar-btns {
  display: inline-flex;
  gap: 2px;
  background: rgba(42, 124, 111, 0.06);
  border-radius: 8px;
  padding: 3px;
}
.wayflo-3d-lightbar-btns button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #6b6357;
  cursor: pointer;
  border-radius: 6px;
  transition: all 160ms ease;
  letter-spacing: 0.02em;
  font-family: inherit;
}
.wayflo-3d-lightbar-btns button:hover {
  color: #2a7c6f;
  background: rgba(255, 255, 255, 0.6);
}
.wayflo-3d-lightbar-btns button.is-active {
  background: #ffffff;
  color: #2a7c6f;
  box-shadow: 0 1px 3px rgba(42, 124, 111, 0.15);
}

/* ============================================================
   MAPBOX MARKER PINS (Wayflo-Stil)
============================================================ */
.wayflo-3d-pin {
  cursor: pointer;
  position: relative;
  width: 36px;
  height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}
.wayflo-3d-pin:hover { transform: translateY(-3px) scale(1.05); }

.wayflo-3d-pin-bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a7c6f 0%, #236a5e 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: 2.5px solid #ffffff;
  box-shadow:
    0 0 0 1px rgba(42, 124, 111, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 180ms ease;
}
.wayflo-3d-pin-tail {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid #ffffff;
  margin-top: -2px;
  filter: drop-shadow(0 1px 0 rgba(42, 124, 111, 0.4));
}
.wayflo-3d-pin.is-active .wayflo-3d-pin-bubble {
  background: linear-gradient(135deg, #b8956a 0%, #a08355 100%);
  box-shadow:
    0 0 0 1px rgba(184, 149, 106, 0.5),
    0 0 0 4px rgba(184, 149, 106, 0.18),
    0 2px 12px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}
.wayflo-3d-pin.is-active .wayflo-3d-pin-tail {
  border-top-color: #ffffff;
  filter: drop-shadow(0 1px 0 rgba(184, 149, 106, 0.5));
}

/* ============================================================
   ERROR TOAST
============================================================ */
.wayflo-3d-toast {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: #1a1815;
  color: #ffffff;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  border-left: 3px solid #c87550;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: opacity 320ms ease;
}
.wayflo-3d-toast.is-hidden { opacity: 0; }

/* ============================================================
   LOADING-INDICATOR (während erster Mapbox-Init)
============================================================ */
.wayflo-3d-loader {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  background: rgba(14, 13, 11, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}
.wayflo-3d-loader.is-visible { opacity: 1; }

.wayflo-3d-loader-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid rgba(184, 149, 106, 0.25);
  border-top-color: #b8956a;
  animation: wayflo-3d-spin 0.8s linear infinite;
}
@keyframes wayflo-3d-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   MOBILE
============================================================ */
@media (max-width: 768px) {
  .wayflo-3d-toggle {
    top: 12px;
    /* left + transform bleiben aus dem Desktop-Style erhalten */
  }
  .wayflo-3d-toggle-btn {
    padding: 6px 11px;
    font-size: 11px;
  }
  .wayflo-3d-toggle-btn span {
    /* Auf Mobile evtl. nur Icons zeigen — bleibt aber sichtbar für Klarheit */
  }
  .wayflo-3d-lightbar {
    bottom: 14px;
    padding: 8px 12px 10px;
  }
  .wayflo-3d-lightbar-btns button {
    padding: 5px 10px;
    font-size: 10.5px;
  }
  .wayflo-3d-pin-bubble {
    width: 32px;
    height: 32px;
    font-size: 13px;
    border-width: 2px;
  }
  .wayflo-3d-pin {
    width: 32px;
    height: 42px;
  }
}

/* Wenn Sidebar offen + Mobile: Toggle nicht überlappen */
@media (max-width: 600px) {
  #vsf-tour-container.vsf-explore-active .wayflo-3d-toggle {
    top: 10px;
  }
}
