/* ============================
   Utility Classes
   ============================ */

/* === 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;
}

/* === Visibility Utilities === */
.visible {
  visibility: visible !important;
  opacity: 1 !important;
}

.invisible {
  visibility: hidden !important;
  opacity: 0 !important;
}

.hidden {
  display: none !important;
}

/* === Common Width/Height Utilities === */
.w-auto {
  width: auto !important;
}

.w-100 {
  width: 100% !important;
}

.h-auto {
  height: auto !important;
}

.h-100 {
  height: 100% !important;
}

.min-h-600 {
  min-height: 600px;
}

.min-h-450 {
  min-height: 450px;
}

.min-h-400 {
  min-height: 400px;
}

.min-h-350 {
  min-height: 350px;
}

.min-h-300 {
  min-height: 300px;
}

.min-h-200 {
  min-height: 200px;
}

.min-h-150 {
  min-height: 150px;
}

.max-h-600 {
  max-height: 600px;
}

.max-h-450 {
  max-height: 450px;
}

.max-h-400 {
  max-height: 400px;
}

.max-h-350 {
  max-height: 350px;
}

.max-h-200 {
  max-height: 200px;
}

.max-h-150 {
  max-height: 150px;
}

/* === Overflow Utilities === */
.overflow-auto {
  overflow: auto !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

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

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

/* === Position Utilities === */
.position-relative {
  position: relative !important;
}

.position-absolute {
  position: absolute !important;
}

.position-fixed {
  position: fixed !important;
}

.position-sticky {
  position: sticky !important;
}

/* === Cursor Utilities === */
.cursor-pointer {
  cursor: pointer !important;
}

.cursor-default {
  cursor: default !important;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}

/* === Pointer Events === */
.pointer-events-none {
  pointer-events: none !important;
}

.pointer-events-auto {
  pointer-events: 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;
}

/* === Z-Index Utilities === */
.z-0 {
  z-index: 0 !important;
}

.z-10 {
  z-index: 10 !important;
}

.z-20 {
  z-index: 20 !important;
}

.z-30 {
  z-index: 30 !important;
}

.z-40 {
  z-index: 40 !important;
}

.z-50 {
  z-index: 50 !important;
}

.z-dropdown {
  z-index: var(--z-dropdown) !important;
}

.z-sticky {
  z-index: var(--z-sticky) !important;
}

.z-fixed {
  z-index: var(--z-fixed) !important;
}

.z-modal {
  z-index: var(--z-modal) !important;
}

.z-tooltip {
  z-index: var(--z-tooltip) !important;
}

/* === Inset Utilities === */
.inset-0 {
  inset: 0;
}

/* === Text Alignment === */
.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

/* === Flex Utilities === */
.flex-row {
  flex-direction: row !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-nowrap {
  flex-wrap: nowrap !important;
}

.justify-content-start {
  justify-content: flex-start !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-end {
  justify-content: flex-end !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.justify-content-around {
  justify-content: space-around !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-end {
  align-items: flex-end !important;
}

.align-items-stretch {
  align-items: stretch !important;
}

/* === Gap Utilities === */
.gap-0 {
  gap: 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-5 {
  gap: var(--space-5) !important;
}

.gap-6 {
  gap: var(--space-6) !important;
}

/* === Progress Bar Height Utilities === */
.progress-h-6 {
  height: 6px !important;
}

.progress-h-8 {
  height: 8px !important;
}

.progress-h-25 {
  height: 25px !important;
}

/* === Width Utilities === */
.w-50 {
  width: 50% !important;
}

.w-75 {
  width: 75% !important;
}

.w-150px {
  width: 150px !important;
}

.w-100px {
  width: 100px !important;
}

.w-3em {
  width: 3em !important;
}

/* === Height Utilities === */
.h-6px {
  height: 6px !important;
}

.h-1-5em {
  height: 1.5em !important;
}

/* === Background Utilities === */
.bg-transparent {
  background-color: transparent !important;
}

.bg-surface-0 {
  background-color: var(--surface-0) !important;
}

.bg-surface-1 {
  background-color: var(--surface-1) !important;
}

.bg-surface-2 {
  background-color: var(--surface-2) !important;
}

.bg-surface-3 {
  background-color: var(--surface-3) !important;
}

.bg-surface-4 {
  background-color: var(--surface-4) !important;
}

.bg-opacity-75 {
  background-color: rgb(var(--surface-rgb) / 75%) !important;
}

/* === Animation Utilities === */
.fade-in {
  animation: fadeIn var(--transition-normal) ease-in forwards;
}

.fade-in-up {
  animation: fadeInUp var(--transition-normal) ease-out forwards;
}

.fade-out {
  animation: fadeOut var(--transition-normal) ease-out forwards;
}

.scale-in {
  animation: scaleIn var(--transition-normal) ease-out forwards;
}

.slide-up {
  animation: slideUp var(--transition-normal) ease-out forwards;
}

.slide-down {
  animation: slideDown var(--transition-normal) ease-out forwards;
}

.shake {
  animation: shake var(--transition-normal) ease;
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.spin {
  animation: spin 1s linear infinite;
}

/* === Transition Utilities === */
.transition-fast {
  transition: all var(--transition-fast);
}

.transition-normal {
  transition: all var(--transition-normal);
}

.transition-slow {
  transition: all var(--transition-slow);
}

/* === Responsive Utilities === */
@media (width <= 768px) {
  .d-mobile-none {
    display: none !important;
  }

  .d-mobile-block {
    display: block !important;
  }

  .d-mobile-flex {
    display: flex !important;
  }
}

@media (width > 768px) {
  .d-desktop-none {
    display: none !important;
  }

  .d-desktop-block {
    display: block !important;
  }

  .d-desktop-flex {
    display: flex !important;
  }
}

/* === Font Size Utilities === */
.fs-xs {
  font-size: var(--font-size-xs) !important;
}

.fs-sm {
  font-size: var(--font-size-sm) !important;
}

.fs-md {
  font-size: var(--font-size-md) !important;
}

.fs-lg {
  font-size: var(--font-size-lg) !important;
}

.fs-xl {
  font-size: var(--font-size-xl) !important;
}

.fs-2xl {
  font-size: var(--font-size-2xl) !important;
}

.fs-1-5rem {
  font-size: 1.5rem !important;
}

/* === Font Weight Utilities === */
.fw-light {
  font-weight: var(--font-weight-light) !important;
}

.fw-normal {
  font-weight: var(--font-weight-regular) !important;
}

.fw-medium {
  font-weight: var(--font-weight-medium) !important;
}

.fw-semibold {
  font-weight: var(--font-weight-semibold) !important;
}

.fw-bold {
  font-weight: var(--font-weight-bold) !important;
}

/* === Color Text Utilities === */
.text-primary {
  color: var(--primary) !important;
}

.text-secondary {
  color: var(--secondary) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-info {
  color: var(--info) !important;
}

.text-muted {
  color: var(--text-tertiary) !important;
}

/* === Border Radius Utilities === */
.rounded-xs {
  border-radius: var(--radius-xs) !important;
}

.rounded-sm {
  border-radius: var(--radius-sm) !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-full {
  border-radius: var(--radius-full) !important;
}

/* === Shadow Utilities === */
.shadow-xs {
  box-shadow: var(--shadow-xs) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !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-none {
  box-shadow: none !important;
}

/* === Common Layout Patterns === */
.hero-gradient {
  background: linear-gradient(
    135deg,
    rgb(var(--primary-rgb) / 15%),
    rgb(var(--secondary-rgb) / 10%)
  );
  padding: var(--space-6) var(--space-5);
}

/* === Form Utilities === */
.form-select-auto {
  width: auto !important;
}
