

.query {
	&_wrap {
		margin-bottom: 32px;
		border-top: 1px solid var(--vip-grey-10);
		display: flex;
		flex-flow: row wrap;
	}

	&_val,
	&_result {
		white-space: pre;
		width: 100%;
		overflow-y: scroll;
		margin-bottom: 32px;
		font-size: var(--vip-sdt-editor-font-size);
		background-color: var(--vip-grey-0);
		padding: 32px;

		> pre {
			line-height: 1.2em;
		}
	}
	&_actions {
		@include text-caption();
		position: absolute;
		right: 32px;
		margin: 32px 0;
		z-index: 1;
		top: 0;
		button {
			text-transform: uppercase;
			font-size:0.8rem;
			font-weight: bold;
			padding: 0.5em;
			border: 0;
			// yes, unfortunately
			background-color: #ffffff !important;
			color: var(--vip-grey-90) !important;
			&:not(:last-of-type) {
				margin-right: 32px;
			}
		}
	}

	&_handle {
		margin: 32px 0;
		cursor: pointer;

		:global(.vip-h3) {
			margin: 0;

			&::selection {
				background-color: initial;
			}
			&::before {
				content: '';
				background-image: url(../../assets/minus.svg);
				background-position: center;
				background-repeat: no-repeat;
				margin-right: 16px;
				width: 16px;
				height: 16px;
				display: inline-block;
			}
		}
	}

	&_collapsed {
		.grid_container {
			display: none;
		}

		:global(.vip-h3) {
			&::before {
				content: '';
				background-image: url(../../assets/plus.svg);
			}
		}
	}
}

.grid_container {
	width: 100%;
	border: 1px solid var(--vip-grey-10);
	border-radius: 3px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0px 0px;
	grid-template-areas:
		'query-src-header query-res-header'
		'query-src query-res';
}

.query_src_header {
	grid-area: query-src-header;
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-around;
	background-color: #ffffff;
}
.query_res_header {
	grid-area: query-res-header;
}

.query_src_header,
.query_res_header {
	padding: 16px 32px;
	display: flex;
	flex-flow: row;
	align-items: center;
	border-bottom: 1px solid var(--vip-grey-10);
}

.query_src,
.query_res {
	max-width: calc(50vw - 32px);
	font-size: var( --vip-sdt-editor-font-size);
	position: relative;
}

.query_src {
	grid-area: query-src;
	background-color: #ffffff;

	&_extra {
		@include text-caption();
		display: flex;
		> * {
			margin: 0 4px;
		}
	}
}
.query_res {
	grid-area: query-res;
}

.query_wrap {
	.container_editor {
		counter-reset: line;
		position: relative;
		

		> textarea,
		> pre {
			padding: 32px 64px !important;
			line-height: 1.2em;
		}

	}
	.container_editor_line_number {
		&::before {
			position: absolute;
			right: calc(100% - 56px);
			margin-right: 12px;
			text-align: right;
			opacity: 0.5;
			user-select: none;
			counter-increment: line;
			content: counter(line);
			color: var(--vip-grey-60);
		}
	}
}