/* Import Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

.tools-switcher {
  position: fixed;
  bottom: 20px;
  right: 20px; /* Primary position in bottom right */
  z-index: 1000;
}

.tools-toggle {
  background-color: #5E35B1;
  border: none;
  border-radius: 50%;
  color: white;
  width: 56px;
  height: 56px;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
}

.tools-toggle:hover {
  background-color: #4527A0;
  transform: scale(1.1);
}

.tools-list {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 360px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  display: none;
}

.tools-switcher.active .tools-list {
  display: grid;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
  text-decoration: none;
  color: #333;
}

.tool-item:hover {
  background: #f5f5f5;
}

.tool-item.active {
  background: #ede7f6;
}

.tool-icon {
  font-size: 24px;
  margin-bottom: 8px;
  color: #5E35B1;
}

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

.tool-name {
  font-size: 14px;
  font-weight: 500;
}

.active .tool-icon {
  color: #4527A0;
}

/* Dragging styles */
.tools-switcher.dragging {
  opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tools-list {
    width: 250px;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Floating buttons container for page elements */
.floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 90px; /* Secondary position, to the left of the tools button */
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 990; /* Lower than tools-switcher */
}

.floating-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #5E35B1;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.floating-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.floating-button i {
  font-size: 24px;
}

.floating-button.screentools {
  background-color: #5E35B1; /* Purple background for home button */
}
