model-viewer::part(hotspot) {
  pointer-events: auto;
}

@font-face {
  font-family: 'P3regular';
  src: url('Ciutadella-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'P3bold';
  src: url('Ciutadella-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: bold;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

#container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  flex-direction: row;
}

#viewer-container {
  width: 78vw;
  height: 100vh;
  position: relative;
}

#sidebar {
  height: auto;
  max-height: 100dvh;
  min-height: 0;
  width: 22vw;
  overflow-y: auto;
  position: relative;
  background-color: #004685;
  padding: 25px;
  box-sizing: border-box;
  font-family: 'P3bold';
  color: white;
}

@media (max-width: 1024px) {
  #container {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    height: auto;
    max-height: 40vh;
    order: 2;
  }

  model-viewer {
    width: 100vw;
    height: 60vh;
    order: 1;
  }
  
  #viewer-container {
    width: 100vw;
    height: 100vh;
    position: relative;
  }
  
}

@media (min-width: 1024px) and (max-width: 1800px) {

  #sidebar {
    width: 35vw;
  }
   #viewer-container {
    width: 65vw;
  }
}


.siteplanHeader {
font-weight: bold;
font-size: 1.5rem;
margin-bottom: 1.2rem;
letter-spacing: 0.03em;
}

.Hotspot {
  background: #fff;
  border-radius: 32px;
  border: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  cursor: pointer;
  height: 24px;
  padding: 8px;
  position: relative;
  transition: opacity 0.3s;
  width: 24px;
}

.Hotspot:focus {
  border: 4px solid rgb(0, 128, 200);
  height: 32px;
  outline: none;
  width: 32px;
}

.Hotspot > * {
  opacity: 0.8;
  transform: translateY(-50%);
}

.HotspotAnnotation {
  background: #00000017;
  padding: 8px;
  border-radius: 4px;
  font-family: 'P3bold',sans-serif;
  font-size: clamp(12px, 0.7vw, 15px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.0);
  max-width: 220px;
  z-index: 20;
  position: relative;
  top: 0px;
  white-space: nowrap;
  opacity: 1;
  color: white;
  cursor: pointer;
}

.hotspot-label {
  font-weight: bold;
  margin-bottom: 0px;
  white-space: nowrap;
}

.hotspot-details {
  display: none;
}

.hotspot-details.visible {
  display: block;
  white-space: nowrap;
  font-family: 'P3regular',sans-serif;
  /* color: #004685;  Odstránené, aby fungovali farebné statusy */
}

