/* ============================================
   NBXC ERP Custom Fonts
   Lexend Bold - Headings
   Sora - Body text
   ============================================ */

/* --- Sora (Variable Font - Body) --- */
@font-face {
    font-family: 'Sora';
    src: url('../fonts/Sora-Variable.woff2') format('woff2'),
         url('../fonts/Sora-Variable.ttf') format('truetype');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* --- Lexend (Headings) --- */
@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-Regular.woff2') format('woff2'),
         url('../fonts/Lexend-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-Medium.woff2') format('woff2'),
         url('../fonts/Lexend-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-SemiBold.woff2') format('woff2'),
         url('../fonts/Lexend-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-Bold.woff2') format('woff2'),
         url('../fonts/Lexend-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-ExtraBold.woff2') format('woff2'),
         url('../fonts/Lexend-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   BODY - Sora as default body font
   Replaces Roboto everywhere
   ============================================ */
html, body {
    font-family: 'Sora', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

body {
    font-family: 'Sora', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* General text elements — exclude icon font classes */
p, span:not(.fa):not(.glyphicon):not(.ion):not([class^="fa-"]):not([class*=" fa-"]):not([class^="ion-"]):not([class*=" ion-"]):not([class^="glyphicon-"]):not([class*=" glyphicon-"]),
div, td, th, input, select, textarea, button:not(.close),
.form-control, .btn:not(.close), .label, .badge, .alert,
.sidebar-menu .treeview-menu > li > a,
.sidebar-menu > li > a,
.content-wrapper, .main-footer,
.box-body, .box-header, .box-footer,
.table, .table td, .table th,
.dropdown-menu > li > a,
.modal-body, .modal-title,
.panel-body, .panel-heading,
.list-group-item,
.breadcrumb, .pagination,
.tooltip, .popover {
    font-family: 'Sora', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* Protect icon fonts from being overridden */
.fa, .fas, .far, .fal, .fab,
[class^="fa-"], [class*=" fa-"],
.sidebar-toggle:before {
    font-family: fontAwesome !important;
}
.glyphicon, [class^="glyphicon-"], [class*=" glyphicon-"] {
    font-family: 'Glyphicons Halflings' !important;
}
.ion, .ionicons, [class^="ion-"], [class*=" ion-"] {
    font-family: "Ionicons" !important;
}

/* Labels use Sora medium weight instead of Roboto-Medium */
label {
    font-family: 'Sora', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 500;
}

/* ============================================
   HEADINGS - Lexend Bold
   ============================================ */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Page headers and content headers */
.content-header > h1,
.page-header,
.box-header .box-title,
.box-header > .box-title,
.modal-title,
.panel-title {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Sidebar headings */
.sidebar-menu > li > a > span,
.user-panel > .info > p,
.logo > .logo-lg,
.logo > .logo-mini,
.sidebar-session {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Bold and strong elements use Lexend Bold */
b, strong,
.font-weight-bold {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Control sidebar headings */
.control-sidebar-heading,
.control-sidebar-subheading {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Dashboard box headings */
.box_dashboard,
.small-box h3,
.small-box p,
.info-box-text,
.info-box-number {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* DataTable headers */
.dataTables_wrapper th,
table.dataTable thead th,
table.dataTable thead td {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Top header bar text */
.main-header .navbar .sidebar-session {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* User dropdown name */
.sstopuser-test h4,
.sstopuser-test h5,
.sstopuser-info h4,
.sstopuser-info h5 {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Timeline headers */
.timeline > li > .timeline-item > .timeline-header > a {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Progress text */
.progress-group .progress-text {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* Comments username */
.box-comments .username {
    font-family: 'Lexend', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 700;
}

/* ============================================
   GLOBAL FIX: Sora font taller metrics — prevent
   text clipping in selects, dropdowns, form controls
   ============================================ */
.form-control,
select.form-control,
.bootstrap-select .btn,
.languageselectpicker {
    height: auto !important;
    min-height: 38px !important;
    line-height: 1.5 !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

select.form-control,
select.languageselectpicker {
    height: 38px !important;
    line-height: 1.5 !important;
}

/* Select2 — match height for Sora */
.select2-container .select2-selection--single {
    height: 38px !important;
    line-height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

/* Select2 multiple */
.select2-container .select2-selection--multiple {
    min-height: 38px !important;
}

/* Bootstrap-select plugin */
.bootstrap-select > .dropdown-toggle {
    height: auto !important;
    min-height: 38px !important;
    line-height: 1.5 !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Dropdown menu items */
.dropdown-menu > li > a {
    padding: 6px 20px !important;
    line-height: 1.5 !important;
}

/* Input groups — match height */
.input-group .form-control,
.input-group-btn .btn {
    min-height: 38px !important;
}

/* Textarea should not be constrained */
textarea.form-control {
    height: auto !important;
    min-height: 80px !important;
}
