/* ==========================================================================
   Priehrada Rezort — 360° virtuálna prehliadka
   Dizajn podľa referencie Mama Krušetnica: bez panelov a rámčekov, ovládanie
   sa vznáša priamo nad panorámou. Paleta prehliadky = firemná čierna + krémová.
   ========================================================================== */

:root {
  --tour-text: #f5f0e8;      /* krémová z palety webu */
  --tour-black: #1d1d1b;     /* firemná čierna */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--tour-black);
  color: var(--tour-text);
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
}

.tour-stage { position: fixed; inset: 0; }
.tour-viewer { position: absolute; inset: 0; background: #000; }

/* ---------- Horná navigácia ----------
   Zámerne bez pozadia, orámovania a tieňa — len text a dve šípky. */
.tour-nav {
  position: absolute;
  top: 28px;
  left: 50%;
  z-index: 9000;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: calc(100vw - 7rem);
}

.tour-nav__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  pointer-events: none;
  text-align: center;
}

.tour-nav__unit {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .65;
  white-space: nowrap;
}

.tour-nav__room {
  font-family: 'Marcellus', serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  /* jemné prelinutie pri zmene priestoru */
  transition: opacity 220ms ease;
}
.tour-nav__room.is-changing { opacity: 0; }

.tour-nav__arrow {
  /* Sú to tlačidlá — prepínajú miestnosti v rámci prehliadky, nie odkazy inam. */
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--tour-text);
  opacity: .9;
  transition: opacity .2s ease;
}
.tour-nav__arrow:hover,
.tour-nav__arrow:focus-visible { opacity: 1; }
.tour-nav__arrow:focus-visible { outline: 2px solid var(--tour-text); outline-offset: 4px; }
.tour-nav__arrow svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Zavrieť ---------- */
.tour-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 9000;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tour-text);
  opacity: .9;
  transition: opacity .2s ease;
}
.tour-close:hover,
.tour-close:focus-visible { opacity: 1; }
.tour-close:focus-visible { outline: 2px solid var(--tour-text); outline-offset: 4px; }
.tour-close svg {
  width: 60%; height: 60%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Šípky na presun v panoráme ---------- */
.pano-ground-hotspot {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--tour-text);
  opacity: .9;
  transition: opacity .2s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45));
}
.pano-ground-hotspot:hover { opacity: 1; }
.pano-ground-hotspot svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 600px) { .pano-ground-hotspot { width: 70px; height: 70px; } }

/* ---------- Prekrytie pri prechode medzi scénami ---------- */
.tour-fade {
  position: absolute;
  inset: 0;
  z-index: 7000;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  background: #000;
  transition: opacity 90ms cubic-bezier(.22, 1, .36, 1);
  will-change: opacity;
}
.tour-fade::before {
  content: '';
  position: absolute;
  top: -25%; right: -40%; bottom: -25%; left: -40%;
  opacity: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 15%, rgba(255,255,255,.3) 50%, rgba(255,255,255,0) 85%);
  filter: blur(20px);
  transform: translateX(-85%) skewX(-12deg);
}
.tour-fade.is-visible { opacity: .34; }
.tour-fade.is-visible::before { opacity: .22; }
.tour-fade.is-visible.is-right::before {
  opacity: .4;
  animation: tour-swipe-right 140ms cubic-bezier(.2, .7, .2, 1) both;
}
.tour-fade.is-visible.is-left::before {
  opacity: .4;
  animation: tour-swipe-left 140ms cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes tour-swipe-right {
  from { transform: translateX(-85%) skewX(-12deg); }
  to   { transform: translateX(85%) skewX(-12deg); }
}
@keyframes tour-swipe-left {
  from { transform: translateX(85%) skewX(-12deg); }
  to   { transform: translateX(-85%) skewX(-12deg); }
}

/* ---------- Načítavacia obrazovka ---------- */
.tour-loader {
  position: absolute;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  overflow: hidden;
  background: var(--tour-black);
  color: var(--tour-text);
  transition: opacity 220ms ease, visibility 220ms ease;
}
/* rozmazaná fotka izby ako podklad */
.tour-loader::before {
  content: '';
  position: absolute;
  inset: -16px;
  background-image: var(--loader-bg, none);
  background-position: center;
  background-size: cover;
  filter: blur(5px);
  transform: scale(1.04);
  opacity: .78;
}
.tour-loader::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .42);
}
.tour-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* Hláška, keď sa panoráma nenačíta — inak by ukazovateľ visel na 99 %. */
.tour-loader__chyba {
  margin-top: 1.25rem;
  text-align: center;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--cream, #f5f0e8);
}
.tour-loader__chyba a {
  color: var(--accent-light, #a68b6a);
  text-underline-offset: .25em;
}

.tour-loader__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tour-loader__spinner { position: relative; width: 84px; height: 84px; margin-bottom: 14px; }
.tour-loader__spinner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(245, 240, 232, .22);
  border-top-color: var(--tour-text);
  animation: tour-spin 1s linear infinite;
}
.tour-loader__mark {
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
}
.tour-loader__mark img {
  width: 42px; height: 42px;
  display: block;
  filter: brightness(0) invert(1);   /* iniciálky v krémovej/bielej */
}
@keyframes tour-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.tour-loader__title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: .01em;
  opacity: .9;
}
.tour-loader__unit {
  font-family: 'Marcellus', serif;
  font-size: 30px;
  line-height: 1.02;
  letter-spacing: .02em;
}
.tour-loader__progress {
  position: relative;
  width: min(320px, 78vw);
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(245, 240, 232, .22);
}
.tour-loader__progress span {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--tour-text);
  transition: width 120ms ease;
}

/* ---------- Photo Sphere Viewer: skryť všetko okrem panorámy ---------- */
.psv-navbar,
.psv-caption,
.psv-loader-container { display: none !important; }

@media (max-width: 600px) {
  .tour-nav { top: 20px; gap: 12px; max-width: calc(100vw - 5rem); }
  .tour-nav__room { font-size: 22px; }
  .tour-nav__unit { font-size: 10px; letter-spacing: .22em; }
  .tour-nav__arrow { width: 24px; height: 24px; }
  .tour-close { top: 12px; right: 12px; width: 34px; height: 34px; }
  .tour-loader__spinner { width: 72px; height: 72px; margin-bottom: 10px; }
  .tour-loader__mark { width: 48px; height: 48px; }
  .tour-loader__mark img { width: 36px; height: 36px; }
  .tour-loader__title { font-size: 14px; }
  .tour-loader__unit { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-fade::before { animation: none !important; }
  .tour-loader__spinner::before { animation: none; }
}
