/**
 * UTILITY CLASSES - GLT74.com Design System
 * Version: 1.0.0
 * Beschreibung: Atomic CSS Utilities für schnelle UI-Entwicklung
 */

/* ========================================
   RESPONSIVE BREAKPOINT UTILITIES
   ======================================== */

/* Mobile First Breakpoints:
   - sm: 640px+  (Tablets Portrait)
   - md: 768px+  (Tablets Landscape)
   - lg: 1024px+ (Desktop)
   - xl: 1280px+ (Large Desktop)
*/

/* ========================================
   DISPLAY UTILITIES
   ======================================== */

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

@media (min-width: 640px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
  .d-sm-grid { display: grid !important; }
}

@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-grid { display: grid !important; }
}

@media (min-width: 1024px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-grid { display: grid !important; }
}

/* ========================================
   FLEXBOX UTILITIES
   ======================================== */

/* Flex Direction */
.flex-row { flex-direction: row !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-column { flex-direction: column !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }

/* Justify Content */
.justify-start { justify-content: flex-start !important; }
.justify-end { justify-content: flex-end !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }
.justify-evenly { justify-content: space-evenly !important; }

/* Align Items */
.items-start { align-items: flex-start !important; }
.items-end { align-items: flex-end !important; }
.items-center { align-items: center !important; }
.items-baseline { align-items: baseline !important; }
.items-stretch { align-items: stretch !important; }

/* Align Self */
.self-auto { align-self: auto !important; }
.self-start { align-self: flex-start !important; }
.self-end { align-self: flex-end !important; }
.self-center { align-self: center !important; }
.self-stretch { align-self: stretch !important; }

/* Flex Wrap */
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-wrap-reverse { flex-wrap: wrap-reverse !important; }

/* Flex Grow/Shrink */
.flex-1 { flex: 1 1 0% !important; }
.flex-auto { flex: 1 1 auto !important; }
.flex-initial { flex: 0 1 auto !important; }
.flex-none { flex: none !important; }

/* Gap */
.gap-0 { gap: var(--space-0) !important; }
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-6 { gap: var(--space-6) !important; }
.gap-8 { gap: var(--space-8) !important; }

/* ========================================
   GRID UTILITIES
   ======================================== */

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }

