global.css 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  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: #a3590f;
  41. --gruen: #0069a1;
  42. }
  43. /* Alternative Pastell (ohne Ampel-Assoziation) */
  44. :root[data-color-scheme="alt-pastell"] {
  45. --rot-hell:#ffeef2 ;
  46. --gelb-hell:#f3e8ff;
  47. --gruen-hell: #e8f0ff;
  48. --rot: #af314e;
  49. --gelb: #7045b4;
  50. --gruen: #00499c;
  51. }
  52. /* =============================================================================
  53. RESET & BASE STYLES
  54. ============================================================================= */
  55. * {
  56. box-sizing: border-box;
  57. }
  58. body {
  59. margin: 0;
  60. padding: 16px;
  61. background: var(--grau-hell);
  62. color: var(--schwarz);
  63. font: 14px/1.5 system-ui, sans-serif;
  64. }
  65. h1, h2, h3 {
  66. margin: 0.2rem 0 0.6rem;
  67. line-height: 1.3;
  68. }
  69. /* Focus-Stile für bessere Keyboard-Navigation */
  70. *:focus {
  71. outline: var(--focus-outline);
  72. outline-offset: 2px;
  73. }
  74. button:focus,
  75. select:focus,
  76. input:focus,
  77. .person-row:focus,
  78. .section-header:focus {
  79. outline: var(--focus-outline);
  80. outline-offset: 2px;
  81. }
  82. tr:focus {
  83. outline: var(--focus-outline);
  84. outline-offset: 1px;
  85. position: relative;
  86. z-index: 1;
  87. }
  88. /* =============================================================================
  89. LAYOUT COMPONENTS
  90. ============================================================================= */
  91. .row {
  92. display: flex;
  93. gap: 0.5rem;
  94. align-items: center;
  95. }
  96. .grid-2 {
  97. display: grid;
  98. grid-template-columns: 1fr 1fr;
  99. gap: 12px;
  100. }
  101. .grid-2 .full {
  102. grid-column: 1/-1;
  103. }
  104. .error-box {
  105. background: var(--rot-hell);
  106. border-left: 4px solid var(--rot);
  107. padding: 0.6rem;
  108. margin: 0.6rem 0;
  109. border-radius: 4px;
  110. }
  111. /* =============================================================================
  112. FORM ELEMENTS
  113. ============================================================================= */
  114. textarea,
  115. input,
  116. select {
  117. width: 100%;
  118. padding: 0.5rem;
  119. background: var(--weiss);
  120. color: var(--schwarz);
  121. border: 2px solid var(--grau-stark);
  122. border-radius: 4px;
  123. font-size: 14px;
  124. }
  125. textarea:hover,
  126. input:hover,
  127. select:hover {
  128. border-color: var(--diwo-blau);
  129. }
  130. .control-group {
  131. display: flex;
  132. align-items: center;
  133. gap: 8px;
  134. }
  135. .control-group label {
  136. font-size: 13px;
  137. font-weight: bold;
  138. white-space: nowrap;
  139. }
  140. /* =============================================================================
  141. BUTTON STYLES
  142. ============================================================================= */
  143. button {
  144. padding: 0.5rem 0.9rem;
  145. border: 2px solid var(--grau-stark);
  146. background: var(--weiss);
  147. cursor: pointer;
  148. font-size: 14px;
  149. min-height: 44px;
  150. transition: all 0.2s ease;
  151. }
  152. button:hover {
  153. background: var(--grau-hell);
  154. border-color: var(--diwo-blau);
  155. }
  156. button:active {
  157. transform: translateY(1px);
  158. }
  159. /* =============================================================================
  160. TABLE STYLES
  161. ============================================================================= */
  162. table {
  163. width: 100%;
  164. border-collapse: collapse;
  165. background: var(--weiss);
  166. border: 1px solid var(--grau-stark);
  167. margin: 0.6rem 0 1rem;
  168. border-spacing: 0;
  169. }
  170. th, td {
  171. border: 1px solid var(--grau-stark);
  172. padding: 0.5rem;
  173. vertical-align: top;
  174. text-align: left;
  175. }
  176. th {
  177. background: var(--grau-stark);
  178. position: sticky;
  179. top: 0;
  180. font-weight: bold;
  181. color: var(--schwarz);
  182. }
  183. /* Symbol-Spalte */
  184. .sym {
  185. width: 2.5rem;
  186. min-width: 2.5rem;
  187. max-width: 2.5rem;
  188. text-align: center;
  189. font-weight: 700;
  190. font-size: 16px;
  191. }
  192. .sym.plus {
  193. color: var(--gruen);
  194. }
  195. .sym.minus {
  196. color: var(--rot);
  197. }
  198. .sym.warn {
  199. color: var(--gelb);
  200. }
  201. /* FontAwesome Icons in Symbol-Spalte */
  202. .sym i.fas {
  203. font-family: "Font Awesome 6 Free";
  204. font-weight: 900;
  205. font-style: normal;
  206. font-variant: normal;
  207. text-rendering: auto;
  208. line-height: 1;
  209. }
  210. .sym i.fa-plus,
  211. .sym i.fa-minus,
  212. .sym i.fa-exclamation {
  213. font-size: 16px;
  214. display: inline-block;
  215. }
  216. /* Diff-Highlighting für Tabellenzeilen */
  217. .diff-row-added {
  218. background: var(--gruen-hell);
  219. }
  220. .diff-row-removed {
  221. background: var(--rot-hell);
  222. }
  223. /* =============================================================================
  224. NEUE ICON-BASIERTE DIFF-DARSTELLUNG
  225. ============================================================================= */
  226. /* Container für den neuen Icon+Text Layout */
  227. .diff-content {
  228. display: flex;
  229. align-items: flex-start;
  230. min-height: 2.4em;
  231. gap: 2px;
  232. }
  233. .diff-icon {
  234. flex-shrink: 0;
  235. width: 18px; /* Größeres Icon */
  236. height: 18px; /* Größeres Icon */
  237. font-size: 16px; /* Größere Schrift für das Icon */
  238. display: flex;
  239. align-items: center;
  240. justify-content: center;
  241. margin-top: 0.1em; /* Kleinerer Abstand oben */
  242. position: relative;
  243. }
  244. .diff-text {
  245. flex: 1;
  246. line-height: 1.3;
  247. min-width: 0; /* Verhindert Overflow-Probleme */
  248. }
  249. .diff-current-value {
  250. display: block;
  251. font-weight: normal;
  252. word-wrap: break-word;
  253. overflow-wrap: break-word;
  254. }
  255. .diff-status-text {
  256. display: block;
  257. font-size: 0.85em;
  258. margin-top: 0.3rem;
  259. opacity: 0.9;
  260. font-style: italic;
  261. word-wrap: break-word;
  262. overflow-wrap: break-word;
  263. }
  264. /* Icon-spezifische Farben mit besserer Sichtbarkeit */
  265. .diff-icon.changed {
  266. color: var(--gelb);
  267. }
  268. .diff-icon.added {
  269. color: var(--gruen);
  270. }
  271. .diff-icon.deleted {
  272. color: var(--rot);
  273. }
  274. /* FontAwesome Icons in Diff-Icons */
  275. .diff-icon i.fas {
  276. font-family: "Font Awesome 6 Free";
  277. font-weight: 900;
  278. font-style: normal;
  279. font-variant: normal;
  280. text-rendering: auto;
  281. line-height: 1;
  282. }
  283. /* Hintergrundfarben für die Zellen */
  284. .cell-changed,
  285. td:has(.cell-changed) {
  286. background: var(--gelb-hell);
  287. }
  288. .cell-added,
  289. td:has(.cell-added) {
  290. background: var(--gruen-hell);
  291. }
  292. .cell-deleted,
  293. td:has(.cell-deleted) {
  294. background: var(--rot-hell);
  295. }
  296. /* =============================================================================
  297. KOPIER-BUTTONS FÜR ALTE WERTE
  298. ============================================================================= */
  299. .copy-btn {
  300. display: inline;
  301. margin-left: 0.25rem;
  302. padding: 0;
  303. font-size: 10px;
  304. line-height: 1;
  305. background: transparent;
  306. border: none;
  307. cursor: pointer;
  308. color: var(--schwarz);
  309. transition: all 0.15s ease;
  310. vertical-align: baseline;
  311. opacity: 0.6;
  312. height: auto;
  313. width: auto;
  314. min-height: unset !important;
  315. }
  316. .copy-btn i {
  317. font-size: 10px;
  318. line-height: 1;
  319. vertical-align: baseline;
  320. }
  321. .copy-btn:hover {
  322. opacity: 1;
  323. transform: scale(1.1);
  324. color: var(--schwarz);
  325. }
  326. .copy-btn:focus {
  327. outline: 1px solid var(--focus-color);
  328. outline-offset: 1px;
  329. opacity: 1;
  330. }
  331. .copy-btn:active {
  332. transform: scale(0.95);
  333. }
  334. /* Feedback-Stile für Kopier-Buttons */
  335. .copy-btn.copy-success {
  336. color: var(--gruen);
  337. opacity: 1;
  338. }
  339. .copy-btn.copy-error {
  340. color: var(--rot);
  341. opacity: 1;
  342. }
  343. /* Kopier-Buttons im neuen Diff-Layout */
  344. .diff-status-text .copy-btn {
  345. font-style: normal;
  346. }
  347. /* =============================================================================
  348. SECTION COMPONENTS (COLLAPSIBLE SECTIONS)
  349. ============================================================================= */
  350. .section-container {
  351. margin: 0.6rem 0 1rem;
  352. }
  353. .section-header {
  354. background: var(--grau-stark);
  355. padding: 12px 16px;
  356. border: 2px solid var(--grau-stark);
  357. border-radius: 4px 4px 0 0;
  358. cursor: pointer;
  359. display: flex;
  360. align-items: center;
  361. gap: 8px;
  362. user-select: none;
  363. transition: all 0.2s ease;
  364. min-height: 44px;
  365. }
  366. .section-header:hover {
  367. background: #c5c6c7;
  368. border-color: var(--diwo-blau);
  369. }
  370. .section-header h3 {
  371. margin: 0;
  372. font-size: 16px;
  373. font-weight: bold;
  374. }
  375. .toggle-icon {
  376. font-size: 14px;
  377. transition: transform 0.2s ease;
  378. font-weight: bold;
  379. }
  380. .toggle-icon.collapsed {
  381. transform: rotate(-90deg);
  382. }
  383. .section-content {
  384. border: 2px solid var(--grau-stark);
  385. border-top: none;
  386. border-radius: 0 0 4px 4px;
  387. transition: max-height 0.3s ease;
  388. overflow: visible;
  389. padding: 4px;
  390. }
  391. .section-content.collapsed {
  392. display: none;
  393. }
  394. .section-content table {
  395. margin: 0;
  396. border: none;
  397. }