/* Thai Font - Noto Sans Thai Global Styles */

/* Define font family variable for easy maintenance */
:root {
    --thai-font-family: 'Noto Sans Thai', 'Helvetica Neue', 'Segoe UI', 'Roboto', Arial, sans-serif;
}

/* Apply Noto Sans Thai to all elements */
* {
    font-family: var(--thai-font-family) !important;
}

/* Specific overrides for common elements */
body, 
html {
    font-family: var(--thai-font-family) !important;
    font-weight: 400;
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--thai-font-family) !important;
    font-weight: 500;
}

/* Navigation and Menu */
.navbar, 
.nav-link, 
.dropdown-menu,
.breadcrumb,
.menu-title {
    font-family: var(--thai-font-family) !important;
}

/* Forms */
input, 
textarea, 
select, 
button,
.form-control,
.form-select,
.btn {
    font-family: var(--thai-font-family) !important;
}

/* Tables */
table, 
thead, 
tbody, 
th, 
td {
    font-family: var(--thai-font-family) !important;
}

/* Cards and Content */
.card,
.card-header,
.card-body,
.card-footer {
    font-family: var(--thai-font-family) !important;
}

/* Alerts and Messages */
.alert,
.toast,
.modal {
    font-family: var(--thai-font-family) !important;
}

/* DataTables specific */
.dataTables_wrapper,
.dataTables_info,
.dataTables_paginate,
.dataTables_length,
.dataTables_filter {
    font-family: var(--thai-font-family) !important;
}

/* User info and text elements */
.user-info,
.user-name,
.designattion,
.logo-text,
.app-title {
    font-family: var(--thai-font-family) !important;
}

/* Badges and Labels */
.badge,
.label,
.tag {
    font-family: var(--thai-font-family) !important;
}

/* Override any existing font definitions */
.text-primary,
.text-secondary,
.text-success,
.text-danger,
.text-warning,
.text-info,
.text-dark,
.text-muted {
    font-family: var(--thai-font-family) !important;
}

/* Ensure consistent line height for Thai text */
p, span, div, a {
    font-family: var(--thai-font-family) !important;
    line-height: 1.6;
}

/* Font weights for better Thai text rendering */
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Special elements */
.sidebar-wrapper,
.header-wrapper,
.page-wrapper,
.footer {
    font-family: var(--thai-font-family) !important;
}

/* Specific optimizations for Thai text */
.thai-text {
    font-family: var(--thai-font-family) !important;
    word-break: break-word;
    line-height: 1.7;
}

/* Button and interactive elements */
.btn, .dropdown-item, .nav-link {
    font-family: var(--thai-font-family) !important;
    font-weight: 400;
}

/* Make sure all text inputs use Thai font */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    font-family: var(--thai-font-family) !important;
}
