/* ========================================
   UTILITÁRIOS RESPONSIVOS
   FiveM Brasil - 2024
   ======================================== */

/* ========================================
   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; }

/* Responsive display utilities */
@media (max-width: 480px) {
    .d-mobile-none { display: none !important; }
    .d-mobile-block { display: block !important; }
    .d-mobile-flex { display: flex !important; }
    .d-mobile-grid { display: grid !important; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .d-tablet-none { display: none !important; }
    .d-tablet-block { display: block !important; }
    .d-tablet-flex { display: flex !important; }
    .d-tablet-grid { display: grid !important; }
}

@media (min-width: 769px) {
    .d-desktop-none { display: none !important; }
    .d-desktop-block { display: block !important; }
    .d-desktop-flex { display: flex !important; }
    .d-desktop-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; }
.justify-evenly { justify-content: space-evenly !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; }
.align-baseline { align-items: baseline !important; }

.flex-1 { flex: 1 !important; }
.flex-auto { flex: auto !important; }
.flex-none { flex: none !important; }

/* Responsive flexbox */
@media (max-width: 768px) {
    .flex-mobile-column { flex-direction: column !important; }
    .flex-mobile-row { flex-direction: row !important; }
    .justify-mobile-center { justify-content: center !important; }
    .align-mobile-center { align-items: center !important; }
}

/* ========================================
   SPACING UTILITIES
   ======================================== */
/* Margin utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }
.m-auto { margin: auto !important; }

.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.mx-4 { margin-left: 1.5rem !important; margin-right: 1.5rem !important; }
.mx-5 { margin-left: 3rem !important; margin-right: 3rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }

/* Padding utilities */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-5 { padding-left: 3rem !important; padding-right: 3rem !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

/* Responsive spacing */
@media (max-width: 768px) {
    .m-mobile-0 { margin: 0 !important; }
    .m-mobile-1 { margin: 0.25rem !important; }
    .m-mobile-2 { margin: 0.5rem !important; }
    .m-mobile-3 { margin: 1rem !important; }
    
    .p-mobile-0 { padding: 0 !important; }
    .p-mobile-1 { padding: 0.25rem !important; }
    .p-mobile-2 { padding: 0.5rem !important; }
    .p-mobile-3 { padding: 1rem !important; }
    
    .px-mobile-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    .py-mobile-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !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-lowercase { text-transform: lowercase !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !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-black { font-weight: 900 !important; }

.text-nowrap { white-space: nowrap !important; }
.text-wrap { white-space: normal !important; }
.text-break { word-break: break-word !important; }

/* Responsive text alignment */
@media (max-width: 768px) {
    .text-mobile-center { text-align: center !important; }
    .text-mobile-left { text-align: left !important; }
}

/* ========================================
   COLOR UTILITIES
   ======================================== */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: #ffffff !important; }
.text-dark { color: var(--background-dark) !important; }
.text-success { color: #2ed573 !important; }
.text-warning { color: #ffdd00 !important; }
.text-danger { color: #ff4757 !important; }
.text-info { color: #3742fa !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--surface-dark) !important; }
.bg-dark { background-color: var(--background-dark) !important; }
.bg-darker { background-color: var(--background-darker) !important; }
.bg-success { background-color: #2ed573 !important; }
.bg-warning { background-color: #ffdd00 !important; }
.bg-danger { background-color: #ff4757 !important; }
.bg-info { background-color: #3742fa !important; }
.bg-transparent { background-color: transparent !important; }

/* ========================================
   BORDER UTILITIES
   ======================================== */
.border { border: 1px solid var(--border-color) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-right { border-right: 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-primary { border-color: var(--primary-color) !important; }
.border-secondary { border-color: var(--border-color) !important; }
.border-success { border-color: #2ed573 !important; }
.border-warning { border-color: #ffdd00 !important; }
.border-danger { border-color: #ff4757 !important; }

.rounded { border-radius: 0.375rem !important; }
.rounded-0 { border-radius: 0 !important; }
.rounded-sm { border-radius: 0.25rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 1rem !important; }
.rounded-full { border-radius: 50% !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; }

.top-0 { top: 0 !important; }
.right-0 { right: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.left-0 { left: 0 !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; }

.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }

.min-vw-100 { min-width: 100vw !important; }
.min-vh-100 { min-height: 100vh !important; }

.vw-100 { width: 100vw !important; }
.vh-100 { height: 100vh !important; }

/* Responsive widths */
@media (max-width: 768px) {
    .w-mobile-100 { width: 100% !important; }
    .w-mobile-auto { width: auto !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-x-scroll { overflow-x: scroll !important; }

.overflow-y-auto { overflow-y: auto !important; }
.overflow-y-hidden { overflow-y: hidden !important; }
.overflow-y-scroll { overflow-y: scroll !important; }

/* ========================================
   SHADOW UTILITIES
   ======================================== */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important; }
.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important; }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06) !important; }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05) !important; }
.shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04) !important; }

.shadow-primary { box-shadow: 0 4px 14px rgba(255, 221, 0, 0.2) !important; }
.shadow-success { box-shadow: 0 4px 14px rgba(46, 213, 115, 0.2) !important; }
.shadow-danger { box-shadow: 0 4px 14px rgba(255, 71, 87, 0.2) !important; }

/* ========================================
   INTERACTION UTILITIES
   ======================================== */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.cursor-wait { cursor: wait !important; }
.cursor-text { cursor: text !important; }
.cursor-move { cursor: move !important; }

.user-select-none { user-select: none !important; }
.user-select-auto { user-select: auto !important; }
.user-select-all { user-select: all !important; }
.user-select-text { user-select: text !important; }

.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

/* ========================================
   TRANSITION UTILITIES
   ======================================== */
.transition-none { transition: none !important; }
.transition-all { transition: all 0.3s ease !important; }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease !important; }
.transition-opacity { transition: opacity 0.3s ease !important; }
.transition-transform { transition: transform 0.3s ease !important; }

.duration-75 { transition-duration: 75ms !important; }
.duration-100 { transition-duration: 100ms !important; }
.duration-150 { transition-duration: 150ms !important; }
.duration-200 { transition-duration: 200ms !important; }
.duration-300 { transition-duration: 300ms !important; }
.duration-500 { transition-duration: 500ms !important; }
.duration-700 { transition-duration: 700ms !important; }
.duration-1000 { transition-duration: 1000ms !important; }

.ease-linear { transition-timing-function: linear !important; }
.ease-in { transition-timing-function: ease-in !important; }
.ease-out { transition-timing-function: ease-out !important; }
.ease-in-out { transition-timing-function: ease-in-out !important; }

/* ========================================
   TRANSFORM UTILITIES
   ======================================== */
.transform { transform: translateX(var(--tw-translate-x, 0)) translateY(var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1)) !important; }
.transform-none { transform: none !important; }

.scale-0 { transform: scale(0) !important; }
.scale-50 { transform: scale(0.5) !important; }
.scale-75 { transform: scale(0.75) !important; }
.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; }
.scale-125 { transform: scale(1.25) !important; }
.scale-150 { transform: scale(1.5) !important; }

.rotate-0 { transform: rotate(0deg) !important; }
.rotate-45 { transform: rotate(45deg) !important; }
.rotate-90 { transform: rotate(90deg) !important; }
.rotate-180 { transform: rotate(180deg) !important; }
.rotate-270 { transform: rotate(270deg) !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; }

/* ========================================
   ACCESSIBILITY UTILITIES
   ======================================== */
.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;
}

.not-sr-only {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

.focus-visible:focus {
    outline: 2px solid var(--primary-color) !important;
    outline-offset: 2px !important;
}

/* ========================================
   PRINT UTILITIES
   ======================================== */
@media print {
    .print-none { display: none !important; }
    .print-block { display: block !important; }
    .print-inline { display: inline !important; }
    .print-inline-block { display: inline-block !important; }
}

/* ========================================
   PERFORMANCE UTILITIES
   ======================================== */
.will-change-auto { will-change: auto !important; }
.will-change-scroll { will-change: scroll-position !important; }
.will-change-contents { will-change: contents !important; }
.will-change-transform { will-change: transform !important; }

.backface-visible { backface-visibility: visible !important; }
.backface-hidden { backface-visibility: hidden !important; }

/* ========================================
   CUSTOM RESPONSIVE UTILITIES
   ======================================== */

/* Container queries support (when available) */
@supports (container-type: inline-size) {
    .container-responsive {
        container-type: inline-size;
    }
    
    @container (max-width: 480px) {
        .container-mobile-stack > * {
            width: 100% !important;
            margin-bottom: 1rem !important;
        }
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .motion-reduce {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .high-contrast {
        border: 2px solid currentColor !important;
    }
}

/* Dark mode utilities (if needed) */
@media (prefers-color-scheme: dark) {
    .dark-auto-text { color: #ffffff !important; }
    .dark-auto-bg { background-color: #1a1a1a !important; }
}

/* ========================================
   ASPECT RATIO UTILITIES
   ======================================== */
.aspect-square { aspect-ratio: 1 / 1 !important; }
.aspect-video { aspect-ratio: 16 / 9 !important; }
.aspect-photo { aspect-ratio: 4 / 3 !important; }
.aspect-auto { aspect-ratio: auto !important; }

/* ========================================
   GRID UTILITIES
   ======================================== */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }

.col-span-1 { grid-column: span 1 / span 1 !important; }
.col-span-2 { grid-column: span 2 / span 2 !important; }
.col-span-3 { grid-column: span 3 / span 3 !important; }
.col-span-4 { grid-column: span 4 / span 4 !important; }
.col-span-5 { grid-column: span 5 / span 5 !important; }
.col-span-6 { grid-column: span 6 / span 6 !important; }
.col-span-full { grid-column: 1 / -1 !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-5 { gap: 1.25rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }

/* Responsive grid utilities */
@media (max-width: 768px) {
    .grid-mobile-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
    .grid-mobile-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .gap-mobile-2 { gap: 0.5rem !important; }
    .gap-mobile-3 { gap: 0.75rem !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-tablet-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .grid-tablet-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}