/* Ultimate Vietnamese Fonts - Local Fonts Only */

/* Force UTF-8 encoding */
@charset "utf-8";

/* Vietnamese font stack using only local fonts */
:root {
    --vietnamese-font-primary: 'Segoe UI', 'Microsoft YaHei', 'Arial Unicode MS', 'Arial', 'Tahoma', 'Verdana', sans-serif;
    --vietnamese-font-secondary: 'Times New Roman', 'Arial Unicode MS', 'Arial', serif;
    --vietnamese-font-fallback: 'Courier New', 'Monaco', 'Consolas', monospace;
}

/* Apply Vietnamese fonts to ALL elements with maximum priority */
* {
    font-family: var(--vietnamese-font-primary) !important;
    font-size: inherit;
    line-height: inherit;
}

/* HTML and Body base settings */
html, body {
    font-family: var(--vietnamese-font-primary) !important;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 1, "kern" 1;
}

/* All text elements */
h1, h2, h3, h4, h5, h6, p, span, div, label, a, li, td, th, caption {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Form elements */
input, textarea, select, button, option {
    font-family: var(--vietnamese-font-primary) !important;
    font-size: 14px;
}

/* ASP.NET specific controls */
[class*="asp:"] {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Specific ASP.NET controls */
asp\\:Label,
asp\\:Button,
asp\\:TextBox,
asp\\:DropDownList,
asp\\:GridView,
asp\\:Panel,
asp\\:Literal,
asp\\:CheckBox,
asp\\:LinkButton {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Table elements */
table, thead, tbody, tr, th, td {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Navigation elements */
.navbar-brand, .nav-menu a, .nav-menu li {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Button elements */
.btn, button, input[type="button"], input[type="submit"], input[type="reset"] {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Card elements */
.card-header, .card-body, .card-title {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Alert elements */
.alert, .alert-success, .alert-danger, .alert-warning {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Form labels */
.form-label, label, .form-group label {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Placeholder text */
::placeholder {
    font-family: var(--vietnamese-font-primary) !important;
    color: #6c757d;
}

/* Focus states */
input:focus, textarea:focus, select:focus {
    font-family: var(--vietnamese-font-primary) !important;
}

/* GridView specific */
.GridView, .GridView th, .GridView td, .table, .table th, .table td {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Login form specific */
.login-form, .login-form h2, .login-form label, .login-form input {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Dashboard elements */
.dashboard, .dashboard h1, .dashboard h2, .dashboard h3, .dashboard h4 {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Search and filter elements */
.search-filter, .search-filter label, .search-filter input {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Mobile optimization */
@media (max-width: 768px) {
    html, body {
        font-size: 16px;
    }
    
    input, textarea, select {
        font-size: 16px;
    }
}

/* Vietnamese character optimization */
.vietnamese-text {
    font-family: var(--vietnamese-font-primary) !important;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

/* Force encoding for Vietnamese characters */
body::before {
    content: "";
    display: none;
}

/* Override any inline styles */
[style*="font-family"] {
    font-family: var(--vietnamese-font-primary) !important;
}

/* Ensure all text renders properly */
* {
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "liga" 1, "kern" 1;
    -moz-font-feature-settings: "liga" 1, "kern" 1;
    font-feature-settings: "liga" 1, "kern" 1;
}
