/* =========================================================
   GRID DEFAULTS - Auto-apply modern-enterprise-grid +
   auto-width-grid styles to ALL RadzenDataGrid (.rz-data-grid)
   without needing to add any class manually.

   Uses :where() which has ZERO specificity — so any explicit
   .modern-enterprise-grid or .auto-width-grid rule always wins.
   ========================================================= */

/* --- modern-enterprise-grid defaults --- */
.rz-data-grid{
    border-radius:5px !important;
}

.rz-datatable{border:0 !important;}
.rz-data-grid .rz-grid-table thead th {
    background: #4da3e5 !important;
    background-image: none !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: clamp(0.70rem, 0.5vw + 0.65rem, 0.825rem) !important;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.rz-data-grid .rz-data-row:nth-child(even) td {
    /*background-color: #f9fafb !important;*/
}

.rz-data-grid .rz-data-row:nth-child(odd) td {
    /*background-color: #ffffff !important;*/
}

.rz-data-grid .rz-data-row:hover td {
    background-color: #f1f5f9 !important;
}

.rz-data-grid .rz-data-row td {
    /*padding: clamp(0.35rem, 0.75vw + 0.25rem, 0.65rem) clamp(0.5rem, 1vw + 0.35rem, 0.75rem) !important;*/
    padding: 0 !important;
    border-bottom: 1px solid #e8ecf1 !important;
    font-size: clamp(0.70rem, 0.5vw + 0.65rem, 0.825rem);
    color: #334155;
}

.rz-data-grid .employee-name-text {
    font-weight: 600;
    color: #0f172a;
}

.rz-data-grid .checkbox-column {
    text-align: center;
    vertical-align: middle;
}

.rz-data-grid .compact-checkbox {
    transform: scale(0.9);
}

.rz-data-grid .rz-grid-header .rz-column-filter-icon {
    color: #64748b;
}

.rz-data-grid .rz-grid-header .rz-column-filter-icon:hover {
    color: #334155;
}

.rz-data-grid .rz-pager {
    padding: clamp(0.35rem, 0.75vw + 0.25rem, 0.65rem) clamp(0.75rem, 1.5vw + 0.5rem, 1rem);
    background-color: #f8f9fa;
    border-top: 1px solid #e2e8f0;
}

.rz-data-grid .rz-paginator-element {
    color: #475569;
    font-weight: 500;
    font-size: var(--form-font-size);
}

.rz-data-grid .rz-grid-table thead th::before,
.rz-data-grid .rz-grid-table thead th::after {
    display: none !important;
}

.rz-data-grid .rz-grid-table thead th .rz-cell-filter span,
.rz-data-grid .rz-grid-table thead th .rz-column-title span {
    height: 25px !important;
}

.rz-data-grid .rz-grid-table thead th .rz-cell-filter span .rz-textbox,
.rz-data-grid .rz-grid-table thead th .rz-cell-filter span .rz-numeric-input {
    height: 25px !important;
    font-size : inherit !important;
}

/* Hide numeric spinner arrows only in the header filter row so other numeric inputs keep their buttons */
.rz-data-grid .rz-grid-table thead th .rz-cell-filter span .rz-numeric .rz-numeric-button,
.rz-data-grid .rz-grid-table thead th .rz-cell-filter span .rz-numeric .rz-numeric-input .rz-numeric-button {
    display: none !important;
}

.rz-data-grid .rz-frozen-cell {
    background-color: inherit !important;
    box-shadow: 2px 0 4px rgba(15, 23, 42, 0.06);
}

.rz-data-grid .rz-numeric-button {
    padding: 0.20rem 0 !important;
    min-height: 0 !important;
}

/* --- auto-width-grid defaults --- */

.rz-data-grid:not(.auto-width-grid-withoutheightAdjusment) {
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100vh - 320px) !important;
    overflow: hidden !important;
    width: 100% !important;
}

.rz-data-grid.auto-width-grid-withoutheightAdjusment {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    width: 100% !important;
}

.rz-data-grid:not(.auto-width-grid-withoutheightAdjusment) .rz-datatable-data {
    overflow-y: auto !important;
    overflow-x: auto !important;
    max-height: calc(100vh - 380px) !important;
    width: 100% !important;
}

.rz-data-grid.auto-width-grid-withoutheightAdjusment .rz-datatable-data {
    overflow-y: auto !important;
    overflow-x: auto !important;
    flex: 1 !important;
    width: 100% !important;
}

.rz-data-grid .rz-grid-table {
    width: max-content !important;
    min-width: 100% !important;
}

.rz-data-grid .rz-grid-table thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #f8fafc !important;
}

.rz-data-grid .rz-datatable-data td:not(.checkbox-column):not(.compact-col):not(.rz-frozen-cell),
.rz-data-grid .rz-datatable-data th:not(.checkbox-column):not(.compact-col):not(.rz-frozen-cell) {
    min-width: 120px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.rz-data-grid .compact-col {
    width: 120px;
    min-width: 120px;
    max-width: 180px;
}

.rz-data-grid .checkbox-column {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}

.rz-data-grid .rz-grid-table tbody tr {
    height: 34px !important;
    line-height: 1.2 !important;
}

.rz-data-grid .rz-grid-table thead tr {
    /* tighter header row height */
    height: auto !important;
    line-height: 1.0 !important;
}

.rz-data-grid .rz-grid-table thead th > div {
    padding: 0 !important;
    margin: 0 !important;
}

.rz-data-grid .rz-column-title {
    display: inline-block !important;
    line-height: 1.3 !important;
    vertical-align: middle !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rz-data-grid .rz-header-cell-content {
    padding: 0 !important;
    margin: 0 !important;
}

.rz-data-grid .rz-grid-table thead th[style*="text-align: right"],
.rz-data-grid .rz-grid-table thead th[style*="text-align:right"],
.rz-data-grid .rz-grid-table tbody td[style*="text-align: right"],
.rz-data-grid .rz-grid-table tbody td[style*="text-align:right"] {
    text-align: right !important;
}

.rz-data-grid .rz-grid-table thead th[style*="text-align: center"],
.rz-data-grid .rz-grid-table thead th[style*="text-align:center"],
.rz-data-grid .rz-grid-table tbody td[style*="text-align: center"],
.rz-data-grid .rz-grid-table tbody td[style*="text-align:center"] {
    text-align: center !important;
}

.rz-data-grid .rz-grid-table thead .rz-filter-row td {
    padding: 0 !important;
    vertical-align: middle !important;
}

/* Reduce height of filter inputs (autocomplete, dropdown, numeric, text) in header filter row */
.rz-data-grid .rz-grid-table thead .rz-filter-row td input,
.rz-data-grid .rz-grid-table thead .rz-filter-row td .rz-dropdown,
.rz-data-grid .rz-grid-table thead .rz-filter-row td .rz-autocomplete,
.rz-data-grid .rz-grid-table thead .rz-filter-row td .rz-numeric-input {
    height: 20px !important;
    min-height: 18px !important;
    padding: 0px !important;
    font-size: 0.85rem !important;
    box-sizing: border-box !important;
}

.rz-data-grid .rz-grid-table thead .rz-filter-row td .rz-numeric .rz-numeric-button {
    padding: 0.05rem 0 !important;
}

.rz-data-grid .rz-grid-table thead .rz-filter-row td[style*="text-align: right"] input,
.rz-data-grid .rz-grid-table thead .rz-filter-row td[style*="text-align:right"] input {
    text-align: right !important;
}
