/* ==========================================================================
   Takeoff.Guru — Site-wide typography
   --------------------------------------------------------------------------
   One font family (Outfit) and one type scale for forms, listings, quotations,
   estimates, turnkey / theme-v2, and superadmin. Presentational only.

   Tokens live in theme-tokens.css (--tk-font-*, --tk-fs-*). Prefer the utility
   classes below in new markup; global rules keep legacy screens consistent
   without rewriting every view.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Bridge legacy / theme-v2 font variables onto the brand stack
   -------------------------------------------------------------------------- */
:root {
    --ThemeFont: var(--tk-font-sans);
    --tg-font: var(--tk-font-sans);
    /* AdminLTE/Bootstrap otherwise keep Source Sans 3 — bridge to Outfit like listings. */
    --bs-font-sans-serif: var(--tk-font-sans);
    --bs-body-font-family: var(--tk-font-sans);
}

body {
    --ThemeFont: var(--tk-font-sans);
    --tg-font: var(--tk-font-sans);
    --bs-font-sans-serif: var(--tk-font-sans);
    --bs-body-font-family: var(--tk-font-sans);
    font-family: var(--tk-font-sans) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Common utility classes — use these for new UI
   -------------------------------------------------------------------------- */
.tk-font,
.tk-type {
    font-family: var(--tk-font-sans) !important;
}

.tk-font-heading {
    font-family: var(--tk-font-heading) !important;
}

/* Display / page / section / card titles */
.tk-type-display {
    font-family: var(--tk-font-heading) !important;
    font-size: var(--tk-fs-2xl);
    font-weight: var(--tk-fw-bold);
    line-height: var(--tk-lh-tight);
    color: var(--tk-text);
}

.tk-type-page-title,
.tk-type-title {
    font-family: var(--tk-font-heading) !important;
    font-size: var(--tk-fs-title);
    font-weight: var(--tk-fw-bold);
    line-height: var(--tk-lh-tight);
    color: var(--tk-text);
}

.tk-type-section {
    font-family: var(--tk-font-heading) !important;
    font-size: var(--tk-fs-section);
    font-weight: var(--tk-fw-semibold);
    line-height: 1.3;
    color: var(--tk-text);
}

.tk-type-card-title {
    font-family: var(--tk-font-heading) !important;
    font-size: var(--tk-fs-base);
    font-weight: var(--tk-fw-semibold);
    line-height: 1.35;
    color: var(--tk-text);
}

.tk-type-body {
    font-family: var(--tk-font-sans) !important;
    font-size: var(--tk-fs-sm);
    font-weight: var(--tk-fw-regular);
    line-height: var(--tk-lh-base);
    color: var(--tk-text);
}

.tk-type-label {
    font-family: var(--tk-font-sans) !important;
    font-size: var(--tk-fs-label);
    font-weight: var(--tk-fw-medium);
    line-height: 1.4;
    color: var(--tk-form-label);
}

.tk-type-meta,
.tk-type-helper {
    font-family: var(--tk-font-sans) !important;
    font-size: var(--tk-fs-xs);
    font-weight: var(--tk-fw-regular);
    line-height: 1.4;
    color: var(--tk-text-muted);
}

.tk-type-control {
    font-family: var(--tk-font-sans) !important;
    font-size: var(--tk-fs-control);
    font-weight: var(--tk-fw-regular);
    line-height: 1.4;
    color: var(--tk-text);
}

.tk-type-btn {
    font-family: var(--tk-font-sans) !important;
    font-size: var(--tk-fs-btn);
    font-weight: var(--tk-fw-semibold);
    line-height: 1.25;
}

.tk-type-table-head {
    font-family: var(--tk-font-sans) !important;
    font-size: var(--tk-fs-xs);
    font-weight: var(--tk-fw-semibold);
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: var(--tk-text-muted);
}

.tk-type-table-cell {
    font-family: var(--tk-font-sans) !important;
    font-size: var(--tk-fs-sm);
    font-weight: var(--tk-fw-regular);
    line-height: 1.4;
    color: var(--tk-text);
}

/* --------------------------------------------------------------------------
   Global inheritance — forms, buttons, selects, tables, headings
   (does not touch PDF / print layouts that skip this stylesheet)
   -------------------------------------------------------------------------- */
body .app-main,
body .app-content,
body .content-wrapper,
body .card,
body .modal-content,
body .dropdown-menu,
body .offcanvas,
body .popover,
body .toast,
body .swal2-popup {
    font-family: var(--tk-font-sans);
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .card-title,
body .modal-title,
body .tg-page-header__title,
body .page-title,
body .tk-page-title {
    font-family: var(--tk-font-heading);
}

/* Form labels */
body .form-label,
body label.form-label,
body .col-form-label,
body .tg-pane__label,
body .control-label {
    font-family: var(--tk-font-sans);
    font-size: var(--tk-fs-label);
    font-weight: var(--tk-fw-medium);
    line-height: 1.4;
}

/* Inputs / native selects / textareas */
body .form-control,
body .form-select,
body select.form-control,
body textarea.form-control,
body input.form-control,
body .input-group-text {
    font-family: var(--tk-font-sans);
    font-size: var(--tk-fs-control);
    line-height: 1.4;
}

body .form-control::placeholder,
body .form-select::placeholder {
    font-family: inherit;
    font-size: inherit;
}

/* Buttons — default size only; leave .btn-sm / .btn-lg alone */
body .btn:not(.btn-sm):not(.btn-lg):not(.btn-xs),
body .btn_primary,
body .btn_secondary,
body .btn-brand-gold,
body a.btn:not(.btn-sm):not(.btn-lg):not(.btn-xs) {
    font-family: var(--tk-font-sans);
    font-size: var(--tk-fs-btn);
    font-weight: var(--tk-fw-semibold);
    line-height: 1.25;
}

body .btn-sm,
body .btn-xs {
    font-family: var(--tk-font-sans);
}

/* Select2 (including dropdowns appended to <body>) */
body .select2-container,
body .select2-container .select2-selection--single,
body .select2-container .select2-selection--multiple,
body .select2-container .select2-selection__rendered,
body .select2-container .select2-search--dropdown .select2-search__field,
body .select2-dropdown,
body .select2-results__option,
.select2-container--open .select2-dropdown,
.select2-container--open .select2-results__option {
    font-family: var(--tk-font-sans) !important;
    font-size: var(--tk-fs-control) !important;
    line-height: 1.4;
}

/* Tables / DataTables */
body table,
body table.dataTable,
body .table,
body .dataTables_wrapper,
body .dataTables_info,
body .dataTables_paginate,
body .dataTables_length,
body .dataTables_filter,
body .dataTables_length label,
body .dataTables_filter label {
    font-family: var(--tk-font-sans);
}

body table thead th,
body table.dataTable thead th,
body .table > :not(caption) > * > th {
    font-family: var(--tk-font-sans);
    font-size: var(--tk-fs-xs);
    font-weight: var(--tk-fw-semibold);
}

body table tbody td,
body table.dataTable tbody td,
body .table > :not(caption) > * > td {
    font-family: var(--tk-font-sans);
    font-size: var(--tk-fs-sm);
}

/* Nav / breadcrumbs / badges stay on the same face */
body .breadcrumb,
body .nav-link,
body .dropdown-item,
body .badge:not(.material-symbols-outlined) {
    font-family: var(--tk-font-sans);
}

/* --------------------------------------------------------------------------
   Icon fonts must keep their own face (never Outfit)
   -------------------------------------------------------------------------- */
.material-symbols-outlined {
    font-family: "Material Symbols Outlined" !important;
}

.bi,
[class^="bi-"],
[class*=" bi-"] {
    font-family: "bootstrap-icons" !important;
}

.fa,
.fas,
.far,
.fab,
.fal,
.fad,
.fa-solid,
.fa-regular,
.fa-brands,
[class^="fa-"]:not(button):not(a):not(.btn),
i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "FontAwesome" !important;
}

/* Monospace / code stays monospace */
pre,
code,
kbd,
samp,
.font-monospace,
.tk-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}
