/**
 * 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; }

/* ==========================================
   FLEX UTILITIES
   ========================================== */
.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; }

.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.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-start { align-items: flex-start !important; }
.align-end { align-items: flex-end !important; }
.align-center { align-items: center !important; }
.align-baseline { align-items: baseline !important; }
.align-stretch { align-items: stretch !important; }

.flex-1 { flex: 1 !important; }
.flex-auto { flex: auto !important; }
.flex-none { flex: none !important; }

/* Gap utilities */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: var(--spacing-xs) !important; }
.gap-2 { gap: var(--spacing-sm) !important; }
.gap-3 { gap: var(--spacing-md) !important; }
.gap-4 { gap: var(--spacing-lg) !important; }
.gap-5 { gap: var(--spacing-xl) !important; }

/* ==========================================
   POSITION UTILITIES
   ========================================== */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* ==========================================
   TEXT UTILITIES
   ========================================== */
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-justify { text-align: justify !important; }

.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.text-decoration-none { text-decoration: none !important; }
.text-decoration-underline { text-decoration: underline !important; }

.text-nowrap { white-space: nowrap !important; }
.text-wrap { white-space: normal !important; }

.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Font sizes */
.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-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 weights */
.font-light { font-weight: 300 !important; }
.font-regular { font-weight: var(--font-weight-regular) !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; }

/* 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; }

/* ==========================================
   COLOR UTILITIES
   ========================================== */
/* Text colors */
.text-primary { color: var(--color-text-primary) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.text-white { color: var(--color-text-white) !important; }
.text-disabled { color: var(--color-text-disabled) !important; }

.text-success { color: var(--color-status-success) !important; }
.text-warning { color: var(--color-status-warning) !important; }
.text-error { color: var(--color-status-error) !important; }
.text-info { color: var(--color-status-info) !important; }

.text-primary-main { color: var(--color-primary-main) !important; }
.text-coral { color: var(--color-secondary-coral) !important; }
.text-yellow { color: var(--color-secondary-yellow) !important; }
.text-navy { color: var(--color-secondary-navy) !important; }

/* Background colors */
.bg-main { background-color: var(--color-bg-main) !important; }
.bg-card { background-color: var(--color-bg-card) !important; }
.bg-hover { background-color: var(--color-bg-hover) !important; }

.bg-primary { background-color: var(--color-primary-main) !important; }
.bg-primary-light { background-color: var(--color-primary-light) !important; }
.bg-primary-dark { background-color: var(--color-primary-dark) !important; }

.bg-success { background-color: var(--color-status-success) !important; }
.bg-warning { background-color: var(--color-status-warning) !important; }
.bg-error { background-color: var(--color-status-error) !important; }
.bg-info { background-color: var(--color-status-info) !important; }

.bg-coral { background-color: var(--color-secondary-coral) !important; }
.bg-yellow { background-color: var(--color-secondary-yellow) !important; }
.bg-navy { background-color: var(--color-secondary-navy) !important; }

.bg-transparent { background-color: transparent !important; }

/* ==========================================
   BORDER UTILITIES
   ========================================== */
.border { border: 1px solid #E5E7EB !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid #E5E7EB !important; }
.border-bottom { border-bottom: 1px solid #E5E7EB !important; }
.border-right { border-right: 1px solid #E5E7EB !important; }
.border-left { border-left: 1px solid #E5E7EB !important; }

/* Border radius */
.rounded-none { border-radius: 0 !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-full { border-radius: var(--radius-full) !important; }

/* ==========================================
   SHADOW UTILITIES
   ========================================== */
.shadow-none { box-shadow: none !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; }

/* ==========================================
   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; }

/* ==========================================
   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-x-hidden { overflow-x: hidden !important; }
.overflow-y-auto { overflow-y: auto !important; }
.overflow-y-hidden { overflow-y: hidden !important; }

/* ==========================================
   WIDTH & HEIGHT UTILITIES
   ========================================== */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

.min-h-screen { min-height: 100vh !important; }
.min-w-0 { min-width: 0 !important; }

.max-w-xs { max-width: 20rem !important; }
.max-w-sm { max-width: 24rem !important; }
.max-w-md { max-width: 28rem !important; }
.max-w-lg { max-width: 32rem !important; }
.max-w-xl { max-width: 36rem !important; }
.max-w-2xl { max-width: 42rem !important; }
.max-w-full { max-width: 100% !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; }

/* ==========================================
   VISIBILITY UTILITIES
   ========================================== */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !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-auto { z-index: auto !important; }

/* ==========================================
   INTERACTION UTILITIES
   ========================================== */
.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

.user-select-none { user-select: none !important; }
.user-select-auto { user-select: auto !important; }
.user-select-all { user-select: all !important; }

/* ==========================================
   TRANSITION UTILITIES
   ========================================== */
.transition-none { transition: none !important; }
.transition-all { transition: all var(--transition-normal) !important; }
.transition-fast { transition: all var(--transition-fast) !important; }
.transition-slow { transition: all var(--transition-slow) !important; }

/* ==========================================
   TRANSFORM UTILITIES
   ========================================== */
.scale-90 { transform: scale(0.9) !important; }
.scale-95 { transform: scale(0.95) !important; }
.scale-100 { transform: scale(1) !important; }
.scale-105 { transform: scale(1.05) !important; }
.scale-110 { transform: scale(1.1) !important; }

.rotate-90 { transform: rotate(90deg) !important; }
.rotate-180 { transform: rotate(180deg) !important; }
.rotate-270 { transform: rotate(270deg) !important; }

/* ==========================================
   HOVER EFFECTS
   ========================================== */
.hover-lift {
  transition: all var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform var(--transition-normal);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-opacity:hover {
  opacity: 0.8;
}

/* ==========================================
   SCROLLBAR CUSTOM
   ========================================== */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--color-bg-hover);
  border-radius: var(--radius-sm);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--color-text-disabled);
  border-radius: var(--radius-sm);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* ==========================================
   ASPECT RATIO
   ========================================== */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

/* ==========================================
   OBJECT FIT
   ========================================== */
.object-contain { object-fit: contain !important; }
.object-cover { object-fit: cover !important; }
.object-fill { object-fit: fill !important; }
.object-none { object-fit: none !important; }

/* ==========================================
   LIST UTILITIES
   ========================================== */
.list-none { list-style: none !important; }
.list-disc { list-style: disc !important; }
.list-decimal { list-style: decimal !important; }

/* ==========================================
   PRINT UTILITIES
   ========================================== */
@media print {
  .print-hidden { display: none !important; }
  .print-visible { display: block !important; }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in { animation: fadeIn var(--transition-normal) ease-in; }
.animate-fade-out { animation: fadeOut var(--transition-normal) ease-out; }
.animate-slide-in-right { animation: slideInRight var(--transition-normal) ease-out; }
.animate-slide-in-left { animation: slideInLeft var(--transition-normal) ease-out; }
.animate-slide-in-up { animation: slideInUp var(--transition-normal) ease-out; }
.animate-slide-in-down { animation: slideInDown var(--transition-normal) ease-out; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ==========================================
   RESPONSIVE TEXT
   ========================================== */
@media (max-width: 640px) {
  .text-sm\:xs { font-size: var(--font-size-xs) !important; }
  .text-sm\:sm { font-size: var(--font-size-sm) !important; }
  .text-sm\:base { font-size: var(--font-size-base) !important; }
}

/* ==========================================
   ACCESSIBILITY UTILITIES
   ========================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

