/* 1. Clear the path for sticky to work */
/* We target the specific wrapper classes shown in your inspector */
.fi-fo-rich-editor,
.fi-fo-rich-editor > .fi-input-wrp,
.fi-fo-rich-editor > .fi-input-wrp > .fi-input-wrp-content,
.fi-fo-field-wrp,
.fi-fo-field-wrp-label-offset {
    overflow: visible !important;
}

/* 2. The Sticky Toolbar */
.fi-fo-rich-editor-toolbar {
    position: sticky !important;
    top: 64px !important; /* Standard Filament header height */
    z-index: 30 !important;
    /* Use Filament's theme variables for background to keep it consistent */
    background-color: var(--fi-fo-rich-editor-toolbar-bg, white) !important;
    border-bottom: 1px solid var(--fi-fo-rich-editor-border-color, #e5e7eb) !important;
}

/* 3. Dark mode override */
.dark .fi-fo-rich-editor-toolbar {
    background-color: #161617 !important; /* Tailwind gray-900 for modern Filament dark */
    border-bottom-color: #374151 !important;
}