/* Spotlight modal overlay styles */
#spotlight {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9); /* Even darker overlay for better focus */
  z-index: 10001; /* Higher than floating toolbar (10000) */
  display: none;
  justify-content: center;
  align-items: center;
  padding: 0; /* Remove padding - tool takes center stage */
  box-sizing: border-box;
}

/* Remove the white container - tool appears directly on overlay */
#spotlight-content {
  background: transparent; /* No white background */
  padding: 0; /* No padding around tool */
  border-radius: 0; /* No border radius */
  max-width: none; /* No size constraints */
  max-height: none; /* No size constraints */
  overflow: visible; /* Allow tool to extend naturally */
  box-shadow: none; /* No container shadow */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Tool in spotlight mode - dynamically scaled to fill screen optimally */
#spotlight-content .tool {
  position: static !important; /* Override fixed positioning */
  margin: 0; /* No margin - perfectly centered */
  /* Don't override transform-origin - let JavaScript control it for consistency */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6); /* Dramatic shadow for floating effect */
  cursor: default; /* Remove grab cursor in spotlight */
  z-index: auto;
  max-width: none;
  max-height: none;
  border-radius: 12px; /* Keep tool's own styling enhanced */
  
  /* Dynamic scaling will be applied by JavaScript based on tool size and viewport */
  /* This ensures tools fill as much screen as possible without overflow */
}

#spotlight-close {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 10001;
  background-color: rgba(0, 0, 0, 1);
  color: #999;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;  display: flex;
  align-items: center;
  justify-content: center;  opacity: 0.8;
  font-size: 1.8em;
  font-weight: normal;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
}

#spotlight-close:hover {
  color: #ccc;
  opacity: 1;
}

.dimmed-for-spotlight {
  filter: blur(2px) grayscale(0.7) brightness(0.7);
  pointer-events: none;
  opacity: 0.5;
  transition: filter 0.2s, opacity 0.2s;
}

/* Ensure floating toolbar is hidden when spotlight is active */
body:has(#spotlight[style*="display: flex"]) .floating-toolbar {
  display: none !important;
}
