global.scss 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. /**
  2. * Global Styles
  3. *
  4. * Base styles and theme variables for the annotation platform
  5. */
  6. /* Base Reset */
  7. * {
  8. box-sizing: border-box;
  9. }
  10. html,
  11. body {
  12. margin: 0;
  13. padding: 0;
  14. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
  15. 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
  16. sans-serif;
  17. -webkit-font-smoothing: antialiased;
  18. -moz-osx-font-smoothing: grayscale;
  19. }
  20. body {
  21. background: var(--theme-background);
  22. color: var(--theme-paragraph);
  23. transition: background-color 0.3s ease, color 0.3s ease;
  24. }
  25. /* Typography */
  26. h1,
  27. h2,
  28. h3,
  29. h4,
  30. h5,
  31. h6 {
  32. color: var(--theme-headline);
  33. margin: 0;
  34. font-weight: 600;
  35. }
  36. p {
  37. color: var(--theme-paragraph);
  38. margin: 0;
  39. }
  40. a {
  41. color: var(--theme-button);
  42. text-decoration: none;
  43. transition: color 0.2s ease;
  44. &:hover {
  45. color: var(--theme-button-hover);
  46. }
  47. }
  48. /* Scrollbar Styling */
  49. ::-webkit-scrollbar {
  50. width: 8px;
  51. height: 8px;
  52. }
  53. ::-webkit-scrollbar-track {
  54. background: var(--theme-background-secondary);
  55. }
  56. ::-webkit-scrollbar-thumb {
  57. background: var(--theme-border);
  58. border-radius: 4px;
  59. &:hover {
  60. background: var(--theme-paragraph-subtle);
  61. }
  62. }
  63. /* Focus Styles */
  64. *:focus-visible {
  65. outline: 2px solid var(--theme-button);
  66. outline-offset: 2px;
  67. }
  68. /* Selection */
  69. ::selection {
  70. background: var(--theme-button);
  71. color: var(--theme-button-text);
  72. }
  73. /* Override @humansignal/ui Button styles to use theme colors */
  74. :global {
  75. /* Button base overrides */
  76. .button_base__1vMSr {
  77. --text-color: var(--theme-headline);
  78. --background-color: transparent;
  79. --border-color: var(--theme-border);
  80. --background-color-hover: var(--theme-background-secondary);
  81. --border-color-hover: var(--theme-button);
  82. --background-color-active: var(--theme-background-tertiary);
  83. }
  84. /* Primary button variant */
  85. .button_variant-primary__bdYre {
  86. --text-color: var(--theme-button-text) !important;
  87. --background-color: var(--theme-button) !important;
  88. --border-color: var(--theme-button) !important;
  89. --background-color-hover: var(--theme-button-hover) !important;
  90. --border-color-hover: var(--theme-button-hover) !important;
  91. --background-color-active: var(--theme-button-active) !important;
  92. }
  93. /* Neutral button variant */
  94. .button_variant-neutral__3kZXm {
  95. --text-color: var(--theme-headline);
  96. --background-color: transparent;
  97. --border-color: var(--theme-border);
  98. --background-color-hover: var(--theme-background-secondary);
  99. --border-color-hover: var(--theme-button);
  100. --background-color-active: var(--theme-background-tertiary);
  101. }
  102. /* Input fields */
  103. input[type="text"],
  104. input[type="email"],
  105. input[type="password"],
  106. input[type="number"],
  107. textarea,
  108. select {
  109. background: var(--theme-background) !important;
  110. color: var(--theme-headline) !important;
  111. border-color: var(--theme-border) !important;
  112. &:focus {
  113. border-color: var(--theme-button) !important;
  114. outline-color: var(--theme-button) !important;
  115. }
  116. &::placeholder {
  117. color: var(--theme-paragraph-subtle) !important;
  118. }
  119. }
  120. /* Form labels */
  121. label {
  122. color: var(--theme-headline) !important;
  123. }
  124. /* Error states */
  125. .text-error-foreground,
  126. [class*="error"] {
  127. color: var(--theme-error) !important;
  128. }
  129. /* Disabled states */
  130. :disabled,
  131. [disabled] {
  132. opacity: 0.5;
  133. cursor: not-allowed;
  134. }
  135. }
  136. /* Utility Classes */
  137. .text-headline {
  138. color: var(--theme-headline);
  139. }
  140. .text-paragraph {
  141. color: var(--theme-paragraph);
  142. }
  143. .text-subtle {
  144. color: var(--theme-paragraph-subtle);
  145. }
  146. .bg-primary {
  147. background: var(--theme-background);
  148. }
  149. .bg-secondary {
  150. background: var(--theme-background-secondary);
  151. }
  152. .bg-tertiary {
  153. background: var(--theme-background-tertiary);
  154. }
  155. .border-default {
  156. border-color: var(--theme-border);
  157. }
  158. .border-subtle {
  159. border-color: var(--theme-border-subtle);
  160. }
  161. /* Card Styles */
  162. .card {
  163. background: var(--theme-card-background);
  164. border: 1px solid var(--theme-card-border);
  165. border-radius: 12px;
  166. padding: 24px;
  167. transition: all 0.2s ease;
  168. &:hover {
  169. border-color: var(--theme-button);
  170. box-shadow: 0 4px 12px var(--theme-shadow);
  171. }
  172. }
  173. /* Button Base Styles */
  174. .btn {
  175. display: inline-flex;
  176. align-items: center;
  177. justify-content: center;
  178. gap: 8px;
  179. padding: 10px 20px;
  180. border: none;
  181. border-radius: 8px;
  182. font-size: 14px;
  183. font-weight: 600;
  184. cursor: pointer;
  185. transition: all 0.2s ease;
  186. text-decoration: none;
  187. &:disabled {
  188. opacity: 0.5;
  189. cursor: not-allowed;
  190. }
  191. }
  192. .btn-primary {
  193. background: var(--theme-button);
  194. color: var(--theme-button-text);
  195. &:hover:not(:disabled) {
  196. background: var(--theme-button-hover);
  197. }
  198. &:active:not(:disabled) {
  199. background: var(--theme-button-active);
  200. }
  201. }
  202. .btn-secondary {
  203. background: transparent;
  204. color: var(--theme-paragraph);
  205. border: 1px solid var(--theme-border);
  206. &:hover:not(:disabled) {
  207. background: var(--theme-background-secondary);
  208. border-color: var(--theme-button);
  209. color: var(--theme-button);
  210. }
  211. }
  212. /* Status Colors */
  213. .status-success {
  214. color: var(--theme-success);
  215. }
  216. .status-warning {
  217. color: var(--theme-warning);
  218. }
  219. .status-error {
  220. color: var(--theme-error);
  221. }
  222. .status-info {
  223. color: var(--theme-info);
  224. }
  225. /* Loading Spinner */
  226. @keyframes spin {
  227. to {
  228. transform: rotate(360deg);
  229. }
  230. }
  231. .spinner {
  232. display: inline-block;
  233. width: 20px;
  234. height: 20px;
  235. border: 2px solid var(--theme-border);
  236. border-top-color: var(--theme-button);
  237. border-radius: 50%;
  238. animation: spin 0.6s linear infinite;
  239. }
  240. /* Transitions */
  241. .fade-enter {
  242. opacity: 0;
  243. }
  244. .fade-enter-active {
  245. opacity: 1;
  246. transition: opacity 0.3s ease;
  247. }
  248. .fade-exit {
  249. opacity: 1;
  250. }
  251. .fade-exit-active {
  252. opacity: 0;
  253. transition: opacity 0.3s ease;
  254. }