/* ============================================
   Utilities Stylesheet
   فئات CSS مساعدة
   مؤسسة محمود الحفناوى للتنمية الخيرية
   ============================================ */

/* ============================================
   1. Display
   ============================================ */

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

/* ============================================
   2. 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; }
.flex-1 { flex: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }

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

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

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

/* ============================================
   3. Spacing (Margin & Padding)
   ============================================ */

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

.mt-0 { margin-top: 0 !important; }
.mt-xs { margin-top: var(--spacing-xs) !important; }
.mt-sm { margin-top: var(--spacing-sm) !important; }
.mt-md { margin-top: var(--spacing-md) !important; }
.mt-lg { margin-top: var(--spacing-lg) !important; }
.mt-xl { margin-top: var(--spacing-xl) !important; }
.mt-auto { margin-top: auto !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-xs { margin-bottom: var(--spacing-xs) !important; }
.mb-sm { margin-bottom: var(--spacing-sm) !important; }
.mb-md { margin-bottom: var(--spacing-md) !important; }
.mb-lg { margin-bottom: var(--spacing-lg) !important; }
.mb-xl { margin-bottom: var(--spacing-xl) !important; }
.mb-auto { margin-bottom: auto !important; }

.ms-0 { margin-right: 0 !important; }
.ms-xs { margin-right: var(--spacing-xs) !important; }
.ms-sm { margin-right: var(--spacing-sm) !important; }
.ms-md { margin-right: var(--spacing-md) !important; }
.ms-lg { margin-right: var(--spacing-lg) !important; }
.ms-auto { margin-right: auto !important; }

.me-0 { margin-left: 0 !important; }
.me-xs { margin-left: var(--spacing-xs) !important; }
.me-sm { margin-left: var(--spacing-sm) !important; }
.me-md { margin-left: var(--spacing-md) !important; }
.me-lg { margin-left: var(--spacing-lg) !important; }
.me-auto { margin-left: auto !important; }

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

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

.pt-0 { padding-top: 0 !important; }
.pt-sm { padding-top: var(--spacing-sm) !important; }
.pt-md { padding-top: var(--spacing-md) !important; }
.pt-lg { padding-top: var(--spacing-lg) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-sm { padding-bottom: var(--spacing-sm) !important; }
.pb-md { padding-bottom: var(--spacing-md) !important; }
.pb-lg { padding-bottom: var(--spacing-lg) !important; }

/* ============================================
   4. Sizing
   ============================================ */

.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100px !important; }
.w-200 { width: 200px !important; }
.w-300 { width: 300px !important; }

.h-full { height: 100% !important; }
.h-auto { height: auto !important; }
.h-100 { height: 100px !important; }
.h-200 { height: 200px !important; }

.min-h-100vh { min-height: 100vh !important; }
.max-w-sm { max-width: 400px !important; }
.max-w-md { max-width: 600px !important; }
.max-w-lg { max-width: 900px !important; }

/* ============================================
   5. Borders
   ============================================ */

.border { border: 1px solid var(--gray-200) !important; }
.border-0 { border: none !important; }
.border-top { border-top: 1px solid var(--gray-200) !important; }
.border-bottom { border-bottom: 1px solid var(--gray-200) !important; }
.border-start { border-right: 1px solid var(--gray-200) !important; }
.border-end { border-left: 1px solid var(--gray-200) !important; }

.border-primary { border-color: var(--primary) !important; }
.border-success { border-color: var(--success) !important; }
.border-warning { border-color: var(--warning) !important; }
.border-danger { border-color: var(--danger) !important; }

.border-dashed { border-style: dashed !important; }
.border-2 { border-width: 2px !important; }
.border-4 { border-width: 4px !important; }

/* ============================================
   6. Border Radius
   ============================================ */

.rounded-0 { border-radius: 0 !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded { 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: 9999px !important; }
.rounded-circle { border-radius: 50% !important; }

.rounded-top { border-radius: var(--radius-md) var(--radius-md) 0 0 !important; }
.rounded-bottom { border-radius: 0 0 var(--radius-md) var(--radius-md) !important; }

/* ============================================
   7. Shadows
   ============================================ */

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

/* ============================================
   8. Background Colors
   ============================================ */

.bg-transparent { background-color: transparent !important; }
.bg-white { background-color: var(--white) !important; }
.bg-gray-50 { background-color: var(--gray-50) !important; }
.bg-gray-100 { background-color: var(--gray-100) !important; }
.bg-gray-200 { background-color: var(--gray-200) !important; }

.bg-primary { background-color: var(--primary) !important; color: white !important; }
.bg-primary-light { background-color: var(--primary-50) !important; }
.bg-success { background-color: var(--success) !important; color: white !important; }
.bg-success-light { background-color: var(--success-light) !important; }
.bg-warning { background-color: var(--warning) !important; color: white !important; }
.bg-warning-light { background-color: var(--warning-light) !important; }
.bg-danger { background-color: var(--danger) !important; color: white !important; }
.bg-danger-light { background-color: var(--danger-light) !important; }
.bg-info { background-color: var(--info) !important; color: white !important; }
.bg-info-light { background-color: var(--info-light) !important; }

/* ============================================
   9. Text Colors
   ============================================ */

.text-white { color: var(--white) !important; }
.text-black { color: var(--black) !important; }
.text-gray-400 { color: var(--gray-400) !important; }
.text-gray-500 { color: var(--gray-500) !important; }
.text-gray-600 { color: var(--gray-600) !important; }
.text-gray-700 { color: var(--gray-700) !important; }
.text-gray-800 { color: var(--gray-800) !important; }

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }

/* ============================================
   10. Position
   ============================================ */

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

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

.top-50 { top: 50% !important; }
.start-50 { right: 50% !important; }
.translate-middle {
    transform: translate(50%, -50%) !important;
}

/* ============================================
   11. Z-Index
   ============================================ */

.z-0 { z-index: 0 !important; }
.z-10 { z-index: 10 !important; }
.z-20 { z-index: 20 !important; }
.z-50 { z-index: 50 !important; }
.z-100 { z-index: 100 !important; }
.z-auto { z-index: auto !important; }

/* ============================================
   12. Overflow
   ============================================ */

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

/* ============================================
   13. Visibility & Opacity
   ============================================ */

.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

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

/* ============================================
   14. Text Utilities
   ============================================ */

.text-start { text-align: right !important; }
.text-center { text-align: center !important; }
.text-end { text-align: left !important; }

.text-underline { text-decoration: underline !important; }
.text-overline { text-decoration: overline !important; }
.text-linethrough { text-decoration: line-through !important; }
.text-no-decoration { text-decoration: none !important; }

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

.text-nowrap { white-space: nowrap !important; }
.text-wrap { white-space: normal !important; }
.text-break { word-break: break-word !important; overflow-wrap: break-word !important; }

.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-medium { font-weight: 500 !important; }
.font-weight-semibold { font-weight: 600 !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-extrabold { font-weight: 800 !important; }

/* ============================================
   15. Responsive Utilities
   ============================================ */

@media (max-width: 768px) {
    .d-none-mobile { display: none !important; }
    .d-block-mobile { display: block !important; }
    .d-flex-mobile { display: flex !important; }
    .flex-column-mobile { flex-direction: column !important; }
    .w-full-mobile { width: 100% !important; }
    .text-center-mobile { text-align: center !important; }
}

@media (max-width: 576px) {
    .d-none-sm { display: none !important; }
}

@media (min-width: 992px) {
    .d-none-desktop { display: none !important; }
    .d-block-desktop { display: block !important; }
}