/*
    Form scale: the one type and size scale for every form control on the web app (text boxes, ChipSelect dropdowns,
    Syncfusion inputs, segmented choices, buttons, labels, hints). Matches the theme baseline (Silicon .form-control 14px,
    .btn 14px / 600). Component sheets consume these tokens instead of their own pixel values, so a field, a dropdown and
    a button read the same size in every popup and on every page.

    Heights are outer heights (border included). A control drawn inside a bordered field box subtracts the box's border
    and padding (see --ci-h-control-inner).

    Prefix: --ci-. Load early (after app.css); every component sheet reads these.
*/

:root {
    /* Text boxes, dropdowns, date pickers: the value the user types or picks. */
    --ci-fs-control: 14px;
    --ci-fw-control: 500;
    --ci-h-control: 40px;
    --ci-h-control-inner: 38px;            /* inside a field box: 40 minus its 1px borders */

    /* Compact controls: toolbars, filter and sort bars, inline pickers. */
    --ci-fs-control-sm: 13px;
    --ci-h-control-sm: 34px;
    --ci-h-control-sm-inner: 32px;

    /* Field labels above a control, uppercase captions, hints and errors under it. */
    --ci-fs-label: 12.5px;
    --ci-fw-label: 600;
    --ci-fs-caption: 11px;
    --ci-fs-help: 12px;

    /* Pick-list rows (dropdown popups, menus). */
    --ci-fs-option: 13px;

    /* Buttons. Regular: dialog footers and form actions. Small: page toolbars and card actions. XS: row actions. */
    --ci-fs-btn: 14px;
    --ci-fw-btn: 600;
    --ci-h-btn: 40px;
    --ci-fs-btn-sm: 13px;
    --ci-h-btn-sm: 34px;
    --ci-fs-btn-xs: 12px;

    /* Headings inside forms: the dialog title and a card / section title within it. */
    --ci-fs-dialog-title: 16px;
    --ci-fs-form-section: 15px;
}

/* Touch phones: iOS Safari zooms the page when a field under 16px takes focus, so every control types at 16px there. */
@media (max-width: 640px) and (pointer: coarse) {
    :root {
        --ci-fs-control: 16px;
    }
}

/* The Bootstrap form classes the few theme-styled forms use, on the same scale. */
.form-control,
.form-select {
    font-size: var(--ci-fs-control);
}

.form-label {
    font-size: var(--ci-fs-label);
    font-weight: var(--ci-fw-label);
}
