/* utilities/utilities.css - Essential Global Utilities */

/* === DISPLAY UTILITIES === */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }

/* === VISIBILITY UTILITIES === */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* === OPACITY UTILITIES === */
.opacity-0 { opacity: 0 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-100 { opacity: 1 !important; }

/* === POSITIONING UTILITIES === */
.pos-relative { position: relative !important; }
.pos-absolute { position: absolute !important; }
.pos-fixed { position: fixed !important; }
.pos-sticky { position: sticky !important; }

/* === OVERFLOW UTILITIES === */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* === Z-INDEX UTILITIES === */
.z-0 { z-index: 0 !important; }
.z-10 { z-index: 10 !important; }
.z-50 { z-index: 50 !important; }
.z-100 { z-index: 100 !important; }

/* === CURSOR UTILITIES === */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.cursor-wait { cursor: wait !important; }

/* === POINTER EVENTS === */
.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

/* === SIZING UTILITIES === */
.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.min-h-screen { min-height: 100vh !important; }

/* === FLEXBOX UTILITIES === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* === SPACING UTILITIES === */
.m-0 { margin: 0 !important; }
.p-0 { padding: 0 !important; }
.mt-auto { margin-top: auto !important; }
.mb-auto { margin-bottom: auto !important; }
.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }

/* === BORDER RADIUS === */
.rounded { border-radius: var(--radius-md) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* === ACCESSIBILITY === */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: var(--radius-sm);
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 6px;
}

/* === ASPECT RATIO === */
@supports (aspect-ratio: 1) {
    .aspect-square { aspect-ratio: 1 / 1 !important; }
    .aspect-video { aspect-ratio: 16 / 9 !important; }
}

/* === LOADING STATES === */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === STATE UTILITIES === */
.disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

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

/* === PERFORMANCE UTILITIES === */
.gpu-accelerate {
    transform: translateZ(0);
    will-change: transform;
}

/* === RESPONSIVE DISPLAY === */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
    .hide-desktop { display: none !important; }
    .show-desktop { display: block !important; }
}

/* === PRINT UTILITIES === */
@media print {
    .no-print { display: none !important; }
    .print-only { display: block !important; }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .loading::after {
        animation: none;
    }
    
    .respect-motion {
        animation: none !important;
        transition: none !important;
    }
}

