/* Hide admin bar completely */
#wpadminbar,
#adminmenumain,
.edit-post-fullscreen-mode-close,
#screen-meta,
#screen-meta-links,
.wrap h1,
.wrap .page-title-action,
.components-panel__header.edit-post-sidebar__panel-tabs,
.edit-post-header__settings,
.edit-post-header-toolbar__inserter-toggle,
.edit-post-header-toolbar__block-navigation,
.interface-pinned-items,
.block-editor-block-breadcrumb,
.block-editor-block-breadcrumb__button {
    display: none !important;
}

.editor-visual-editor__post-title-wrapper,
.components-notice-list,
.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder] {
    visibility: hidden !important;
    display: none !important;
}

/* Force hide admin menu */
#adminmenuwrap {
    display: none !important;
}

/* Adjust content area to use full width */
#wpcontent,
#wpbody-content {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Set editor to full screen mode */
.edit-post-layout.is-mode-visual .edit-post-visual-editor,
.editor-styles-wrapper {
    height: 100vh !important;
    padding-top: 0 !important;
}

/* Custom fullscreen styles */
.is-fullscreen-mode .interface-interface-skeleton,
.is-distraction-free .interface-interface-skeleton {
    top: 0 !important;
    left: 0 !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

/* Hide top toolbar for distraction-free mode */
.is-distraction-free .edit-post-header,
.flowpilot-embed-mode .edit-post-header {
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    min-height: 0 !important;
}

/* Make sure content area expands to fill available space */
.interface-interface-skeleton__editor {
    flex-grow: 1 !important;
}

/* Hide admin notices */
.notice,
.updated,
.update-nag {
    display: none !important;
}

/* Hide sidebar */
.interface-interface-skeleton__sidebar {
    display: none !important;
}

/* Expand editor area */
.interface-interface-skeleton__content {
    width: 100% !important;
}

.block-editor-block-toolbar button.gtl-hide {
    display: none !important;
}

/* Remove leftover padding/gaps in toolbar */
.block-editor-block-toolbar {
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Pack buttons tightly */
.block-editor-block-toolbar .components-toolbar-group {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    border: none !important;
}

/* Hide toolbar groups that have no visible buttons */
.block-editor-block-toolbar .components-toolbar-group:empty {
    display: none !important;
}

/* Hide the parent selector safely to remove stray pixel */
.block-editor-block-toolbar .block-editor-block-parent-selector {
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide editor inserter - comprehensive */
.block-editor-inserter,
.block-list-appender,
.block-editor-default-block-appender,
.block-editor-button-block-appender,
.block-editor-block-list__insertion-point,
.block-editor-block-list__insertion-point-inserter,
.wp-block-button__inline-link-search {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Hide the plus button that appears between blocks */
.block-editor-block-list__insertion-point-button {
    display: none !important;
}

/* Hide snackbar (Page updated.) */
.components-snackbar-list {
    display: none !important;
}

/* Hide appenders inside specific blocks */
[data-type="core/button"] .block-list-appender,
[data-type="core/buttons"] .block-list-appender {
    display: none !important;
}

/* Hide Gutenberg pseudo-element at the bottom of editor */
:root :where(.editor-styles-wrapper)::after {
    display: none !important;
}