/* Zvýraznenie farebných statusov v anotácii */
.x-status-available { color: #1c9434 !important; font-weight: bold; }
.x-status-na { color: #cc0000 !important; font-weight: bold; }
.x-status-development { color: orange !important; font-weight: bold; }

.HotspotAnnotation .hotspot-details.visible ~ .hotspot-label,
.HotspotAnnotation:has(.hotspot-details.visible) {
  background-color: #ffffffeb;
  border-color: #cc0000;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
  color: #004685;
}

.logo-title-container {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  z-index: 11;
  background-color: #004685;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
  min-height: 40px;
}

.logo-title-logo {
  width: 4.5vw;
  max-width: 100px;
  min-width: 70px;
  height: auto;
}

.page-title {
  font-family: 'P3bold', sans-serif;
  font-size: clamp(24px, 1.5vw, 35px);
  color: white;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 20px;
  margin-bottom: 20px;
  margin-left: 35px;
  margin-right: 35px;
}

.custom-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px;
  font-size: clamp(12px, 0.7vw, 14px);
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f0f0f0;
  transition: background 0.3s;
  font-family: 'P3regular';
  text-align: left;
  color: #00305A;
}

.custom-button .material-symbols-outlined {
  color: #004685;
  font-size: 32px;
  width: 32px;
  min-width: 32px;
  text-align: center;
  margin-right: 12px;
  display: inline-block;
  vertical-align: middle;
}

.custom-button span.button-text {
  font-size: clamp(12px, 0.7vw, 14px);
  font-weight: 500;
  color: #00305A;
  display: inline-block;
}

.custom-button:hover {
  background: #e0e0e0;
}

.hotspot-toggle-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hotspot-list-panel {
  overflow: hidden;
  max-height: calc(100vh - 240px);
  border-top: 1px solid #ccc;
  padding-top: 2px;
  font-size: clamp(12px, 0.7vw, 14px);
}

.hotspot-list-row {
  border-bottom: 1px solid #ddd;
  padding: 6px;
  cursor: pointer;
}

.hotspot-list-row:hover {
  border-bottom: 1px solid #ddd;
  padding: 6px;
  background-color: white;
  color: #004685;
  cursor: pointer;
}

/* Kontajner tabuľky */
.hotspot-list-panel table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

/* Hlavička tabuľky */
.hotspot-list-panel th {
  text-align: center;
  padding: 8px;
  font-weight: bold;
  border-bottom: 3px solid #ccc;
}

/* Bunky tabuľky */
.hotspot-list-panel td {
  text-align: center;
  padding: 8px;
  border-bottom: 1px solid #eee;
  word-wrap: break-word;
}

/* Hover efekt na riadok */
.hotspot-list-panel tr:hover {
  background-color: #d0e6ff;
  cursor: pointer;
  color: #004685;
}

/* Aktívny (kliknutý) riadok */
.hotspot-list-panel tr.active-row {
  background-color: #d0e6ff;
  color: #004685;
}

.active-row {
  background: #d0e6ff !important;
  font-weight: bold;
  transition: background 0.2s;
}

.custom-legend {
  position: fixed;
  left: 20px;
  bottom: 20px;
  min-width: 260px;
  z-index: 5;
  background: rgba(18, 22, 33, 0.65);
  border-radius: 12px;
  padding: 18px 20px 14px 16px;
  box-shadow: 0 2px 12px 0 #0a19303a;
  font-size: clamp(12px, 0.7vw, 14px);
  color: #fff;
  user-select: none;
  pointer-events: none;
  font-family: 'P3regular';
}
.custom-legend .legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  pointer-events: auto;
}
.custom-legend .legend-row:last-child { margin-bottom: 0; }
.custom-legend .legend-swatch img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  border-radius: 7px;
  box-shadow: 0 1px 4px 0 #0002;
  border: 1.5px solid #202840;
  background: #fff2;
  display: block;
}
.custom-legend .legend-label {
  font-size: clamp(12px, 0.7vw, 14px);
  color: #fff;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  filter: drop-shadow(0 1px 2px #0004);
}


/* MOBILNÁ LEGENDA – keď je v sidebare */
.custom-legend.legend-mobile {
  position: static !important;
  left: unset;
  bottom: unset;
  margin-top: 24px;
  margin-bottom: 14px;
  max-width: 100%;
  width: auto;
  background: rgba(18, 22, 33, 0.88);
  padding: 14px 10px 10px 10px;
  border-radius: 11px;
  box-shadow: 0 2px 10px 0 #0a193026;
  pointer-events: none;
  font-size: clamp(12px, 0.7vw, 14px);
}

@media (max-width: 1024px) {
  .custom-legend.legend-mobile .legend-label {
    font-size: clamp(12px, 0.7vw, 14px);
  }
  .custom-legend.legend-mobile .legend-swatch img {
    width: 25px;
    height: 25px;
  }
}

