/* =====================================================================
   Squishy Buttons & Cursor — front-end styles
   Button look reverse-engineered from orbix.studio (.primary-button):
   pill, #010101 / white variant, 16–18px label, 40px icon circle or
   48px avatar image, soft layered bottom-left shadow.
   ===================================================================== */

:root {
	--sqb-bg: #010101;
	--sqb-color: #ffffff;
	--sqb-hover-bg: #1a1a1a;
	--sqb-hover-color: #ffffff;
	--sqb-icon-bg: #ffffff;
	--sqb-icon-color: #010101;
	--sqb-alt-bg: #ffffff;
	--sqb-alt-color: #010101;
	--sqb-alt-hover-bg: #f3f4f6;
	--sqb-alt-hover-color: #010101;
	--sqb-alt-icon-bg: #010101;
	--sqb-alt-icon-color: #ffffff;
	--sqb-radius: 99px;
	--sqb-weight: 500;
	--sqb-press-scale: 0.95;
	--sqb-shadow:
		0 0 0 0 rgba(0, 0, 0, 0),
		-1.1px 1.2px 0.1px rgba(0, 0, 0, 0.012),
		-2.2px 2.4px 0.3px rgba(0, 0, 0, 0.02),
		-3.3px 3.7px 0.5px rgba(0, 0, 0, 0.02),
		-4.6px 5.1px 0.7px rgba(0, 0, 0, 0.03),
		-6px 6.6px 0.9px rgba(0, 0, 0, 0.03),
		-7.6px 8.4px 1.3px rgba(0, 0, 0, 0.03),
		-9.5px 10.5px 1.8px rgba(0, 0, 0, 0.03),
		-11.8px 13px 2.4px rgba(0, 0, 0, 0.03),
		-14.7px 16.2px 3.2px rgba(0, 0, 0, 0.03),
		-18.3px 20.2px 4.4px rgba(0, 0, 0, 0.04),
		-23px 25.4px 6px rgba(0, 0, 0, 0.04),
		-29.3px 32.3px 8.2px rgba(0, 0, 0, 0.04),
		-37.8px 41.8px 11.3px rgba(0, 0, 0, 0.04),
		-49.9px 55.1px 15.9px rgba(0, 0, 0, 0.04);

	--sqb-cursor-color: #ffffff;
	--sqb-cursor-line: #d3d3d3;
	--sqb-cursor-line-o: 0.14;
	--sqb-cursor-size: 20px;
	--sqb-cursor-blend: difference;
}

/* ------------------------------------------------------------- Button */

.sqb-btn,
.sqb-btn:link,
.sqb-btn:visited {
	--_bg: var(--sqb-l-bg, var(--sqb-bg));
	--_color: var(--sqb-l-color, var(--sqb-color));
	--_hover-bg: var(--sqb-l-hover-bg, var(--sqb-hover-bg));
	--_hover-color: var(--sqb-l-hover-color, var(--sqb-hover-color));
	--_icon-bg: var(--sqb-l-icon-bg, var(--sqb-icon-bg));
	--_icon-color: var(--sqb-l-icon-color, var(--sqb-icon-color));

	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--sqb-radius);
	background: var(--_bg);
	color: var(--_color);
	font-family: inherit;
	font-weight: var(--sqb-weight);
	font-size: 16px;
	line-height: 1.2;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	overflow: hidden;
	overflow: clip;
	box-shadow: var(--sqb-shadow);
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	-webkit-user-select: none;
	transform: translate3d(0, 0, 0);
	will-change: transform;
	transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sqb-btn:hover,
.sqb-btn:focus-visible {
	background: var(--_hover-bg);
	color: var(--_hover-color);
	text-decoration: none;
}

.sqb-btn:focus {
	outline: none;
}

.sqb-btn:focus-visible {
	outline: 2px solid var(--_bg);
	outline-offset: 3px;
}

.sqb-btn--no-shadow {
	box-shadow: none;
}

.sqb-btn--rounded {
	border-radius: 12px;
}

.sqb-btn--square {
	border-radius: 0;
}

.sqb-btn--pill {
	border-radius: 99px;
}

/* Light variant: applied automatically on dark backgrounds (.sqb-on-dark, set by JS)
   or forced with variant="light" (.sqb-variant-light). Per-button colors
   (--sqb-l-*) still win, so explicitly colored buttons never flip. */
