/* ============================================================================= DIWO Vergleich - Global CSS ============================================================================= Gemeinsame Stile die von allen Seiten verwendet werden: - CSS Custom Properties (Variablen) - Reset & Base Styles - Layout Components - Form Elements - Button Styles - Table Styles - Section Components (Collapsible Sections) ============================================================================= */ /* ============================================================================= CSS CUSTOM PROPERTIES (VARIABLEN) ============================================================================= */ :root { /* Standard Farben mit verbessertem Kontrast */ --rot-hell: #ffe6e6; --gelb-hell: #fff8db; --gruen-hell: #e8f5e8; --rot: #b30000; --gelb: #9d5502; --gruen: #004d26; --weiss: #ffffff; --schwarz: #000000; --grau-hell: #f7f9fa; --grau-stark: #d7d8d9; --diwo-blau: #145c9e; --diwo-blau-hell: #cfe8fc; /* Focus Ring Farbe für bessere Sichtbarkeit */ --focus-color: #0066cc; --focus-outline: 3px solid var(--focus-color); } /* Alternative Farben mit besserem Kontrast */ :root[data-color-scheme="alternative"] { --rot-hell: #ffe6f5; --gelb-hell: #ffeccc; --gruen-hell: #e6f9ff; --rot: #cc0044; --gelb: #b8620e; --gruen: #008a8a; } /* ============================================================================= RESET & BASE STYLES ============================================================================= */ * { box-sizing: border-box; } body { margin: 0; padding: 16px; background: var(--grau-hell); color: var(--schwarz); font: 14px/1.5 system-ui, sans-serif; } h1, h2, h3 { margin: 0.2rem 0 0.6rem; line-height: 1.3; } /* Focus-Stile für bessere Keyboard-Navigation */ *:focus { outline: var(--focus-outline); outline-offset: 2px; } button:focus, select:focus, input:focus, .person-row:focus, .section-header:focus { outline: var(--focus-outline); outline-offset: 2px; } tr:focus { outline: var(--focus-outline); outline-offset: 1px; position: relative; z-index: 1; } /* ============================================================================= LAYOUT COMPONENTS ============================================================================= */ .row { display: flex; gap: 0.5rem; align-items: center; } .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid-2 .full { grid-column: 1/-1; } .error-box { background: var(--rot-hell); border-left: 4px solid var(--rot); padding: 0.6rem; margin: 0.6rem 0; border-radius: 4px; } /* ============================================================================= FORM ELEMENTS ============================================================================= */ textarea, input, select { width: 100%; padding: 0.5rem; background: var(--weiss); color: var(--schwarz); border: 2px solid var(--grau-stark); border-radius: 4px; font-size: 14px; } textarea:hover, input:hover, select:hover { border-color: var(--diwo-blau); } .control-group { display: flex; align-items: center; gap: 8px; } .control-group label { font-size: 13px; font-weight: bold; white-space: nowrap; } /* ============================================================================= BUTTON STYLES ============================================================================= */ button { padding: 0.5rem 0.9rem; border: 2px solid var(--grau-stark); background: var(--weiss); cursor: pointer; font-size: 14px; min-height: 44px; transition: all 0.2s ease; } button:hover { background: var(--grau-hell); border-color: var(--diwo-blau); } button:active { transform: translateY(1px); } /* ============================================================================= TABLE STYLES ============================================================================= */ table { width: 100%; border-collapse: collapse; background: var(--weiss); border: 1px solid var(--grau-stark); margin: 0.6rem 0 1rem; border-spacing: 0; } th, td { border: 1px solid var(--grau-stark); padding: 0.5rem; vertical-align: top; text-align: left; } th { background: var(--grau-stark); position: sticky; top: 0; font-weight: bold; color: var(--schwarz); } /* Symbol-Spalte */ .sym { width: 2.5rem; min-width: 2.5rem; max-width: 2.5rem; text-align: center; font-weight: 700; font-size: 16px; } .sym.plus { color: var(--gruen); } .sym.minus { color: var(--rot); } .sym.warn { color: var(--gelb); } /* Diff-Highlighting für Tabellenzeilen */ .diff-row-added { background: var(--gruen-hell); } .diff-row-removed { background: var(--rot-hell); } .cell-changed, td:has(.cell-changed) { background: var(--gelb-hell); } .cell-changed:not(.sym)::before { content: "! "; color: var(--gelb); font-weight: bold; font-size: 0.9em; margin-right: 4px; } .cell-added, td:has(.cell-added) { background: var(--gruen-hell); } .cell-added:not(.sym)::before { content: "+ "; color: var(--gruen); font-weight: bold; font-size: 0.9em; margin-right: 4px; } .cell-deleted, td:has(.cell-deleted) { background: var(--rot-hell); } .cell-deleted:not(.sym)::before { content: "− "; color: var(--rot); font-weight: bold; font-size: 0.9em; margin-right: 4px; } .old { display: block; font-size: 0.85em; margin-top: 0.2rem; opacity: 0.9; font-style: italic; } /* ============================================================================= SECTION COMPONENTS (COLLAPSIBLE SECTIONS) ============================================================================= */ .section-container { margin: 0.6rem 0 1rem; } .section-header { background: var(--grau-stark); padding: 12px 16px; border: 2px solid var(--grau-stark); border-radius: 4px 4px 0 0; cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none; transition: all 0.2s ease; min-height: 44px; } .section-header:hover { background: #c5c6c7; border-color: var(--diwo-blau); } .section-header h3 { margin: 0; font-size: 16px; font-weight: bold; } .toggle-icon { font-size: 14px; transition: transform 0.2s ease; font-weight: bold; } .toggle-icon.collapsed { transform: rotate(-90deg); } .section-content { border: 2px solid var(--grau-stark); border-top: none; border-radius: 0 0 4px 4px; transition: max-height 0.3s ease; overflow: visible; padding: 4px; } .section-content.collapsed { display: none; } .section-content table { margin: 0; border: none; }