#floorplan {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
canvas.grabbing {
  cursor: grabbing;
}
canvas.pointer {
  cursor: pointer;
}
#info-panel {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 180px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  padding: 10px;
  z-index: 10;
}
#info-panel.visible {
  display: block;
}
#info-close {
  position: absolute;
  top: 0;
  right: 0;
  background: #438ef0;
  border: none;
  font-size: 20px;
  padding: 5px;
  cursor: pointer;
  color: #fff;
  line-height: 13px;
  border-radius: 0 4px;
}
#info-close:hover {
  background: #3a7bc8;
}
#info-logo {
  display: none;
  width: 100%;
  aspect-ratio: 1/0.5;
  object-fit: contain;
  padding: 12px;
  box-sizing: border-box;
  margin-bottom: 10px;
  border-radius: 6px;
}
#info-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 0px;
  text-align: center;
}
#info-company {
  font-size: 14px;
  color: #4a90d9;
  margin-bottom: 4px;
}
#info-category {
  display: none !important;
  font-size: 12px;
  color: #666;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 0;
}
#info-hours {
  display: none;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}
#info-hours dt {
  font-weight: 600;
  display: inline;
}
#info-hours dd {
  display: inline;
  margin: 0 0 0 4px;
}
#info-hours dd::after {
  content: '';
  display: block;
}
#info-more {
  width: 48%;
  margin-top: 8px;
  padding: 7px;
  background: #fff;
  color: #438ef0;
  border: 1.5px solid #438ef0;
  border-radius: 6px;
  float: left;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  font-family: inherit;
}
#info-more:hover {
  background: #438ef0;
  color: #fff;
}
#info-navigate {
  display: block;
  width: 48%;
  margin-top: 8px;
  padding: 7px;
  background: #438ef0;
  color: #fff;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  border: 1.5px solid #438ef0;
  cursor: pointer;
  float: right;
  transition: background 0.15s;
  font-family: inherit;
}
#info-navigate:hover {
  background: #438ef0;
}
#floor-switcher {
  position: absolute;
  bottom: 14px;
  left: 11px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 5px 4px 2px;
  border-radius: 30px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  z-index: 10;
  width: auto;
  left: 50%;
  transform: translateX(-50%);
}
#floor-switcher button {
  border: none;
  background: transparent;
  color: #444;
  font-family: inherit;
  border-radius: 40px;
  font-size: 9px;
  font-weight: 700;
  padding: 7px 11px;
  margin-left: 3px;
  cursor: pointer;
  white-space: nowrap;

  transition:
    background 0.15s,
    color 0.15s;
}
#floor-switcher button:hover {
  background: rgba(255, 255, 255, 0.3);
}
#floor-switcher button.active {
  background: #438ef0;
  color: #fff;
}
#floor-switcher button.active:hover {
  background: #438ef0;
}

@keyframes blink-background {
  0%,
  100% {
    background-color: #b2d4ff;
  }
  50% {
    background-color: transparent;
  }
}

#floor-switcher button.has-route:not(.active) {
  animation: blink-background 1s infinite ease-in-out;
}
#top-left-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  z-index: 10;
}
#search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 30px;
  background: transparent;
  gap: 2px;
}
#search-input {
  width: 125px;
  padding: 6px 10px;
  border: none;
  font-size: 12px;
  font-family: inherit;
  background: transparent;
  border-radius: 30px;
  color: #333;
}
#search-input::placeholder {
  color: #777;
  background: transparent;
}
#search-input:focus {
  outline: none;
  background: transparent;
}
#search-clear {
  display: block;
  visibility: hidden;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: #c62828;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 30px;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s;
}
#search-wrapper.search-active #search-clear {
  display: flex;
  visibility: visible;
}
#search-clear:hover {
  background: #b71c1c;
  color: #fff;
}
#search-no-result {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  font-size: 10px;
  color: #c62828;
}
#search-wrapper.no-result #search-no-result {
  display: block;
  visibility: visible;
}
#map-bottom-left-stack {
  position: absolute;
  bottom: 15px;
  left: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
#map-bottom-left-stack button {
  width: 34px;
  height: 34px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#map-bottom-left-stack button:hover {
  background: #fff;
}
#url-entity-recenter-btn[hidden] {
  display: none !important;
}
#nav-modal {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
#nav-modal.visible {
  display: flex;
}
.nav-modal-content {
  background: #fff;
  width: 90%;
  max-width: 400px;
  max-height: 80%;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.nav-modal-header {
  padding: 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #222;
}
#nav-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #888;
  line-height: 1;
  padding: 4px;
}
.nav-modal-search-wrapper {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
#nav-modal-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
#nav-modal-search:focus {
  border-color: #222;
}
.nav-modal-body {
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}
.nav-company-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-company-item:hover {
  background: #f5f5f5;
}
.nav-company-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  background: #f9f9f9;
}
.nav-company-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
#iso-view-container {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
}
#iso-view-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#iso-view-container canvas.grabbing {
  cursor: grabbing;
}

@media (max-width: 768px), (max-height: 500px) {
  #floor-switcher {
    bottom: 10px;
    left: 11px;
    transform: none;
  }
  #floor-switcher button {
    font-size: 9px;
    padding: 6px 5px 7px 5px;
    letter-spacing: -0.3px;
    margin-bottom: 1px;
  }
  #top-left-controls {
    top: 10px;
    left: 10px;
    padding: 3px;
    gap: 3px;
  }
  #search-input {
    width: 125px;
    padding: 5px 10px;
  }
  #search-clear {
    width: 29px;
    height: 29px;
    font-size: 18px;
  }
  #map-bottom-left-stack {
    bottom: 55px;
    left: 10px;
  }
  #map-bottom-left-stack button {
    width: 30px;
    height: 30px;
  }
}
