/* Vazir Font - Comprehensive Application */
@import url('https://fonts.googleapis.com/css2?family=Vazir:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

/* CRITICAL: Font Awesome icons MUST be defined FIRST */
.fas, .far, .fab, .fa, .fal,
i[class^="fa-"], 
i[class*=" fa-"],
[class^="fa-"],
[class*=" fa-"],
i.fa,
i.fas,
i.far,
i.fal,
i.fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-block !important;
}

.far {
    font-weight: 400 !important;
}

.fab {
    font-family: "Font Awesome 6 Brands" !important;
}

/* Apply Vazir font to body */
body {
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
    direction: rtl;
}

/* Apply to all text elements */
h1, h2, h3, h4, h5, h6, p, span, div, a, label, input, textarea, select, button,
strong, em, small, mark, del, ins, sub, sup, code, pre, blockquote,
ul, ol, li, dl, dt, dd, table, thead, tbody, tfoot, tr, th, td,
form, fieldset, legend, optgroup, option {
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
}

/* Bootstrap components */
.form-control, .form-select, .form-check-input, .form-check-label, .form-label,
.btn, .btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-light, .btn-dark,
.card, .card-header, .card-body, .card-footer, .card-title, .card-text,
.navbar, .navbar-brand, .navbar-nav, .nav-link, .dropdown-menu, .dropdown-item,
.table, .table-striped, .table-hover, .table-bordered, .table-borderless,
.alert, .alert-primary, .alert-secondary, .alert-success, .alert-danger, .alert-warning, .alert-info, .alert-light, .alert-dark,
.badge, .breadcrumb, .breadcrumb-item, .pagination, .page-link,
.modal, .modal-header, .modal-body, .modal-footer, .modal-title,
.list-group, .list-group-item, .accordion, .accordion-header, .accordion-body {
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
}

/* Ensure icons inside buttons and other elements keep Font Awesome */
.btn i, .nav-link i, .dropdown-item i, .alert i, .badge i,
.card-header i, .card-body i, .modal-header i, .modal-body i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

.btn .far, .nav-link .far, .dropdown-item .far, .alert .far {
    font-weight: 400 !important;
}

.btn .fab, .nav-link .fab, .dropdown-item .fab {
    font-family: "Font Awesome 6 Brands" !important;
}

/* Fix datepicker z-index to appear above modals */
jdp-container, jdp-container *, jdp-container :after, jdp-container :before,
.jdp-container,
.jdp-container *,
.jdp-container::after,
.jdp-container::before,
body > .jdp-container,
body > div[class*="jdp"]:not(.persian-date-picker),
body > div[id*="jdp"]:not(.persian-date-picker) {
    z-index: 5000 !important;
}

/* Date picker input should keep its normal position */
.persian-date-picker,
.persian-date-picker + .input-group-text,
.input-group .persian-date-picker {
    position: relative !important;
    z-index: auto !important;
}