global.css 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. /* =============================================================================
  2. DIWO Vergleich - Global CSS
  3. =============================================================================
  4. Gemeinsame Stile die von allen Seiten verwendet werden:
  5. - CSS Custom Properties (Variablen)
  6. - Reset & Base Styles
  7. - Layout Components
  8. - Form Elements
  9. - Button Styles
  10. - Table Styles
  11. - Section Components (Collapsible Sections)
  12. ============================================================================= */
  13. /* =============================================================================
  14. CSS CUSTOM PROPERTIES (VARIABLEN)
  15. ============================================================================= */
  16. :root {
  17. /* Standard Farben mit verbessertem Kontrast */
  18. --rot-hell: #ffe6e6;
  19. --gelb-hell: #fff8db;
  20. --gruen-hell: #e8f5e8;
  21. --rot: #b30000;
  22. --gelb: #9d5502;
  23. --gruen: #004d26;
  24. --weiss: #ffffff;
  25. --schwarz: #000000;
  26. --grau-hell: #f7f9fa;
  27. --grau-stark: #d7d8d9;
  28. --diwo-blau: #145c9e;
  29. --diwo-blau-hell: #cfe8fc;
  30. /* Focus Ring Farbe für bessere Sichtbarkeit */
  31. --focus-color: #0066cc;
  32. --focus-outline: 3px solid var(--focus-color);
  33. }
  34. /* Alternative Farben mit besserem Kontrast */
  35. :root[data-color-scheme="alt-a"] {
  36. --rot-hell: #ffe6f5;
  37. --gelb-hell: #fff2cc;
  38. --gruen-hell: #e6f7ff;
  39. --rot: #cc0044;
  40. --gelb: #b8620e;
  41. --gruen: #0077b6;
  42. }
  43. /* Alternative B – maximale Kontrastunterscheidung */
  44. :root[data-color-scheme="alt-b"] {
  45. --rot-hell: #ffe6f0;
  46. --gelb-hell: #e6ebff;
  47. --gruen-hell: #eaf7d4;
  48. --rot: #d00070;
  49. --gelb:#0040ff ;
  50. --gruen: #7a9e00;
  51. }
  52. /* Alternative Pastell (ohne Ampel-Assoziation) */
  53. :root[data-color-scheme="alt-pastell"] {
  54. --rot-hell:#ffeef2 ;
  55. --gelb-hell:#f3e8ff;
  56. --gruen-hell: #e8f0ff;
  57. --rot: #e67891;
  58. --gelb: #9d6ee8;
  59. --gruen: #4f9df7;
  60. }
  61. /* =============================================================================
  62. RESET & BASE STYLES
  63. ============================================================================= */
  64. * {
  65. box-sizing: border-box;
  66. }
  67. body {
  68. margin: 0;
  69. padding: 16px;
  70. background: var(--grau-hell);
  71. color: var(--schwarz);
  72. font: 14px/1.5 system-ui, sans-serif;
  73. }
  74. h1, h2, h3 {
  75. margin: 0.2rem 0 0.6rem;
  76. line-height: 1.3;
  77. }
  78. /* Focus-Stile für bessere Keyboard-Navigation */
  79. *:focus {
  80. outline: var(--focus-outline);
  81. outline-offset: 2px;
  82. }
  83. button:focus,
  84. select:focus,
  85. input:focus,
  86. .person-row:focus,
  87. .section-header:focus {
  88. outline: var(--focus-outline);
  89. outline-offset: 2px;
  90. }
  91. tr:focus {
  92. outline: var(--focus-outline);
  93. outline-offset: 1px;
  94. position: relative;
  95. z-index: 1;
  96. }
  97. /* =============================================================================
  98. LAYOUT COMPONENTS
  99. ============================================================================= */
  100. .row {
  101. display: flex;
  102. gap: 0.5rem;
  103. align-items: center;
  104. }
  105. .grid-2 {
  106. display: grid;
  107. grid-template-columns: 1fr 1fr;
  108. gap: 12px;
  109. }
  110. .grid-2 .full {
  111. grid-column: 1/-1;
  112. }
  113. .error-box {
  114. background: var(--rot-hell);
  115. border-left: 4px solid var(--rot);
  116. padding: 0.6rem;
  117. margin: 0.6rem 0;
  118. border-radius: 4px;
  119. }
  120. /* =============================================================================
  121. FORM ELEMENTS
  122. ============================================================================= */
  123. textarea,
  124. input,
  125. select {
  126. width: 100%;
  127. padding: 0.5rem;
  128. background: var(--weiss);
  129. color: var(--schwarz);
  130. border: 2px solid var(--grau-stark);
  131. border-radius: 4px;
  132. font-size: 14px;
  133. }
  134. textarea:hover,
  135. input:hover,
  136. select:hover {
  137. border-color: var(--diwo-blau);
  138. }
  139. .control-group {
  140. display: flex;
  141. align-items: center;
  142. gap: 8px;
  143. }
  144. .control-group label {
  145. font-size: 13px;
  146. font-weight: bold;
  147. white-space: nowrap;
  148. }
  149. /* =============================================================================
  150. BUTTON STYLES
  151. ============================================================================= */
  152. button {
  153. padding: 0.5rem 0.9rem;
  154. border: 2px solid var(--grau-stark);
  155. background: var(--weiss);
  156. cursor: pointer;
  157. font-size: 14px;
  158. min-height: 44px;
  159. transition: all 0.2s ease;
  160. }
  161. button:hover {
  162. background: var(--grau-hell);
  163. border-color: var(--diwo-blau);
  164. }
  165. button:active {
  166. transform: translateY(1px);
  167. }
  168. /* =============================================================================
  169. TABLE STYLES
  170. ============================================================================= */
  171. table {
  172. width: 100%;
  173. border-collapse: collapse;
  174. background: var(--weiss);
  175. border: 1px solid var(--grau-stark);
  176. margin: 0.6rem 0 1rem;
  177. border-spacing: 0;
  178. }
  179. th, td {
  180. border: 1px solid var(--grau-stark);
  181. padding: 0.5rem;
  182. vertical-align: top;
  183. text-align: left;
  184. }
  185. th {
  186. background: var(--grau-stark);
  187. position: sticky;
  188. top: 0;
  189. font-weight: bold;
  190. color: var(--schwarz);
  191. }
  192. /* Symbol-Spalte */
  193. .sym {
  194. width: 2.5rem;
  195. min-width: 2.5rem;
  196. max-width: 2.5rem;
  197. text-align: center;
  198. font-weight: 700;
  199. font-size: 16px;
  200. }
  201. .sym.plus {
  202. color: var(--gruen);
  203. }
  204. .sym.minus {
  205. color: var(--rot);
  206. }
  207. .sym.warn {
  208. color: var(--gelb);
  209. }
  210. /* FontAwesome Icons in Symbol-Spalte */
  211. .sym i.fas {
  212. font-family: "Font Awesome 6 Free";
  213. font-weight: 900;
  214. font-style: normal;
  215. font-variant: normal;
  216. text-rendering: auto;
  217. line-height: 1;
  218. }
  219. .sym i.fa-plus,
  220. .sym i.fa-minus,
  221. .sym i.fa-exclamation {
  222. font-size: 16px;
  223. display: inline-block;
  224. }
  225. /* Diff-Highlighting für Tabellenzeilen */
  226. .diff-row-added {
  227. background: var(--gruen-hell);
  228. }
  229. .diff-row-removed {
  230. background: var(--rot-hell);
  231. }
  232. .cell-changed,
  233. td:has(.cell-changed) {
  234. background: var(--gelb-hell);
  235. }
  236. .cell-changed:not(.sym)::before {
  237. content: "! ";
  238. color: var(--gelb);
  239. font-weight: bold;
  240. font-size: 0.9em;
  241. margin-right: 4px;
  242. }
  243. .cell-added,
  244. td:has(.cell-added) {
  245. background: var(--gruen-hell);
  246. }
  247. .cell-added:not(.sym)::before {
  248. content: "+ ";
  249. color: var(--gruen);
  250. font-weight: bold;
  251. font-size: 0.9em;
  252. margin-right: 4px;
  253. }
  254. .cell-deleted,
  255. td:has(.cell-deleted) {
  256. background: var(--rot-hell);
  257. }
  258. .cell-deleted:not(.sym)::before {
  259. content: "− ";
  260. color: var(--rot);
  261. font-weight: bold;
  262. font-size: 0.9em;
  263. margin-right: 4px;
  264. }
  265. .old {
  266. display: block;
  267. font-size: 0.85em;
  268. margin-top: 0.2rem;
  269. opacity: 0.9;
  270. font-style: italic;
  271. }
  272. /* =============================================================================
  273. KOPIER-BUTTONS FÜR ALTE WERTE
  274. ============================================================================= */
  275. .copy-btn {
  276. display: inline;
  277. margin-left: 0.25rem;
  278. padding: 0;
  279. font-size: 10px;
  280. line-height: 1;
  281. background: transparent;
  282. border: none;
  283. cursor: pointer;
  284. color: var(--schwarz);
  285. transition: all 0.15s ease;
  286. vertical-align: baseline;
  287. opacity: 0.6;
  288. height: auto;
  289. width: auto;
  290. min-height: unset !important;
  291. }
  292. .copy-btn i {
  293. font-size: 10px;
  294. line-height: 1;
  295. vertical-align: baseline;
  296. }
  297. .copy-btn:hover {
  298. opacity: 1;
  299. transform: scale(1.1);
  300. color: var(--schwarz);
  301. }
  302. .copy-btn:focus {
  303. outline: 1px solid var(--focus-color);
  304. outline-offset: 1px;
  305. opacity: 1;
  306. }
  307. .copy-btn:active {
  308. transform: scale(0.95);
  309. }
  310. /* Feedback-Stile für Kopier-Buttons */
  311. .copy-btn.copy-success {
  312. color: var(--gruen);
  313. opacity: 1;
  314. }
  315. .copy-btn.copy-error {
  316. color: var(--rot);
  317. opacity: 1;
  318. }
  319. /* Sicherstellen, dass Kopier-Buttons in der old-Zeile richtig angezeigt werden */
  320. .old .copy-btn {
  321. font-style: normal;
  322. }
  323. /* =============================================================================
  324. SECTION COMPONENTS (COLLAPSIBLE SECTIONS)
  325. ============================================================================= */
  326. .section-container {
  327. margin: 0.6rem 0 1rem;
  328. }
  329. .section-header {
  330. background: var(--grau-stark);
  331. padding: 12px 16px;
  332. border: 2px solid var(--grau-stark);
  333. border-radius: 4px 4px 0 0;
  334. cursor: pointer;
  335. display: flex;
  336. align-items: center;
  337. gap: 8px;
  338. user-select: none;
  339. transition: all 0.2s ease;
  340. min-height: 44px;
  341. }
  342. .section-header:hover {
  343. background: #c5c6c7;
  344. border-color: var(--diwo-blau);
  345. }
  346. .section-header h3 {
  347. margin: 0;
  348. font-size: 16px;
  349. font-weight: bold;
  350. }
  351. .toggle-icon {
  352. font-size: 14px;
  353. transition: transform 0.2s ease;
  354. font-weight: bold;
  355. }
  356. .toggle-icon.collapsed {
  357. transform: rotate(-90deg);
  358. }
  359. .section-content {
  360. border: 2px solid var(--grau-stark);
  361. border-top: none;
  362. border-radius: 0 0 4px 4px;
  363. transition: max-height 0.3s ease;
  364. overflow: visible;
  365. padding: 4px;
  366. }
  367. .section-content.collapsed {
  368. display: none;
  369. }
  370. .section-content table {
  371. margin: 0;
  372. border: none;
  373. }