image2sand.css 6.1 KB

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