image2sand.css 6.0 KB

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