/**
 * MWANGI UI Utility Classes
 *
 * Handy utility classes for common styling needs.
 * Use sparingly - components should handle most use cases.
 */

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

/* Margin utilities */
.mw-m-0 { margin: var(--mw-spacing-0) !important; }
.mw-m-1 { margin: var(--mw-spacing-1) !important; }
.mw-m-2 { margin: var(--mw-spacing-2) !important; }
.mw-m-3 { margin: var(--mw-spacing-3) !important; }
.mw-m-4 { margin: var(--mw-spacing-4) !important; }
.mw-m-5 { margin: var(--mw-spacing-5) !important; }
.mw-m-6 { margin: var(--mw-spacing-6) !important; }
.mw-m-8 { margin: var(--mw-spacing-8) !important; }

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

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

.mw-ml-auto { margin-left: auto !important; }
.mw-mr-auto { margin-right: auto !important; }
.mw-mx-auto { margin-left: auto !important; margin-right: auto !important; }

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

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

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

/* Text colors */
.mw-text-primary { color: var(--mw-text-primary) !important; }
.mw-text-secondary { color: var(--mw-text-secondary) !important; }
.mw-text-tertiary { color: var(--mw-text-tertiary) !important; }
.mw-text-success { color: var(--mw-success) !important; }
.mw-text-warning { color: var(--mw-warning) !important; }
.mw-text-error { color: var(--mw-error) !important; }
.mw-text-info { color: var(--mw-info) !important; }

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

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

/* Text styles */
.mw-italic { font-style: italic !important; }
.mw-no-underline { text-decoration: none !important; }
.mw-uppercase { text-transform: uppercase !important; }
.mw-lowercase { text-transform: lowercase !important; }
.mw-capitalize { text-transform: capitalize !important; }
.mw-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

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

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

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

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

.mw-items-start { align-items: flex-start !important; }
.mw-items-center { align-items: center !important; }
.mw-items-end { align-items: flex-end !important; }
.mw-items-stretch { align-items: stretch !important; }

.mw-justify-start { justify-content: flex-start !important; }
.mw-justify-center { justify-content: center !important; }
.mw-justify-end { justify-content: flex-end !important; }
.mw-justify-between { justify-content: space-between !important; }
.mw-justify-around { justify-content: space-around !important; }

.mw-gap-1 { gap: var(--mw-spacing-1) !important; }
.mw-gap-2 { gap: var(--mw-spacing-2) !important; }
.mw-gap-3 { gap: var(--mw-spacing-3) !important; }
.mw-gap-4 { gap: var(--mw-spacing-4) !important; }
.mw-gap-6 { gap: var(--mw-spacing-6) !important; }
.mw-gap-8 { gap: var(--mw-spacing-8) !important; }

.mw-flex-1 { flex: 1 !important; }
.mw-flex-auto { flex: auto !important; }
.mw-flex-none { flex: none !important; }

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

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

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

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

.mw-w-full { width: 100% !important; }
.mw-w-auto { width: auto !important; }
.mw-w-fit { width: fit-content !important; }

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

.mw-max-w-sm { max-width: 24rem !important; }
.mw-max-w-md { max-width: 28rem !important; }
.mw-max-w-lg { max-width: 32rem !important; }
.mw-max-w-xl { max-width: 36rem !important; }
.mw-max-w-2xl { max-width: 42rem !important; }
.mw-max-w-full { max-width: 100% !important; }

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

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

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

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

.mw-border { border: var(--mw-border-width-1) solid var(--mw-border-primary) !important; }
.mw-border-0 { border: 0 !important; }
.mw-border-t { border-top: var(--mw-border-width-1) solid var(--mw-border-primary) !important; }
.mw-border-b { border-bottom: var(--mw-border-width-1) solid var(--mw-border-primary) !important; }

.mw-rounded-none { border-radius: var(--mw-radius-none) !important; }
.mw-rounded-sm { border-radius: var(--mw-radius-sm) !important; }
.mw-rounded { border-radius: var(--mw-radius-base) !important; }
.mw-rounded-md { border-radius: var(--mw-radius-md) !important; }
.mw-rounded-lg { border-radius: var(--mw-radius-lg) !important; }
.mw-rounded-xl { border-radius: var(--mw-radius-xl) !important; }
.mw-rounded-full { border-radius: var(--mw-radius-full) !important; }

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

.mw-shadow-none { box-shadow: none !important; }
.mw-shadow-sm { box-shadow: var(--mw-shadow-sm) !important; }
.mw-shadow { box-shadow: var(--mw-shadow-base) !important; }
.mw-shadow-md { box-shadow: var(--mw-shadow-md) !important; }
.mw-shadow-lg { box-shadow: var(--mw-shadow-lg) !important; }
.mw-shadow-xl { box-shadow: var(--mw-shadow-xl) !important; }

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

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

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

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

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

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

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

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

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

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

.mw-z-0 { z-index: 0 !important; }
.mw-z-10 { z-index: 10 !important; }
.mw-z-20 { z-index: 20 !important; }
.mw-z-30 { z-index: 30 !important; }
.mw-z-40 { z-index: 40 !important; }
.mw-z-50 { z-index: 50 !important; }

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

/* Hide on mobile, show on tablet and up */
@media (max-width: 767px) {
  .mw-hide-mobile { display: none !important; }
}

/* Show on mobile, hide on tablet and up */
@media (min-width: 768px) {
  .mw-show-mobile { display: none !important; }
}

/* Hide on tablet, show on desktop */
@media (min-width: 768px) and (max-width: 1023px) {
  .mw-hide-tablet { display: none !important; }
}

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

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

/* ============================================================================
   INTERACTION STATES
   ============================================================================ */

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

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