/* PIX Studio - virtuální prohlídky: layout vieweru + branding panel.
   Sdílené mezi online viewerem (/tour/{slug}) a exportním balíkem. */

.tourpage { margin: 0; background: #0b0f19; }
.tourpage, .tourpage * { box-sizing: border-box; }

/* Viewer přes celý viewport (dvh kvůli lištám mobilních prohlížečů). */
.tour-viewer-full { width: 100%; height: 100vh; height: 100dvh; }
body.has-previewbar .tour-viewer-full { height: calc(100vh - 42px); height: calc(100dvh - 42px); }

/* Lišta náhledu pro admina (draft/hidden) */
.previewbar {
  height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: #b45309; color: #fff;
  font: 600 13.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.previewbar a { color: #fff; text-decoration: underline; }
.previewbar .pv-badge {
  background: rgba(255,255,255,.2); border-radius: 6px; padding: 4px 8px;
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
}

/* Logo realitky (roh) */
.tour-logo {
  position: absolute; top: 14px; left: 14px; z-index: 40; display: block;
  background: rgba(255,255,255,.92); border-radius: 12px; padding: 8px 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25); text-decoration: none;
}
.tour-logo img { display: block; max-height: 44px; max-width: 150px; }

/* Tlačítko Kontakt */
.tour-contact-btn {
  position: absolute; top: 14px; right: 14px; z-index: 40;
  min-height: 44px; padding: 0 20px; border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; background: rgba(15,23,42,.72); color: #fff;
  font: 600 14.5px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tour-contact-btn:hover { background: rgba(15,23,42,.88); }
.tour-contact-btn svg { width: 17px; height: 17px; }

/* Karta makléře */
/* z-index nad PSV navbarem (90), jinak by lišta s názvem překryla kartu
   kontaktu - hlavně mobilní bottom-sheet, který sedí u spodní hrany. */
.tour-sheet-overlay {
  position: fixed; inset: 0; z-index: 95; background: rgba(8,12,22,.55);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.tour-card {
  position: fixed; top: 68px; right: 14px; z-index: 100; width: 320px; max-width: calc(100vw - 28px);
  background: #fff; color: #0f172a; border-radius: 16px; box-shadow: 0 12px 50px rgba(0,0,0,.4);
  padding: 22px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: none;
}
body.tour-card-open .tour-card { display: block; }
body.tour-card-open .tour-sheet-overlay { opacity: 1; pointer-events: auto; }
.tour-card .tc-close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: none;
  border-radius: 10px; background: #f1f5f9; color: #475569; font-size: 17px; cursor: pointer;
}
.tour-card .tc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.tour-card .tc-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.tour-card .tc-name { font-weight: 800; font-size: 16.5px; }
.tour-card .tc-agency { color: #64748b; font-size: 13px; margin-top: 2px; }
.tour-card .tc-links { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.tour-card .tc-links a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  border-radius: 11px; background: #f6f8fa; color: #0f172a; text-decoration: none;
  font-weight: 600; font-size: 14.5px;
}
.tour-card .tc-links a:hover { background: #ecfdf7; color: #0f766e; }
.tour-card .tc-links svg { width: 17px; height: 17px; color: #0d9488; flex: none; }

/* Mobil: bottom-sheet */
@media (max-width: 640px) {
  .tour-card {
    top: auto; right: 0; left: 0; bottom: 0; width: 100%; max-width: none;
    border-radius: 18px 18px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .25s ease; display: block;
  }
  body.tour-card-open .tour-card { transform: none; }
}

/* Decentní podpis PixStudio (nad navbar) */
.tour-credit {
  position: absolute; right: 10px; bottom: 48px; z-index: 35;
  font: 500 11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: rgba(255,255,255,.55); text-decoration: none; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.tour-credit:hover { color: rgba(255,255,255,.85); }

/* Síťová hláška (pomalé připojení / chyba načtení) */
.tour-net {
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%);
  z-index: 46; max-width: min(440px, calc(100% - 28px));
  background: rgba(15, 23, 42, .82); color: #fff; text-align: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.14); border-radius: 13px;
  padding: 12px 16px; font: 500 13.5px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.tour-net.err { background: rgba(127, 29, 29, .88); border-color: rgba(255,255,255,.2); }
.tour-net-btn {
  display: inline-block; margin: 8px auto 0; min-height: 38px; padding: 0 18px;
  border: none; border-radius: 999px; background: #fff; color: #0f172a;
  font: 700 13.5px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; cursor: pointer;
}

/* "Walk" přechod: snímek starého pohledu se zvětšuje ke dveřím a mizí */
.tour-walk {
  position: absolute; inset: 0; z-index: 25; pointer-events: none;
  background-size: cover; background-position: center;
  will-change: transform, opacity;
  transition: transform .8s cubic-bezier(.3, .08, .25, 1), opacity .8s ease;
}
.tour-walk.go { transform: scale(1.65); opacity: 0; }

/* Prázdná / nedostupná prohlídka */
.tour-empty {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  color: #94a3b8; text-align: center; padding: 24px;
  font: 500 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tour-empty h1 { color: #e2e8f0; font-size: 21px; margin: 0 0 8px; }
