/* ============================================================ UTILITIES.CSS — Minimale Helfer Nur das Nötigste. Keine Tailwind-Exzesse. ============================================================ */ /* ---------------------------------------------------------- DISPLAY ---------------------------------------------------------- */ .block { display: block; } .inline { display: inline; } .flex { display: flex; } .grid-u { display: grid; } .hidden { display: none; } /* ---------------------------------------------------------- FLEX SHORTCUTS ---------------------------------------------------------- */ .flex-center { display: flex; align-items: center; justify-content: center; } .flex-between { display: flex; align-items: center; justify-content: space-between; } .flex-start { display: flex; align-items: center; justify-content: flex-start; } .flex-end { display: flex; align-items: center; justify-content: flex-end; } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; } .flex-1 { flex: 1; } .flex-shrink-0 { flex-shrink: 0; } /* Flex-Kind darf schmaler als sein Inhalt werden (z. B. lange Tabellen in main) */ .min-w-0 { min-width: 0; } /* ---------------------------------------------------------- GAP ---------------------------------------------------------- */ .gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); } .gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); } .gap-6 { gap: var(--space-6); } .gap-8 { gap: var(--space-8); } /* ---------------------------------------------------------- ALIGNMENT (standalone, kombinierbar mit .flex / .grid-u) ---------------------------------------------------------- */ .items-start { align-items: flex-start; } .items-center { align-items: center; } .items-end { align-items: flex-end; } .items-stretch { align-items: stretch; } .items-baseline { align-items: baseline; } .justify-start { justify-content: flex-start; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; } .justify-between { justify-content: space-between; } .self-start { align-self: flex-start; } .self-center { align-self: center; } .self-end { align-self: flex-end; } .self-stretch { align-self: stretch; } /* ---------------------------------------------------------- SPACING UTILITIES (margin / padding) Nur die am häufigsten benötigten ---------------------------------------------------------- */ .mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); } .mt-auto { margin-top: auto; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--space-2); } .mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); } .mb-8 { margin-bottom: var(--space-8); } .ml-auto { margin-left: auto; } .mr-auto { margin-right: auto; } .mx-auto { margin-inline: auto; } .p-0 { padding: 0; } .p-2 { padding: var(--space-2); } .p-4 { padding: var(--space-4); } .p-6 { padding: var(--space-6); } .p-8 { padding: var(--space-8); } .px-4 { padding-inline: var(--space-4); } .px-6 { padding-inline: var(--space-6); } .py-4 { padding-block: var(--space-4); } .py-6 { padding-block: var(--space-6); } .py-8 { padding-block: var(--space-8); } /* ---------------------------------------------------------- TEXT ---------------------------------------------------------- */ .text-xs { font-size: var(--text-xs); } .text-sm { font-size: var(--text-sm); } .text-base { font-size: var(--text-base); } .text-md { font-size: var(--text-md); } .text-lg { font-size: var(--text-lg); } .text-xl { font-size: var(--text-xl); } .text-left { text-align: left; } .text-center { text-align: center; } .text-right { text-align: right; } .font-normal { font-weight: var(--weight-normal); } .font-medium { font-weight: var(--weight-medium); } .font-semibold { font-weight: var(--weight-semibold); } .font-bold { font-weight: var(--weight-bold); } .font-mono { font-family: var(--font-mono); } .uppercase { text-transform: uppercase; } .capitalize { text-transform: capitalize; } .nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Semantic Text Colors */ .text-default { color: var(--text); } .text-muted { color: var(--text-muted); } .text-subtle { color: var(--text-subtle); } .text-accent { color: var(--accent); } .text-success { color: var(--color-success); } .text-warning { color: var(--color-warning); } .text-danger { color: var(--color-danger); } /* ---------------------------------------------------------- BORDERS & RADIUS ---------------------------------------------------------- */ .rounded { border-radius: var(--radius-md); } .rounded-lg { border-radius: var(--radius-lg); } .rounded-xl { border-radius: var(--radius-xl); } .rounded-full { border-radius: var(--radius-full); } .border { border: 1px solid var(--border); } .border-t { border-top: 1px solid var(--border); } .border-b { border-bottom: 1px solid var(--border); } /* ---------------------------------------------------------- BACKGROUNDS ---------------------------------------------------------- */ .bg-subtle { background: var(--bg-subtle); } .bg-muted { background: var(--bg-muted); } .bg-surface { background: var(--surface); } /* ---------------------------------------------------------- SHADOWS ---------------------------------------------------------- */ .shadow-xs { box-shadow: var(--shadow-xs); } .shadow-sm { box-shadow: var(--shadow-sm); } .shadow-md { box-shadow: var(--shadow-md); } .shadow-lg { box-shadow: var(--shadow-lg); } /* ---------------------------------------------------------- OVERFLOW ---------------------------------------------------------- */ .overflow-hidden { overflow: hidden; } .overflow-auto { overflow: auto; } .overflow-x-auto { overflow-x: auto; } /* ---------------------------------------------------------- WIDTH / HEIGHT ---------------------------------------------------------- */ .w-full { width: 100%; } .h-full { height: 100%; } .min-h-screen { min-height: 100dvh; } /* ---------------------------------------------------------- POSITION ---------------------------------------------------------- */ .relative { position: relative; } .absolute { position: absolute; } .sticky { position: sticky; } .inset-0 { inset: 0; } /* ---------------------------------------------------------- CURSOR ---------------------------------------------------------- */ .cursor-pointer { cursor: pointer; } .cursor-default { cursor: default; } .cursor-not-allowed { cursor: not-allowed; } /* ---------------------------------------------------------- OPACITY ---------------------------------------------------------- */ .opacity-50 { opacity: 0.5; } .opacity-75 { opacity: 0.75; } /* ---------------------------------------------------------- TRANSITIONS ---------------------------------------------------------- */ .transition { transition: all var(--transition); } /* ---------------------------------------------------------- FILTER-BAR Responsives Flex-Row für Filter-Leisten. Auf Mobile werden die Elemente untereinander gestapelt. ---------------------------------------------------------- */ .filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; } @media (max-width: 40rem) { .filter-bar { flex-direction: column; align-items: stretch; } } /* ---------------------------------------------------------- SR-ONLY (Screenreader) ---------------------------------------------------------- */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* ---------------------------------------------------------- RESPONSIVE HELPERS ---------------------------------------------------------- */ @media (max-width: 48rem) { .hide-mobile { display: none !important; } } @media (min-width: 48.001rem) { .hide-desktop { display: none !important; } }