/* FloorPlanMap Component Styles */

.floor-plan-map-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #FFFFFF;
  font-family: 'Bio Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Image Container */
.floor-plan-image-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #F8FAFC;
  min-height: 0; /* Important for flex child */
  user-select: none;
}

/* Pattern overlay for the image container */
.floor-plan-image-container.pattern-scales::before {
  opacity: 0.03; /* Make it more subtle than login/register pages */
}

.floor-plan-image-container.cursor-default {
  cursor: default;
}

.floor-plan-image-container.cursor-grab {
  cursor: grab;
}

.floor-plan-image-container.cursor-grabbing {
  cursor: grabbing;
}

.floor-plan-content {
  transform-origin: top left;
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.2s ease-out;
}

.floor-plan-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* SVG Overlay */
.floor-plan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Person Markers */
.person-marker {
  cursor: pointer;
  pointer-events: auto;
}

.person-dot {
  transition: all 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.person-marker:hover .person-dot {
  r: 8;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.person-label-bg {
  transition: all 0.2s ease;
}

.person-marker:hover .person-label-bg {
  fill: rgba(0, 0, 0, 0.95);
}

.person-label-text {
  transition: all 0.2s ease;
}

.sim-indicator {
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.person-marker:hover .sim-indicator {
  opacity: 1;
}

/* Bottom Info Panel */
.floor-plan-info-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #E2E8F0;
  backdrop-filter: blur(8px);
  z-index: 20;
  min-height: 48px;
  flex-shrink: 0;
}

.info-stats {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.info-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.loading-text {
  color: #E12424;
  font-weight: 700;
  animation: pulse 1.5s infinite;
  margin-left: 8px;
}

.info-icon {
  font-size: 12px;
  font-weight: 700;
}

.info-icon-red {
  color: #E12424;
}

.info-icon-orange {
  color: #F59E0B;
}

.info-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #E12424;
  border: 2px solid #E12424;
  border-radius: 6px;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0;
}

.zoom-btn:hover {
  background: #FFFFFF;
  color: #E12424;
  transform: scale(1.05);
}

.zoom-btn:active {
  transform: scale(0.95);
}

.zoom-btn:disabled {
  background: #9CA3AF;
  border-color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
}

.zoom-level {
  padding: 6px 12px;
  background: #FFFFFF;
  border: 2px solid #E12424;
  border-radius: 6px;
  color: #E12424;
  font-size: 11px;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  transition: all 0.2s ease;
}

.zoom-level-clickable {
  cursor: pointer;
}

.zoom-level:hover,
.zoom-level-clickable:hover {
  background: #E12424;
  color: #FFFFFF;
}

/* Debug Panel Container */
.debug-panel-container {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 30;
}

/* Loading State */
.floor-plan-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
  color: #64748B;
}

.loading-spinner {
  font-size: 16px;
  font-weight: 500;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .floor-plan-info-panel {
    padding: 10px 12px;
    min-height: 44px;
  }
  
  .info-stats {
    gap: 16px;
  }
  
  .info-stat {
    font-size: 10px;
  }
  
  .zoom-btn {
    width: 28px;
    height: 28px;
  }
  
  .zoom-level {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 40px;
  }
}

@media (max-width: 768px) {
  .floor-plan-info-panel {
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
    min-height: auto;
  }
  
  .info-stats {
    gap: 12px;
    justify-content: center;
  }
  
  .info-controls {
    gap: 6px;
  }
  
  .debug-panel-container {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 480px) {
  .info-stats {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  
  .info-stat {
    font-size: 9px;
  }
  
  .zoom-btn {
    width: 24px;
    height: 24px;
  }
  
  .zoom-level {
    padding: 3px 6px;
    font-size: 9px;
    min-width: 35px;
  }
  
  .debug-panel-container {
    top: 8px;
    right: 8px;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .floor-plan-info-panel {
    border-top: 2px solid #000000;
    background: #FFFFFF;
  }
  
  .zoom-btn {
    border-width: 3px;
  }
  
  .zoom-level {
    border-width: 3px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .person-dot,
  .person-label-bg,
  .person-label-text,
  .sim-indicator,
  .zoom-btn {
    transition: none;
  }
  
  .loading-spinner {
    animation: none;
  }
}