/**
 * Utility Classes
 * Helper classes for common CSS patterns
 */

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

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

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

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

/* ==========================================================================
   SPACING UTILITIES - MARGIN
   ========================================================================== */

.m-0 {
    margin: 0 !important;
}

.m-auto {
    margin: auto !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: var(--space-1) !important;
}

.mt-2 {
    margin-top: var(--space-2) !important;
}

.mt-3 {
    margin-top: var(--space-3) !important;
}

.mt-4 {
    margin-top: var(--space-4) !important;
}

.mt-6 {
    margin-top: var(--space-6) !important;
}

.mt-8 {
    margin-top: var(--space-8) !important;
}

.mt-auto {
    margin-top: auto !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: var(--space-1) !important;
}

.mb-2 {
    margin-bottom: var(--space-2) !important;
}

.mb-3 {
    margin-bottom: var(--space-3) !important;
}

.mb-4 {
    margin-bottom: var(--space-4) !important;
}

.mb-6 {
    margin-bottom: var(--space-6) !important;
}

.mb-8 {
    margin-bottom: var(--space-8) !important;
}

.mb-auto {
    margin-bottom: auto !important;
}

.ml-0 {
    margin-left: 0 !important;
}

.ml-auto {
    margin-left: auto !important;
}

.mr-0 {
    margin-right: 0 !important;
}

.mr-auto {
    margin-right: auto !important;
}

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

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

.my-0 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.my-4 {
    margin-top: var(--space-4) !important;
    margin-bottom: var(--space-4) !important;
}

.my-6 {
    margin-top: var(--space-6) !important;
    margin-bottom: var(--space-6) !important;
}

/* ==========================================================================
   SPACING UTILITIES - PADDING
   ========================================================================== */

.p-0 {
    padding: 0 !important;
}

.pt-0 {
    padding-top: 0 !important;
}

.pt-1 {
    padding-top: var(--space-1) !important;
}

.pt-2 {
    padding-top: var(--space-2) !important;
}

.pt-3 {
    padding-top: var(--space-3) !important;
}

.pt-4 {
    padding-top: var(--space-4) !important;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.pb-1 {
    padding-bottom: var(--space-1) !important;
}

.pb-2 {
    padding-bottom: var(--space-2) !important;
}

.pb-3 {
    padding-bottom: var(--space-3) !important;
}

.pb-4 {
    padding-bottom: var(--space-4) !important;
}

.px-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.px-4 {
    padding-left: var(--space-4) !important;
    padding-right: var(--space-4) !important;
}

.py-0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.py-4 {
    padding-top: var(--space-4) !important;
    padding-bottom: var(--space-4) !important;
}

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

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

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

.text-right {
    text-align: right !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-primary {
    color: var(--color-primary) !important;
}

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

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

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

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

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

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

/* ==========================================================================
   FONT UTILITIES
   ========================================================================== */

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

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

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

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

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

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

.fw-normal {
    font-weight: var(--font-weight-normal) !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;
}

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

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

.border-0 {
    border: none !important;
}

.border-top {
    border-top: 1px solid var(--border-color) !important;
}

.border-bottom {
    border-bottom: 1px solid var(--border-color) !important;
}

.border-left {
    border-left: 1px solid var(--border-color) !important;
}

.border-right {
    border-right: 1px solid var(--border-color) !important;
}

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

.rounded-sm {
    border-radius: var(--radius-sm) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.rounded-full {
    border-radius: var(--radius-full) !important;
}

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

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

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

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

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

.bg-transparent {
    background-color: transparent !important;
}

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

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

.w-auto {
    width: auto !important;
}

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

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

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

.max-w-container {
    max-width: var(--container-max-width) !important;
}

.max-w-content {
    max-width: var(--content-max-width) !important;
}

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

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

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

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

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

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

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

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

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

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

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

.shadow-none {
    box-shadow: none !important;
}

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

/* Hide on mobile */
@media (max-width: 767px) {
    .d-md-none {
        display: none !important;
    }
}

/* Show only on mobile */
@media (min-width: 768px) {
    .d-sm-none {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }
}

/* ==========================================================================
   INTERACTION UTILITIES
   ========================================================================== */

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

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

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

.user-select-none {
    user-select: none !important;
}

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

.opacity-0 {
    opacity: 0 !important;
}

.opacity-50 {
    opacity: 0.5 !important;
}

.opacity-75 {
    opacity: 0.75 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

/* ==========================================================================
   VISIBILITY UTILITIES
   ========================================================================== */

.visible {
    visibility: visible !important;
}

.invisible {
    visibility: hidden !important;
}
