/* ==========================================================================
   Custom Reusable jQuery DataTables Styling Overrides (PMS Gold & Blue Theme)
   ========================================================================== */

/* 1. Custom Pagination buttons styling */
.dataTables_wrapper .dataTables_paginate {
    float: right !important;
    text-align: right !important;
    padding-top: 0.5em !important;
    display: block !important;
    visibility: visible !important;
    margin-bottom: 8px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    box-sizing: border-box !important;
    display: inline-block !important;
    min-width: 1.5em !important;
    padding: 0.5em 1em !important;
    margin-left: 4px !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    color: #ffffff !important; /* White text for unselected */
    border: 1px solid #0b2a5b !important;
    border-radius: 4px !important;
    background: #0b2a5b !important; /* Bluish background for unselected */
    font-weight: bold !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #111111 !important; /* Black text for selected */
    border: 1px solid #ffd54f !important;
    background: #ffe082 !important; /* Light yellowish background for selected */
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #ffffff !important;
    background: #1b4f93 !important; /* Lighter blue background on hover */
    border-color: #1b4f93 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, 
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, 
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    cursor: not-allowed !important;
    color: #b0b0b0 !important;
    border: 1px solid #e0e0e0 !important;
    background: #f5f5f5 !important;
    opacity: 1 !important;
}

/* 2. FontAwesome sorting arrows in header */
table.dataTable thead th.sorting, 
table.dataTable thead th.sorting_asc, 
table.dataTable thead th.sorting_desc {
    position: relative !important;
    padding-right: 25px !important;
    cursor: pointer !important;
    background-image: none !important; /* Disable default background icons */
}
table.dataTable thead th.sorting:after, 
table.dataTable thead th.sorting_asc:after, 
table.dataTable thead th.sorting_desc:after {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: inline-block !important;
    font: normal normal normal 14px/1 FontAwesome !important;
    font-size: inherit !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    opacity: 0.4 !important;
}
table.dataTable thead th.sorting:after {
    content: "\f0dc" !important; /* fa-sort */
}
table.dataTable thead th.sorting_asc:after {
    content: "\f0de" !important; /* fa-sort-asc */
    opacity: 1 !important;
    color: #f6b60b !important; /* Matches nav bottom border color */
}
table.dataTable thead th.sorting_desc:after {
    content: "\f0dd" !important; /* fa-sort-desc */
    opacity: 1 !important;
    color: #f6b60b !important; /* Matches nav bottom border color */
}

/* 3. Table Header color matching Nav Bar (including .colorfull & [id$=Grd] overrides) */
table.dataTable thead th,
.colorfull th,
table.colorfull th,
.colorfull thead th,
table.colorfull thead th,
[id$=Grd] th,
[id$=Grd] thead th {
    background: #0b2a5b !important; /* Matches navbar dark blue background */
    color: #ffffff !important; /* White text */
    border-bottom: 2px solid #f6b60b !important; /* Matches navbar orange border-bottom */
    font-weight: bold !important;
}

/* 3b. Table Footer color matching Nav Bar (including .colorfull & [id$=Grd] overrides) */
table.dataTable tfoot th,
table.dataTable tfoot td,
.colorfull tfoot th,
.colorfull tfoot td,
table.colorfull tfoot th,
table.colorfull tfoot td,
[id$=Grd] tfoot th,
[id$=Grd] tfoot td/*,
.colorfull tr:last-child td,
.colorfull tr:last-child th,
[id$=Grd] tr:last-child td,
[id$=Grd] tr:last-child th,
td[style*="f9641c" i],
th[style*="f9641c" i],
tr[style*="f9641c" i] td,
tr[style*="f9641c" i] th */ {
    background: #0b2a5b !important; /* Dark Navy Background */
    color: #ffffff !important; /* White Text */
    font-weight: bold !important;
    border-top: 2px solid #f6b60b !important; /* Gold top border highlight */
}

/* 4. Align header corner curves with table corners */
table.dataTable thead tr:first-child th:first-child {
    border-top-left-radius: 4px !important;
}
table.dataTable thead tr:first-child th:last-child {
    border-top-right-radius: 4px !important;
}

/* 5. Force outer table border radius clipping */
table.dataTable,
.colorfull,
table.colorfull,
[id$=Grd] {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
/*    border: 1px solid #ddd !important;*/
}

/* 6. Summary Table Header override styling */
[id$=tbl_summ] th {
    background: #0b2a5b !important;
    color: #ffffff !important;
}

/* 7. Summary Table Border and Corner Radius Overrides */
[id$=tbl_summ] {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    margin: 0 auto !important; /* Horizontally center the table */
}
[id$=tbl_summ] td,
[id$=tbl_summ] th {
    text-align: center !important; /* Center align cell contents */
}
[id$=tbl_summ] tr:first-child th:first-child {
    border-top-left-radius: 4px !important;
}
[id$=tbl_summ] tr:first-child th:last-child {
    border-top-right-radius: 4px !important;
}

/* 8. Global Print Media Overrides */
@media print {
    body .dataTables_wrapper .dataTables_paginate,
    body .dataTables_wrapper .dataTables_filter,
    body .dataTables_wrapper .dataTables_info,
    body .dataTables_wrapper .dataTables_length {
        display: none !important;
    }
}

/* 9. Reusable Modern Form Layout Grid */
.modern-form-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

/* Individual Input Wrapper (Label + Input) */
.modern-form-group {
    flex: 1;
    min-width: 160px;
}

.modern-form-group label {
    display: block;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    font-size: 13px;
}

/* Button Wrapper */
.modern-form-actions {
    flex-grow: 0;
    min-width: 120px;
}

.modern-form-actions .btn {
    width: 100%;
    height: 34px;
    font-weight: 700;
}

/* Preserve Hindi Fonts (krishnanormal, Kruti Dev, Mangal, Devanagari) in Table Cells */
table.dataTable td,
.colorfull td,
[id$=Grd] td,
.hindi,
td.hindi {
    font-family: 'Roboto', sans-serif, 'krishnanormal', 'Kruti Dev 010', 'Kruti Dev 016', 'Mangal', 'Noto Sans Devanagari', Arial, sans-serif !important;
}

/* 7. Override legacy orange ForeColor settings on table cells */
/*.colorfull td,
[id$=Grd] td {
    color: #1e293b !important;*/ /* Force readable slate-black text on grid rows */
/*}*/
