/* Floor list container */
#floor-list {
  position: fixed;
  bottom: 20px;  
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  z-index: 99; /* Lower than scale button (z-index: 100) */
  pointer-events: none; /* Allow clicks to pass through container */
}

.floor-item.selected {
  background-color: #e1e9ff;
  box-shadow: 0 2px 8px rgba(46, 134, 222, 0.4);
  border: 2px solid #2e86de;   /* Rounded stroke */
  border-radius: 10px;         /* Smooth corners */
}

/* Floor image list */
#floor-image-list {
  display: none;
  margin-bottom: 5px;
   display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  background: transparent !important;
  border-radius: 12px;
  pointer-events: auto; /* Make image list clickable */
  max-width: fit-content; /* Take only needed width */
}

#floor-image-list img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

#floor-image-list img:hover,
#floor-image-list img.selected {
  border-color: #2e86de;
}

/* Floor items container - enable clicks only here */
.floor-items-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  background: transparent !important;
  padding: 10px 15px;
  border-radius: 12px;
  pointer-events: auto; /* Re-enable clicks for the items */
  max-width: fit-content; /* Take only needed width */
}

/* Floor scale container */
#floor-scale-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  margin-right: 10px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: #333;
}

#floor-list,
.floor-list-container{
  background-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}

/* Floor items */
.floor-item {
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
   border: 2px solid transparent;  
  pointer-events: auto; /* Ensure items are clickable */
}

/* Floor icons */
.floor-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  object-fit: contain;
}

/* Floor labels */
.tool-label {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  text-align: center;
  user-select: none;
  pointer-events: none;
}

.floor-item:hover {
  background-color: #e1e9ff;
  box-shadow: 0 2px 8px rgba(46, 134, 222, 0.4);
}

.component-item.selected {
  background-color: #e1e9ff;
  box-shadow: 0 2px 8px rgba(46, 134, 222, 0.4);
  border: 2px solid #2e86de;
  border-radius: 10px;
}


@media (max-width: 768px) {

  /* ===== FLOOR LIST ===== */


  .floor-item {
    width: 35px;
    height: 40px;
    padding: 2px;
  }

  .floor-icon {
    width: 24px;
    height: 24px;
  }

  .tool-label {
    font-size: 10px;
      font-weight: 800;

  }

  #floor-image-list img {
    width: 40px;
    height: 40px;
  }

   
  .floor-items-container {
  display: flex;
  flex-wrap: nowrap;          
  overflow-x: auto;           /*  allow horizontal scroll */
  overflow-y: hidden;
  gap: 12px;
  justify-content: flex-start;
  max-width: 100vw;           /* limit to screen width */
  -webkit-overflow-scrolling: touch; /* smooth iOS scroll */
}


}



/* Floor scale container - Bottom Left */
#floor-scale-container {
  position: fixed;
  display: none; /* hidden by default */
  bottom: 20px;
  left: 20px;
  z-index: 100;
   align-items: center;
  gap: 8px;
}

#floor-scale-btn {
  background: #4da6ff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

#floor-scale-label {
  color: black;
  font-size: 14px;
}




/* Custom Alert Overlay */
.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.alert-overlay.hidden {
  display: none;
  opacity: 0;
}

/* Alert Box */
.alert-box {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: alertSlideIn 0.3s ease-out;
  transform-origin: center;
}

@keyframes alertSlideIn {
  from {
    transform: scale(0.7) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Alert Icon */
.alert-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-icon i {
  font-size: 30px;
  color: white;
}

/* Alert Message */
.alert-message {
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 25px;
  font-weight: 500;
}

/* OK Button */
.alert-ok-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.alert-ok-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.alert-ok-btn:active {
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .alert-box {
    max-width: 320px;
    width: 85%;
    padding: 25px 20px;
    border-radius: 16px;
  }

  .alert-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 16px;
  }

  .alert-icon i {
    font-size: 24px;
  }

  .alert-message {
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
  }

  .alert-ok-btn {
    padding: 10px 35px;
    font-size: 15px;
    border-radius: 20px;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .alert-box {
    max-width: 280px;
    padding: 20px 16px;
  }

  .alert-message {
    font-size: 14px;
  }
}
