dev-mode.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /* ============================================================================
  2. PROTOTYPE DEV MODE STYLES
  3. Styles for developer/feedback mode that allows copying Object IDs
  4. Usage: Include these styles in your prototype HTML or CSS file
  5. ============================================================================ */
  6. /* Dev Mode Toggle Button */
  7. .dev-mode-toggle {
  8. position: fixed;
  9. top: 20px;
  10. right: 20px;
  11. z-index: 9999;
  12. background: #fff;
  13. border: 2px solid #e5e7eb;
  14. border-radius: 8px;
  15. padding: 10px 16px;
  16. display: flex;
  17. align-items: center;
  18. gap: 8px;
  19. cursor: pointer;
  20. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  21. transition: all 0.2s;
  22. font-size: 14px;
  23. font-weight: 500;
  24. color: #6b7280;
  25. }
  26. .dev-mode-toggle:hover {
  27. background: #f9fafb;
  28. border-color: #d1d5db;
  29. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  30. }
  31. .dev-mode-toggle.active {
  32. background: #0066CC;
  33. border-color: #0066CC;
  34. color: #fff;
  35. box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  36. }
  37. .dev-mode-toggle svg {
  38. flex-shrink: 0;
  39. }
  40. /* Dev Mode Active State */
  41. body.dev-mode-active {
  42. cursor: help !important; /* Show help cursor to indicate special mode */
  43. }
  44. /* Subtle element highlighting on hover (not Shift held) */
  45. body.dev-mode-active [id]:hover {
  46. outline: 2px solid #6b7280 !important;
  47. outline-offset: 2px !important;
  48. box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2) !important;
  49. }
  50. /* Active highlighting when Shift is held (ready to copy) */
  51. body.dev-mode-active.shift-held {
  52. cursor: copy !important;
  53. }
  54. body.dev-mode-active.shift-held [id]:hover {
  55. outline: 3px solid #10B981 !important;
  56. outline-offset: 3px !important;
  57. box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.4) !important;
  58. }
  59. /* Dev Mode Tooltip */
  60. .dev-mode-tooltip {
  61. position: fixed;
  62. background: #1F2937;
  63. color: #fff;
  64. padding: 8px 12px;
  65. border-radius: 6px;
  66. font-size: 13px;
  67. font-weight: 600;
  68. font-family: 'Courier New', monospace;
  69. z-index: 10000;
  70. pointer-events: none;
  71. white-space: nowrap;
  72. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  73. transition: background 0.2s;
  74. }
  75. .dev-mode-tooltip::before {
  76. content: '';
  77. position: absolute;
  78. top: -4px;
  79. left: 8px;
  80. width: 8px;
  81. height: 8px;
  82. background: inherit;
  83. transform: rotate(45deg);
  84. }
  85. /* Disable only certain interactions when Shift is held in dev mode */
  86. body.dev-mode-active.shift-held button:not(#dev-mode-toggle),
  87. body.dev-mode-active.shift-held input,
  88. body.dev-mode-active.shift-held select,
  89. body.dev-mode-active.shift-held textarea,
  90. body.dev-mode-active.shift-held a {
  91. pointer-events: none !important;
  92. }
  93. /* But allow the toggle button to work */
  94. body.dev-mode-active #dev-mode-toggle,
  95. body.dev-mode-active #dev-mode-toggle * {
  96. pointer-events: auto !important;
  97. cursor: pointer !important;
  98. }
  99. /* Feedback overlay (created dynamically) */
  100. @keyframes fadeInOut {
  101. 0% {
  102. opacity: 0;
  103. transform: translate(-50%, -50%) scale(0.9);
  104. }
  105. 20% {
  106. opacity: 1;
  107. transform: translate(-50%, -50%) scale(1);
  108. }
  109. 80% {
  110. opacity: 1;
  111. transform: translate(-50%, -50%) scale(1);
  112. }
  113. 100% {
  114. opacity: 0;
  115. transform: translate(-50%, -50%) scale(0.9);
  116. }
  117. }
  118. /* Responsive: Adjust toggle button on mobile */
  119. @media (max-width: 768px) {
  120. .dev-mode-toggle {
  121. top: 10px;
  122. right: 10px;
  123. padding: 8px 12px;
  124. font-size: 12px;
  125. }
  126. .dev-mode-toggle span {
  127. display: none; /* Hide text on mobile, show only icon */
  128. }
  129. .dev-mode-toggle.active span {
  130. display: inline; /* Show "ON" status */
  131. max-width: 60px;
  132. }
  133. }
  134. /* Optional: Add visual indicator when Shift is held */
  135. body.dev-mode-active.shift-held .dev-mode-toggle::after {
  136. content: '⬆️';
  137. margin-left: 4px;
  138. animation: pulse 1s infinite;
  139. }
  140. @keyframes pulse {
  141. 0%, 100% { opacity: 1; transform: scale(1); }
  142. 50% { opacity: 0.7; transform: scale(1.1); }
  143. }