/* ============================================
   ANSIN PRICE TRACKER - UTILITIES
   Modals, Z-index, Helpers
   ============================================ */

/* -------------------- MODALS -------------------- */

.modal {
    z-index: 11000 !important;
}

.modal-backdrop {
    z-index: 10999 !important;
    opacity: 0.4 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal-dialog {
    z-index: 11001 !important;
}

/* Mantine Modal Hierarchy */
[data-mantine-portal] {
    z-index: 10000 !important;
}

.mantine-Modal-root {
    z-index: 10000 !important;
}

.mantine-Modal-inner {
    z-index: 10001 !important;
}

.mantine-Modal-content {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
}

.mantine-Modal-header {
    border-bottom: 1px solid var(--color-border) !important;
}

.mantine-Modal-title {
    font-weight: 500 !important;
}

/* Dropdowns & Pickers */
.mantine-Select-dropdown,
.mantine-MonthPickerInput-dropdown {
    z-index: 10002 !important;
}

.mantine-MonthPickerInput-popover,
.mantine-MonthPickerInput-dropdown,
.mantine-MonthPickerInput-calendar,
.mantine-Portal-root[data-portal="true"],
.mantine-Popover-dropdown,
.mantine-Popover-arrow,
.mantine-DatePicker-calendar,
.mantine-DatePicker-month,
.mantine-MonthPicker-monthsList {
    z-index: 30000 !important;
    pointer-events: auto !important;
}

.mantine-MonthPickerInput-dropdown {
    background-color: white !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--color-border) !important;
}

/* -------------------- SPACING UTILITIES -------------------- */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }

.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; }

/* -------------------- FLEX UTILITIES -------------------- */

.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* -------------------- TEXT UTILITIES -------------------- */

.text-muted { color: var(--color-text-muted) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.text-primary { color: var(--color-text-primary) !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-center { text-align: center !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }

/* -------------------- BORDER UTILITIES -------------------- */

.border-top { border-top: 1px solid var(--color-border) !important; }
.border-bottom { border-bottom: 1px solid var(--color-border) !important; }
.rounded { border-radius: var(--radius-md) !important; }

/* -------------------- VISIBILITY -------------------- */

.hidden { display: none !important; }
.visible { visibility: visible !important; }

/* -------------------- ANSIN HIGHLIGHT -------------------- */

.ansin-highlight {
    background: var(--color-ansin-bg) !important;
    border-left: 3px solid var(--color-ansin-border) !important;
    font-weight: 500;
}

/* -------------------- TRANSITIONS -------------------- */

.transition {
    transition: all var(--transition-base);
}

.transition-fast {
    transition: all var(--transition-fast);
}
