/* ============================================================
 * Shelly Jordan Experience Centre: overlay UI
 * Dark glass over the 3D canvas. Thin large type, hairlines,
 * restrained brand blue, flat corners to match the store.
 * ========================================================== */
.sx {
	--sx-ink: #FDFDFD;
	--sx-dim: rgba(253, 253, 253, 0.64);
	--sx-faint: rgba(253, 253, 253, 0.4);
	--sx-line: rgba(255, 255, 255, 0.12);
	--sx-glass: rgba(11, 20, 25, 0.62);
	--sx-glass-strong: rgba(11, 20, 25, 0.86);
	--sx-blue: #4594D1;
	--sx-brand: #0361A7;
	--sx-alert: #D1223E;
	--sx-ok: #38E07B;
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	min-height: 560px;
	overflow: hidden;
	background: radial-gradient(120% 90% at 50% 40%, #1B212B 0%, #0B1419 70%);
	color: var(--sx-ink);
	font-family: 'Manrope', system-ui, -apple-system, sans-serif;
	-webkit-font-smoothing: antialiased;
	isolation: isolate;
}
.admin-bar .sx { height: calc(100vh - 32px); height: calc(100dvh - 32px); }
.sx *, .sx *::before, .sx *::after { box-sizing: border-box; }
/* :where() keeps these resets at zero specificity so component rules always win. */
.sx :where(button) { font: inherit; color: inherit; cursor: pointer; }
.sx :where(a) { color: inherit; text-decoration: none; }
.sx :focus-visible { outline: 2px solid var(--sx-blue); outline-offset: 2px; }
.sx-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; touch-action: none; opacity: 0; transition: opacity 900ms ease; }
.sx--ready .sx-canvas { opacity: 1; }
.sx-ui { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.sx-ui > * { pointer-events: auto; }

/* ---------- top bar ---------- */
.sx-top {
	position: absolute; top: 0; left: 0; right: 0;
	display: flex; align-items: center; gap: 20px;
	padding: 18px 28px;
	background: linear-gradient(180deg, rgba(7, 8, 8, 0.78) 0%, rgba(7, 8, 8, 0) 100%);
}
.sx-back { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; font-size: 13px; font-weight: 600; color: var(--sx-dim); border: 1px solid var(--sx-line); background: var(--sx-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: color 160ms ease, border-color 160ms ease; }
.sx-back:hover { color: var(--sx-ink); border-color: rgba(255, 255, 255, 0.3); }
.sx-store-switch { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:0 12px; color:#fff!important; background:#0361a7; border:1px solid rgba(255,255,255,.32); font-size:11px; font-weight:800; white-space:nowrap; }
.sx-store-switch:hover { background:#087cc8; }
@media(max-width:780px) { .sx-store-switch { padding:0 7px; font-size:10px; } }
.sx-brand { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.sx-brand strong { font-size: 17px; font-weight: 400; letter-spacing: -0.01em; }
.sx-brand span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sx-faint); }
.sx-top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sx-scenes { display: flex; gap: 6px; }
.sx-chip { height: 40px; padding: 0 14px; font-size: 12.5px; font-weight: 600; color: var(--sx-dim); background: var(--sx-glass); border: 1px solid var(--sx-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: all 160ms ease; }
.sx-chip:hover { color: #0B1419; background: var(--sx-ink); border-color: var(--sx-ink); }
.sx-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; color: var(--sx-dim); background: var(--sx-glass); border: 1px solid var(--sx-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: all 160ms ease; }
.sx-icon:hover { color: var(--sx-ink); border-color: rgba(255, 255, 255, 0.3); }
.sx-icon--ghost { background: none; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.sx-meter { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; background: var(--sx-glass); border: 1px solid var(--sx-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color 160ms ease; }
.sx-meter:hover { border-color: var(--sx-blue); }
.sx-meter svg { color: var(--sx-blue); }
.sx-meter__w { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 66px; text-align: left; }
.sx-meter__c { font-size: 12px; color: var(--sx-faint); font-variant-numeric: tabular-nums; padding-left: 10px; border-left: 1px solid var(--sx-line); }

/* ---------- room rail ---------- */
.sx-rail { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--sx-glass); border: 1px solid var(--sx-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.sx-rail__btn { position: relative; padding: 11px 16px 11px 18px; text-align: left; font-size: 13px; font-weight: 600; color: var(--sx-dim); background: none; border: 0; white-space: nowrap; transition: color 160ms ease, background 160ms ease; }
.sx-rail__btn::before { content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0; background: var(--sx-blue); transform: translateY(-50%); transition: height 200ms ease; }
.sx-rail__btn:hover { color: var(--sx-ink); background: rgba(255, 255, 255, 0.05); }
.sx-rail__btn[aria-current="true"] { color: var(--sx-ink); }
.sx-rail__btn[aria-current="true"]::before { height: 60%; }

/* ---------- hotspots ---------- */
.sx-spots { position: absolute; inset: 0; pointer-events: none !important; overflow: hidden; }
.sx-spot { position: absolute; left: 0; top: 0; margin: -17px 0 0 -17px; display: inline-flex; align-items: center; gap: 0; height: 34px; padding: 0; background: none; border: 0; pointer-events: auto; will-change: transform; transition: opacity 200ms ease; }
.sx-spot.is-off { opacity: 0; pointer-events: none; }
.sx-spot__dot { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(3, 97, 167, 0.94); border: 1.5px solid rgba(255, 255, 255, 0.9); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45); transition: transform 180ms ease, background 180ms ease; }
.sx-spot__dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgba(69, 148, 209, 0.7); animation: sx-pulse 2.6s ease-out infinite; }
.sx-spot__dot i { font-style: normal; font-size: 12px; font-weight: 700; color: #fff; }
.sx-spot__label { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--sx-ink); background: var(--sx-glass-strong); border: 1px solid var(--sx-line); border-left: 0; margin-left: -8px; padding: 0; height: 28px; line-height: 26px; opacity: 0; transition: max-width 240ms ease, padding 240ms ease, opacity 200ms ease; }
.sx-spot:hover .sx-spot__label, .sx-spot:focus-visible .sx-spot__label, .sx-spot.is-active .sx-spot__label { max-width: 220px; padding: 0 12px 0 16px; opacity: 1; }
.sx-spot:hover .sx-spot__dot, .sx-spot.is-active .sx-spot__dot { transform: scale(1.12); background: #fff; }
.sx-spot:hover .sx-spot__dot i, .sx-spot.is-active .sx-spot__dot i { color: var(--sx-brand); }
@keyframes sx-pulse { 0% { transform: scale(0.85); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- device panel ---------- */
.sx-panel { position: absolute; top: 88px; right: 28px; bottom: 28px; width: 380px; max-width: calc(100% - 56px); padding: 22px 24px 24px; overflow-y: auto; overscroll-behavior: contain; background: var(--sx-glass-strong); border: 1px solid var(--sx-line); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8); animation: sx-in 320ms ease both; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.sx-panel[hidden] { display: none; }
@keyframes sx-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.sx-panel__head { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 8px 0; }
.sx-eyebrow { margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sx-blue); }
.sx-eyebrow--gap { margin: 24px 0 10px; color: var(--sx-faint); }
.sx-panel__title:focus-visible { outline: none; }
.sx-panel__title { margin: 0 0 10px; font-size: 30px; line-height: 1.08; font-weight: 300; letter-spacing: -0.02em; outline: none; }
.sx-tag { display: inline-block; padding: 5px 10px; font-size: 11.5px; font-weight: 700; color: var(--sx-ink); background: rgba(69, 148, 209, 0.16); border: 1px solid rgba(69, 148, 209, 0.4); }
.sx-panel__body { margin: 16px 0 20px; font-size: 14.5px; line-height: 1.6; color: var(--sx-dim); }
.sx-controls { display: grid; gap: 4px; padding: 6px 0; border-top: 1px solid var(--sx-line); border-bottom: 1px solid var(--sx-line); }
.sx-ctl { padding: 10px 0; }
.sx-ctl__label { font-size: 13.5px; font-weight: 600; color: var(--sx-ink); }
.sx-ctl__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.sx-ctl__val { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sx-blue); }
.sx-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0; background: none; border: 0; }
.sx-toggle__track { position: relative; width: 46px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); transition: background 200ms ease; }
.sx-toggle__knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 200ms ease; }
.sx-toggle[aria-checked="true"] .sx-toggle__track { background: var(--sx-blue); }
.sx-toggle[aria-checked="true"] .sx-toggle__knob { transform: translateX(20px); }
.sx input[type="range"] { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: none; border-radius: 0 !important; cursor: pointer; }
.sx input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--sx-blue) var(--p), rgba(255, 255, 255, 0.16) var(--p)); }
.sx input[type="range"]::-moz-range-track { height: 3px; background: linear-gradient(90deg, var(--sx-blue) var(--p), rgba(255, 255, 255, 0.16) var(--p)); }
.sx input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7.5px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.sx input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; }
.sx-ctl--segmented { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sx-seg { display: inline-flex; border: 1px solid var(--sx-line); }
.sx-seg__btn { padding: 8px 14px; font-size: 12.5px; font-weight: 700; color: var(--sx-dim); background: none; border: 0; border-left: 1px solid var(--sx-line); transition: all 160ms ease; }
.sx-seg__btn:first-child { border-left: 0; }
.sx-seg__btn[aria-pressed="true"] { color: #0B1419; background: var(--sx-ink); }
.sx-action { width: 100%; height: 44px; font-size: 13.5px; font-weight: 700; color: var(--sx-ink); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--sx-line); transition: all 160ms ease; }
.sx-action:hover { background: var(--sx-ink); color: #0B1419; border-color: var(--sx-ink); }
.sx-action[data-tone="alert"] { border-color: rgba(209, 34, 62, 0.55); color: #F9CAD5; }
.sx-action[data-tone="alert"]:hover { background: var(--sx-alert); border-color: var(--sx-alert); color: #fff; }
.sx-reads { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 18px 0 0; background: var(--sx-line); border: 1px solid var(--sx-line); }
.sx-reads > div { padding: 12px 14px; background: rgba(11, 20, 25, 0.9); }
.sx-reads dt { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sx-faint); margin-bottom: 5px; }
.sx-reads dd { margin: 0; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sx-reads > div[data-alert] dd { color: var(--sx-alert); font-weight: 700; font-size: 13.5px; letter-spacing: 0.04em; }
.sx-note { margin: 14px 0 0; padding: 9px 12px; font-size: 12.5px; line-height: 1.5; color: var(--sx-dim); border-left: 2px solid var(--sx-blue); background: rgba(255, 255, 255, 0.04); }
.sx-prod { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; margin-top: 8px; border: 1px solid var(--sx-line); background: rgba(255, 255, 255, 0.03); }
.sx-prod--main { border-color: rgba(69, 148, 209, 0.45); background: rgba(69, 148, 209, 0.08); }
.sx-prod img { width: 56px; height: 56px; object-fit: contain; background: #fff; }
.sx-prod__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sx-prod__name { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.sx-prod__name:hover { color: var(--sx-blue); }
.sx-prod__price { font-size: 13px; color: var(--sx-dim); font-variant-numeric: tabular-nums; }
.sx-prod__add { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; font-size: 12.5px; font-weight: 700; color: #0B1419; background: var(--sx-ink); transition: background 160ms ease, color 160ms ease; }
.sx-prod__add:hover { background: var(--sx-blue); color: #fff; }
.sx-next { width: 100%; display: flex; align-items: center; gap: 6px; margin-top: 22px; padding: 14px 0 0; font-size: 13px; color: var(--sx-faint); background: none; border: 0; border-top: 1px solid var(--sx-line); text-align: left; }
.sx-next strong { color: var(--sx-ink); font-weight: 700; margin-right: auto; }
.sx-next:hover strong, .sx-next:hover svg { color: var(--sx-blue); }

/* ---------- tray, toasts, hint ---------- */
.sx-tray { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 22px; padding: 10px 10px 10px 20px; background: var(--sx-glass-strong); border: 1px solid var(--sx-line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: sx-up 360ms ease both; }
.sx-tray[hidden] { display: none; }
@keyframes sx-up { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sx-tray__info { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.sx-tray__info strong { font-size: 13.5px; font-weight: 700; }
.sx-tray__info span { font-size: 12px; color: var(--sx-dim); font-variant-numeric: tabular-nums; }
.sx-tray__go { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; font-size: 13.5px; font-weight: 700; color: #0B1419 !important; background: var(--sx-ink); white-space: nowrap; transition: all 160ms ease; }
.sx-tray__go:hover { background: var(--sx-blue); color: #fff !important; }
.sx-toasts { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none !important; width: min(440px, calc(100% - 40px)); }
.sx-toast { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; background: var(--sx-glass-strong); border: 1px solid var(--sx-line); border-left: 3px solid var(--sx-blue); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); opacity: 0; transform: translateY(-10px); transition: opacity 320ms ease, transform 320ms ease; }
.sx-toast.is-in { opacity: 1; transform: none; }
.sx-toast[data-tone="alert"] { border-left-color: var(--sx-alert); }
.sx-toast strong { font-size: 13.5px; font-weight: 700; }
.sx-toast span { font-size: 12.5px; line-height: 1.45; color: var(--sx-dim); }
.sx-hint { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); margin: 0; padding: 9px 16px; font-size: 12.5px; color: var(--sx-dim); background: var(--sx-glass); border: 1px solid var(--sx-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); white-space: nowrap; pointer-events: none !important; transition: opacity 600ms ease; }
.sx-hint.is-gone { opacity: 0; }

/* ---------- loader + fallback ---------- */
.sx-loader { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 40%, #121519 0%, #070808 75%); transition: opacity 800ms ease, visibility 0s linear 800ms; }
.sx-loader.is-done { opacity: 0; visibility: hidden; }
.sx-loader__inner { width: min(420px, 80%); text-align: center; }
.sx-loader__brand { margin: 0 0 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--sx-blue); }
.sx-loader__title { margin: 0 0 34px; font-size: clamp(34px, 6vw, 56px); font-weight: 200; letter-spacing: -0.03em; line-height: 1; color: var(--sx-ink); }
.sx-loader__bar { height: 1px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.sx-loader__bar span { display: block; height: 100%; background: var(--sx-ink); transform-origin: left; transform: scaleX(0.04); transition: transform 400ms ease; }
.sx-loader__note { margin: 16px 0 0; font-size: 12.5px; color: var(--sx-faint); }
.sx-fallback { display: none; }
.sx--nowebgl .sx-fallback { display: block; position: absolute; inset: 0; z-index: 6; overflow: auto; padding: 120px 28px 60px; background: #0B1419; }
.sx-fallback ul { list-style: none; margin: 24px auto 0; padding: 0; max-width: 900px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sx-fallback a { display: block; padding: 16px; border: 1px solid var(--sx-line); font-weight: 600; }
.sx-fallback h2 { max-width: 900px; margin: 0 auto; font-weight: 300; font-size: 30px; }

/* ---------- small screens: rail becomes a strip, panel a bottom sheet ---------- */
@media (max-width: 900px) {
	.sx-top { padding: 12px 14px; gap: 10px; }
	.sx-brand span, .sx-back span, .sx-scenes, .sx-meter__c { display: none; }
	.sx-brand strong { font-size: 15px; }
	.sx-back { padding: 0; width: 40px; justify-content: center; }
	.sx-rail { left: 0; right: 0; top: 64px; transform: none; flex-direction: row; gap: 0; padding: 0 8px; overflow-x: auto; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; scrollbar-width: none; }
	.sx-rail::-webkit-scrollbar { display: none; }
	.sx-rail__btn { padding: 9px 12px; font-size: 12.5px; background: var(--sx-glass); border: 1px solid var(--sx-line); margin-right: 6px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
	.sx-rail__btn::before { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 2px; transform: scaleX(0); transition: transform 200ms ease; }
	.sx-rail__btn[aria-current="true"]::before { height: 2px; transform: scaleX(1); }
	.sx-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 56dvh; padding: 18px 18px 22px; border-width: 1px 0 0; animation-name: sx-sheet; }
	@keyframes sx-sheet { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
	.sx-panel__title { font-size: 24px; }
	.sx-tray { left: 12px; right: 12px; bottom: 12px; transform: none; justify-content: space-between; animation: none; }
	.sx-ui:has(.sx-panel:not([hidden])) .sx-tray, .sx-ui:has(.sx-panel:not([hidden])) .sx-hint { display: none; }
	.sx-hint { bottom: 84px; white-space: normal; width: calc(100% - 40px); text-align: center; }
	.sx-toasts { top: 112px; }
	.sx-spot__label { display: none; }
	.sx-spot { margin: -14px 0 0 -14px; height: 28px; }
	.sx-spot__dot { width: 28px; height: 28px; }
	.sx-spot__dot i { font-size: 11px; }
	.sx-spot__dot::after { inset: -5px; }
}
@media (prefers-reduced-motion: reduce) {
	.sx-spot__dot::after, .sx-panel, .sx-tray { animation: none; }
	.sx-canvas, .sx-toast, .sx-loader { transition: none; }
}

/* ---------- page chrome: the experience page is an app, not a document ---------- */
.shelly-experience-page { margin: 0; background: #0B1419; overflow: hidden; }
.shelly-experience-page .wp-site-blocks { padding: 0 !important; margin: 0; max-width: none; }
.shelly-experience-page .wp-site-blocks > * { margin: 0 !important; max-width: none !important; }

/* ---------- preview mode: a quiet living backdrop inside another section ---------- */
.sx--preview { position: absolute; inset: 0; height: auto; min-height: 0; background-size: cover; background-position: center; pointer-events: none; }
.sx--preview .sx-canvas { pointer-events: none; transition-duration: 1600ms; }
