/* ===== TOGGLE SWITCH COMPONENT ===== */

.events-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border: none;
}

.toggle-item+.toggle-item {
  border-top: none;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.toggle-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: all 0.2s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

#edit-instance-name:disabled {
  background: var(--border-light);
  cursor: not-allowed;
  opacity: 0.7;
}

/* --- Toggle glow (dark theme) --- */
.toggle-slider {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .06);
}

[data-theme="light"] .toggle-slider {
  background: #d1d5db;
  border: 1px solid #9ca3af;
}
[data-theme="light"] .toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
  border-color: var(--primary);
}
