/* ==========================================================================
   Poznej Janov – Fresh 2 Rewrite
   Design system matching janov-sy.cz
   ========================================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #c81e1e;
  --color-primary-dark: #a11b1b;
  --color-primary-light: #fee2e2;
  --color-accent: #2563eb;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-bg: #ffffff;
  --color-bg-subtle: #f9fafb;
  --color-border: #e5e7eb;
  --color-border-hover: #d1d5db;
  --sidebar-width: 280px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
  height: 100%;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   App Shell
   ========================================================================== */

.app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar__logo img {
  width: 40px;
  height: auto;
  flex-shrink: 0;
}

.sidebar__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.sidebar__logo-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.sidebar__logo-text span {
  font-size: 12px;
  color: var(--color-text-light);
}

.sidebar__toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--color-text);
  transition: background var(--transition);
}

.sidebar__toggle:hover {
  background: var(--color-bg-subtle);
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar__section-title {
  padding: 4px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
}

.sidebar__list {
  list-style: none;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  font-size: 14px;
  text-align: left;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  position: relative;
}

.sidebar__item:hover {
  background: var(--color-bg-subtle);
}

.sidebar__item--active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 500;
}

.sidebar__item--active:hover {
  background: var(--color-primary-light);
}

.sidebar__item-emoji {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar__item-label {
  flex: 1;
}

.sidebar__item-check {
  flex-shrink: 0;
  color: var(--color-primary);
}

.sidebar__item--expand {
  margin-top: 4px;
  padding-left: 48px;
  color: var(--color-text-light);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar__item--expand:hover {
  color: var(--color-text);
}

.sidebar__desk-badge {
  margin: 8px 16px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--color-accent);
  background: #eff6ff;
  border-radius: var(--radius);
  text-align: center;
}

.sidebar__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.sidebar__footer-link {
  font-size: 12px;
  color: var(--color-text-light);
  transition: color var(--transition);
}

.sidebar__footer-link:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   Map
   ========================================================================== */

.map-container {
  flex: 1;
  position: relative;
  min-width: 0;
}

.map {
  width: 100%;
  height: 100%;
}

/* Marker styles */
.marker-icon {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}

/* Ensure hovered markers are on top so tooltip is visible */
.leaflet-marker-icon:hover {
  z-index: 10000 !important;
}

.map-marker {
  position: relative;
  width: 40px;
  height: 52px;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform 150ms ease;
}

.map-marker:hover {
  transform: scale(1.1);
  z-index: 1000 !important;
}

.map-marker svg {
  position: absolute;
  top: 0;
  left: 0;
}

.map-marker-icon {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
  z-index: 11111;
}

/* Hover tooltip label */
.map-marker-tooltip {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 999;
  line-height: 1.3;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Arrow pointing up from tooltip to marker */
.map-marker-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--color-bg);
  filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.06));
}

.map-marker:hover .map-marker-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(100%) translateY(2px);
}

/* ==========================================================================
   Marker Clusters (inlined from MarkerCluster.css to avoid CDN blocks)
   ========================================================================== */

.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: none !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: none !important;
}

.cluster-icon {
  background: transparent !important;
  border: none !important;
}

.cluster-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  box-shadow:
    0 0 0 4px rgba(200, 30, 30, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 200ms ease;
  cursor: pointer;
  position: relative;
}

.cluster-marker::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(200, 30, 30, 0.25);
  animation: cluster-pulse 3s ease-out infinite;
}

@keyframes cluster-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

.cluster-marker:hover {
  transform: scale(1.1);
}

.cluster-marker span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cluster--sm {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.cluster--md {
  width: 50px;
  height: 50px;
  font-size: 14px;
}

.cluster--lg {
  width: 60px;
  height: 60px;
  font-size: 16px;
}

/* Spider leg styling */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform 300ms ease, opacity 300ms ease !important;
}

/* Leaflet overrides */
.leaflet-control-zoom {
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 16px !important;
  color: var(--color-text) !important;
  border-bottom-color: var(--color-border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--color-bg-subtle) !important;
}

/* ==========================================================================
   Popup
   ========================================================================== */

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  pointer-events: auto;
}

.popup {
  width: 380px;
  max-width: 100vw;
  height: 100%;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  padding: 24px;
  animation: popup-slide-in 250ms ease-out;
}

@keyframes popup-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.popup__close {
  position: sticky;
  top: 0;
  float: right;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text-light);
  transition: background var(--transition), color var(--transition);
  z-index: 1;
}

.popup__close:hover {
  background: var(--color-bg-subtle);
  color: var(--color-text);
}

