/* WS Post Layouts — column/grid layouts for post content */

/* ── HR styling (editor + frontend) ────────────────────── */
hr {
	border: none;
	border-top: 1px solid #e8e8e8;
	margin: 3rem 0;
}

/* ── Shared column base ─────────────────────────────── */
.post-layout-cols-2,
.post-layout-cols-3,
.post-layout-grid-4 {
	display: flex;
	gap: 2rem;
	margin: 4rem 0;
}

.post-layout-cols-2 > .post-layout-col { flex: 1; min-width: 0; }

.post-layout-cols-3 > .post-layout-col { flex: 1; min-width: 0; }

/* ── 2×2 grid ───────────────────────────────────────── */
.post-layout-grid-4 > .post-layout-col {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.post-layout-img-entry { display: flex; flex-direction: column; gap: 0.4rem; }

.post-layout-grid-4 .post-layout-caption-wrap { margin-top: 0.15rem; }

/* ── 2×2 Masonry ────────────────────────────────────── */
.post-layout-masonry {
	display: flex;
	gap: 1.25rem;
	margin: 1.5rem 0;
}

.post-layout-masonry > .post-layout-col {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* flex: 1 1 auto — natural image height is the basis so masonry can measure
   the taller column, then extra space is distributed to the shorter column's entries */
.post-layout-masonry .post-layout-img-entry {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.post-layout-masonry .post-layout-img-wrap {
	flex: 1 1 auto;
	overflow: hidden;
}

/* Image fills the flex img-wrap; flex: 1 absorbs any extra height the column distributes */
.post-layout-masonry .post-layout-img-wrap img {
	width: 100%;
	flex: 1;
	min-height: 0;
	object-fit: cover;
	display: block;
}

/* WP wraps images in <p> on the frontend — make it fill the flex img-wrap */
.post-layout-masonry .post-layout-img-wrap > p {
	flex: 1;
	display: flex;
	min-height: 0;
	margin: 0;
	padding: 0;
}
.post-layout-masonry .post-layout-img-wrap > p > img {
	flex: 1;
	min-height: 0;
	width: 100%;
	object-fit: cover;
	display: block;
}

.post-layout-masonry .post-layout-caption-wrap {
	flex: 0 0 auto;
	margin-top: 0.15rem;
}

/* ── Image + Text ───────────────────────────────────── */
.post-layout-media-text {
	display: grid;
	grid-template-columns: 48% 1fr;
	grid-template-areas: "img txt" "cap .";
	column-gap: 2rem;
	margin: 4rem 0;
}

.post-layout-img-right {
	grid-template-columns: 1fr 48%;
	grid-template-areas: "txt img" ". cap";
}

/* ── Image + Text split variants ───────────────────────── */
.post-layout-media-text.post-layout-split-75               { grid-template-columns: 60% 1fr; }
.post-layout-media-text.post-layout-split-25               { grid-template-columns: 40% 1fr; }
.post-layout-media-text.post-layout-img-right.post-layout-split-75 { grid-template-columns: 1fr 60%; }
.post-layout-media-text.post-layout-img-right.post-layout-split-25 { grid-template-columns: 1fr 40%; }

/* Image column — height driven by grid row (max of both columns).
   img-wrap fills the grid area; object-fit:cover handles when text is taller. */
.post-layout-media-text .post-layout-media { grid-area: img; }

.post-layout-media-text .post-layout-media .post-layout-img-wrap {
	height: 100%;
	overflow: hidden;
}

/* WordPress wraps images in <p> — fill the flex img-wrap column */
.post-layout-media-text .post-layout-media .post-layout-img-wrap > p {
	flex: 1;
	display: flex;
	min-height: 0;
	margin: 0;
	padding: 0;
}

.post-layout-media-text .post-layout-media .post-layout-img-wrap img {
	width: 100%;
	flex: 1;
	min-height: 0;
	object-fit: cover;
	display: block;
}

.post-layout-media-text .post-layout-text         { grid-area: txt; align-self: center; }

.post-layout-media-text > .post-layout-caption-wrap { grid-area: cap; }

/* Text blocks (title / paragraph wrappers) */
.post-layout-text-block { position: relative !important; }

/* ── Image wrapper ──────────────────────────────────── */
.post-layout-img-wrap {
	position: relative !important;
	display: flex;
	flex-direction: column;
}

.post-layout-img-wrap img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 0.25rem;
}

/* ── Equal Height variants ──────────────────────────────
   aspect-ratio on img-wrap is the only reliable CSS-only approach. */

.post-layout-cols-2.post-layout-equal-height .post-layout-img-wrap,
.post-layout-cols-3.post-layout-equal-height .post-layout-img-wrap {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.post-layout-cols-2.post-layout-equal-height .post-layout-img-wrap > p,
.post-layout-cols-3.post-layout-equal-height .post-layout-img-wrap > p {
	margin: 0;
	padding: 0;
}

.post-layout-cols-2.post-layout-equal-height .post-layout-img-wrap img,
.post-layout-cols-3.post-layout-equal-height .post-layout-img-wrap img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Grid: 1:1 ratio */
.post-layout-grid-4.post-layout-equal-height .post-layout-img-wrap {
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.post-layout-grid-4.post-layout-equal-height .post-layout-img-wrap > p {
	margin: 0;
	padding: 0;
}

.post-layout-grid-4.post-layout-equal-height .post-layout-img-wrap img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Reset <p> margin/padding that WordPress injects around images */
.post-layout-img-wrap p { margin: 0; padding: 0; }

/* ── Per-layout image border radius (desktop) ────────── */
.post-layout-cols-2    .post-layout-img-wrap img { border-radius: 0.75rem; }
.post-layout-grid-4    .post-layout-img-wrap img { border-radius: 0.75rem; }
.post-layout-masonry   .post-layout-img-wrap img { border-radius: 0.75rem; }
.post-layout-media-text .post-layout-img-wrap img { border-radius: 0.5rem; }
.post-layout-cols-3    .post-layout-img-wrap img { border-radius: 0.5rem; }
.post-layout-full      .post-layout-img-wrap img { border-radius: 1rem; }

/* ── Caption ────────────────────────────────────────── */
.post-layout-caption-wrap {
	position: relative !important;
	margin-top: 0.4rem;
}

.post-layout-caption {
	font-size: 0.7rem;
	color: #888;
	text-align: center;
	margin: 0;
}

body .post-layout-caption-wrap .post-layout-caption a {
	font-size: inherit !important;
	color: inherit !important;
	text-decoration: none;
}

body .post-layout-caption-wrap .post-layout-caption a:hover {
	font-size: inherit !important;
	color: #9482E6 !important;
	text-decoration: underline;
}

/* Empty caption-wraps hidden on frontend (stripped by cleanForSave + PHP filter; this is a last-resort fallback) */
.post-layout-caption-wrap:has(.post-layout-caption:empty),
.post-layout-caption-wrap:has(.post-layout-caption > br:only-child) {
	display: none;
}

/* ── Full-width image ───────────────────────────────── */
.post-layout-full { margin: 1.5rem 0; }

/* ── First/last layout spacing ─────────────────────── */
.post-layout-cols-2:first-child,
.post-layout-cols-3:first-child,
.post-layout-grid-4:first-child,
.post-layout-masonry:first-child,
.post-layout-media-text:first-child,
.post-layout-full:first-child { margin-top: 0; }

.post-layout-cols-2:last-child,
.post-layout-cols-3:last-child,
.post-layout-grid-4:last-child,
.post-layout-masonry:last-child,
.post-layout-media-text:last-child,
.post-layout-full:last-child { margin-bottom: 0; }

/* ── All close/move buttons hidden on frontend ──────── */
.post-layout-close,
.post-layout-caption-close,
.post-layout-text-close,
.post-layout-move-btns { display: none; }

/* ── Empty layouts hidden on frontend ───────────────── */
.post-layout-cols-2:not(:has(img, h2:not(:empty), h3:not(:empty), h4:not(:empty), p:not(.post-layout-img-slot):not(:empty))),
.post-layout-cols-3:not(:has(img, h2:not(:empty), h3:not(:empty), h4:not(:empty), p:not(.post-layout-img-slot):not(:empty))),
.post-layout-grid-4:not(:has(img, h2:not(:empty), h3:not(:empty), h4:not(:empty), p:not(.post-layout-img-slot):not(:empty))),
.post-layout-masonry:not(:has(img, h2:not(:empty), h3:not(:empty), h4:not(:empty), p:not(.post-layout-img-slot):not(:empty))),
.post-layout-media-text:not(:has(img, h2:not(:empty), h3:not(:empty), h4:not(:empty), p:not(.post-layout-img-slot):not(:empty))),
.post-layout-full:not(:has(img)) {
	display: none;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
	.post-layout-cols-2,
	.post-layout-cols-3,
	.post-layout-grid-4,
	.post-layout-masonry { flex-direction: column; }

	.post-layout-masonry .post-layout-img-entry { flex: none; }

	/* img → caption → text on mobile for all image+text variants (including split ratios) */
	.post-layout-media-text,
	.post-layout-media-text.post-layout-img-right,
	.post-layout-media-text.post-layout-split-75,
	.post-layout-media-text.post-layout-split-25,
	.post-layout-media-text.post-layout-img-right.post-layout-split-75,
	.post-layout-media-text.post-layout-img-right.post-layout-split-25 {
		grid-template-columns: 1fr;
		grid-template-areas: "img" "cap" "txt";
	}

	.post-layout-media-text .post-layout-media .post-layout-img-wrap        { height: auto; }
	.post-layout-media-text .post-layout-media .post-layout-img-wrap > p    { flex: none; height: auto; }
	.post-layout-media-text .post-layout-media .post-layout-img-wrap img    { flex: none; height: auto; }

	.post-layout-caption-wrap { margin-top: 0.25rem; }
	.post-layout-caption { font-size: 0.8rem; }
	.post-layout-media-text .post-layout-text { margin-top: 1.5rem; }

	/* 0.75rem on all layout images — selectors match desktop per-layout specificity to override */
	.post-layout-cols-2 .post-layout-img-wrap img,
	.post-layout-cols-3 .post-layout-img-wrap img,
	.post-layout-grid-4 .post-layout-img-wrap img,
	.post-layout-masonry .post-layout-img-wrap img,
	.post-layout-media-text .post-layout-img-wrap img,
	.post-layout-full .post-layout-img-wrap img,
	.post-layout-img-wrap img { border-radius: 0.75rem; }
}

/* ════════════════════════════════════════════════════════
   EDITOR-ONLY STYLES  (.mce-content-body scoped)
   ════════════════════════════════════════════════════════ */

/* ── Parent layout containers ───────────────────────── */
.mce-content-body .post-layout-cols-2,
.mce-content-body .post-layout-cols-3,
.mce-content-body .post-layout-grid-4,
.mce-content-body .post-layout-masonry,
.mce-content-body .post-layout-media-text,
.mce-content-body .post-layout-full {
	outline: 1px solid rgb(176 168 216 / 30%);
	background-color: rgb(191 177 255 / 3%);
	border-radius: 0.25rem;
	transition: background-color 0.3s ease-out;
}

.mce-content-body .post-layout-cols-2:hover,
.mce-content-body .post-layout-cols-3:hover,
.mce-content-body .post-layout-grid-4:hover,
.mce-content-body .post-layout-masonry:hover,
.mce-content-body .post-layout-media-text:hover,
.mce-content-body .post-layout-full:hover {
	background-color: rgb(191 177 255 / 10%);
}

/* ── Intermediate wrappers ──────────────────────────── */
.mce-content-body .post-layout-col,
.mce-content-body .post-layout-media,
.mce-content-body .post-layout-text {
	outline: 1px dashed rgb(176 168 216 / 30%);
	border-radius: 0.25rem;
	pointer-events: none;
}

/* ── Editable leaf elements ─────────────────────────── */
.mce-content-body .post-layout-text-block,
.mce-content-body .post-layout-caption-wrap,
.mce-content-body .post-layout-img-slot {
	outline: 1px dashed rgb(176 168 216 / 40%);
	background-color: rgb(121 94 246 / 3%);
	border-radius: 0.25rem;
	pointer-events: auto;
	transition: outline-color 0.2s ease-out, background-color 0.3s ease-out, box-shadow 0.3s ease-out;
}

.mce-content-body .post-layout-img-wrap {
	outline: 1px solid rgb(176 168 216 / 40%);
	background-color: rgb(121 94 246 / 3%);
	border-radius: 0.25rem;
	pointer-events: auto;
	transition: outline-color 0.2s ease-out, background-color 0.3s ease-out, box-shadow 0.3s ease-out;
}

/* Editor images match the wrapper's border-radius, not the frontend per-layout values */
.mce-content-body .post-layout-img-wrap img { border-radius: 0.25rem; }

.mce-content-body .post-layout-text-block.post-layout-filled,
.mce-content-body .post-layout-caption-wrap.post-layout-filled { outline-style: solid; }

.mce-content-body .post-layout-text-block:hover,
.mce-content-body .post-layout-caption-wrap:hover,
.mce-content-body .post-layout-img-slot:hover,
.mce-content-body .post-layout-img-wrap:hover {
	outline-color: rgb(176 168 216 / 60%);
	background-color: rgb(121 94 246 / 12%);
	box-shadow: 0 0 8px 1px rgb(121 94 246 / 10%);
}

/* ── Layout master container ────────────────────────── */
.mce-content-body .post-layout-cols-2,
.mce-content-body .post-layout-cols-3,
.mce-content-body .post-layout-grid-4,
.mce-content-body .post-layout-masonry,
.mce-content-body .post-layout-media-text,
.mce-content-body .post-layout-full {
	position: relative !important;
	overflow: visible !important;
	padding: 0.5rem;
	margin-top: 2.25rem;
	margin-bottom: 1.5rem;
}

/* ── Editor: always show layouts ─────────────────────── */
.mce-content-body .post-layout-cols-2,
.mce-content-body .post-layout-cols-3,
.mce-content-body .post-layout-grid-4,
.mce-content-body .post-layout-masonry { display: flex !important; }

.mce-content-body .post-layout-media-text { display: grid !important; }
.mce-content-body .post-layout-full       { display: block !important; }

/* Editor masonry columns */
.mce-content-body .post-layout-masonry > .post-layout-col {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.mce-content-body .post-layout-masonry .post-layout-img-entry { flex: none; overflow: visible; }

.mce-content-body .post-layout-masonry .post-layout-img-wrap { flex: none; min-height: 0; }

/* ── Layout badge (::before) ────────────────────────── */
.mce-content-body .post-layout-cols-2::before,
.mce-content-body .post-layout-cols-3::before,
.mce-content-body .post-layout-grid-4::before,
.mce-content-body .post-layout-masonry::before,
.mce-content-body .post-layout-media-text::before,
.mce-content-body .post-layout-full::before {
	content: 'Layout';
	position: absolute;
	top: -2px;
	left: -2px;
	transform: translateY(-120%);
	background: rgb(191 177 255 / 30%);
	color: rgb(139 127 196);
	font-size: 0.55rem;
	font-style: normal;
	font-weight: 550;
	letter-spacing: 0.05rem;
	text-transform: uppercase;
	padding: 4px 6px;
	border-radius: 4px;
	pointer-events: none;
	user-select: none;
	line-height: 100%;
	border: 1.25px solid rgb(176 168 216 / 40%);
	box-shadow: 0px 6px 12px rgb(132 106 255 / 20%);
	opacity: 0;
	transition: opacity 0.2s ease-out;
}

.mce-content-body .post-layout-cols-2:hover::before,
.mce-content-body .post-layout-cols-3:hover::before,
.mce-content-body .post-layout-grid-4:hover::before,
.mce-content-body .post-layout-masonry:hover::before,
.mce-content-body .post-layout-media-text:hover::before,
.mce-content-body .post-layout-full:hover::before { opacity: 1; }

/* Badge content per layout type */
.mce-content-body .post-layout-cols-2::before                                                { content: 'Layout — 2 Column Images'; }
.mce-content-body .post-layout-cols-2.post-layout-equal-height::before                       { content: 'Layout — 2 Column Images (Equal Height)'; }
.mce-content-body .post-layout-cols-3::before                                                { content: 'Layout — 3 Column Images'; }
.mce-content-body .post-layout-cols-3.post-layout-equal-height::before                       { content: 'Layout — 3 Column Images (Equal Height)'; }
.mce-content-body .post-layout-grid-4::before                                                { content: 'Layout — 2×2 Image Grid'; }
.mce-content-body .post-layout-grid-4.post-layout-equal-height::before                       { content: 'Layout — 2×2 Image Grid (Equal Height)'; }
.mce-content-body .post-layout-masonry::before                                               { content: 'Layout — 2×2 Image Masonry'; }
.mce-content-body .post-layout-full::before                                                   { content: 'Layout — Full Width Image'; }
.mce-content-body .post-layout-media-text.post-layout-img-left::before                       { content: 'Layout — Image Left + Text (50/50)'; }
.mce-content-body .post-layout-media-text.post-layout-img-left.post-layout-split-75::before  { content: 'Layout — Image Left + Text (60/40)'; }
.mce-content-body .post-layout-media-text.post-layout-img-left.post-layout-split-25::before  { content: 'Layout — Image Left + Text (40/60)'; }
.mce-content-body .post-layout-media-text.post-layout-img-right::before                      { content: 'Layout — Image Right + Text (50/50)'; }
.mce-content-body .post-layout-media-text.post-layout-img-right.post-layout-split-75::before { content: 'Layout — Image Right + Text (60/40)'; }
.mce-content-body .post-layout-media-text.post-layout-img-right.post-layout-split-25::before { content: 'Layout — Image Right + Text (40/60)'; }

/* ── Inner column/media/text areas ──────────────────── */
.mce-content-body .post-layout-col,
.mce-content-body .post-layout-media,
.mce-content-body .post-layout-text { padding: 0.4rem; }

.mce-content-body .post-layout-text-block {
	padding: 0;
	margin-bottom: 0.4rem;
}

.mce-content-body .post-layout-text-block:last-child { margin-bottom: 0; }

.mce-content-body .post-layout-text-block > h3,
.mce-content-body .post-layout-text-block > h2,
.mce-content-body .post-layout-text-block > h4,
.mce-content-body .post-layout-text-block > p:not(.post-layout-caption) {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.3rem 0.4rem;
	margin: 0;
	min-height: 1.25rem;
}

/* ── Placeholder text ───────────────────────────────── */
.mce-content-body .post-layout-caption-wrap > .post-layout-caption:empty::before,
.mce-content-body .post-layout-caption-wrap > .post-layout-caption:has(> br:only-child)::before {
	content: 'Add a caption…';
	color: #b0b8c1;
	font-style: italic;
	pointer-events: none;
}

.mce-content-body .post-layout-text-block > h3:empty::before,
.mce-content-body .post-layout-text-block > h3:has(> br:only-child)::before,
.mce-content-body .post-layout-text-block > h2:empty::before,
.mce-content-body .post-layout-text-block > h2:has(> br:only-child)::before,
.mce-content-body .post-layout-text-block > h4:empty::before,
.mce-content-body .post-layout-text-block > h4:has(> br:only-child)::before {
	content: 'Add a title…';
	color: #b0b8c1;
	font-style: italic;
	pointer-events: none;
}

.mce-content-body .post-layout-text-block > p:not(.post-layout-caption):empty::before,
.mce-content-body .post-layout-text-block > p:not(.post-layout-caption):has(> br:only-child)::before {
	content: 'Add text…';
	color: #b0b8c1;
	font-style: italic;
	pointer-events: none;
}

.mce-content-body .post-layout-text-block > h3.post-layout-active::before,
.mce-content-body .post-layout-text-block > h2.post-layout-active::before,
.mce-content-body .post-layout-text-block > h4.post-layout-active::before,
.mce-content-body .post-layout-text-block > p.post-layout-active::before,
.mce-content-body .post-layout-caption-wrap > .post-layout-caption.post-layout-active::before {
	display: none;
}

/* ── Image slot placeholder ─────────────────────────── */
.post-layout-img-slot { display: none; }

.mce-content-body .post-layout-img-slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 1.5rem 1rem;
	color: #6b7280;
	font-size: 0.85rem;
	font-style: italic;
	text-align: center;
	cursor: pointer;
	user-select: none;
	caret-color: transparent;
}

.mce-content-body .post-layout-img-slot::before {
	content: '';
	display: block;
	width: 2rem;
	height: 2rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a394d8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'%2F%3E%3Ccircle cx='12' cy='13' r='4'%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
	pointer-events: none;
}

/* ── Caption ────────────────────────────────────────── */
.mce-content-body .post-layout-caption-wrap {
	display: block !important;
	padding: 0;
	margin-top: 0.4rem;
}

.mce-content-body .post-layout-grid-4 .post-layout-caption-wrap,
.mce-content-body .post-layout-masonry .post-layout-caption-wrap { margin-top: 0.15rem; }

.mce-content-body hr {
	border: none;
	border-top: 1px solid #e8e8e8;
	margin: 3rem 0;
}

.mce-content-body .post-layout-caption-wrap > .post-layout-caption {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.3rem 0.5rem;
	margin: 0;
	min-height: 2rem;
	line-height: 160%;
}

/* Neutralise the <p> TinyMCE forces around injected editor-only divs */
.mce-content-body p:has(> .post-layout-close),
.mce-content-body p:has(> .post-layout-caption-close),
.mce-content-body p:has(> .post-layout-text-close),
.mce-content-body p:has(> .post-layout-move-btns) { display: contents; }

/* ── Shared close button style ──────────────────────── */
.mce-content-body .post-layout-close,
.mce-content-body .post-layout-caption-close,
.mce-content-body .post-layout-text-close {
	display: flex !important;
	pointer-events: auto;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: -8px;
	right: -8px;
	width: 16px;
	height: 16px;
	background: #fff;
	color: rgb(139 127 196);
	border: 1px solid rgb(121 94 246 / 50%);
	border-radius: 50%;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	z-index: 10;
	opacity: 0;
	transition: background-color 0.3s ease-out, color 0.3s ease-out, opacity 0.2s ease-out;
}

/* Show layout close + badge on any hover within the container */
.mce-content-body .post-layout-cols-2:hover .post-layout-close,
.mce-content-body .post-layout-cols-3:hover .post-layout-close,
.mce-content-body .post-layout-grid-4:hover .post-layout-close,
.mce-content-body .post-layout-masonry:hover .post-layout-close,
.mce-content-body .post-layout-media-text:hover .post-layout-close,
.mce-content-body .post-layout-full:hover .post-layout-close,
.mce-content-body .post-layout-caption-wrap:hover .post-layout-caption-close,
.mce-content-body .post-layout-text-block:hover .post-layout-text-close { opacity: 1; }

.mce-content-body .post-layout-close:hover,
.mce-content-body .post-layout-caption-close:hover,
.mce-content-body .post-layout-text-close:hover {
	background-color: rgb(82 72 128 / 90%);
	color: #fff;
}

/* ── Move up/down buttons ───────────────────────────── */
.mce-content-body .post-layout-move-btns {
	display: flex !important;
	gap: 3px;
	position: absolute;
	top: -2px;
	left: 50%;
	transform: translateX(-50%) translateY(-100%);
	opacity: 0;
	transition: opacity 0.2s ease-out;
	pointer-events: auto;
	user-select: none;
	z-index: 10;
}

.mce-content-body .post-layout-move-up,
.mce-content-body .post-layout-move-down {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	background: #fff;
	color: rgb(139 127 196);
	border: 1px solid rgb(121 94 246 / 50%);
	border-radius: 4px;
	font-size: 9px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.3s ease-out, color 0.3s ease-out;
}

.mce-content-body .post-layout-cols-2:hover .post-layout-move-btns,
.mce-content-body .post-layout-cols-3:hover .post-layout-move-btns,
.mce-content-body .post-layout-grid-4:hover .post-layout-move-btns,
.mce-content-body .post-layout-masonry:hover .post-layout-move-btns,
.mce-content-body .post-layout-media-text:hover .post-layout-move-btns,
.mce-content-body .post-layout-full:hover .post-layout-move-btns { opacity: 1; }

.mce-content-body .post-layout-move-up:hover,
.mce-content-body .post-layout-move-down:hover {
	background-color: rgb(82 72 128 / 90%);
	color: #fff;
}
