/* ============================================================
   tour.css — warstwa interfejsu na eksporcie Marzipano.
   Ładowana PO style.css, więc nadpisuje domyślne style boilerplate'u.
   Plików style.css / index.js nie ruszamy, żeby dało się w razie
   czego podmienić eksport z Marzipano Tool bez utraty tych zmian.
   ============================================================ */

:root {
  --ui-bg: rgba(20, 22, 26, 0.62);
  --ui-bg-solid: rgba(20, 22, 26, 0.92);
  --ui-border: rgba(255, 255, 255, 0.14);
  --ui-accent: #4dd6c4;
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background: #0e1013;
  font-family: var(--ui-font);
}

/* --- Domyślna lista scen Marzipano: ukryta, ale zostaje w DOM ---------
   index.js podpina do niej przełączanie scen, a tour.js w nią klika. */
#sceneList,
#sceneListToggle {
  display: none !important;
}

/* --- Nazwa pomieszczenia: pigułka w lewym górnym rogu ----------------- */
#titleBar,
.mobile #titleBar {
  position: fixed;
  top: 14px;
  left: 14px;
  right: auto;
  width: auto;
  height: auto;
  text-align: left;
  z-index: 20;
  pointer-events: none;
}

#titleBar .sceneName,
.mobile #titleBar .sceneName {
  display: inline-block;
  width: auto;
  height: auto;
  line-height: 1.2;
  padding: 9px 15px;
  background: var(--ui-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: none;
}

/* --- Przyciski sterowania (przeniesione do #tourControls przez tour.js) */
#tourControls {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 21;
  display: flex;
  gap: 8px;
}

#tourControls > a,
#tourControls > button {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  background: var(--ui-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

#tourControls > a:hover,
#tourControls > button:hover {
  background: var(--ui-bg-solid);
  transform: translateY(-1px);
}

/* style.css nadaje na telefonie własne rozmiary (.mobile #fullscreenToggle
   itd.), które wygrywają specyficznością — dlatego równamy je tutaj, żeby
   wszystkie trzy przyciski miały ten sam rozmiar. */
.mobile #tourControls > a,
.mobile #tourControls > button {
  width: 42px;
  height: 42px;
}

#tourControls .icon,
.mobile #tourControls .icon {
  position: static;
  top: auto;
  right: auto;
  width: 19px;
  height: 19px;
  /* ikony boilerplate'u bywają ciemne — wymuszamy biel */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

#tourControls svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
}

/* --- Hotspoty nawigacyjne ---------------------------------------------
   img/link.png sam jest już okrągłą plakietką z szewronem, więc nie
   dokładamy własnego tła ani obwódki — tylko biel, cień i pulsujący
   pierścień, żeby strzałka odcinała się od jasnych wnętrz. */
.link-hotspot,
.mobile .link-hotspot {
  width: 62px;
  height: 62px;
  margin-left: -31px;
  margin-top: -31px;
  opacity: 0.94;
  transition: transform 0.18s, opacity 0.18s;
}

.no-touch .link-hotspot:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* pulsujący pierścień przyciągający wzrok */
.link-hotspot::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  animation: hotspotPulse 2.6s ease-out infinite;
  pointer-events: none;
}

@keyframes hotspotPulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  70%  { transform: scale(1.5);  opacity: 0; }
  100% { transform: scale(1.5);  opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .link-hotspot::after { animation: none; }
}

.link-hotspot-icon,
.mobile .link-hotspot-icon {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1) drop-shadow(0 2px 7px rgba(0, 0, 0, 0.65));
}

/* dymek z nazwą pomieszczenia docelowego */
.link-hotspot-tooltip,
.mobile .link-hotspot-tooltip {
  top: 16px;
  margin-left: 8px;
  padding: 7px 12px;
  background: var(--ui-bg-solid);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  color: #fff;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* --- Podpowiedź startowa --------------------------------------------- */
#dragHint {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 19;
  padding: 11px 20px;
  background: rgba(15, 17, 20, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#dragHint.is-gone {
  opacity: 0;
}

/* --- Pasek miniatur --------------------------------------------------- */
#sceneStrip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 22;
  padding: 0 12px 12px;
}

#sceneStrip::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: -1;
}

#stripToggle {
  display: block;
  width: 48px;
  height: 22px;
  margin: 0 auto 8px;
  background: var(--ui-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
}

#stripToggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -5px 0 0 -4px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  opacity: 0.85;
  transition: transform 0.25s;
}

body.strip-collapsed #stripToggle::before {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.strip-track {
  position: relative;
  display: flex;
  gap: 9px;
  padding: 4px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.strip-track::-webkit-scrollbar {
  display: none;
}

body.strip-collapsed .strip-track {
  display: none;
}

.thumb {
  position: relative;
  flex: 0 0 auto;
  width: 134px;
  height: 76px;
  padding: 0;
  overflow: hidden;
  background: #000;
  border: 2px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 0.18s;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: opacity 0.2s, transform 0.35s;
}

.thumb:hover img {
  opacity: 1;
  transform: scale(1.05);
}

.thumb.is-active {
  border-color: var(--ui-accent);
}

.thumb.is-active img {
  opacity: 1;
}

.thumb-label {
  position: absolute;
  top: 6px;
  left: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 8px;
  background: rgba(15, 17, 20, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Toast (potwierdzenie skopiowania linku) -------------------------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 130px;
  z-index: 40;
  transform: translate(-50%, 8px);
  padding: 10px 18px;
  background: var(--ui-bg-solid);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}

#toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Telefony --------------------------------------------------------- */
@media (max-width: 640px) {
  #titleBar, .mobile #titleBar { top: 10px; left: 10px; }
  #titleBar .sceneName, .mobile #titleBar .sceneName { padding: 7px 12px; font-size: 13px; }

  #tourControls { top: 10px; right: 10px; gap: 6px; }
  #tourControls > a, #tourControls > button,
  .mobile #tourControls > a, .mobile #tourControls > button { width: 38px; height: 38px; }

  #dragHint { font-size: 13px; padding: 9px 16px; }

  /* większy cel dotykowy na telefonie */
  .link-hotspot, .mobile .link-hotspot {
    width: 70px; height: 70px; margin-left: -35px; margin-top: -35px;
  }

  #sceneStrip { padding: 0 8px 8px; }
  .thumb { width: 112px; height: 64px; }
  .thumb-label { font-size: 10px; padding: 2px 6px; }
  #toast { bottom: 112px; }
}
