/* Shared by the platform and the embedded tracking workspace.
   Font binaries remain unmodified and are served from this installation. */
@font-face {
  font-family: 'Dubai';
  src: url('../fonts/dubai-font/Dubai-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Dubai';
  src: url('../fonts/dubai-font/Dubai-Medium.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Dubai';
  src: url('../fonts/dubai-font/Dubai-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/Poppins-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  /* The supplied Poppins build has proportional digits and no tnum feature.
     Use Dubai's equal-width digits for aligned amounts and counters. */
  unicode-range: U+0000-002F, U+003A-10FFFF;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/Poppins-Medium.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-002F, U+003A-10FFFF;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/Poppins-SemiBold.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-002F, U+003A-10FFFF;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins/Poppins-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-002F, U+003A-10FFFF;
}

:root {
  --fleet-font-latin: 'Poppins', 'Dubai', 'Segoe UI', Arial, sans-serif;
  --fleet-font-arabic: 'Dubai', 'Poppins', 'Segoe UI', Arial, sans-serif;
  --fleet-font-mono: 'Cascadia Code', Consolas, 'Liberation Mono', monospace;
  --fleet-font-ui: var(--fleet-font-latin);
  --fleet-type-body: 15px;
  --fleet-type-control: 15px;
  --fleet-type-table: 14px;
  --fleet-type-label: 14px;
  --fleet-type-meta: 13px;
  --fleet-type-nav: 14px;
  --fleet-type-leading: 1.65;
}
[dir='ltr'] { --fleet-font-ui: var(--fleet-font-latin); }
[dir='rtl'] {
  --fleet-font-ui: var(--fleet-font-arabic);
  --fleet-type-body: 17px;
  --fleet-type-control: 16px;
  --fleet-type-table: 15px;
  --fleet-type-label: 15px;
  --fleet-type-meta: 14px;
  --fleet-type-nav: 16px;
  --fleet-type-leading: 1.75;
}

body.fleet-theme, body.fleet-tracking {
  font-family: var(--fleet-font-ui);
  font-size: var(--fleet-type-body);
  font-weight: 400;
  line-height: var(--fleet-type-leading);
  font-kerning: normal;
}

/* Tracking is an independent document, so it consumes the same tokens here. */
body.fleet-tracking :is(input, select, textarea, button):not(.material-icons):not(.glyphicon) {
  font-family: var(--fleet-font-ui) !important;
}
body.fleet-tracking :is(.fo-root, .fo-stop-marker > span, .fo-map-tooltip,
  .fo-stop-popup, .layers-panel, .online-measuring-panel, .objects-panel,
  .veh-pop, .leaflet-container, #deviceTimehistory) {
  font-family: var(--fleet-font-ui) !important;
}
body.fleet-tracking .fo-root { font-size: var(--fleet-type-table); line-height: 1.6; }
body.fleet-tracking :is(.fo-field, .fo-tabs button, .fo-button, .fo-search input) {
  font-size: var(--fleet-type-meta);
}
body.fleet-tracking :is(.fo-field input, .fo-field select, .fo-field textarea, .fo-search input) {
  font-size: var(--fleet-type-control);
  line-height: 1.6;
}
body.fleet-tracking :is(.fo-mission-facts, .fo-card-main strong) { font-size: var(--fleet-type-table); }
body.fleet-tracking :is(.fo-header h2, .objects-panel__title) {
  font-weight: 700;
  line-height: 1.4;
}
body.fleet-tracking :is(.fo-mission-facts, .fo-route-stat, .fo-report-kpis, #deviceTimehistory) {
  font-variant-numeric: lining-nums tabular-nums;
}
@media (max-width: 600px) {
  body.fleet-tracking :is(.fo-field input, .fo-field select, .fo-field textarea, .fo-search input) {
    font-size: 16px;
  }
}