/* --- STATUS DOTS & ANNOTATION COLORS --- */
.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50%;
  display: inline-block;
  background: #bbb;
  margin-left: 5px;
  vertical-align: middle;
}
.status-dot.available { background: #1c9434 !important; }
.status-dot.na { background: #cc0000 !important; }
.status-dot.development { background: orange !important; }

.x-status-available { color: #1c9434 !important; font-weight: bold; }
.x-status-na { color: #cc0000 !important; font-weight: bold; }
.x-status-development { color: orange !important; font-weight: bold; }

.hotspot-list-panel table {
  table-layout: auto !important;
  width: 100%;
}

/* Druhý stĺpec tabuľky: label */
.hotspot-list-panel table th:nth-child(2),
.hotspot-list-panel table td:nth-child(2) {
  white-space: normal;
  padding-left: 14px;
  padding-right: 14px;
  width: auto;
  min-width: 50px;
  word-break: break-word;
}

.HotspotAnnotation.inactive .hotspot-label {
  color: #ffffff96!important;
  transition: color 0.3s;
}

/* Layout dvoch stĺpcov buttonov */
.button-columns {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: auto; /* nastav výšku podľa počtu tlačidiel, alebo použi auto */
  min-height: 100px;
  margin-bottom: 20px;
  gap: 10px;
}

.button-panel {
  flex: 0 70%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.button-map-panel {
  flex: 0 30%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: auto;
}

/* Veľké map tlačidlo - prispôsobené na výšku stĺpca */
.custom-map-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  min-height: 60px;
  width: 100%;
  padding: 8px;
  font-size: clamp(12px, 0.7vw, 14px);
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f0f0f0;
  transition: background 0.3s;
  font-family: 'P3regular';
}
.custom-map-button:hover {
  background: #e8f3ff;
}

.custom-map-button .material-symbols-outlined {
  color: #004685;
  font-size: 50px;
  min-width: 32px;
  text-align: center;
  margin-right: 0px;
  display: inline-block;
  vertical-align: middle;
}

.custom-map-button .button-text {
  font-size: clamp(12px, 0.7vw, 14px);
  font-weight: 500;
  color: #00305A;
  display: inline-block;
}

/* Lightbox overlay a modal */
.map-modal-overlay {
  position: fixed;
  z-index: 10;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(16,22,33,0.83);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 48px #0007;
  position: relative;
  width: 95vw;
  max-width: 1000px;
  max-height: 95vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.map-modal iframe {
  width: 100%;
  height: 420px;
  border: none;
  border-radius: 0 0 16px 16px;
  display: block;
}

.map-modal-close {
  position: absolute;
  top: 0;
  right: 0;
  margin: 10px 18px 0 0;
  background: none;
  border: none;
  font-size: 2.6rem;
  color: #004685;
  cursor: pointer;
  z-index: 10;
  transition: color 0.18s;
}
.map-modal-close:hover {
  color: #bb2424;
}

@media (max-width: 1024px) {
  .button-columns {
    flex-direction: column;
    gap: 10px;
  }
  .button-map-panel {
    height: auto;
  }
  .custom-map-button {
    min-height: 44px;
    height: 44px;
  }
  .map-modal {
    max-width: 98vw;
    min-width: 0;
  }
  .map-modal iframe {
    height: 240px;
  }
}

@media (max-width: 1024px) {
  .custom-map-button {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 8px !important;
    width: 100% !important;
    font-size: clamp(12px, 0.7vw, 14px) !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background: #f0f0f0 !important;
    transition: background 0.3s !important;
    font-family: 'P3regular' !important;
    margin-bottom: 0 !important;
  }
  .custom-map-button .material-symbols-outlined {
    color: #004685 !important;
    font-size: 22px !important;
    min-width: 32px !important;
    margin-left: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
  }
  .custom-map-button .button-text {
    font-size: clamp(12px, 0.7vw, 14px) !important;
    font-weight: 500 !important;
    color: #00305A !important;
    display: inline-block !important;
  }
}

.POIAnnotation {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}
.poi-dot {
  width: 40px;         /* väčšia klikacia plocha */
  height: 40px;
  background: transparent;
  position: absolute;
  left: -18px; top: -18px; /* upravené na centrovanie podľa novej veľkosti */
  cursor: pointer;
  border: none;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
}

.poi-dot::before {
  content: '';
  display: block;
  width: 23px;
  height: 23px;
  background: white;
  border: 2.5px solid #004685;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s;
  z-index: 1;
}

.poi-dot:hover::before {
  border: 2.5px solid #004685;
  box-shadow: 0 0 12px #ffffff;
}

.poi-dot.main_entrance::before { 
  background: #004685; 
  border-color: white;
  animation: poiPulse 1.4s infinite cubic-bezier(.47,1.64,.41,.8);
}

@keyframes poiPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.28);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.poi-annotation {
  display: none;
  position: absolute;
  left: 35px;
  top: -20px;
  background: #ffffffeb;
  color: #00305A;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.0);
  font-family: 'P3bold', sans-serif;
  font-size: clamp(12px, 0.7vw, 15px);
  min-width: 180px;
  max-width: 290px;
  padding: 8px;
  z-index: 100;
  pointer-events: auto;
  text-align: left;
}
  
 .poi-dot svg {
  position: relative;
  z-index: 2;
  display: block;
  pointer-events: none;
} 
  
.poi-annotation .poi-name {
  font-size: clamp(12px, 0.7vw, 15px);
  font-weight: bold;
  margin-bottom: 4px;
  color:#004685;
  text-align: left;
}
.poi-annotation .poi-desc {
  font-size: clamp(12px, 0.7vw, 15px);
  margin-top: 2px;
  color: #004685;
  font-family: 'P3regular', sans-serif;
  text-align: left;
}
@media (max-width: 800px) {
  .poi-annotation {
   left: 35px;
   top: -20px;
    min-width: 120px;
    max-width: 96vw;
    font-size: 13px;
    padding: 7px 9px;
  }
  
}