/**
 * Prettyberg Stylesheet
 * Preset: Light
 * Description: Light, boring, and efficient design to provide a distraction free and unbranded UX.
 * Version: 0.1
 * Author: C13 Creative
 * Author URI: https://c13creative.com
 * License: GPL2
 */
 
/* Color Variables
---------------------------------------------------------------------------- */

:root {
	--color-1: #c2c2c5; /* Editor window background */
	--color-2: #e6e6e8; /* Blocks and title wrapper background */
	--color-3: #dbdbdd; /* Block border */
}

/* Typography
---------------------------------------------------------------------------- */

.editor-visual-editor,
.editor-visual-editor h1,
.editor-visual-editor h2,
.editor-visual-editor h3,
.editor-visual-editor h4,
.editor-visual-editor h5,
.editor-visual-editor h6,
.editor-visual-editor p {
	/* Overriding theme fonts to ensure a consistent look across themes */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

 
/* Layout & Containers
---------------------------------------------------------------------------- */

/* Main editor wrapper for post title and content */
.editor-styles-wrapper .wp-block-post-content,
.editor-visual-editor__post-title-wrapper {
	max-width: 1200px !important;
	margin: 0 auto !important;
	padding: 24px 30px 0 !important;
	background-color: var(--color-2) !important;
}

/* Additional spacing and styling for the post title wrapper */
.editor-visual-editor__post-title-wrapper {
	margin-top: 36px !important;
	padding: 24px 30px 0 !important;
	border-radius: 18px 18px 0 0;
}

 
 /* Post Title
---------------------------------------------------------------------------- */

/* Original heading styling within the title wrapper */
.editor-visual-editor__post-title-wrapper h1 {
	font-size: 30px !important;
	margin-bottom: 0 !important;
}

/* Fallback: Target the Gutenberg title input field directly */
.editor-styles-wrapper .editor-post-title__input {
	font-size: 30px !important;
	margin-bottom: 0 !important;
}

 
 /* Post Content Area
---------------------------------------------------------------------------- */

.wp-block-post-content {
	border-radius: 0;
	margin: 0 auto !important;
	position: relative; /* For ::after and ::before positioning */
}

/* Editor wrapper itself */
.editor-styles-wrapper {
	height: 100%;
	width: 100%;
	margin: auto !important;
	padding: 30px 0 !important;
	background-color: var(--color-1) !important;
}

 
/* Blocks & Elements
---------------------------------------------------------------------------- */

.editor-styles-wrapper .wp-block {
	max-width: unset !important;
	padding: 18px !important;
	margin: 6px;
	border: 2px solid var(--color-3) !important;
	border-radius: 6px;
	background-color: #fdfdfd;
}

/* Typography for text elements inside the editor wrapper */
:where(.editor-styles-wrapper) p,
:where(.editor-styles-wrapper) ul,
:where(.editor-styles-wrapper) ol,
:where(.editor-styles-wrapper) dl {
	font-size: 18px;
}

/* Removing styling from the default block appender */
.editor-styles-wrapper .wp-block.block-list-appender {
	padding: revert;
	margin: revert;
	border: none;
	border-radius: revert;
	background-color: transparent;
}

/* Adjusting post content and title block spacing */
.editor-styles-wrapper .wp-block-post-content > *,
.editor-visual-editor__post-title-wrapper .wp-block {
	margin: 24px 0 0 !important;
	border-radius: 12px;
	border: none!important;
}

/* Add border radius to blue outline when block is selected */


.editor-styles-wrapper .wp-block:focus::after {
	border-radius: 4px!important;
}

.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after, .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after, .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable="true"]):focus::after {
	border-radius: 12px;
}

 
/* Block Insertion Controls
---------------------------------------------------------------------------- */

.block-editor-block-list__insertion-point-inserter {
	left: calc(50% - 24px);
	top: calc(50% - 14px);
}

.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon,
.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon {
	border-radius: 2px;
	color: #fff;
	height: 28px;
	min-width: 48px;
	padding: 0;
}

 
 /* Sepecific Theme Compatibility
---------------------------------------------------------------------------- */

/* Astra
--------------------------------------------- */

.wp-block-image img {
	box-shadow: none !important;
	-webkit-box-shadow: none !important;
	-moz-box-shadow: none !important;
}

/* Ensure max-width if overridden by theme inline styles */
body .editor-visual-editor__post-title-wrapper {
	max-width: 1200px !important;
}

 
/* "Add new block" plus sign at bottom of editor
---------------------------------------------------------------------------- */

/* The plus sign under post content area */
.wp-block-post-content::after {
	content: '+';
	position: absolute;
	left: 0;
	display: block;
	width: 100%;
	height: 120px;
	margin: auto;
	bottom: -120px;
	text-align: center;
	line-height: 1.28;
	font-size: 96px;
	color: #6b6b6b;
	background-color: var(--color-2);
	border-radius: 0 0 18px 18px;
	pointer-events: none;
}

/* Grey-out the plus sign when deactivated */
/* DOES NOT WORK, YET */
.wp-block-post-content > p:last-child:has(span)::after {
	color: #bfbfbf;
}

/* Add extra spacing after the content block */
:root :where(.editor-styles-wrapper)::after {
	height: 180px !important;
}


/* Signature
---------------------------------------------------------------------------- */

/* Add a small signature before the end of the post content */
.wp-block-post-content::before {
	content: "Made pretty with Prettyberg";
	display: block;
	position: absolute;
	bottom: -150px;
	right: 2px;
	text-align: center;
	font-size: 12px;
	color: #6b6b6b;
}