.sqb-btn.sqb-on-dark,
.sqb-btn.sqb-variant-light,
.sqb-btn.sqb-on-dark:link,
.sqb-btn.sqb-variant-light:link,
.sqb-btn.sqb-on-dark:visited,
.sqb-btn.sqb-variant-light:visited {
	--_bg: var(--sqb-l-bg, var(--sqb-alt-bg));
	--_color: var(--sqb-l-color, var(--sqb-alt-color));
	--_hover-bg: var(--sqb-l-hover-bg, var(--sqb-alt-hover-bg));
	--_hover-color: var(--sqb-l-hover-color, var(--sqb-alt-hover-color));
	--_icon-bg: var(--sqb-l-icon-bg, var(--sqb-alt-icon-bg));
	--_icon-color: var(--sqb-l-icon-color, var(--sqb-alt-icon-color));
}

/* On dark backgrounds the black layered shadow is invisible anyway; a faint light glow grounds the button instead. */
.sqb-btn.sqb-on-dark:not(.sqb-btn--no-shadow),
.sqb-btn.sqb-variant-light:not(.sqb-btn--no-shadow) {
	box-shadow: var(--sqb-shadow), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* While the pointer is inside, the button floats above its neighbours. */
.sqb-btn.is-squishing,
.sqb-magnet.is-squishing {
	z-index: 5;
}

/* Content wrapper: JS slides this for the parallax effect. */
.sqb-content {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: var(--_gap, 12px);
	padding: var(--_pad, 16px 28px);
	will-change: transform;
	transform: translate3d(0, 0, 0);
	pointer-events: none; /* so mousemove always targets the button itself */
}

.sqb-label {
	display: inline-block;
}

/* Icon / image slots */
.sqb-media {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.sqb-media svg {
	display: block;
	width: 100%;
	height: 100%;
	transition: transform 0.3s ease;
}

.sqb-media--circle {
	width: var(--_icon, 40px);
	height: var(--_icon, 40px);
	border-radius: 50%;
	background: var(--_icon-bg);
	color: var(--_icon-color);
	transition: background-color 0.3s ease, color 0.3s ease;
}

.sqb-media--circle svg {
	width: 52%;
	height: 52%;
}

.sqb-media--plain {
	width: calc(var(--_icon, 40px) * 0.65);
	height: calc(var(--_icon, 40px) * 0.65);
	color: var(--sqb-l-icon-color, currentColor);
}

.sqb-media--image .sqb-image {
	display: block;
	width: var(--_img, 48px);
	height: var(--_img, 48px);
	border-radius: 50%;
	object-fit: cover;
	margin: 0;
	box-shadow: none;
}

/* Icon hover motion (Orbix: arrow starts at -45° and settles to 0° on hover) */
.sqb-btn--hover-rotate .sqb-media svg {
	transform: rotate(-45deg);
}

.sqb-btn--hover-rotate:hover .sqb-media svg,
.sqb-btn--hover-rotate:focus-visible .sqb-media svg {
	transform: rotate(0deg);
}

.sqb-btn--hover-slide:hover .sqb-media svg,
.sqb-btn--hover-slide:focus-visible .sqb-media svg {
	transform: translateX(3px);
}

.sqb-btn--media-left.sqb-btn--hover-slide:hover .sqb-media svg {
	transform: translateX(-3px);
}

/* ------------------------------------------------------------- Sizes */

.sqb-btn--sm {
	font-size: 14px;
	--_icon: 32px;
	--_img: 36px;
	--_gap: 10px;
	--_pad: 12px 20px;
}

.sqb-btn--md {
	font-size: 16px;
	--_icon: 40px;
	--_img: 48px;
	--_gap: 12px;
	--_pad: 16px 28px;
}

.sqb-btn--lg {
	font-size: 18px;
	--_icon: 48px;
	--_img: 56px;
	--_gap: 14px;
	--_pad: 20px 36px;
}

/* Circle icon / image on the right: tight padding on that side (8px 8px 8px 24px on Orbix). */
.sqb-btn--sm.sqb-btn--media-right.sqb-btn--icon-circle,
.sqb-btn--sm.sqb-btn--media-right.sqb-btn--has-image { --_pad: 6px 6px 6px 16px; }
.sqb-btn--sm.sqb-btn--media-left.sqb-btn--icon-circle,
.sqb-btn--sm.sqb-btn--media-left.sqb-btn--has-image { --_pad: 6px 16px 6px 6px; }

.sqb-btn--md.sqb-btn--media-right.sqb-btn--icon-circle,
.sqb-btn--md.sqb-btn--media-right.sqb-btn--has-image { --_pad: 8px 8px 8px 24px; }
.sqb-btn--md.sqb-btn--media-left.sqb-btn--icon-circle,
.sqb-btn--md.sqb-btn--media-left.sqb-btn--has-image { --_pad: 8px 24px 8px 8px; }

.sqb-btn--lg.sqb-btn--media-right.sqb-btn--icon-circle,
.sqb-btn--lg.sqb-btn--media-right.sqb-btn--has-image { --_pad: 10px 10px 10px 28px; }
.sqb-btn--lg.sqb-btn--media-left.sqb-btn--icon-circle,
.sqb-btn--lg.sqb-btn--media-left.sqb-btn--has-image { --_pad: 10px 28px 10px 10px; }

/* Plain (no circle) icons: like the WhatsApp button, 16px 24px 16px 20px. */
.sqb-btn--has-icon.sqb-btn--icon-plain.sqb-btn--media-left  { --_gap: 8px; }
.sqb-btn--has-icon.sqb-btn--icon-plain.sqb-btn--media-right { --_gap: 8px; }
.sqb-btn--sm.sqb-btn--icon-plain.sqb-btn--media-left  { --_pad: 12px 20px 12px 16px; }
.sqb-btn--sm.sqb-btn--icon-plain.sqb-btn--media-right { --_pad: 12px 16px 12px 20px; }
.sqb-btn--md.sqb-btn--icon-plain.sqb-btn--media-left  { --_pad: 16px 24px 16px 20px; }
.sqb-btn--md.sqb-btn--icon-plain.sqb-btn--media-right { --_pad: 16px 20px 16px 24px; }
.sqb-btn--lg.sqb-btn--icon-plain.sqb-btn--media-left  { --_pad: 20px 32px 20px 26px; }
.sqb-btn--lg.sqb-btn--icon-plain.sqb-btn--media-right { --_pad: 20px 26px 20px 32px; }

/* Alignment wrapper (shortcode align="", block align) */
.sqb-wrap { display: block; }
.sqb-wrap--left { text-align: left; }
.sqb-wrap--center { text-align: center; }
.sqb-wrap--right { text-align: right; }

/* ----------------------------------------------- Global button takeover
   JS adds .sqb-btn + .sqb-btn--auto to theme buttons and wraps their
   content in .sqb-content. These rules need to beat theme CSS, hence
   the !important on the handful of properties that define the look. */

.sqb-restyle-on .sqb-btn--auto {
	background: var(--_bg) !important;
	color: var(--_color) !important;
	border: 0 !important;
	border-radius: var(--sqb-radius) !important;
	padding: 0 !important;
	box-shadow: var(--sqb-shadow) !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-weight: var(--sqb-weight) !important;
	line-height: 1.2 !important;
	min-height: 0 !important;
	height: auto !important;
	background-image: none !important;
}

.sqb-restyle-on .sqb-btn--auto:hover,
.sqb-restyle-on .sqb-btn--auto:focus-visible {
	background: var(--_hover-bg) !important;
	color: var(--_hover-color) !important;
	text-decoration: none !important;
}

.sqb-restyle-on .sqb-btn--auto.sqb-btn--no-shadow {
	box-shadow: none !important;
}

/* Inputs can't wrap children, so pad the element itself. */
.sqb-restyle-on .sqb-btn--auto.sqb-btn--input {
	padding: var(--_pad, 16px 28px) !important;
	-webkit-appearance: none;
	appearance: none;
}

/* Motion-only mode (restyle off): keep theme look, just make sure transforms apply. */
.sqb-magnet {
	position: relative;
	will-change: transform;
	overflow: hidden;
	overflow: clip;
}

.sqb-magnet > .sqb-content {
	padding: 0;
	gap: 0;
	display: inline-flex;
	pointer-events: none;
}

/* Touch / no-JS fallback: a little CSS squish on press. */
@media (hover: none), (pointer: coarse) {
	.sqb-btn:active,
	.sqb-magnet:active {
		transform: scale(var(--sqb-press-scale));
		transition: transform 0.12s ease;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sqb-btn,
	.sqb-content,
	.sqb-media svg {
		transition: none;
	}
}

/* ------------------------------------------------------------- Cursor */

.sqb-cursor {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	pointer-events: none;
	overflow: hidden;
	opacity: 0;
	mix-blend-mode: var(--sqb-cursor-blend);
	transition: opacity 0.25s ease;
	contain: strict;
}

.sqb-cursor.is-visible {
	opacity: 1;
}

.sqb-cursor.is-hidden,
.sqb-cursor.is-disabled {
	opacity: 0;
}

html.sqb-cursor-scope-on.sqb-cursor-scope-off .sqb-cursor-scope,
html.sqb-cursor-scope-on.sqb-cursor-scope-off .sqb-cursor-scope * {
	cursor: auto !important;
}

.sqb-cursor__line,
.sqb-cursor__dot,
.sqb-cursor__ring,
.sqb-cursor__arrow {
	position: absolute;
	top: 0;
	left: 0;
	display: none;
	will-change: transform;
	transform-origin: center;
}

.sqb-cursor__line {
	background: var(--sqb-cursor-line);
	opacity: var(--sqb-cursor-line-o);
}

.sqb-cursor__line--h {
	width: 100%;
	height: 1px;
}

.sqb-cursor__line--v {
	width: 1px;
	height: 100%;
}

.sqb-cursor__dot {
	width: var(--sqb-cursor-size);
	height: var(--sqb-cursor-size);
	border-radius: 50%;
	background: var(--sqb-cursor-color);
}

.sqb-cursor__ring {
	width: calc(var(--sqb-cursor-size) * 2.2);
	height: calc(var(--sqb-cursor-size) * 2.2);
	border-radius: 50%;
	border: 1.5px solid var(--sqb-cursor-color);
	box-sizing: border-box;
	opacity: var(--_ring-o, 1);
}

.sqb-cursor__arrow {
	width: 26px;
	height: 26px;
	color: var(--sqb-cursor-color);
	filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35));
}

.sqb-cursor__arrow svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Styles */
.sqb-cursor--crosshair .sqb-cursor__line,
.sqb-cursor--crosshair .sqb-cursor__dot,
.sqb-cursor--dot-ring .sqb-cursor__dot,
.sqb-cursor--dot-ring .sqb-cursor__ring,
.sqb-cursor--dot .sqb-cursor__dot,
.sqb-cursor--ring .sqb-cursor__ring,
.sqb-cursor--blob .sqb-cursor__dot,
.sqb-cursor--arrow .sqb-cursor__arrow {
	display: block;
}

.sqb-cursor--blob .sqb-cursor__dot {
	width: calc(var(--sqb-cursor-size) * 2.6);
	height: calc(var(--sqb-cursor-size) * 2.6);
	filter: blur(calc(var(--sqb-cursor-size) * 0.6));
	opacity: 0.85;
}

.sqb-cursor--arrow {
	mix-blend-mode: normal; /* an inverted arrow reads wrong; always show exact color */
}

/* The "ring" hover mode fades a ring in on any style. */
.sqb-cursor.is-hover-ring .sqb-cursor__ring {
	display: block;
}

/* Hide the native cursor while the custom one is active. */
html.sqb-cursor-on,
html.sqb-cursor-on body,
html.sqb-cursor-on * {
	cursor: none !important;
}

html.sqb-cursor-on.sqb-keep-text input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
html.sqb-cursor-on.sqb-keep-text textarea,
html.sqb-cursor-on.sqb-keep-text [contenteditable="true"],
html.sqb-cursor-on.sqb-keep-text [contenteditable=""] {
	cursor: text !important;
}

html.sqb-cursor-on .sqb-cursor-default,
html.sqb-cursor-on .sqb-cursor-default *,
html.sqb-cursor-on iframe {
	cursor: auto !important;
}

/* Settings-page preview scope: only hide the native cursor inside the preview box. */
html.sqb-cursor-scope-on .sqb-cursor-scope,
html.sqb-cursor-scope-on .sqb-cursor-scope * {
	cursor: none !important;
}
