.fi-fo-rich-editor-toolbar {
    position: sticky;
    top: 4rem; /* matches Filament's sticky topbar height (min-h-16) so the toolbar isn't hidden underneath it */
    z-index: 20;
    background-color: rgb(255 255 255);
    border-top-left-radius: var(--radius-lg, 0.5rem);
    border-top-right-radius: var(--radius-lg, 0.5rem);
}

.dark .fi-fo-rich-editor-toolbar {
    background-color: rgb(24 24 27);
}

/* Inside a Filament modal, the scroll container is the modal window itself,
   not the page — anchor the toolbar to the top of that container instead.
   The modal header (title bar) scrolls away above it, so once the toolbar
   is stuck it should sit flush against the top of the modal window with no
   gap from the header's own top padding. */
.fi-modal .fi-fo-rich-editor-toolbar {
    top: 0;
    margin-top: -1.5rem; /* cancels .fi-modal-content's top padding (py-6) so the toolbar sticks flush, not 1.5rem below the modal's visible top edge */
    padding-top: 0.5rem;
}
