/* SMART HR global multilingual typography layer.
   Presentation only: keeps business logic, localization keys, and layout structure unchanged. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Myanmar:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap');

:root {
    --smart-font-ui: "Noto Sans Thai", "Leelawadee UI", Tahoma, "Segoe UI", sans-serif;
    --smart-font-size-base: 15.5px;
    --smart-line-height-base: 1.65;
    --smart-line-height-control: 1.45;
}

html[lang^="th"] {
    --smart-font-ui: "Noto Sans Thai", "Leelawadee UI", Tahoma, "Segoe UI", sans-serif;
    --smart-font-size-base: 15.5px;
    --smart-line-height-base: 1.65;
    --smart-line-height-control: 1.5;
}

html[lang^="en"] {
    --smart-font-ui: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    --smart-font-size-base: 15px;
    --smart-line-height-base: 1.55;
    --smart-line-height-control: 1.4;
}

html[lang^="zh"] {
    --smart-font-ui: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --smart-font-size-base: 15.5px;
    --smart-line-height-base: 1.65;
    --smart-line-height-control: 1.5;
}

html[lang^="my"] {
    --smart-font-ui: "Noto Sans Myanmar", "Myanmar Text", Pyidaungsu, "Nirmala UI", sans-serif;
    --smart-font-size-base: 15px;
    --smart-line-height-base: 1.65;
    --smart-line-height-control: 1.48;
}

html[lang] body {
    font-family: var(--smart-font-ui) !important;
    font-size: var(--smart-font-size-base);
    line-height: var(--smart-line-height-base);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

html[lang] :where(button, input, select, textarea, optgroup, .btn, .form-control, .form-select, .dropdown-menu, .tooltip, .popover) {
    font-family: var(--smart-font-ui) !important;
}

html[lang] :where(.btn, .form-control, .form-select, .dropdown-item, .nav-link, .table, .modal-content, .toast) {
    line-height: var(--smart-line-height-control);
}

html[lang^="zh"] :where(p, li, dd, dt, label, .form-text, .card-text) {
    line-height: 1.65;
}

html[lang^="my"] :where(p, li, dd, dt, label, .form-text, .card-text, small, .small) {
    line-height: 1.65;
}

html[lang^="my"] :where(.btn, .form-control, .form-select, .dropdown-item, .nav-link, .table, .badge) {
    line-height: 1.48;
}

html[lang] :where(code, pre, kbd, samp, .font-monospace, .digital-clock) {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
}

/* Third-party widgets must follow the active UI language too. */
html[lang] :where(.select2-container, .select2-dropdown, .select2-results__option, .select2-selection__rendered, .ui-widget, .leaflet-container) {
    font-family: var(--smart-font-ui) !important;
}

html[lang^="zh"] body {
    line-break: strict;
}

/* Keep the SMART HR Latin wordmark deliberately brand-styled. */
html[lang] :where(.admin-brand-wordmark, .admin-mobile-brand span) {
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}
/* Myanmar compact typography for the mobile UserScan workspace. */
html[lang^="my"] body.userscan-shell :where(.scan-home-brand strong) {
    font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}
html[lang^="my"] body.userscan-shell :where(.scan-home-brand span,
    .scan-home-employee__copy small,
    .scan-home-employee__meta) {
    line-height: 1.42;
}
html[lang^="my"] body.userscan-shell .scan-home-employee__copy > strong {
    line-height: 1.28;
}
html[lang^="my"] body.userscan-shell :where(.home-summary-header .usr-section-title,
    .home-section-heading .usr-section-title) {
    line-height: 1.42;
}
html[lang^="my"] body.userscan-shell .home-time-copy span {
    line-height: 1.38;
}
html[lang^="my"] body.userscan-shell .home-quick-card > span:last-child {
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .62rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
html[lang^="my"] body.userscan-shell .home-info-grid .home-content-header {
    align-items: flex-start;
}
html[lang^="my"] body.userscan-shell .home-info-grid .home-content-header .usr-section-title {
    white-space: normal;
    font-size: .64rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
html[lang^="my"] body.userscan-shell .home-info-grid .home-content-header a {
    font-size: .56rem;
    line-height: 1.35;
    white-space: nowrap;
}
html[lang^="my"] body.userscan-shell .scan-bottom-nav a {
    font-size: .58rem;
    line-height: 1.35;
}
html[lang^="my"] body.userscan-shell .hs-scan-fab__label {
    max-width: 78px;
    font-size: .58rem;
    line-height: 1.25;
    white-space: normal;
}
html[lang^="my"] body.userscan-shell :where(.usr-badge, .hs-badge, .scan-home-employee__status) {
    line-height: 1.35;
}
