/**
 * Utility Classes
 *
 * These are the ONLY classes allowed to use !important
 * They override everything by design
 */

/* ============================================
   TEXT UTILITIES
   ============================================ */

.u-text-center { text-align: center !important; }
.u-text-left { text-align: left !important; }
.u-text-right { text-align: right !important; }
.u-text-justify { text-align: justify !important; }

.u-text-uppercase { text-transform: uppercase !important; }
.u-text-lowercase { text-transform: lowercase !important; }
.u-text-capitalize { text-transform: capitalize !important; }

.u-text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Text Colors */
.u-text-primary { color: var(--color-primary) !important; }
.u-text-secondary { color: var(--color-text-secondary) !important; }
.u-text-muted { color: var(--color-text-muted) !important; }
.u-text-success { color: var(--color-success) !important; }
.u-text-danger { color: var(--color-danger) !important; }
.u-text-warning { color: var(--color-warning) !important; }
.u-text-info { color: var(--color-info) !important; }

/* Font Sizes */
.u-text-xs { font-size: var(--font-size-xs) !important; }
.u-text-sm { font-size: var(--font-size-sm) !important; }
.u-text-base { font-size: var(--font-size-base) !important; }
.u-text-lg { font-size: var(--font-size-lg) !important; }
.u-text-xl { font-size: var(--font-size-xl) !important; }
.u-text-xxl { font-size: var(--font-size-xxl) !important; }

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

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

/* Margin */
.u-m-0 { margin: 0 !important; }
.u-m-xs { margin: var(--space-xs) !important; }
.u-m-sm { margin: var(--space-sm) !important; }
.u-m-md { margin: var(--space-md) !important; }
.u-m-lg { margin: var(--space-lg) !important; }
.u-m-xl { margin: var(--space-xl) !important; }

/* Margin Top */
.u-mt-0 { margin-top: 0 !important; }
.u-mt-xs { margin-top: var(--space-xs) !important; }
.u-mt-sm { margin-top: var(--space-sm) !important; }
.u-mt-md { margin-top: var(--space-md) !important; }
.u-mt-lg { margin-top: var(--space-lg) !important; }
.u-mt-xl { margin-top: var(--space-xl) !important; }

/* Margin Bottom */
.u-mb-0 { margin-bottom: 0 !important; }
.u-mb-xs { margin-bottom: var(--space-xs) !important; }
.u-mb-sm { margin-bottom: var(--space-sm) !important; }
.u-mb-md { margin-bottom: var(--space-md) !important; }
.u-mb-lg { margin-bottom: var(--space-lg) !important; }
.u-mb-xl { margin-bottom: var(--space-xl) !important; }

/* Margin Left/Right */
.u-ml-auto { margin-left: auto !important; }
.u-mr-auto { margin-right: auto !important; }
.u-mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Padding */
.u-p-0 { padding: 0 !important; }
.u-p-xs { padding: var(--space-xs) !important; }
.u-p-sm { padding: var(--space-sm) !important; }
.u-p-md { padding: var(--space-md) !important; }
.u-p-lg { padding: var(--space-lg) !important; }
.u-p-xl { padding: var(--space-xl) !important; }

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

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

/* Visibility */
.u-invisible { visibility: hidden !important; }
.u-visible { visibility: visible !important; }

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

.u-flex-row { flex-direction: row !important; }
.u-flex-column { flex-direction: column !important; }
.u-flex-wrap { flex-wrap: wrap !important; }
.u-flex-nowrap { flex-wrap: nowrap !important; }

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

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

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

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

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

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

.u-bg-primary { background-color: var(--color-bg-primary) !important; }
.u-bg-secondary { background-color: var(--color-bg-secondary) !important; }
.u-bg-surface { background-color: var(--color-bg-surface) !important; }
.u-bg-transparent { background-color: transparent !important; }

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

.u-border-0 { border: none !important; }
.u-border { border: 1px solid var(--color-border) !important; }
.u-border-primary { border-color: var(--color-primary) !important; }

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

.u-pointer { cursor: pointer !important; }
.u-not-allowed { cursor: not-allowed !important; }
.u-default { cursor: default !important; }

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

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

/* ============================================
   WIDTH UTILITIES
   ============================================ */

.u-w-full { width: 100% !important; }
.u-w-auto { width: auto !important; }
.u-w-screen { width: 100vw !important; }

/* ============================================
   HEIGHT UTILITIES
   ============================================ */

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

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

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

/* ============================================
   SCREEN READER ONLY
   ============================================ */

.u-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;
}
