/* ===================================================================
   Radzen Blazor Components - Custom Overrides
   ===================================================================
   This file contains overrides for Radzen Blazor components to
   customize their appearance and behavior. It should be loaded
   AFTER the RadzenTheme component in App.razor.
   =================================================================== */

/* ===================================================================
   Font Family Overrides
   =================================================================== */

:root {
    /* IMPORTANT: DO NOT override --rz-icon-font-family as it controls Material Symbols/Icons */
    /* Keep icons using their default font: Material Symbols */

    /* Base font family for all Radzen components */
    --rz-body-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Text component font family */
    --rz-text-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Button font family (text only, not icons) */
    --rz-button-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Input/form controls font family */
    --rz-input-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Grid/DataGrid font family */
    --rz-grid-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Dialog font family */
    --rz-dialog-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Menu font family */
    --rz-menu-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Card font family */
    --rz-card-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Panel font family */
    --rz-panel-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    /* Tabs font family */
    --rz-tabview-font-family:
        "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;
}

/* ===================================================================
   Component-Level Font Family Overrides
   =================================================================== */

/* Apply Roboto to text content only - DO NOT apply to icon classes */
/* Note: We rely primarily on CSS variables above, these are minimal backup rules */
.rz-button-text,
.rz-card-title,
.rz-card-content,
.rz-dialog-title,
.rz-dialog-content,
.rz-panel-title,
.rz-fieldset-legend,
.rz-text,
.rz-label,
.rz-checkbox-label,
.rz-radiobutton-label {
    font-family:
        "Roboto",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Helvetica Neue",
        Arial,
        sans-serif;
}

/* ===================================================================
   Icon Font Preservation - HIGHEST PRIORITY
   =================================================================== */

/* CRITICAL: Preserve Material Symbols font for ALL icon elements */
/* The .rzi class contains text like "delete" that MUST use Material Symbols to render as icon glyphs */

/* Primary icon class - most important */
.rzi,
i.rzi,
span.rzi,
.notranslate.rzi {
    font-family: "Material Symbols Outlined" !important;
}

/* Button icons */
.rz-button-icon,
.rz-button-icon-left,
.rz-button-icon-right,
.rz-button-box i,
.rz-button-box .rzi,
.rz-button-box i.rzi {
    font-family: "Material Symbols Outlined" !important;
}

/* Other Radzen icons */
.rz-icon,
i.rz-icon,
[class^="rzi"],
[class*=" rzi"],
.rz-checkbox-icon,
.rz-radiobutton-icon,
.rz-dropdown-icon,
.rz-calendar-icon,
.rz-grid-sort-icon,
.rz-paginator-icon,
.rz-tree-icon,
.rz-menu-icon {
    font-family: "Material Symbols Outlined" !important;
}

/* Bootstrap and Material Icons */
i[class^="bi-"],
i[class*=" bi-"],
.bi::before,
i.bi,
span[class*="material-"],
i[class*="material-"] {
    font-family: "Material Symbols Outlined" !important;
}

/* Catch-all for any icon within Radzen components */
[class*="rz-"] i,
[class*="rz-"] .rzi,
[class*="rz-"] [class*="icon"] {
    font-family: "Material Symbols Outlined" !important;
}

/* Explicitly ensure button text uses Roboto (already covered above but being explicit) */
.rz-button-text {
    font-family:
        "Roboto",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Helvetica Neue",
        Arial,
        sans-serif !important;
}

/* ===================================================================
   Additional Customizations
   =================================================================== */

/* Add your custom Radzen component overrides below */

/* Example: Custom button hover effect */
/*
.rz-button:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}
*/

/* Example: Custom grid header styling */
/*
.rz-grid-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
*/