.popup__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-right: 40px;
}

.popup__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}

.popup__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.popup__content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 20px;
}

.popup__content p {
  margin-bottom: 8px;
}

.popup__content strong {
  font-weight: 600;
}

.popup__pano-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-bg);
  background: var(--color-primary);
  border-radius: var(--radius);
  transition: background var(--transition);
  margin-bottom: 12px;
  justify-content: center;
}

.popup__pano-btn:hover {
  background: var(--color-primary-dark);
}

.popup__pano-btn svg {
  flex-shrink: 0;
}

.popup__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 16px;
  transition: color var(--transition);
}

.popup__link:hover {
  color: var(--color-primary-dark);
}



.popup__qr-section {
  margin: 20px 0;
  padding: 16px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.popup__qr-section h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text);
  display: flex;
  align-items: center;
}

.popup__qr-canvas {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.popup__qr-canvas canvas,
.popup__qr-canvas img {
  border-radius: var(--radius);
  border: 4px solid white;
  box-shadow: var(--shadow-sm);
}

.popup__coords {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-light);
  font-variant-numeric: tabular-nums;
}

.popup__gallery {
  margin-top: 20px;
}

.popup__gallery-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.popup__gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.popup__gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}

.popup__gallery-item:hover img {
  opacity: 0.85;
}

/* ==========================================================================
   Pano Page
   ========================================================================== */

.pano-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
}

.pano-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  transition: background var(--transition);
}

.pano-back:hover {
  background: rgba(0, 0, 0, 0.7);
}

.pano-title {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  white-space: nowrap;
}
@media(max-width: 686px) {
  .pano-title{
    top: unset;
    bottom: 4rem;
  }
}

.pano-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.pano-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  transition: opacity 300ms ease;
  touch-action: none;
}

.pano-canvas:active {
  cursor: grabbing;
}

.pano-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #000;
  z-index: 5;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.pano-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pano-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #ef4444;
  font-size: 14px;
  z-index: 5;
}

.pano-controls-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
}

/* HQ progressive loading badge */
.pano-hq-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  animation: hq-fade-in 300ms ease;
}

@keyframes hq-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.pano-hq-badge__spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

/* ==========================================================================
   Pano Hotspots
   ========================================================================== */

.pano-hotspots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.pano-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.pano-hotspot__ring {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 200ms ease, background 200ms ease;
}

.pano-hotspot:hover .pano-hotspot__ring {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.6);
}

.pano-hotspot__pulse {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  animation: hotspot-pulse 2.5s ease-out infinite;
}

@keyframes hotspot-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.pano-hotspot__label {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  white-space: nowrap;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
  line-height: 1.3;
  max-width: 200px;
  text-overflow: ellipsis;
  overflow: hidden;
}

.pano-hotspot__label::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid rgba(0, 0, 0, 0.7);
}

.pano-hotspot:hover .pano-hotspot__label {
  opacity: 1;
  transform: translateX(-50%) translateY(100%) translateY(2px);
}

.pano-transition-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 8;
  pointer-events: none;
}


Copy

/* ===================================================
   Pano Context Menu (right-click)
   Add these to your existing pano stylesheet.
   =================================================== */
 
.pano-ctx-menu {
  position: absolute;
  z-index: 1000;
  min-width: 200px;
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
  animation: ctx-menu-in 0.12s ease-out;
}
 
@keyframes ctx-menu-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
 
.pano-ctx-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  color: #e5e7eb;
  font-size: 13px;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
 
.pano-ctx-menu__item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
 
.pano-ctx-menu__item svg {
  flex-shrink: 0;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 3000;
  }

  .sidebar--open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar__toggle {
    display: flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2500;
    width: 40px;
    height: 40px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
  }

  .sidebar--open .sidebar__toggle {
    position: static;
    border: none;
    box-shadow: none;
    width: 36px;
    height: 36px;
  }

  .popup {
    width: 100%;
    max-height: 65vh;
    height: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-left: none;
    border-top: 1px solid var(--color-border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: popup-slide-up 250ms ease-out;
  }

  @keyframes popup-slide-up {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .popup-overlay {
    align-items: flex-end;
    justify-content: stretch;
    background: rgba(0, 0, 0, 0.3);
  }

  .pano-title {
    font-size: 13px;
    padding: 6px 14px;
  }
}

/* ==========================================================================
   Official Desk Mode
   ========================================================================== */

.official-desk .sidebar {
  width: 320px;
}

.official-desk .popup {
  width: 420px;
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .sidebar,
  .popup__close,
  .pano-controls-hint {
    display: none;
  }

  .map-container {
    width: 100%;
  }
}