/* Dashed RichEditor: sticky toolbar + fullscreen mode */

.fi-fo-rich-editor {
    position: relative;
}

.fi-fo-rich-editor .fi-fo-rich-editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #ffffff;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.dark .fi-fo-rich-editor .fi-fo-rich-editor-toolbar {
    background: #18181b;
}

/* Toggle button — sits as a normal item at the front of the toolbar. */
.dashed-editor-fullscreen-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: #71717a;
    cursor: pointer;
    flex-shrink: 0;
    background: transparent;
    border: 0;
    padding: 0;
}

.dashed-editor-fullscreen-toggle:hover {
    background: #f4f4f5;
    color: #3f3f46;
}

.dark .dashed-editor-fullscreen-toggle {
    color: #a1a1aa;
}

.dark .dashed-editor-fullscreen-toggle:hover {
    background: #27272a;
    color: #e4e4e7;
}

.dashed-editor-fullscreen-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* Fullscreen wrapper: a fixed scrollable box. Solid white background
   (NOT transparent). Toolbar stays sticky via the rule above. */
.fi-fo-rich-editor.dashed-editor-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background-color: #ffffff !important;
    overflow-y: auto;
    overflow-x: hidden;
}

.dark .fi-fo-rich-editor.dashed-editor-fullscreen {
    background-color: #18181b !important;
}

/* Make sure the inner content container actually fills the wrapper.
   Filament's .fi-input-wrp is display:flex, but in fullscreen we want
   the children to take full width and grow. */
.fi-fo-rich-editor.dashed-editor-fullscreen > .fi-input-wrp-content-ctn {
    width: 100% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    background-color: inherit;
}

.fi-fo-rich-editor.dashed-editor-fullscreen .fi-fo-rich-editor-content {
    min-height: calc(100vh - 4rem);
    background-color: inherit;
}

body.dashed-editor-fullscreen-active {
    overflow: hidden;
}
