/* 🔧 Canvas Visual Effects */

.section-highlight {
  outline: 3px solid #ffc107;
  animation: pulseHighlight 0.8s ease;
}

@keyframes pulseHighlight {
  0% { outline-color: #ffc107; }
  50% { outline-color: #ff9800; }
  100% { outline-color: #ffc107; }
}

.section-move {
  outline: 2px dashed #0d6efd;
  animation: sectionPulse 0.3s ease;
}

@keyframes sectionPulse {
  from { outline-offset: 5px; }
  to   { outline-offset: 0px; }
}

/* 🧠 Global Canvas Layout Enhancements */

body, html {
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden;
  background-color: #000 !important;
  color: #fff;
}

body.bg-dark {
  background-color: #000 !important;
  color: #fff;
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.form-check-input {
  border-radius: 2rem;
  transition: background-color 0.25s ease;
  cursor: pointer;
}

.typing-cursor {
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

/* 🎛️ Section button sizing */
.section-controls button {
  width: 48%;
}

/* ➕ Add padding to delete button for scrollbar breathing room */
.section-controls button.btn-outline-danger {
  margin-right: 4px;
}

/* ✅ Visual separation for each canvas section */
.canvas-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #111;
  border: 1px dashed #555;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease;
  color: #fff;
}

.canvas-section:hover {
  background-color: #222;
}

.canvas-section pre {
  margin: 0;
  background-color: transparent;
  border: none;
  color: #fff;
}

/* ✅ Fix missing containers + scrollbar */
#sectionButtons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 80vh;
  overflow-y: scroll !important;
  padding-right: 6px;
  scrollbar-width: auto;
  scrollbar-color: #888 #2c2f33;
}

#sectionButtons::-webkit-scrollbar {
  width: 10px;
}

#sectionButtons::-webkit-scrollbar-track {
  background: #2c2f33;
}

#sectionButtons::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 6px;
  border: 2px solid #2c2f33;
}

#sectionButtons > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border: 1px solid #444;
  border-radius: 0.5rem;
  background-color: #2c2f33;
  transition: background-color 0.3s ease;
  color: #fff;
  width: calc(100% - 8px); /* ✅ ensures space for scrollbar */
}

/* Make checkbox border color dark and consistent */
#sectionButtons .form-check-input {
  border: 2px solid #000;
  transform: scale(1.3);
  accent-color: #0d6efd;
  cursor: pointer;
  margin-top: 2px;
}

/* 🔒 Hide theme toggle until future revisit */
#themeToggleBtn,
#darkModeToggle,
#darkModeLabel,
.form-switch {
  display: none !important;
}
