image2sand.css 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. /* Image Converter Section Styles */
  2. .image-converter-content {
  3. overflow-y: auto;
  4. display: flex;
  5. flex-direction: column;
  6. gap: 20px;
  7. flex-grow: 1;
  8. }
  9. .image-converter-steps {
  10. flex-wrap: wrap;
  11. gap: 10px;
  12. display: flex;
  13. }
  14. .image-converter-steps > .image-converter-preview {
  15. width: 33%;
  16. }
  17. .image-converter-header {
  18. display: flex;
  19. justify-content: space-between;
  20. align-items: center;
  21. margin-bottom: 20px;
  22. border-bottom: 1px solid var(--border-primary);
  23. padding-bottom: 10px;
  24. }
  25. .image-converter-header h2 {
  26. margin: 0;
  27. color: var(--theme-secondary-hover);
  28. }
  29. .preview-controls-container {
  30. display: grid;
  31. grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  32. gap: 20px;
  33. margin-bottom: 20px;
  34. }
  35. .image-converter-settings {
  36. display: flex;
  37. flex-direction: column;
  38. gap: 15px;
  39. padding: 15px;
  40. }
  41. .image-converter-preview,
  42. .sand-garden-preview {
  43. display: flex;
  44. flex-direction: column;
  45. align-items: center;
  46. margin-bottom: 15px;
  47. flex-grow: 1;
  48. }
  49. .image-converter-preview canvas,
  50. .sand-garden-preview canvas {
  51. max-width: 100%;
  52. border: 1px solid var(--border-primary);
  53. background-color: #FFFFFF;
  54. margin-bottom: 10px;
  55. width: 100%;
  56. height: auto;
  57. aspect-ratio: 1 / 1;
  58. object-fit: contain;
  59. min-height: 250px;
  60. }
  61. /* Ensure all canvases have the same size */
  62. #original-image, #edge-image, #dot-image, #connect-image {
  63. width: 100%;
  64. height: auto;
  65. aspect-ratio: 1 / 1;
  66. min-height: 250px;
  67. }
  68. #connect-image {
  69. /*border: 1px solid var(--border-primary);*/
  70. /*background: var(--theme-secondary);*/
  71. padding: 15px;
  72. }
  73. .sand-garden-preview canvas {
  74. min-height: 250px;
  75. }
  76. .image-converter-preview h3,
  77. .sand-garden-preview h3 {
  78. margin-top: 0;
  79. margin-bottom: 8px;
  80. font-size: 1rem;
  81. color: var(--theme-secondary-hover);
  82. }
  83. .image-converter-actions {
  84. display: flex;
  85. justify-content: flex-end;
  86. gap: 15px;
  87. margin-top: 20px;
  88. padding-top: 15px;
  89. border-top: 1px solid var(--border-primary);
  90. }
  91. .image-converter-actions button {
  92. padding: 10px 20px;
  93. border-radius: 4px;
  94. cursor: pointer;
  95. font-weight: 500;
  96. display: flex;
  97. align-items: center;
  98. gap: 8px;
  99. }
  100. .image-converter-actions button i {
  101. font-size: 1.1rem;
  102. }
  103. .image-converter-actions .cancel {
  104. background-color: var(--color-error);
  105. color: var(--text-secondary);
  106. border: none;
  107. }
  108. .image-converter-actions .cta {
  109. background-color: var(--theme-primary);
  110. color: var(--text-secondary);
  111. border: none;
  112. }
  113. .slider-container {
  114. display: flex;
  115. flex-direction: column;
  116. width: 100%;
  117. }
  118. .slider-labels {
  119. display: flex;
  120. justify-content: space-between;
  121. font-size: 0.8rem;
  122. color: var(--text-primary);
  123. }
  124. .setting-item {
  125. display: flex;
  126. flex-direction: column;
  127. }
  128. .setting-item label {
  129. margin-bottom: 5px;
  130. font-weight: 500;
  131. color: var(--text-primary);
  132. }
  133. .setting-item select,
  134. .setting-item input {
  135. padding: 8px;
  136. border-radius: 4px;
  137. border: 1px solid var(--border-primary);
  138. background-color: var(--input-background);
  139. color: var(--input-text);
  140. }
  141. .checkbox-group {
  142. display: flex;
  143. flex-wrap: wrap;
  144. gap: 20px;
  145. margin: 10px 0;
  146. }
  147. .checkbox-container {
  148. display: flex;
  149. align-items: center;
  150. gap: 8px;
  151. white-space: nowrap;
  152. }
  153. .checkbox-container label {
  154. margin-bottom: 0;
  155. color: var(--text-primary);
  156. }
  157. .generate-button-container {
  158. display: flex;
  159. justify-content: center;
  160. margin-top: 15px;
  161. }
  162. .generate-button-container button {
  163. padding: 10px 20px;
  164. font-size: 1rem;
  165. background-color: var(--theme-primary);
  166. color: var(--text-secondary);
  167. border: none;
  168. border-radius: 4px;
  169. cursor: pointer;
  170. display: flex;
  171. align-items: center;
  172. gap: 8px;
  173. }
  174. .generate-button-container button:hover {
  175. background-color: var(--theme-primary-hover);
  176. }
  177. .processing-indicator {
  178. position: absolute;
  179. top: 0;
  180. left: 0;
  181. width: 100%;
  182. height: 100%;
  183. background-color: var(--background-translucent);
  184. display: flex;
  185. flex-direction: column;
  186. justify-content: center;
  187. align-items: center;
  188. z-index: 10;
  189. color: var(--text-secondary);
  190. font-size: 1.2rem;
  191. visibility: hidden;
  192. opacity: 0;
  193. transition: opacity 0.3s, visibility 0.3s;
  194. }
  195. .processing-indicator.visible {
  196. visibility: visible;
  197. opacity: 1;
  198. }
  199. .spinner {
  200. border: 4px solid rgba(255, 255, 255, 0.3);
  201. border-radius: 50%;
  202. border-top: 4px solid var(--theme-primary);
  203. width: 40px;
  204. height: 40px;
  205. animation: spin 1s linear infinite;
  206. margin-bottom: 15px;
  207. }
  208. @keyframes spin {
  209. 0% {
  210. transform: rotate(0deg);
  211. }
  212. 100% {
  213. transform: rotate(360deg);
  214. }
  215. }
  216. #total-points {
  217. margin-top: 10px;
  218. font-size: 0.9rem;
  219. color: var(--text-primary);
  220. }
  221. /* Ensure inputs and checkboxes match the theme */
  222. input[type="checkbox"] {
  223. accent-color: var(--theme-primary);
  224. }
  225. input[type="range"] {
  226. accent-color: var(--theme-primary);
  227. background-color: var(--input-background);
  228. }
  229. /* Ensure the dialog transitions smoothly with theme changes */
  230. .image-converter-dialog * {
  231. transition: background-color var(--transition-fast),
  232. color var(--transition-fast),
  233. border-color var(--transition-fast);
  234. }
  235. .gen-button {
  236. margin-left: 10px;
  237. }
  238. canvas#connect-image {
  239. clip-path: ellipse();
  240. }
  241. @media (min-width: 769px) {
  242. .image-converter-content {
  243. flex-direction: row;
  244. }
  245. .image-converter-content > div {
  246. width: calc(100% / 3);
  247. }
  248. .image-converter-steps {
  249. overflow-y: auto;
  250. }
  251. .image-converter-steps > .image-converter-preview:last-of-type {
  252. max-width: none;
  253. }
  254. }