#components-list {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  z-index: 99;
  pointer-events: none;
  background-color: transparent !important;
  width: min(60vw, 900px);
  max-width: calc(100vw - 120px);
}

#component-image-list {
  display: none;
  gap: 10px;
  margin-bottom: 5px;
  justify-content: center;
  flex-wrap: nowrap;
  pointer-events: auto;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 10px;
}

#component-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;
}

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

/* Items container */
.components-items-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 10px 15px;
  pointer-events: auto;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Base item style */
.component-item {
  width: 60px;
  height: 50px;
  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;
}

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

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

.component-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  object-fit: contain;
}

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

#component-image-list img,
.component-item {
  flex: 0 0 auto;
}

/* Small Reset Button Style */
.reset-small-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #4deaff9d;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-right: 10px;
  transition: transform 0.2s ease, background-color 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.reset-small-btn:hover {
  background-color: #2ae6ff8e;
  transform: scale(1.1);
}

.reset-small-btn:active {
  transform: scale(0.9);
}

/* Tint Button Style */
.tint-small-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #ff9f43;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-right: 5px;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

/* Sliders Panel */
.sliders-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  padding: 12px;
  border-radius: 15px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 200px;
  pointer-events: auto;
  transition: all 0.3s ease;
}

.sliders-panel.hidden {
  display: none;
}

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

.slider-group i {
  color: #555;
  width: 15px;
}

/* The Linear Slider Look */
.linear-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
}

/* Full color spectrum with black and white at the ends */
#tint-color-slider {
  background: linear-gradient(to right, 
    #000000 0%,      /* Black */
    #ff0000 14%,     /* Red */
    #ff00ff 28%,     /* Magenta */
    #0000ff 42%,     /* Blue */
    #00ffff 56%,     /* Cyan */
    #00ff00 70%,     /* Green */
    #ffff00 84%,     /* Yellow */
    #ffffff 100%     /* White */
  );
}

.linear-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2e86de;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
  #components-list {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    bottom: 12px;
  }

  /* ===== COMPONENT LIST ===== */
  .component-item {
    width: 40px;
    height: 42px;
    padding: 4px;
  }

  .component-icon {
    width: 34px;
    height: 34px;
  }

  .component-tool-label {
    font-size: 13px;
  }

  #component-image-list img {
    width: 34px;
    height: 34px;
  }

  /* Items container */
  .components-items-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
}