/**
 * BE Note Constellation Search (home §11). Ported from reference site.css v36 (`.sbx`, `.sbx-*`)
 * plus the base helpers it uses (.pad, .sr, .stabs, .sresult, .search-res, .sr-item with the
 * v29 image well). Every hard value reads a custom property set by the widget's Style controls;
 * the fallback in each var() is the reference value.
 *
 * Buttons and the input carry `.be-site.be-site` so the Elementor kit button/input styles
 * (`.elementor-kit-5 button`, `input:not(...)`) do not override them.
 *
 * Fixed reference bug kept: the rings ignore the pointer (.sbx-ring pointer-events:none) and
 * only the chip pills take clicks, so the outer ring never blocks the inner one.
 */

.e-con .elementor-widget-be-note-search {
	width: 100%;
}

.be-sbx.sbx {
	position: relative;
	overflow: hidden;
	color: var(--be-sbx-title, #F6ECE3);
	background:
		radial-gradient(50% 70% at 75% 50%, var(--be-sbx-glow, rgba(190, 70, 30, .22)), transparent 70%),
		radial-gradient(1px 1px at 20% 30%, rgba(255, 230, 200, .5), transparent),
		var(--be-sbx-bg, #0D0807);
	font-family: var(--f);
	font-size: 15px;
	line-height: 1.7;
}

.be-sbx.sbx::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(1px 1px at 12% 20%, var(--be-sbx-stars, rgba(255, 235, 210, .35)) 50%, transparent 51%),
		radial-gradient(1px 1px at 37% 70%, var(--be-sbx-stars, rgba(255, 235, 210, .3)) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 58% 12%, var(--be-sbx-stars, rgba(255, 235, 210, .35)) 50%, transparent 51%),
		radial-gradient(1px 1px at 88% 82%, var(--be-sbx-stars, rgba(255, 235, 210, .3)) 50%, transparent 51%),
		radial-gradient(1px 1px at 70% 40%, var(--be-sbx-stars, rgba(255, 235, 210, .25)) 50%, transparent 51%);
	pointer-events: none;
}

.be-sbx .pad {
	padding-left: var(--gl);
	padding-right: var(--gr);
}

.be-sbx .sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.be-sbx .sbx-in {
	position: relative;
	max-width: 1640px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(30px, 5vw, 80px);
	align-items: center;
	padding-top: var(--be-sbx-pad, clamp(70px, 8vw, 120px));
	padding-bottom: var(--be-sbx-pad, clamp(70px, 8vw, 120px));
}

/* ---------- left: texts ---------- */
.be-sbx .sbx-k {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	font: 500 10.5px var(--f);
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--be-sbx-k, #E9C987);
}

.be-sbx .sbx-k i {
	width: 30px;
	height: 1px;
	flex: none;
	background: var(--be-sbx-k-line, #C9A35A);
}

.be-sbx .sbx-title {
	margin: 18px 0 0;
	padding: 0;
	font-family: var(--f-serif);
	font-weight: 500;
	font-size: clamp(44px, 5.2vw, 82px);
	line-height: 1;
	letter-spacing: -.01em;
	text-wrap: balance;
	color: var(--be-sbx-title, #F6ECE3);
}

.be-sbx .sbx-l > .sbx-title:first-child {
	margin-top: 0;
}

.be-sbx .sbx-title em {
	font-style: italic;
	background: linear-gradient(90deg, var(--be-sbx-em-1, #F3D9A0), var(--be-sbx-em-2, #E08A4E));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.be-sbx .sbx-p {
	margin: 20px 0 0;
	max-width: 440px;
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--be-sbx-p, rgba(246, 236, 227, .62));
}

/* ---------- switch ---------- */
.be-sbx .sbx-switch {
	position: relative;
	display: inline-grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-top: 30px;
	padding: 4px;
	border-radius: 999px;
	border: 1px solid var(--be-sbx-sw-border, rgba(233, 201, 135, .3));
	background: var(--be-sbx-sw-bg, rgba(255, 255, 255, .03));
}

.be-site.be-site .be-sbx .sbx-switch button {
	position: relative;
	z-index: 1;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: none;
	padding: 10px 26px;
	font-family: var(--f);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.7;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--be-sbx-sw-text, rgba(246, 236, 227, .65));
	cursor: pointer;
	transition: color .3s;
}

.be-site.be-site .be-sbx .sbx-switch button[aria-pressed="true"] {
	color: var(--be-sbx-sw-active, #1B0B07);
}

.be-site.be-site .be-sbx .sbx-switch button:focus-visible {
	outline: 2px solid var(--amber);
	outline-offset: 3px;
}

.be-sbx .sbx-knob {
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 4px;
	width: calc(50% - 4px);
	border-radius: 999px;
	background: linear-gradient(135deg, var(--be-sbx-knob-1, #F3D9A0), var(--be-sbx-knob-2, #C9A35A));
	transition: transform .45s cubic-bezier(.3, .7, .2, 1);
}

.be-sbx .sbx-switch.note .sbx-knob {
	transform: translateX(100%);
}

/* ---------- field ---------- */
.be-sbx .sbx-form {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 26px 0 0;
	max-width: 540px;
	border-bottom: 1px solid var(--be-sbx-line, rgba(233, 201, 135, .45));
	transition: border-color .3s;
}

.be-sbx .sbx-form:focus-within {
	border-bottom-color: var(--be-sbx-line-focus, #F3D9A0);
}

.be-site.be-site .be-sbx .sbx-form input {
	flex: 1;
	min-width: 0;
	height: auto;
	margin: 0;
	background: none;
	border: 0;
	border-radius: 0;
	outline: 0;
	box-shadow: none;
	color: var(--be-sbx-input, #F6ECE3);
	padding: 16px 0;
	font-family: var(--f-serif);
	font-size: clamp(20px, 1.8vw, 26px);
	font-weight: 400;
	line-height: normal;
	-webkit-appearance: none;
	appearance: none;
}

.be-site.be-site .be-sbx .sbx-form input::placeholder {
	color: var(--be-sbx-ph, rgba(246, 236, 227, .35));
	font-style: italic;
	opacity: 1;
}

.be-sbx .sbx-form input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.be-site.be-site .be-sbx .sbx-form button {
	flex: none;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	border: 0;
	display: grid;
	place-items: center;
	cursor: pointer;
	background: var(--be-sbx-btn, #F6ECE3);
	color: var(--be-sbx-btn-icon, #1B0B07);
	transition: transform .3s, background .3s;
}

.be-site.be-site .be-sbx .sbx-form button:hover,
.be-site.be-site .be-sbx .sbx-form button:focus-visible {
	transform: scale(1.06);
	background: var(--be-sbx-btn-hover, #F3D9A0);
	color: var(--be-sbx-btn-icon, #1B0B07);
}

.be-site.be-site .be-sbx .sbx-form button:focus:not(:focus-visible) {
	background: var(--be-sbx-btn, #F6ECE3);
	color: var(--be-sbx-btn-icon, #1B0B07);
}

.be-sbx .sbx-form button svg,
.be-sbx .sbx-form button i {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

/* ---------- popular chips ---------- */
.be-sbx .sbx-pop {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin-top: 18px;
}

.be-sbx .sbx-pop > span {
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--be-sbx-pop, rgba(246, 236, 227, .4));
	margin-right: 4px;
}

.be-site.be-site .be-sbx .sbx-chip {
	margin: 0;
	background: none;
	border: 0;
	border-bottom: 1px solid transparent;
	border-radius: 0;
	padding: 4px 0;
	cursor: pointer;
	font-family: var(--f);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	color: var(--be-sbx-chip, rgba(246, 236, 227, .8));
	transition: all .25s;
}

.be-site.be-site .be-sbx .sbx-chip:hover,
.be-site.be-site .be-sbx .sbx-chip:focus-visible {
	background: none;
	color: var(--be-sbx-chip-hover, #F3D9A0);
	border-bottom-color: var(--be-sbx-chip-hover, #F3D9A0);
}

.be-site.be-site .be-sbx button.sbx-chip:focus:not(:focus-visible) {
	background: none;
}

/* ---------- right: constellation ---------- */
.be-sbx .sbx-r {
	--r1: clamp(110px, 10vw, 150px);
	--r2: clamp(190px, 17.5vw, 255px);
	position: relative;
	aspect-ratio: 1;
	width: min(100%, 560px);
	justify-self: center;
}

.be-sbx .sbx-core {
	position: absolute;
	left: 50%;
	top: 50%;
	width: clamp(90px, 8vw, 120px);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 40% 35%, var(--be-sbx-core-1, #FFC27A), var(--be-sbx-core-2, #E06A2A) 45%, var(--be-sbx-core-3, #7A1E0C) 100%);
	box-shadow: 0 0 60px var(--be-sbx-core-glow, rgba(240, 106, 42, .55)), 0 0 120px color-mix(in srgb, var(--be-sbx-core-glow, rgba(240, 106, 42, .55)) 45%, transparent);
}

/* Glow pulse (reference animates box-shadow; here a glow layer fades in and out: opacity only). */
.be-sbx .sbx-core::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	pointer-events: none;
	box-shadow: 0 0 80px var(--be-sbx-core-glow, rgba(240, 106, 42, .55)), 0 0 160px color-mix(in srgb, var(--be-sbx-core-glow, rgba(240, 106, 42, .55)) 55%, transparent);
	opacity: 0;
	animation: be-sbxpulse 4s ease-in-out infinite;
}

.be-sbx .sbx-core b {
	font-family: var(--f-serif);
	font-size: 34px;
	font-weight: 700;
	line-height: 1;
	color: var(--be-sbx-core-b, #fff);
}

.be-sbx .sbx-core small {
	font-size: 9.5px;
	line-height: 1.7;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--be-sbx-core-s, rgba(255, 240, 225, .85));
}

.be-sbx .sbx-orbit {
	position: absolute;
	left: 50%;
	top: 50%;
	border-radius: 50%;
	border: 1px dashed var(--be-sbx-orbit, rgba(233, 201, 135, .2));
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.be-sbx .sbx-orbit.o1 {
	width: calc(var(--r1) * 2);
	height: calc(var(--r1) * 2);
}

.be-sbx .sbx-orbit.o2 {
	width: calc(var(--r2) * 2);
	height: calc(var(--r2) * 2);
}

.be-sbx .sbx-ring {
	position: absolute;
	inset: 0;
	pointer-events: none;
	animation: be-sbxspin var(--be-sbx-r1-dur, 70s) linear infinite;
}

.be-sbx .sbx-ring.r2 {
	animation-duration: var(--be-sbx-r2-dur, 110s);
	animation-direction: reverse;
}

.be-site.be-site .be-sbx .sbx-n {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	padding: 0;
	background: none;
	font-family: var(--f);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: normal;
	text-transform: none;
	color: inherit;
	cursor: pointer;
	transform: rotate(var(--a)) translateX(var(--r));
}

.be-sbx .sbx-n span {
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	padding: 9px 14px;
	border-radius: 999px;
	white-space: nowrap;
	transform: translate(-50%, -50%) rotate(calc(-1 * var(--a)));
	background: var(--be-sbx-n-bg, rgba(20, 12, 10, .85));
	border: 1px solid var(--be-sbx-n-border, rgba(233, 201, 135, .35));
	color: var(--be-sbx-n-text, #F6ECE3);
	pointer-events: auto;
	cursor: pointer;
	transition: background .3s, border-color .3s, box-shadow .3s;
	animation: be-sbxkeep var(--be-sbx-r1-dur, 70s) linear infinite;
}

.be-sbx .sbx-ring.r2 .sbx-n span {
	animation-duration: var(--be-sbx-r2-dur, 110s);
	animation-direction: reverse;
}

/* Outer ring turning the same way as the inner one. */
.be-sbx.sbx-same-way .sbx-ring.r2,
.be-sbx.sbx-same-way .sbx-ring.r2 .sbx-n span {
	animation-direction: normal;
}

.be-sbx .sbx-n b {
	font-family: var(--f-serif);
	font-weight: 600;
	font-size: 17px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
}

.be-sbx .sbx-n small {
	font-size: 9px;
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: .14em;
	color: var(--be-sbx-n-count, #E9C987);
}

.be-sbx .sbx-n:hover span,
.be-sbx .sbx-n:focus-visible span,
.be-sbx .sbx-n.on span {
	background: linear-gradient(135deg, var(--be-sbx-knob-1, #F3D9A0), var(--be-sbx-knob-2, #C9A35A));
	border-color: transparent;
	color: var(--be-sbx-n-on-text, #1B0B07);
	box-shadow: 0 0 30px color-mix(in srgb, var(--be-sbx-knob-1, #F3D9A0) 40%, transparent);
}

.be-sbx .sbx-n:hover small,
.be-sbx .sbx-n:focus-visible small,
.be-sbx .sbx-n.on small {
	color: var(--be-sbx-n-on-count, #5A3A12);
}

.be-site.be-site .be-sbx .sbx-n:focus-visible {
	outline: 0;
}

.be-sbx .sbx-n:focus-visible span {
	outline: 2px solid var(--amber);
	outline-offset: 3px;
}

.be-sbx.sbx-hover-pause .sbx-r:hover .sbx-ring,
.be-sbx.sbx-hover-pause .sbx-r:hover .sbx-n span,
.be-sbx .sbx-r:focus-within .sbx-ring,
.be-sbx .sbx-r:focus-within .sbx-n span,
.be-sbx.is-paused .sbx-ring,
.be-sbx.is-paused .sbx-n span,
.be-sbx.is-paused .sbx-core::after {
	animation-play-state: paused;
}

/* Still version: animation off in the widget, or reduced motion. */
.be-sbx[data-anim="0"] .sbx-ring,
.be-sbx[data-anim="0"] .sbx-n span,
.be-sbx.sbx-no-pulse .sbx-core::after {
	animation: none;
}

@keyframes be-sbxpulse {
	50% { opacity: .75; }
}

@keyframes be-sbxspin {
	to { transform: rotate(360deg); }
}

@keyframes be-sbxkeep {
	from { rotate: 0deg; }
	to { rotate: -360deg; }
}

/* ---------- results ---------- */
.be-sbx .sbx-res {
	grid-column: 1 / -1;
	width: 100%;
	max-width: none;
	margin: 10px 0 0;
	justify-self: stretch;
	text-align: left;
}

.be-sbx .sbx-res:empty {
	display: none;
}

.be-sbx .sbx-res .search-res {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--be-sbx-res-min, 260px)), 1fr));
	gap: 12px;
	margin-top: 0;
	max-height: var(--be-sbx-res-max-h, 560px);
	overflow-y: auto;
	padding: 4px 6px 4px 0;
	scrollbar-width: thin;
	scrollbar-color: rgba(233, 201, 135, .4) transparent;
}

.be-sbx .sbx-res .sr-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	border-radius: 14px;
	background: var(--be-sbx-res-bg, rgba(255, 255, 255, .04));
	border: 1px solid var(--be-sbx-res-border, rgba(233, 201, 135, .16));
	color: var(--be-sbx-res-name, #F6ECE3);
	text-decoration: none;
	transition: background .25s, border-color .25s, transform .25s;
}

.be-sbx .sbx-res .sr-item:hover,
.be-sbx .sbx-res .sr-item:focus-visible {
	background: var(--be-sbx-res-hover-bg, rgba(233, 201, 135, .1));
	border-color: var(--be-sbx-res-hover-border, rgba(233, 201, 135, .45));
	color: var(--be-sbx-res-name, #F6ECE3);
	transform: translateY(-2px);
}

.be-sbx .sbx-res .sr-item img {
	display: block;
	flex: none;
	width: 56px;
	height: 56px;
	max-width: none;
	border-radius: 10px;
	object-fit: contain;
	padding: 6px;
	background: radial-gradient(85% 75% at 50% 32%, #FCF8F1 0%, #F1E7D9 55%, #E2D3BF 100%);
	box-shadow: inset 0 0 0 1px rgba(120, 90, 60, .10);
}

.be-sbx .sbx-res .sr-item span {
	min-width: 0;
}

.be-sbx .sbx-res .sr-item b {
	display: block;
	font-family: var(--f-serif);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
}

.be-sbx .sbx-res .sr-item small {
	display: block;
	font-size: 11px;
	line-height: 1.7;
	color: var(--be-sbx-res-meta, rgba(246, 236, 227, .55));
	margin-top: 3px;
}

.be-sbx .sbx-res .search-none {
	margin: 18px 0 0;
	font-size: 15px;
	text-align: center;
	color: var(--be-sbx-res-none, rgba(246, 236, 227, .7));
}

.be-sbx .sbx-res[aria-busy="true"] .search-res {
	opacity: .6;
	transition: opacity .2s;
}

/* ---------- responsive (reference v36) ---------- */
@media (max-width: 1000px) {
	.be-sbx .sbx-in {
		grid-template-columns: 1fr;
	}

	.be-sbx .sbx-r {
		width: min(100%, 460px);
		--r1: clamp(90px, 24vw, 130px);
		--r2: clamp(150px, 40vw, 210px);
	}
}

@media (max-width: 560px) {
	.be-sbx .sbx-r {
		--r1: 74px;
		--r2: 132px;
		width: 100%;
	}

	.be-sbx .sbx-core {
		width: 76px;
	}

	.be-sbx .sbx-core b {
		font-size: 26px;
	}

	.be-sbx .sbx-n span {
		padding: 5px 9px;
	}

	.be-sbx .sbx-n b {
		font-size: 13px;
	}

	.be-sbx .sbx-n small {
		font-size: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.be-sbx .sbx-ring,
	.be-sbx .sbx-n span,
	.be-sbx .sbx-core::after {
		animation: none;
	}

	.be-sbx .sbx-knob,
	.be-sbx .sbx-res .sr-item {
		transition: none;
	}
}
