/* ========== Mobile Responsive Utilities ========== */

/* Hide/Show Utilities */
.d-xs-none { display: none !important; }
.d-xs-inline { display: inline !important; }
.d-xs-inline-block { display: inline-block !important; }
.d-xs-block { display: block !important; }
.d-xs-flex { display: flex !important; }
.d-xs-grid { display: grid !important; }

@media (max-width: 640px) {
    .d-sm-none { display: none !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-grid { display: grid !important; }
    
    .hide-sm { display: none !important; }
    .show-sm { display: block !important; }
}

@media (max-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-inline { display: inline !important; }
    .d-md-inline-block { display: inline-block !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-grid { display: grid !important; }
    
    .hide-md { display: none !important; }
    .show-md { display: block !important; }
}

/* Mobile Margin/Padding Utilities */
@media (max-width: 640px) {
    /* Margin utilities */
    .m-xs-0 { margin: 0 !important; }
    .m-xs-1 { margin: 4px !important; }
    .m-xs-2 { margin: 8px !important; }
    .m-xs-3 { margin: 12px !important; }
    .m-xs-4 { margin: 16px !important; }
    
    .mx-xs-0 { margin-left: 0 !important; margin-right: 0 !important; }
    .mx-xs-2 { margin-left: 8px !important; margin-right: 8px !important; }
    .mx-xs-3 { margin-left: 12px !important; margin-right: 12px !important; }
    
    .my-xs-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
    .my-xs-2 { margin-top: 8px !important; margin-bottom: 8px !important; }
    .my-xs-3 { margin-top: 12px !important; margin-bottom: 12px !important; }
    
    /* Padding utilities */
    .p-xs-0 { padding: 0 !important; }
    .p-xs-1 { padding: 4px !important; }
    .p-xs-2 { padding: 8px !important; }
    .p-xs-3 { padding: 12px !important; }
    .p-xs-4 { padding: 16px !important; }
    
    .px-xs-0 { padding-left: 0 !important; padding-right: 0 !important; }
    .px-xs-2 { padding-left: 8px !important; padding-right: 8px !important; }
    .px-xs-3 { padding-left: 12px !important; padding-right: 12px !important; }
    
    .py-xs-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
    .py-xs-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
    .py-xs-3 { padding-top: 12px !important; padding-bottom: 12px !important; }
}

/* Text Utilities for Mobile */
@media (max-width: 640px) {
    .text-xs-center { text-align: center !important; }
    .text-xs-left { text-align: left !important; }
    .text-xs-right { text-align: right !important; }
    
    .fs-xs-1 { font-size: 0.8rem !important; }
    .fs-xs-2 { font-size: 0.9rem !important; }
    .fs-xs-3 { font-size: 1rem !important; }
    .fs-xs-4 { font-size: 1.1rem !important; }
    .fs-xs-5 { font-size: 1.25rem !important; }
}

/* Width/Height Utilities for Mobile */
@media (max-width: 640px) {
    .w-xs-100 { width: 100% !important; }
    .w-xs-50 { width: 50% !important; }
    .w-xs-75 { width: 75% !important; }
    
    .h-xs-auto { height: auto !important; }
    .h-xs-100 { height: 100% !important; }
}

/* Flex Utilities for Mobile */
@media (max-width: 640px) {
    .flex-xs-column { flex-direction: column !important; }
    .flex-xs-row { flex-direction: row !important; }
    .flex-xs-wrap { flex-wrap: wrap !important; }
    .flex-xs-nowrap { flex-wrap: nowrap !important; }
    
    .justify-content-xs-center { justify-content: center !important; }
    .justify-content-xs-between { justify-content: space-between !important; }
    .justify-content-xs-around { justify-content: space-around !important; }
    
    .align-items-xs-center { align-items: center !important; }
    .align-items-xs-start { align-items: flex-start !important; }
    .align-items-xs-end { align-items: flex-end !important; }
}

/* Grid Utilities for Mobile */
@media (max-width: 640px) {
    .gap-xs-0 { gap: 0 !important; }
    .gap-xs-1 { gap: 4px !important; }
    .gap-xs-2 { gap: 8px !important; }
    .gap-xs-3 { gap: 12px !important; }
}

/* Mobile Border Utilities */
@media (max-width: 640px) {
    .border-xs-none { border: none !important; }
    .border-xs-radius { border-radius: 8px !important; }
}

/* Mobile Position Utilities */
@media (max-width: 768px) {
    .position-sm-static { position: static !important; }
    .position-sm-relative { position: relative !important; }
    .position-sm-absolute { position: absolute !important; }
    .position-sm-fixed { position: fixed !important; }
}

/* Mobile Shadow Utilities */
@media (max-width: 640px) {
    .shadow-xs-none { box-shadow: none !important; }
    .shadow-xs-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
    .shadow-xs { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
}

/* Mobile Opacity Utilities */
@media (max-width: 640px) {
    .opacity-xs-0 { opacity: 0 !important; }
    .opacity-xs-25 { opacity: 0.25 !important; }
    .opacity-xs-50 { opacity: 0.5 !important; }
    .opacity-xs-75 { opacity: 0.75 !important; }
    .opacity-xs-100 { opacity: 1 !important; }
}

/* Mobile Overflow Utilities */
@media (max-width: 640px) {
    .overflow-xs-auto { overflow: auto !important; }
    .overflow-xs-hidden { overflow: hidden !important; }
    .overflow-x-xs-auto { overflow-x: auto !important; }
    .overflow-y-xs-auto { overflow-y: auto !important; }
}

/* Mobile Grid Column Utilities */
@media (max-width: 640px) {
    .grid-cols-xs-1 { grid-template-columns: 1fr !important; }
    .grid-cols-xs-2 { grid-template-columns: repeat(2, 1fr) !important; }
    
    .col-xs-1 { flex: 0 0 100% !important; max-width: 100% !important; }
    .col-xs-6 { flex: 0 0 50% !important; max-width: 50% !important; }
    .col-xs-4 { flex: 0 0 33.333% !important; max-width: 33.333% !important; }
}

/* Mobile Aspect Ratio Utilities */
@media (max-width: 640px) {
    .aspect-xs-square { aspect-ratio: 1 / 1 !important; }
    .aspect-xs-video { aspect-ratio: 16 / 9 !important; }
}

/* Mobile Z-Index Utilities */
@media (max-width: 768px) {
    .z-xs-0 { z-index: 0 !important; }
    .z-xs-10 { z-index: 10 !important; }
    .z-xs-20 { z-index: 20 !important; }
    .z-xs-30 { z-index: 30 !important; }
    .z-xs-auto { z-index: auto !important; }
}

/* Mobile Cursor Utilities */
@media (max-width: 768px) {
    .cursor-xs-pointer { cursor: pointer !important; }
    .cursor-xs-default { cursor: default !important; }
    .cursor-xs-not-allowed { cursor: not-allowed !important; }
}

/* Mobile Transition Utilities */
@media (prefers-reduced-motion: no-preference) {
    .transition-xs-all { transition: all 0.2s ease !important; }
    .transition-xs-colors { transition: color, background-color, border-color 0.2s ease !important; }
}

/* Mobile Content Visibility */
@media (max-width: 640px) {
    .content-xs-visible { content-visibility: auto !important; }
}

/* Mobile Scroll Behavior */
@media (max-width: 768px) {
    .scroll-smooth-xs {
        scroll-behavior: smooth;
    }
    
    /* Momentum scrolling on iOS */
    .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
    }
}

/* Mobile Print Utilities */
@media print {
    .print-xs-hidden { display: none !important; }
    .print-xs-show { display: block !important; }
}

/* Mobile Container Queries (if needed in future) */
@supports (container-type: inline-size) {
    .container-xs {
        container-type: inline-size;
    }
}
