/*
 * Table toolbar for a right-to-left panel.
 *
 * Plain CSS registered through FilamentAsset (see panel-forms.css for why).
 *
 * Filament puts the search field, the filters button and the column toggle at
 * the END of the toolbar, which in Arabic is the LEFT edge, far from where the
 * reader starts. The school asked for them on the right. The toolbar is a flex
 * row: the actions group comes first and the search group straight after it,
 * so swapping their order moves search and filters to the start (right) and
 * pushes the actions to the far side.
 */
.fi-ta-header-toolbar > .fi-ta-actions {
    order: 2;
    margin-inline-start: auto;
}

.fi-ta-header-toolbar > .fi-ta-actions + * {
    order: 1;
    margin-inline-start: 0;
}

/*
 * The filters dropdown: a little wider than Filament's default, so a long
 * grade name («السادس العلمي - بنات») fits on one line, but never wider than
 * the screen on a phone.
 */
/* Doubled class: outranks Filament's .fi-dropdown-panel.fi-width-xs rule. */
.fi-ta-filters-dropdown .fi-dropdown-panel.fi-dropdown-panel {
    max-width: min(24rem, calc(100vw - 2rem)) !important;
}