@media (min-width: 768px) {
  .grid-cols-md-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .grid-cols-md-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .grid-cols-md-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

@media (min-width: 1024px) {
  .grid-cols-lg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .grid-cols-lg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .grid-cols-lg-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}

/* ========================================
   SPACING UTILITIES
   ======================================== */

/* Margin */
.m-0 { margin: var(--space-0) !important; }
.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.m-6 { margin: var(--space-6) !important; }
.m-8 { margin: var(--space-8) !important; }
.m-auto { margin: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }

.mt-0 { margin-top: var(--space-0) !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mt-12 { margin-top: var(--space-12) !important; }
.mt-16 { margin-top: var(--space-16) !important; }

.mr-0 { margin-right: var(--space-0) !important; }
.mr-1 { margin-right: var(--space-1) !important; }
.mr-2 { margin-right: var(--space-2) !important; }
.mr-3 { margin-right: var(--space-3) !important; }
.mr-4 { margin-right: var(--space-4) !important; }
.mr-6 { margin-right: var(--space-6) !important; }

.mb-0 { margin-bottom: var(--space-0) !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.mb-12 { margin-bottom: var(--space-12) !important; }
.mb-16 { margin-bottom: var(--space-16) !important; }

.ml-0 { margin-left: var(--space-0) !important; }
.ml-1 { margin-left: var(--space-1) !important; }
.ml-2 { margin-left: var(--space-2) !important; }
.ml-3 { margin-left: var(--space-3) !important; }
.ml-4 { margin-left: var(--space-4) !important; }

/* Padding */
.p-0 { padding: var(--space-0) !important; }
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-6 { padding: var(--space-6) !important; }
.p-8 { padding: var(--space-8) !important; }

.px-0 { padding-left: var(--space-0) !important; padding-right: var(--space-0) !important; }
.px-2 { padding-left: var(--space-2) !important; padding-right: var(--space-2) !important; }
.px-4 { padding-left: var(--space-4) !important; padding-right: var(--space-4) !important; }
.px-6 { padding-left: var(--space-6) !important; padding-right: var(--space-6) !important; }

.py-0 { padding-top: var(--space-0) !important; padding-bottom: var(--space-0) !important; }
.py-2 { padding-top: var(--space-2) !important; padding-bottom: var(--space-2) !important; }
.py-4 { padding-top: var(--space-4) !important; padding-bottom: var(--space-4) !important; }
.py-6 { padding-top: var(--space-6) !important; padding-bottom: var(--space-6) !important; }
.py-8 { padding-top: var(--space-8) !important; padding-bottom: var(--space-8) !important; }

.pt-0 { padding-top: var(--space-0) !important; }
.pt-2 { padding-top: var(--space-2) !important; }
.pt-4 { padding-top: var(--space-4) !important; }
.pt-6 { padding-top: var(--space-6) !important; }

.pb-0 { padding-bottom: var(--space-0) !important; }
.pb-2 { padding-bottom: var(--space-2) !important; }
.pb-4 { padding-bottom: var(--space-4) !important; }
.pb-6 { padding-bottom: var(--space-6) !important; }

/* ========================================
   TYPOGRAPHY UTILITIES
   ======================================== */

/* Font Family */
.font-primary { font-family: var(--font-primary) !important; }
.font-heading { font-family: var(--font-heading) !important; }
.font-mono { font-family: var(--font-mono) !important; }

/* Font Size */
.text-xs { font-size: var(--font-size-xs) !important; }
.text-sm { font-size: var(--font-size-sm) !important; }
.text-base { font-size: var(--font-size-base) !important; }
.text-md { font-size: var(--font-size-md) !important; }
.text-lg { font-size: var(--font-size-lg) !important; }
.text-xl { font-size: var(--font-size-xl) !important; }
.text-2xl { font-size: var(--font-size-2xl) !important; }
.text-3xl { font-size: var(--font-size-3xl) !important; }
.text-4xl { font-size: var(--font-size-4xl) !important; }

/* Font Weight */
.font-light { font-weight: var(--font-weight-light) !important; }
.font-normal { font-weight: var(--font-weight-normal) !important; }
.font-medium { font-weight: var(--font-weight-medium) !important; }
.font-semibold { font-weight: var(--font-weight-semibold) !important; }
.font-bold { font-weight: var(--font-weight-bold) !important; }

/* Text Align */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-justify { text-align: justify !important; }

/* Text Transform */
.uppercase { text-transform: uppercase !important; }
.lowercase { text-transform: lowercase !important; }
.capitalize { text-transform: capitalize !important; }
.normal-case { text-transform: none !important; }

/* Text Decoration */
.underline { text-decoration: underline !important; }
.line-through { text-decoration: line-through !important; }
.no-underline { text-decoration: none !important; }

/* Line Height */
.leading-tight { line-height: var(--line-height-tight) !important; }
.leading-normal { line-height: var(--line-height-normal) !important; }
.leading-relaxed { line-height: var(--line-height-relaxed) !important; }
.leading-loose { line-height: var(--line-height-loose) !important; }

/* Text Color */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary { color: var(--text-tertiary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-inverse { color: var(--text-inverse) !important; }
.text-link { color: var(--text-link) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-error { color: var(--color-error) !important; }
.text-info { color: var(--color-info) !important; }

/* ========================================
   BACKGROUND UTILITIES
   ======================================== */

.bg-primary { background-color: var(--bg-primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-tertiary { background-color: var(--bg-tertiary) !important; }
.bg-accent { background-color: var(--bg-accent) !important; }

.bg-color-primary { background-color: var(--color-primary-600) !important; }
.bg-color-secondary { background-color: var(--color-secondary-600) !important; }
.bg-color-success { background-color: var(--color-success) !important; }
.bg-color-warning { background-color: var(--color-warning) !important; }
.bg-color-error { background-color: var(--color-error) !important; }

.bg-transparent { background-color: transparent !important; }

/* ========================================
   BORDER UTILITIES
   ======================================== */

/* Border Width */
.border-0 { border-width: var(--border-width-0) !important; }
.border { border-width: var(--border-width-1) !important; }
.border-2 { border-width: var(--border-width-2) !important; }
.border-4 { border-width: var(--border-width-4) !important; }

.border-t { border-top-width: var(--border-width-1) !important; }
.border-r { border-right-width: var(--border-width-1) !important; }
.border-b { border-bottom-width: var(--border-width-1) !important; }
.border-l { border-left-width: var(--border-width-1) !important; }

/* Border Color */
.border-primary { border-color: var(--border-primary) !important; }
.border-secondary { border-color: var(--border-secondary) !important; }
.border-focus { border-color: var(--border-focus) !important; }
.border-error { border-color: var(--border-error) !important; }
.border-transparent { border-color: transparent !important; }

/* Border Radius */
.rounded-none { border-radius: var(--radius-none) !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded { border-radius: var(--radius-md) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* ========================================
   SHADOW UTILITIES
   ======================================== */

.shadow-none { box-shadow: none !important; }
.shadow-xs { box-shadow: var(--shadow-xs) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }
.shadow-2xl { box-shadow: var(--shadow-2xl) !important; }
.shadow-inner { box-shadow: var(--shadow-inner) !important; }

/* ========================================
   WIDTH & HEIGHT UTILITIES
   ======================================== */

/* Width */
.w-auto { width: auto !important; }
.w-full { width: 100% !important; }
.w-screen { width: 100vw !important; }
.w-1\/2 { width: 50% !important; }
.w-1\/3 { width: 33.333333% !important; }
.w-2\/3 { width: 66.666667% !important; }
.w-1\/4 { width: 25% !important; }
.w-3\/4 { width: 75% !important; }

/* Max Width */
.max-w-xs { max-width: 320px !important; }
.max-w-sm { max-width: var(--container-sm) !important; }
.max-w-md { max-width: var(--container-md) !important; }
.max-w-lg { max-width: var(--container-lg) !important; }
.max-w-xl { max-width: var(--container-xl) !important; }
.max-w-4xl { max-width: 896px !important; }
.max-w-full { max-width: 100% !important; }

/* Height */
.h-auto { height: auto !important; }
.h-full { height: 100% !important; }
.h-screen { height: 100vh !important; }

/* ========================================
   POSITION UTILITIES
   ======================================== */

.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed { position: fixed !important; }
.sticky { position: sticky !important; }
.static { position: static !important; }

.top-0 { top: 0 !important; }
.right-0 { right: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.left-0 { left: 0 !important; }

.inset-0 { top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; }

/* ========================================
   Z-INDEX UTILITIES
   ======================================== */

.z-0 { z-index: var(--z-index-base) !important; }
.z-10 { z-index: var(--z-index-dropdown) !important; }
.z-20 { z-index: var(--z-index-sticky) !important; }
.z-30 { z-index: var(--z-index-fixed) !important; }
.z-40 { z-index: var(--z-index-modal-backdrop) !important; }
.z-50 { z-index: var(--z-index-modal) !important; }

/* ========================================
   OVERFLOW UTILITIES
   ======================================== */

.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* ========================================
   OPACITY UTILITIES
   ======================================== */

.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ========================================
   CURSOR UTILITIES
   ======================================== */

.cursor-auto { cursor: auto !important; }
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.cursor-move { cursor: move !important; }
.cursor-grab { cursor: grab !important; }
.cursor-grabbing { cursor: grabbing !important; }

/* ========================================
   USER SELECT UTILITIES
   ======================================== */

.select-none { user-select: none !important; }
.select-text { user-select: text !important; }
.select-all { user-select: all !important; }
.select-auto { user-select: auto !important; }

/* ========================================
   POINTER EVENTS UTILITIES
   ======================================== */

.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

/* ========================================
   TRANSITION UTILITIES
   ======================================== */

.transition-none { transition: none !important; }
.transition-fast { transition: var(--transition-fast) !important; }
.transition { transition: var(--transition-normal) !important; }
.transition-slow { transition: var(--transition-slow) !important; }

/* ========================================
   ACCESSIBILITY UTILITIES
   ======================================== */

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border-width: 0 !important;
}

.not-sr-only {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

/* Skip to Content Link */
.skip-to-content {
  position: absolute;
  top: -999px;
  left: 0;
  padding: var(--space-4);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  z-index: var(--z-index-modal);
}

.skip-to-content:focus {
  top: 0;
  outline: var(--border-width-2) solid var(--border-focus);
  outline-offset: var(--space-1);
}

/* Focus Visible Styles */
.focus-ring:focus-visible {
  outline: none !important;
  box-shadow: var(--state-focus-ring) !important;
}

/* ========================================
   PRINT UTILITIES
   ======================================== */

@media print {
  .print-hidden { display: none !important; }
  .print-visible { display: block !important; }
}
