/* Controls CSS - Buttons, panels, and UI controls */

/* Top control panel */
.controls {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  display: flex;
  gap: 6px;
}

/* Control buttons */
.control-button {
  margin: 0 3px;
  padding: 6px 12px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.control-button:hover {
  background: #357abd;
}

.control-button:active {
  transform: translateY(1px);
}

/* Preview button (top-right) */
.preview-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

/* Edit mode toggle (moved inward) */
.edit-mode-toggle {
  position: fixed;
  top: 20px;
  right: 120px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

/* Toggle switch styles */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input[type="checkbox"] {
  display: none;
}

.toggle-switch .slider {
  width: 50px;
  height: 24px;
  background: #ccc;
  border-radius: 24px;
  position: relative;
  transition: background 0.3s;
}

.toggle-switch .slider:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input[type="checkbox"]:checked + .slider {
  background: #4a90e2;
}

.toggle-switch input[type="checkbox"]:checked + .slider:before {
  transform: translateX(26px);
}

.toggle-label {
  min-width: 60px;
}

/* Fit to screen icon (top-left) */
.fit-screen-icon {
  position: fixed;
  top: 20px;
  left: 15%;
  z-index: 1001;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: background-color 0.2s ease;
}

.fit-screen-icon:hover {
  background: rgba(255, 255, 255, 1);
}

.fit-screen-icon svg {
  width: 18px;
  height: 18px;
  fill: #666;
}

/* Help icon (top-right) */
.help-icon {
  position: fixed;
  top: 20px;
  right: 15%;
  z-index: 1001;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: background-color 0.2s ease;
  font-size: 16px;
  font-weight: normal;
  color: #666;
}

.help-icon:hover {
  background: rgba(255, 255, 255, 1);
}