.lygcs-widget {
	--lygcs-bg: #ffffff;
	--lygcs-text: #111111;
	--lygcs-muted: #777777;
	--lygcs-border: #111111;
	--lygcs-hover: #f4f4f4;
	--lygcs-mark: #fff2a8;

	position: relative;
	font: inherit;
}

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

.lygcs-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	transition:
		color 160ms ease,
		background-color 160ms ease,
		transform 160ms ease;
}

.lygcs-trigger:hover,
.lygcs-trigger:focus-visible {
	outline: none;
}

.lygcs-trigger:active {
	transform: scale(0.96);
}

.lygcs-trigger__icon {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	font-size: 22px;
	line-height: 1;
}

.lygcs-trigger__icon i,
.lygcs-trigger__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.lygcs-trigger__icon svg {
	fill: currentColor;
}

.lygcs-trigger__text {
	display: inline-block;
	line-height: 1.1;
}

body.lygcs-overlay-open {
	position: fixed;
	overflow: hidden;
	width: 100%;
}

.lygcs-overlay {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.96);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 220ms ease,
		visibility 220ms ease;
}

.lygcs-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.lygcs-overlay__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 72px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.lygcs-overlay.is-position-top .lygcs-overlay__inner {
	align-items: flex-start;
	padding-top: 120px;
}

.lygcs-overlay.is-position-center .lygcs-overlay__inner {
	align-items: center;
}

.lygcs-overlay__panel {
	position: relative;
	width: 100%;
	max-width: 820px;
	transform: translateY(18px) scale(0.985);
	opacity: 0;
	transition:
		transform 260ms cubic-bezier(.2,.8,.2,1),
		opacity 220ms ease;
}

.lygcs-overlay.is-open .lygcs-overlay__panel {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.lygcs-overlay__close {
	position: fixed;
	z-index: 2;
	top: max(20px, env(safe-area-inset-top));
	right: max(20px, env(safe-area-inset-right));
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #111;
	cursor: pointer;
	transition:
		background-color 150ms ease,
		transform 150ms ease;
}

.lygcs-overlay__close:hover,
.lygcs-overlay__close:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	outline: none;
}

.lygcs-overlay__close:active {
	transform: scale(0.94);
}

.lygcs-overlay__close svg {
	width: 52%;
	height: 52%;
}

.lygcs-searchbox {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 74px;
	border-width: 0 0 2px 0;
	border-style: solid;
	border-color: #111;
	background: transparent;
}

.lygcs-searchbox__icon {
	flex: 0 0 auto;
	width: 31px;
	height: 31px;
	margin-right: 18px;
	color: #111;
	pointer-events: none;
}

.lygcs-searchbox__input {
	appearance: none;
	width: 100%;
	min-width: 0;
	height: 74px;
	padding: 0 56px 0 0;
	margin: 0;
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #111;
	font: inherit;
	font-size: clamp(28px, 4.3vw, 56px);
	font-weight: 500;
	line-height: 1.05;
}

.lygcs-searchbox__input::placeholder {
	color: currentColor;
	opacity: 0.28;
}

.lygcs-searchbox__input::-webkit-search-cancel-button {
	display: none;
}

.lygcs-searchbox__clear {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition:
		background-color 140ms ease,
		transform 140ms ease;
}

.lygcs-searchbox__clear:hover,
.lygcs-searchbox__clear:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	outline: none;
}

.lygcs-searchbox__clear:active {
	transform: translateY(-50%) scale(0.94);
}

.lygcs-searchbox__clear svg {
	width: 22px;
	height: 22px;
}

.lygcs-searchbox__spinner {
	position: absolute;
	right: 14px;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	animation: lygcs-spin 650ms linear infinite;
}

.lygcs-widget.is-loading .lygcs-searchbox__spinner {
	opacity: 0.5;
}

.lygcs-widget.is-loading .lygcs-searchbox__clear {
	display: none;
}

.lygcs-result-count {
	margin-top: 20px;
	color: #777;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.lygcs-results {
	width: 100%;
	max-height: min(430px, 46vh);
	margin-top: 10px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.lygcs-results.is-grid,
.lygcs-results.is-loop {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.lygcs-results.is-grid .lygcs-result {
	height: 100%;
}

.lygcs-loop-result {
	min-width: 0;
	height: 100%;
	cursor: pointer;
}

.lygcs-loop-result > .elementor,
.lygcs-loop-result > .e-con,
.lygcs-loop-result > .elementor-element {
	height: 100%;
}

.lygcs-loop-result.is-active {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.lygcs-result {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 14px;
	border-radius: 12px;
	color: #111;
	text-decoration: none !important;
	transition:
		background-color 120ms ease,
		transform 120ms ease;
}

.lygcs-result__content {
	flex: 1 1 auto;
	min-width: 0;
}

.lygcs-result__image {
	flex: 0 0 auto;
	width: 72px;
	height: 72px;
	border-radius: 8px;
	object-fit: cover;
	object-position: center;
}

.lygcs-result:hover,
.lygcs-result:focus-visible,
.lygcs-result.is-active {
	background: #f4f4f4;
	outline: none;
}

.lygcs-result:active {
	transform: scale(0.995);
}

.lygcs-result__meta {
	margin-bottom: 4px;
	color: #777;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.lygcs-result__title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.28;
}

.lygcs-result__snippet {
	margin-top: 5px;
	color: #777;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
}

.lygcs-result mark {
	padding: 0 0.08em;
	border-radius: 0.16em;
	background: var(--lygcs-mark);
	color: inherit;
}


.lygcs-message {
	padding: 16px 14px;
	color: #777;
	font-size: 14px;
	line-height: 1.45;
}

.lygcs-message.is-error {
	color: #a12626;
}

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

@media (max-width: 767px) {
	.lygcs-results.is-grid,
	.lygcs-results.is-loop {
		grid-template-columns: 1fr;
	}

	.lygcs-overlay__inner,
	.lygcs-overlay.is-position-center .lygcs-overlay__inner,
	.lygcs-overlay.is-position-top .lygcs-overlay__inner {
		align-items: flex-start;
		padding-top: max(110px, calc(env(safe-area-inset-top) + 90px));
		padding-bottom: 32px;
	}

	.lygcs-searchbox {
		min-height: 62px;
	}

	.lygcs-searchbox__input {
		height: 62px;
		font-size: clamp(26px, 8vw, 38px);
	}

	.lygcs-searchbox__icon {
		width: 25px;
		height: 25px;
		margin-right: 13px;
	}

	.lygcs-result-count {
		margin-top: 16px;
	}

	.lygcs-results {
		max-height: none;
		margin-top: 8px;
	}

	.lygcs-result {
		padding-left: 8px;
		padding-right: 42px;
	}

	.lygcs-result__title {
		font-size: 17px;
	}

	.lygcs-result__snippet {
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lygcs-trigger,
	.lygcs-overlay,
	.lygcs-overlay__panel,
	.lygcs-overlay__close,
	.lygcs-searchbox__clear,
	.lygcs-result,

	.lygcs-searchbox__spinner {
		animation-duration: 1.2s;
	}
}
