.mks-gre-insight-origin {
	display: none !important;
}

/* A Gutenberg Insight block remains editable, while its frontend column gives
 * the adjacent page content the space previously occupied by the sidebar. */
.kt-row-column-wrap:has(> .wp-block-kadence-column > .kt-inside-inner-col > .mks-gre-insight-origin:only-child) {
	grid-template-columns: minmax(0, 1fr) !important;
}

.kt-row-column-wrap > .wp-block-kadence-column:has(> .kt-inside-inner-col > .mks-gre-insight-origin:only-child) {
	display: none !important;
}

.kt-row-column-wrap:has(> .wp-block-kadence-column > .kt-inside-inner-col > .mks-gre-insight-origin:only-child) > .wp-block-kadence-column:not(:has(.mks-gre-insight-origin)) {
	grid-column: 1 !important;
	width: 100% !important;
	min-width: 0;
}

.mks-gre-insight-drawer {
	height: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.mks-gre-insight-drawer > summary {
	position: fixed;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 100031;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 28px;
	padding: 11px 7px;
	border: 1px solid #c9adf4;
	border-left: 0;
	border-radius: 0 9px 9px 0;
	background: linear-gradient(160deg, #8d41e9, #6928c6);
	box-shadow: 4px 4px 18px rgba(101, 44, 178, 0.22);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	list-style: none;
	white-space: nowrap;
	writing-mode: vertical-rl;
	text-orientation: mixed;
	cursor: pointer;
}

.mks-gre-insight-drawer > summary::-webkit-details-marker {
	display: none;
}

.mks-gre-insight-drawer[open] > summary::after {
	content: "×";
	display: grid;
	place-items: center;
	width: 21px;
	height: 21px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	font-size: 19px;
	line-height: 1;
}

.mks-gre-insight-drawer > summary:focus-visible {
	outline: 3px solid #b88be9;
	outline-offset: 4px;
}

.mks-gre-insight-drawer__backdrop {
	position: fixed;
	inset: 0;
	z-index: 100020;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(30, 17, 61, 0.36);
	backdrop-filter: blur(3px);
	cursor: default;
}

.mks-gre-insight-drawer__panel {
	position: fixed;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 84px);
	left: 48px;
	bottom: 16px;
	z-index: 100030;
	width: min(450px, calc(100vw - 60px));
	box-sizing: border-box;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 1px solid #e4d6f4;
	border-radius: 20px;
	background: #111827;
	box-shadow: 0 25px 70px rgba(23, 11, 64, 0.33);
}

.mks-gre-insight-drawer__panel .mks-gre-insight {
	width: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 20px;
	box-shadow: none;
}

.mks-gre-insight-drawer__panel .mks-gre-insight__toggle {
	display: none !important;
}

.mks-gre-insight-drawer__panel .mks-gre-insight__content,
.mks-gre-insight-drawer__panel .mks-gre-insight__ticker {
	display: block !important;
}

body:has(.mks-gre-insight-drawer[open]) {
	overflow: hidden;
}

@media (max-width: 600px) {
	.mks-gre-insight-drawer__panel {
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 12px);
		bottom: 12px;
	}
}
