// Overrides and fixes of default Gutenberg styles.

// stylelint-disable
body {
	// Moving border around the block to the actual block line.
	.block-editor-block-list__layout {
		.#{global-settings(customBlocksName)} {
			&.wp-block {
				max-width: 100%;

				&:hover {
					outline: 1px dotted var(--es-admin-block-hover-shadow, rgb(0 0 0 / 0.1));
					outline-offset: 0.25rem;
					border-radius: 0.125rem;
				}
			}

			&.block-editor-block-list__block {
				max-width: none;

				// Move plus sign for adding new block before selected block to the right.
				& > .block-editor-block-list__insertion-point {
					left: auto;
					right: 0;
					width: 50px;
					top: 0;
				}

				// Remove border padding line over the block.
				.block-editor-block-list__block-edit::before {
					top: 0;
					bottom: 0;
				}
			}
		}

		.block-editor-block-list__block.is-reusable {
			max-width: none;
		}
	}

	// Bump edit-post-sidebar__panel-tabs z-index.
	.edit-post-sidebar__panel-tabs {
		z-index: 2 !important;
	}

	// Fix for scrollbar overflow.
	@supports (scrollbar-gutter: stable) {
		.interface-interface-skeleton__sidebar {
			scrollbar-gutter: stable;
		}
	}

	@supports not (scrollbar-gutter: stable) {
		.interface-interface-skeleton__sidebar {
			overflow-x: hidden;
		}
	}
}
