/* Wing-preselected readonly/disabled shift & medium fields */
.field-readonly-disabled,
select.field-readonly-disabled:disabled {
    background-color: #e9ecef !important;
    opacity: 0.85;
    cursor: not-allowed;
}

/* Override Bootstrap validation colors to use primary color */
.form-control.is-valid,
.form-select.is-valid,
.datepicker-input.is-valid {
    border-color: var(--bs-primary) !important;
    padding-right: calc(1.5em + 0.75rem) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23005b6f' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(0.375em + 0.1875rem) center !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
}

.form-control.is-valid:focus,
.form-select.is-valid:focus,
.datepicker-input.is-valid:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;
}

/*
 * Global table density — every table on every page (list pages, DataTables, plain tables).
 * Body base is 0.812rem (--bs-body-font-size); table cells sit one step below it.
 * This file is loaded from templates/element/new/head-css.php on every layout, so it is
 * the single place to change table text size — do not re-declare it per page.
 */
.table > :not(caption) > * > *,
.table > thead > tr > th {
    font-size: 0.75rem;
}

/* DataTables chrome (length select, search box, info line, pager) matches the cells */
.datatable-top,
.datatable-bottom,
div.dt-container .dt-length,
div.dt-container .dt-search,
div.dt-container .dt-info,
div.dt-container .dt-paging .page-link {
    font-size: 0.75rem;
}

/*
 * Long, transient tables inside a modal (for example the blocked-payment list on the
 * fee template payment sync preview): keep the modal itself a sensible height and let
 * the table scroll inside its own box.
 */
.sync-scroll-area {
    max-height: 20rem;
    overflow-y: auto;
}