.chb-widget {
	--chb-primary: #1f2b3a;
	--chb-button-text: #fff;
	--chb-bg: #f8f5ef;
	--chb-border: #e4d9c9;
	--chb-text: #182230;
	--chb-height: 980px;
	--chb-height-mobile: 1250px;
	box-sizing: border-box;
	width: 100%;
	color: var(--chb-text);
	font-family: inherit;
}

.chb-widget *,
.chb-widget *::before,
.chb-widget *::after {
	box-sizing: border-box;
}

.chb-heading {
	margin: 0 0 14px;
	text-align: center;
}

.chb-heading h2 {
	margin: 0 0 4px;
	color: var(--chb-text);
	font-size: clamp(24px, 3vw, 34px);
	line-height: 1.2;
}

.chb-heading p {
	margin: 0;
	font-size: 14px;
	opacity: .75;
}

.chb-search-form {
	display: grid;
	grid-template-columns: repeat(4, minmax(130px, 1fr));
	gap: 10px;
	align-items: end;
	padding: 18px;
	border: 1px solid var(--chb-border);
	border-radius: 12px;
	background: var(--chb-bg);
	box-shadow: 0 4px 18px rgba(20, 30, 45, .04);
}

.chb-layout-vertical .chb-search-form {
	grid-template-columns: 1fr;
}

.chb-field {
	min-width: 0;
}

.chb-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 700;
}

.chb-field input,
.chb-field select {
	display: block;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid color-mix(in srgb, var(--chb-border) 78%, #7b8796);
	border-radius: 8px;
	background: #fff;
	color: var(--chb-text);
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
}

.chb-field input:focus,
.chb-field select:focus {
	outline: 2px solid color-mix(in srgb, var(--chb-primary) 42%, transparent);
	outline-offset: 1px;
	border-color: var(--chb-primary);
}

.chb-submit-wrap {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
	padding-top: 8px;
}

.chb-layout-vertical .chb-submit-wrap {
	padding-top: 0;
}

.chb-submit {
	min-height: 46px;
	min-width: 210px;
	padding: 11px 24px;
	border: 0;
	border-radius: 7px;
	background: var(--chb-primary);
	color: var(--chb-button-text);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .15s ease, filter .15s ease;
}

.chb-submit:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.chb-submit:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--chb-primary) 35%, #fff);
	outline-offset: 2px;
}

.chb-form-error {
	grid-column: 1 / -1;
	display: none;
	margin: 0;
	color: #9d1c1c;
	font-size: 13px;
	text-align: center;
}

.chb-form-error.is-visible {
	display: block;
}

.chb-engine-wrap {
	position: relative;
	width: 100%;
	margin-top: 12px;
	overflow: hidden;
	border: 1px solid var(--chb-border);
	border-radius: 12px;
	background: #fff;
}

.chb-engine-wrap.is-standalone {
	margin-top: 0;
}

.chb-engine-frame {
	display: block;
	width: 100%;
	height: var(--chb-height);
	border: 0;
	background: #fff;
}

.chb-loader {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 12px;
	background: rgba(255, 255, 255, .94);
	font-size: 13px;
	transition: opacity .2s ease, visibility .2s ease;
}

.chb-loader.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.chb-loader span {
	width: 18px;
	height: 18px;
	border: 2px solid #d5dce4;
	border-top-color: var(--chb-primary);
	border-radius: 50%;
	animation: chb-spin .75s linear infinite;
}

@keyframes chb-spin {
	to { transform: rotate(360deg); }
}

.chb-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(9, 16, 26, .78);
}

.chb-modal[hidden] {
	display: none;
}

.chb-modal-dialog {
	position: relative;
	width: min(1180px, 100%);
	height: min(92vh, 1100px);
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 22px 80px rgba(0, 0, 0, .32);
}

.chb-modal-frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.chb-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(20, 30, 45, .9);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

body.chb-modal-open {
	overflow: hidden;
}

@media (max-width: 820px) {
	.chb-search-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.chb-engine-frame {
		height: var(--chb-height-mobile);
	}
}

@media (max-width: 520px) {
	.chb-heading h2 {
		font-size: 24px;
	}

	.chb-search-form {
		grid-template-columns: 1fr;
		padding: 14px;
	}

	.chb-submit {
		width: 100%;
		min-width: 0;
	}

	.chb-modal {
		padding: 0;
	}

	.chb-modal-dialog {
		width: 100%;
		height: 100%;
		border-radius: 0;
	}
}
