/* Copyright (c) 2026 Eleos Compliance. All rights reserved.
   This software is proprietary and confidential. Unauthorized copying,
   distribution, or modification of this file is strictly prohibited. */

/* ==========================================================================
   Global Platform Typography & Scalability Architecture
   Scales all Tailwind rem-based elements and AG-Grid Balham theme proportionally.
   ========================================================================== */

/* 1. Root typography scale per data-text-size attribute */
html[data-text-size="xs"],
html[data-text-size="text-xs"] {
    font-size: 13.5px;
    --ag-custom-font-size: 11px;
    --ag-custom-grid-size: 3.5px;
}

html[data-text-size="sm"],
html[data-text-size="text-sm"] {
    font-size: 14.5px;
    --ag-custom-font-size: 12px;
    --ag-custom-grid-size: 4px;
}

/* Default standard scale (16px root font size) */
html:not([data-text-size]),
html[data-text-size="base"],
html[data-text-size="text-base"] {
    font-size: 16px;
    --ag-custom-font-size: 13px;
    --ag-custom-grid-size: 4.5px;
}

html[data-text-size="lg"],
html[data-text-size="text-lg"] {
    font-size: 17.5px;
    --ag-custom-font-size: 14.5px;
    --ag-custom-grid-size: 5px;
}

html[data-text-size="xl"],
html[data-text-size="text-xl"] {
    font-size: 19.5px;
    --ag-custom-font-size: 16px;
    --ag-custom-grid-size: 5.5px;
}

html[data-text-size="2xl"],
html[data-text-size="text-2xl"] {
    font-size: 21.5px;
    --ag-custom-font-size: 18px;
    --ag-custom-grid-size: 6px;
}

/* 2. Seamless AG-Grid Theme Integration */
.ag-theme-balham {
    --ag-font-family: 'Questrial', sans-serif !important;
    --ag-font-size: var(--ag-custom-font-size, 12px) !important;
    --ag-grid-size: var(--ag-custom-grid-size, 4px) !important;
    --ag-row-height: calc(var(--ag-grid-size) * 7) !important;
    --ag-header-height: calc(var(--ag-grid-size) * 8) !important;
}

/* Ensure cell line height, header labels and inputs inherit cleanly */
.ag-theme-balham .ag-cell,
.ag-theme-balham .ag-header-cell-text,
.ag-theme-balham .ag-floating-filter-input,
.ag-theme-balham .ag-filter-toolpanel-instance {
    font-size: var(--ag-font-size) !important;
}

/* Smooth transition for font size adjustments */
html,
body,
.ag-theme-balham {
    transition: font-size 0.15s ease-out;
}
