.cx-vui-component--has-macros {
	.cx-vui-component__control {
		display: flex;
		position: relative;
		align-items: flex-start;
	}
}

.jet-engine-query-builder-heading {
	display: flex;
	padding: 20px 0 20px;
	align-items: center;
	justify-content: space-between;
	.cx-vui-component {
		padding: 0;
		&__meta {
			padding-right: 10px;
		}
	}
}

.jet-engine-query-suggestions {
	position: relative;
	&__list {
		position: absolute;
		left: 0;
		top: 3px;
		width: 100%;
		background: #fff;
		box-shadow: 0 4px 8px rgba( 0, 0, 0, .15 );
	}
	&__item {
		padding: 5px;
		cursor: pointer;
		border-top: 1px solid rgba( 0, 0, 0, .15 );
		&:hover {
			background: rgba( 0, 0, 0, .05 );
		}
		&:first-child {
			border-top: none;
		}
	}
	&__close {
		position: absolute;
		right: 5px;
		top: 5px;
		font-size: 28px;
		z-index: 99;
		cursor: pointer;
	}
}

.jet-engine-query-preview {
	width: 430px;
	position: fixed;
	right: 10px;
	bottom: 10px;
	border: 1px solid #007cba;
	box-shadow: 0 5px 10px rgba(0,0,0,.4);
	background: #fff;
	body.rtl & {
		left: 10px;
		right: auto;
	}
	.cx-vui-component--preview-control {
		flex-direction: column;
		padding: 10px;
		.cx-vui-component__label {
			font-size: 14px;
		}
		.cx-vui-component__desc {
			font-size: 12px;
		}
	}
	&__body {
		min-height: 10vh;
		max-height: 50vh;
		box-shadow: 0 5px 10px rgba(0,0,0,.1) inset;
		padding: 12px;
		overflow: auto;
		&-updating {
			opacity: .5;
		}
	}
	&__items {
		pre {
			white-space: pre-wrap;
		}
	}
}

.cx-vui-component.cx-vui-component--query-fullwidth {
	padding-left: 0;
	padding-right: 0;
	.cx-vui-component__control {
		max-width: 100%;
		flex: 0 0 100%;
	}
}

.cx-vui-inner-panel.query-panel {
	padding: 20px;
	.cx-vui-panel {
		margin-bottom: 20px;
	}
	> .cx-vui-component__label {
		padding: 0 0 10px;
		+ .cx-vui-component__desc {
			margin: -5px 0 0 0;
			padding: 0 0 15px;
		}
	}
}

.cx-vui-component.cx-vui-component--has-macros {
	align-items: flex-start;
}

.jet-query-macros {
	width: 32px;
	height: 32px;
	&__config {
		text-align: right;
		margin: -12px -15px 10px 0;
		&-trigger {
			color: #007cba;
			text-decoration: underline;
			text-decoration-style: dashed;
			cursor: pointer;
			font-size: 12px;
			&:hover {
				color: #7b7e81;
				text-decoration: none;
			}
		}
	}
	&__trigger {
		height: 32px;
		cursor: pointer;
		display: flex;
		align-items: center;
		align-content: center;
		justify-content: center;
		&:hover {
			svg {
				path {
					fill: #007cba;
				}
			}
		}
		svg {
			path {
				fill: #7b7e81;
			}
		}
		&-open {
			width: 24px;
			height: auto;
		}
		&-close {
			width: 24px;
			height: auto;
		}
	}
	&__value {
		position: absolute;
		left: 0;
		top: 0;
		right: 30px;
		background: #fff;
		padding: 6px 15px 4px;
		border: 2px solid #f4f4f5;
		border-radius: 4px;
		display: flex;
		justify-content: space-between;
		font-size: 13px;
		line-height: 17px;
		color: #7b7e81;
		height: 100%;
		box-sizing: border-box;
		i {
			cursor: pointer;
		}
		&-clear {
			cursor: pointer;
			padding: 5px;
			margin: -7px -12px -8px 0;
			svg {
				width: 20px;
				height: auto;
				path {
					fill: #007cba;
				}
			}
			&:hover {
				svg {
					path {
						fill: #c92c2c;
					}
				}
			}
		}
	}
	&__back {
		cursor: pointer;
		color: #007cba;
		font-weight: bold;
		text-decoration: underline;
	}
	&__title {
		padding: 0 0 10px;
	}
	&__popup {
		position: absolute;
		right: 0;
		left: 0;
		top: 36px;
		background: #fff;
		padding: 20px 30px;
		margin: 0;
		border: 1px solid #ececec;
		box-shadow: 0 2px 6px rgba( 35,40,45,.07 );
		border-radius: 6px;
		z-index: 9999;
		.cx-vui-button.cx-vui-button--style-accent {
			margin: 10px 0 5px 0;
		}
		.cx-vui-component {
			padding: 7px 0;
			&__meta {
				justify-content: center;
			}
			&__label {
				font-size: 13px;
			}
			&--mini-label {
				flex-direction: column;
				border-top: none !important;
				.cx-vui-component__meta {
					max-width: 100%;
					flex: 0 0 100%;
				}
				.cx-vui-component__label {
					font-weight: bold;
					color: #7B7E81;
				}
				.cx-vui-component__control {
					flex: 1 1 auto !important;
					max-width: 100% !important;
				}
			}
		}
	}
	&-item {
		&__name {
			font-size: 13px;
			line-height: 17px;
			color: #7b7e81;
			padding: 2px 0;
			display: flex;
			align-content: flex-start;
			cursor: pointer;
			&:hover {
				color: #23282d;
				font-weight: bold;
			}
		}
		&__mark {
			font-size: 11px;
			line-height: 12px;
			padding: 3px 5px 0 0;
		}
	}
}