@font-face {
    font-family: 'Averta';
    src: url('fonts/Averta_Regular.otf') format('truetype');
}


@font-face {
    font-family: 'Averta Bold';
    src: url('fonts/Averta-ExtraBold.otf') format('truetype');
}

@font-face {
    font-family: 'Stag Sans Book';
    src: url('fonts/Stag Sans-Book.otf') format('truetype');
}


/* Dash mantine conflicts */
input:invalid {
    outline: none !important;
}


a {
    color: white
}

/* Raster overlays: keep cell edges sharp when Leaflet scales the image up on zoom */
.pixelated-overlay {
    image-rendering: pixelated;
}

/* AG Grid table formatting */
.ag-theme-material .ag-row {
    font-family: Averta;
}

/* --ag-active-color is Quartz's single accent variable driving row hover/selection tints
   (via the theme's own `color-mix(in srgb, transparent, var(--ag-active-color) N%)`
   formulas) — overriding it to the app's PRIMARY_COLOR (SE_PRIMARY_COLORS[7], '#007a27')
   swaps the default blue hover for a green matching the rest of the app, at the same
   built-in opacity, for every AgGrid table (every table in the app uses 'ag-theme-quartz',
   see data_table()'s default `theme` param in ecodev_front). */
.ag-theme-quartz {
    font-family: Averta;
    --ag-active-color: #007a27;
}

.ag-theme-material .ag-header {
    font-weight: bold;
    font-family: Averta;
    background-color: #0066A1;
    height: 20px;
}

.ag-theme-quartz .ag-header-cell {
    font-weight: bold;
    color: #525252;
    font-family: Averta;
}

.ag-theme-material .ag-header-cell {
    color: #fff;
}


/* Tighter tree indent per depth level — EncoreHierarchyLabel's weight/case/colour hierarchy
   already carries most of the "which level is this" signal, so the indent itself no longer
   needs to be as wide to keep the tree readable. ENCORE-specific, unlike --ag-active-color
   above (which applies to every AgGrid table in the app). */
.ag-theme-quartz.ag-theme-dependencies {
    --ag-row-group-indent-size: 14px;
}

.ag-theme-quartz.ag-theme-dependencies .ag-header-cell .ag-header-cell-label {
    font-family: Averta;
    padding: 0;
    justify-content: center;
    font-size: 12px;
}

.ag-theme-quartz.ag-theme-dependencies .ag-header-group-cell {
    font-family: Averta;
    font-weight: bold;
    color: #525252;
    padding: 4px 8px;
    text-align: center;
    font-size: 12px;
}


.ag-theme-quartz.ag-theme-dependencies .ag-row .ag-cell {
    align-items: center;
    display: flex;
    justify-content: center;
}

.ag-theme-quartz.ag-theme-dependencies .ag-row .ag-cell:not([col-id^="max_value_"]):not([col-id^="total_"]) {
    font-family: Averta;
    font: bold;
    padding: 4px 8px;
    line-height: 1.2;
    text-align: left;
    font-size: 13px;
    border-right: 1px solid #d0d0d0;
    display: flex;
    justify-content: left;
}

/* Keep navbar tooltips above leaflet map panes/controls (z-index up to 1000) */
.mantine-Tooltip-tooltip {
    z-index: 2000 !important;
}
