/* ==========================================================================
   LinkPilot - public landing page styles
   --------------------------------------------------------------------------
   Color strategy: black + a single calm blue family. Blue is the hue
   most people consistently rate easiest to look at for long stretches
   (it's why so many reading/night modes and trusted-brand interfaces
   lean on it) - so instead of several competing accent colors, this
   theme leans on one blue hue at different tints so the glow reads as
   a soft, restful wash of light rather than scattered colored spots.
   ========================================================================== */

.lsp-stage {
	--lsp-brand: #2f6bff;
	--lsp-accent-sky: #6fb3ff;
	--lsp-accent-deep: #1a2f70;
	--lsp-ink: #eaf1ff;
	--lsp-ink-muted: #8b9bc2;
	--lsp-surface: rgba(255, 255, 255, 0.04);
	--lsp-surface-border: rgba(130, 165, 255, 0.14);
	--lsp-radius: 24px;

	position: relative;
	isolation: isolate;
	min-height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 64px 20px;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--lsp-ink);
}

.lsp-stage *,
.lsp-stage *::before,
.lsp-stage *::after {
	box-sizing: border-box;
}

/* Full-page mode: the theme's own header (and footer) are kept - only
   the space between them becomes LinkPilot's immersive, full-width
   glow section. */
body.lsp-fullpage-body {
	background: #030408;
}

.lsp-fullpage-content {
	background: radial-gradient( ellipse at top, #070b16 0%, #030408 55%, #000000 100% );
}

.lsp-fullpage-content .lsp-stage {
	min-height: 80vh;
	padding: 56px 20px;
}

/* When embedded via [lsp_shortener] inside a normal theme page, give the
   stage its own contained dark backdrop so the glow still reads well
   against any theme. */
body:not(.lsp-fullpage-body) .lsp-stage {
	background: radial-gradient(ellipse at top, #0a0e1c 0%, #030408 100%);
	border-radius: 32px;
}

/* Custom (non-global) theme mode - only active when the site owner has
   unchecked "Use Brand Color for the entire interface" in Settings.
   Overrides just the background/card colors with independently chosen
   ones, with text color automatically switched for readability. Fully
   inert (adds nothing, changes nothing) for every site using the
   default, single-color theme. */
.lsp-stage.lsp-custom-theme,
body.lsp-fullpage-body:has(.lsp-custom-theme) {
	background: var(--lsp-theme-bg) !important;
}

.lsp-custom-theme .lsp-fullpage-content {
	background: var(--lsp-theme-bg) !important;
}

.lsp-custom-theme .lsp-card {
	background: var(--lsp-theme-card1) !important;
	color: var(--lsp-card1-text) !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

.lsp-custom-theme .lsp-card .lsp-subtitle,
.lsp-custom-theme .lsp-card .lsp-slug-prefix,
.lsp-custom-theme .lsp-card .lsp-input {
	color: var(--lsp-card1-text) !important;
}

.lsp-custom-theme .lsp-title {
	background: none !important;
	-webkit-text-fill-color: var(--lsp-card1-text) !important;
	color: var(--lsp-card1-text) !important;
}

.lsp-custom-theme .lsp-pilot-ui-mock,
.lsp-custom-theme .lsp-howitworks-title,
.lsp-custom-theme .lsp-pilot-stage,
.lsp-custom-theme .lsp-about {
	background: var(--lsp-theme-card2) !important;
	color: var(--lsp-card2-text) !important;
}

.lsp-custom-theme .lsp-about-content,
.lsp-custom-theme .lsp-about-heading {
	color: var(--lsp-card2-text) !important;
}

/* Soft, slow-drifting glow - a gentle wash of light, not distinct
   colored spots. Both orbs stay within the same blue family, heavily
   blurred and low-opacity so they blend into one calm ambient glow. */
.lsp-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(130px);
	opacity: 0.35;
	z-index: 0;
	pointer-events: none;
	will-change: transform;
}

.lsp-orb-1 {
	width: 560px;
	height: 560px;
	top: -200px;
	left: -160px;
	background: radial-gradient(circle, var(--lsp-brand) 0%, transparent 72%);
	animation: lsp-drift-1 22s ease-in-out infinite;
}

.lsp-orb-2 {
	width: 520px;
	height: 520px;
	bottom: -200px;
	right: -140px;
	background: radial-gradient(circle, var(--lsp-accent-sky) 0%, transparent 72%);
	animation: lsp-drift-2 26s ease-in-out infinite;
	opacity: 0.28;
}

@keyframes lsp-drift-1 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(40px, 30px) scale(1.06); }
}

@keyframes lsp-drift-2 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(-35px, -20px) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
	.lsp-orb {
		animation: none;
	}
}

.lsp-wrap {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 640px;
	min-width: 0;
}

/* Soft glowing border ring - a slow rotating gradient behind the card,
   just visible at the edges. Tuned down from a "neon sign" look to a
   gentle halo. */
.lsp-card {
	position: relative;
	background: var(--lsp-surface);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-radius: var(--lsp-radius);
	padding: 52px 44px;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.02) inset,
		0 30px 80px -30px rgba(0, 0, 0, 0.75);
}

.lsp-card::before {
	content: "";
	position: absolute;
	inset: -1.5px;
	border-radius: inherit;
	padding: 1.5px;
	z-index: -1;
	background: conic-gradient(from var(--lsp-angle, 0deg), var(--lsp-brand), var(--lsp-accent-sky), var(--lsp-accent-deep), var(--lsp-brand));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	animation: lsp-rotate-border 10s linear infinite;
	opacity: 0.55;
}

.lsp-card::after {
	content: "";
	position: absolute;
	inset: -30px;
	border-radius: calc(var(--lsp-radius) + 20px);
	z-index: -2;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--lsp-brand) 22%, transparent), transparent);
	filter: blur(36px);
	opacity: 0.7;
	pointer-events: none;
}

@keyframes lsp-rotate-border {
	to { --lsp-angle: 360deg; }
}

@property --lsp-angle {
	syntax: '<angle>';
	inherits: false;
	initial-value: 0deg;
}

@media (prefers-reduced-motion: reduce) {
	.lsp-card::before {
		animation: none;
	}
}

.lsp-header {
	text-align: center;
	margin-bottom: 32px;
}

.lsp-kicker {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--lsp-accent-sky);
	background: rgba(111, 179, 255, 0.08);
	border: 1px solid rgba(111, 179, 255, 0.22);
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 20px;
}

.lsp-title {
	font-size: 38px;
	line-height: 1.15;
	font-weight: 800;
	margin: 0 0 14px;
	letter-spacing: -0.02em;
	background: linear-gradient(120deg, var(--lsp-ink) 10%, var(--lsp-brand) 60%, var(--lsp-accent-sky) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.lsp-subtitle {
	font-size: 16px;
	color: var(--lsp-ink-muted);
	margin: 0;
}

.lsp-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.lsp-field-row {
	display: flex;
	gap: 10px;
}

.lsp-field-row-secondary {
	align-items: stretch;
}

.lsp-input {
	width: 100%;
	font-size: 15px;
	padding: 15px 18px;
	border-radius: 12px;
	border: 1.5px solid var(--lsp-surface-border);
	background: rgba(255, 255, 255, 0.03);
	color: var(--lsp-ink);
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.lsp-input::placeholder {
	color: rgba(234, 241, 255, 0.3);
}

.lsp-input:focus {
	border-color: var(--lsp-brand);
	background: rgba(47, 107, 255, 0.07);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--lsp-brand) 20%, transparent);
}

.lsp-input-url {
	font-size: 16px;
}

/* Custom slug toggle checkbox - sized generously for comfortable
   tapping on mobile. */
.lsp-slug-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--lsp-ink-muted);
	cursor: pointer;
	user-select: none;
	margin: -2px 0 0;
	padding: 4px 0;
}

.lsp-slug-toggle input[type="checkbox"] {
	appearance: none;
	width: 40px;
	height: 24px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	border: 1.5px solid var(--lsp-surface-border);
	position: relative;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
	flex: none;
}

.lsp-slug-toggle input[type="checkbox"]::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: var(--lsp-ink-muted);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.lsp-slug-toggle input[type="checkbox"]:checked {
	background: var(--lsp-brand);
	border-color: var(--lsp-brand);
}

.lsp-slug-toggle input[type="checkbox"]:checked::before {
	transform: translateX(16px);
	background: #fff;
}

.lsp-slug-prefix {
	display: flex;
	align-items: center;
	padding: 0 12px;
	background: rgba(255, 255, 255, 0.02);
	border: 1.5px solid var(--lsp-surface-border);
	border-right: none;
	border-radius: 12px 0 0 12px;
	color: var(--lsp-ink-muted);
	font-size: 13px;
	white-space: nowrap;
	max-width: 45%;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lsp-input-slug {
	border-radius: 0 12px 12px 0;
	border-left: none;
	flex: 1;
	min-width: 0;
}

.lsp-btn {
	border: none;
	border-radius: 12px;
	padding: 15px 26px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease;
}

.lsp-btn:active {
	transform: scale(0.97);
}

.lsp-btn-block {
	width: 100%;
}

.lsp-btn-primary {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, var(--lsp-brand), var(--lsp-accent-sky));
	color: #fff;
	box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--lsp-brand) 60%, transparent), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.lsp-btn-primary::before {
	content: "";
	position: absolute;
	top: 0;
	left: -60%;
	width: 40%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
	transform: skewX(-20deg);
	animation: lsp-shine 4s ease-in-out infinite;
}

@keyframes lsp-shine {
	0% { left: -60%; }
	35%, 100% { left: 140%; }
}

.lsp-btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 32px -6px color-mix(in srgb, var(--lsp-brand) 75%, transparent), 0 0 30px -6px var(--lsp-accent-sky);
}

.lsp-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.lsp-btn-primary:disabled::before {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	.lsp-btn-primary::before {
		animation: none;
	}
}

.lsp-btn-secondary {
	background: rgba(255, 255, 255, 0.06);
	color: var(--lsp-ink);
	border: 1.5px solid var(--lsp-surface-border);
}

.lsp-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--lsp-accent-sky);
}

.lsp-result {
	margin-top: 26px;
	padding-top: 26px;
	border-top: 1px dashed var(--lsp-surface-border);
	animation: lsp-fade-in 0.3s ease;
}

@keyframes lsp-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lsp-result-row {
	display: flex;
	gap: 10px;
}

.lsp-result-input {
	flex: 1;
	min-width: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--lsp-accent-sky);
	padding: 15px 18px;
	border-radius: 12px;
	border: 1.5px solid rgba(111, 179, 255, 0.28);
	background: rgba(111, 179, 255, 0.05);
	text-overflow: ellipsis;
}

.lsp-result-qr {
	margin-top: 22px;
	display: flex;
	justify-content: center;
}

.lsp-result-qr img,
.lsp-result-qr svg {
	width: 168px;
	height: 168px;
	max-width: 100%;
	border-radius: 16px;
	border: 1px solid var(--lsp-surface-border);
	padding: 14px;
	background: #fff;
	box-shadow: 0 0 34px -12px color-mix(in srgb, var(--lsp-brand) 50%, transparent);
}

.lsp-error {
	margin-top: 18px;
	background: rgba(255, 79, 90, 0.1);
	border: 1px solid rgba(255, 79, 90, 0.35);
	color: #ff9a9a;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 14px;
}

.lsp-locked {
	text-align: center;
	padding: 26px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--lsp-surface-border);
	border-radius: 16px;
	color: var(--lsp-ink-muted);
}

.lsp-locked p {
	margin: 0 0 8px;
}

.lsp-locked-sub {
	font-size: 13px;
}

.lsp-footer-note {
	text-align: center;
	font-size: 12px;
	color: var(--lsp-ink-muted);
	margin-top: 22px;
}

/* Ad / custom code slots - deliberately minimal styling (just spacing
   and centering) so ad networks and embedded widgets render exactly
   as they normally would, unaffected by the rest of the page's look. */
.lsp-custom-code {
	margin: 24px 0;
	text-align: center;
	max-width: 100%;
	overflow: hidden;
}

.lsp-custom-code:empty {
	display: none;
}

/* Custom text block - owner-placed, colored, optionally animated text
   with no code required. Animations are pure CSS (no JS), matching
   the plugin's "never make it heavier" performance philosophy. */
.lsp-custom-text {
	text-align: center;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	margin: 20px 0;
}

.lsp-text-anim-fade {
	animation: lsp-text-fade 1.1s ease both;
}

@keyframes lsp-text-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.lsp-text-anim-slide {
	animation: lsp-text-slide 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes lsp-text-slide {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

.lsp-text-anim-pulse {
	animation: lsp-text-pulse 2.2s ease-in-out infinite;
}

@keyframes lsp-text-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.6; transform: scale(1.04); }
}

.lsp-text-anim-glow {
	animation: lsp-text-glow 2.4s ease-in-out infinite;
}

@keyframes lsp-text-glow {
	0%, 100% { text-shadow: 0 0 6px currentColor; }
	50% { text-shadow: 0 0 18px currentColor, 0 0 30px currentColor; }
}

.lsp-text-anim-bounce {
	animation: lsp-text-bounce 1.8s ease-in-out infinite;
}

@keyframes lsp-text-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
	.lsp-custom-text[class*="lsp-text-anim-"] {
		animation: none !important;
	}
}

/* ==========================================================================
   About / Review - an optional, owner-written section shown near the
   bottom of the page. Only rendered when the owner has actually
   written something (see the PHP empty-check), so it never leaves
   blank space when unused. Typography is scoped to this block only,
   so it never affects the rest of the page.
   ========================================================================== */

.lsp-about {
	margin-top: 48px;
	padding: 36px 32px;
	background: var(--lsp-surface);
	border: 1px solid var(--lsp-surface-border);
	border-radius: 20px;
}

.lsp-about-heading {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 18px;
	color: var(--lsp-ink);
	letter-spacing: -0.01em;
}

.lsp-about-content {
	color: var(--lsp-ink-muted);
	font-size: 15px;
	line-height: 1.75;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.lsp-about-content > *:first-child {
	margin-top: 0;
}

.lsp-about-content > *:last-child {
	margin-bottom: 0;
}

.lsp-about-content p {
	margin: 0 0 16px;
}

.lsp-about-content h1,
.lsp-about-content h2,
.lsp-about-content h3,
.lsp-about-content h4,
.lsp-about-content h5,
.lsp-about-content h6 {
	color: var(--lsp-ink);
	font-weight: 700;
	line-height: 1.3;
	margin: 28px 0 12px;
}

.lsp-about-content h1 { font-size: 24px; }
.lsp-about-content h2 { font-size: 21px; }
.lsp-about-content h3 { font-size: 18px; }
.lsp-about-content h4,
.lsp-about-content h5,
.lsp-about-content h6 { font-size: 16px; }

.lsp-about-content a {
	color: var(--lsp-accent-sky);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.lsp-about-content a:hover {
	color: var(--lsp-ink);
}

.lsp-about-content strong,
.lsp-about-content b {
	color: var(--lsp-ink);
	font-weight: 700;
}

.lsp-about-content ul,
.lsp-about-content ol {
	margin: 0 0 16px;
	padding-left: 22px;
}

.lsp-about-content li {
	margin-bottom: 6px;
}

.lsp-about-content blockquote {
	margin: 16px 0;
	padding: 4px 0 4px 18px;
	border-left: 3px solid var(--lsp-brand);
	color: var(--lsp-ink);
	font-style: italic;
}

.lsp-about-content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 8px 0;
}

.lsp-about-content hr {
	border: none;
	border-top: 1px solid var(--lsp-surface-border);
	margin: 24px 0;
}

.lsp-about-content code {
	background: rgba(255, 255, 255, 0.06);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}

@media (max-width: 560px) {
	.lsp-about {
		padding: 26px 20px;
	}

	.lsp-about-heading {
		font-size: 19px;
	}

	.lsp-about-content {
		font-size: 14px;
	}
}

/* ==========================================================================
   "How it works" - an animated mock demo showing the actual sequence:
   paste the long link, click Shorten, get a short link. Loops
   automatically so a first-time visitor sees the whole flow play out
   without needing to do anything.
   ========================================================================== */

.lsp-howitworks {
	margin-top: 56px;
}

.lsp-howitworks-title {
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--lsp-ink-muted);
	margin: 0 0 28px;
}

.lsp-pilot-wrap {
	--lsp-pilot-bg: #070a14;
	--lsp-pilot-panel: #0f1424;
	--lsp-pilot-panel-border: #1e2b52;
	--lsp-pilot-blue1: #3b6bf5;
	--lsp-pilot-blue2: #7fb0ff;
	--lsp-pilot-text: #c9d3ee;
	--lsp-pilot-text-dim: #66739c;
	--lsp-pilot-white: #f5f8ff;
	color: var(--lsp-pilot-text);
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.lsp-pilot-wrap *,
.lsp-pilot-wrap *::before,
.lsp-pilot-wrap *::after {
	box-sizing: border-box;
}

.lsp-pilot-stage {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 26px;
	background: linear-gradient(180deg, #0d1330, #0a0e20);
	border: 1px solid var(--lsp-pilot-panel-border);
	border-radius: 20px;
	padding: 22px;
	box-shadow: 0 0 60px rgba(59, 107, 245, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

@media (max-width: 760px) {
	.lsp-pilot-stage {
		grid-template-columns: 1fr;
	}
}

#lsp-pilot-canvas-holder {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	min-height: 360px;
	min-width: 0;
	background: radial-gradient(circle at 50% 38%, #16204a 0%, #0a0e1f 72%);
}

#lsp-pilot-canvas-holder canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.lsp-pilot-glow-ring {
	position: absolute;
	left: 50%;
	bottom: 14%;
	width: 170px;
	height: 26px;
	transform: translateX(-50%);
	background: radial-gradient(ellipse, rgba(127, 176, 255, 0.35), transparent 70%);
	filter: blur(2px);
	pointer-events: none;
}

.lsp-pilot-ui-mock {
	background: #0c1122;
	border: 1px solid var(--lsp-pilot-panel-border);
	border-radius: 14px;
	padding: 24px 22px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	position: relative;
	min-width: 0;
}

/* Small hand/pointer that moves to whatever is being interacted with
   at each step - paste, toggle, Shorten button, copy icon - so a
   first-time visitor can follow along even without reading anything. */
.lsp-pilot-hand {
	position: absolute;
	top: 40px;
	left: 40px;
	z-index: 5;
	opacity: 0;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.65));
	transition: top 0.55s ease, left 0.55s ease, opacity 0.3s ease, transform 0.15s ease;
	pointer-events: none;
}

.lsp-pilot-hand.lsp-pilot-hand-visible {
	opacity: 1;
}

.lsp-pilot-hand.lsp-pilot-hand-tap {
	transform: scale(0.82);
}

@media (prefers-reduced-motion: reduce) {
	.lsp-pilot-hand {
		transition: opacity 0.3s ease;
	}
}

.lsp-pilot-field {
	position: relative;
}

.lsp-pilot-url-box {
	width: 100%;
	background: #fff;
	border-radius: 9px;
	padding: 12px 14px;
	font-size: 13px;
	color: #1a2340;
	min-height: 20px;
	display: flex;
	align-items: center;
	overflow: hidden;
	white-space: nowrap;
}

.lsp-pilot-url-box .lsp-pilot-textcursor {
	display: inline-block;
	width: 2px;
	height: 14px;
	background: #3b6bf5;
	margin-left: 1px;
	animation: lsp-pilot-blink 1s step-end infinite;
}

.lsp-pilot-url-box.lsp-pilot-placeholder {
	color: #9aa3c0;
}

@keyframes lsp-pilot-blink {
	50% { opacity: 0; }
}

.lsp-pilot-toggle-row {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12.5px;
	color: var(--lsp-pilot-text);
}

.lsp-pilot-switch {
	width: 34px;
	height: 19px;
	border-radius: 20px;
	background: #232a4a;
	position: relative;
	transition: 0.35s;
	flex-shrink: 0;
}

.lsp-pilot-switch .lsp-pilot-knob {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #7c8bb5;
	transition: 0.35s;
}

.lsp-pilot-switch.lsp-pilot-on {
	background: linear-gradient(90deg, var(--lsp-pilot-blue1), var(--lsp-pilot-blue2));
}

.lsp-pilot-switch.lsp-pilot-on .lsp-pilot-knob {
	left: 17px;
	background: #fff;
}

.lsp-pilot-slug-row {
	display: flex;
	gap: 0;
	border-radius: 9px;
	overflow: hidden;
	background: #151b34;
	border: 1px solid #232a4a;
}

.lsp-pilot-slug-prefix {
	padding: 11px 10px;
	font-size: 12px;
	color: var(--lsp-pilot-text-dim);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 50%;
	flex-shrink: 0;
	background: #11172e;
}

.lsp-pilot-slug-input {
	flex: 1;
	min-width: 0;
	background: #fff;
	padding: 11px 10px;
	font-size: 12.5px;
	color: #1a2340;
	display: flex;
	align-items: center;
	overflow: hidden;
	white-space: nowrap;
}

.lsp-pilot-slug-input .lsp-pilot-textcursor {
	display: inline-block;
	width: 2px;
	height: 12px;
	background: #3b6bf5;
	margin-left: 1px;
	animation: lsp-pilot-blink 1s step-end infinite;
}

.lsp-pilot-shorten-btn {
	width: 100%;
	padding: 13px;
	border-radius: 9px;
	border: none;
	font-weight: 700;
	font-size: 13.5px;
	color: #fff;
	background: linear-gradient(90deg, var(--lsp-pilot-blue1), var(--lsp-pilot-blue2));
	cursor: default;
	position: relative;
	transition: transform 0.15s;
}

.lsp-pilot-shorten-btn.lsp-pilot-pressed {
	transform: scale(0.96);
}

.lsp-pilot-spinner {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	display: inline-block;
	vertical-align: -3px;
	margin-right: 7px;
	animation: lsp-pilot-spin 0.7s linear infinite;
}

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

.lsp-pilot-result {
	opacity: 0;
	transform: translateY(6px) scale(0.97);
	transition: all 0.45s ease;
	background: #101832;
	border: 1px solid #23325e;
	border-radius: 10px;
	padding: 11px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.lsp-pilot-result.lsp-pilot-show {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.lsp-pilot-result .lsp-pilot-link {
	flex: 1;
	min-width: 0;
	font-size: 12.5px;
	color: var(--lsp-pilot-blue2);
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lsp-pilot-copy-icon {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 6px;
	background: #1a2340;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: default;
	transition: background 0.2s;
}

.lsp-pilot-copy-icon.lsp-pilot-clicked {
	background: var(--lsp-pilot-blue1);
}

.lsp-pilot-copy-icon svg {
	width: 13px;
	height: 13px;
	stroke: var(--lsp-pilot-blue2);
}

.lsp-pilot-copy-icon.lsp-pilot-clicked svg {
	stroke: #fff;
}

.lsp-pilot-toast {
	position: absolute;
	top: -10px;
	left: 50%;
	transform: translateX(-50%) translateY(0);
	opacity: 0;
	background: #1c2a52;
	border: 1px solid #2f4a82;
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 11px;
	color: #9fe6b3;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: all 0.35s ease;
	pointer-events: none;
	white-space: nowrap;
}

.lsp-pilot-toast.lsp-pilot-show {
	opacity: 1;
	transform: translateX(-50%) translateY(-30px);
}

@media (prefers-reduced-motion: reduce) {
	.lsp-pilot-url-box .lsp-pilot-textcursor,
	.lsp-pilot-slug-input .lsp-pilot-textcursor,
	.lsp-pilot-spinner {
		animation: none;
	}
}


.lsp-howitworks-steps {
	list-style: decimal;
	max-width: 320px;
	margin: 22px auto 0;
	padding-left: 22px;
	color: var(--lsp-ink-muted);
	font-size: 13px;
	line-height: 1.9;
}

@media (max-width: 560px) {
	.lsp-card {
		padding: 32px 22px;
	}

	.lsp-title {
		font-size: 27px;
	}

	.lsp-subtitle {
		font-size: 14px;
	}

	.lsp-field-row-secondary {
		flex-wrap: wrap;
	}

	.lsp-slug-prefix {
		display: none;
	}

	.lsp-input-slug {
		border-radius: 12px;
		border-left: 1.5px solid var(--lsp-surface-border);
	}

	.lsp-orb {
		filter: blur(70px);
	}

	.lsp-pilot-stage {
		padding: 16px;
		gap: 16px;
	}

	#lsp-pilot-canvas-holder {
		min-height: 240px;
	}

	.lsp-pilot-ui-mock {
		padding: 18px 16px;
	}

	.lsp-result-row {
		flex-wrap: wrap;
	}

	.lsp-result-input {
		width: 100%;
	}

	.lsp-btn-secondary {
		width: 100%;
	}
}

/* Extra-small phones (iPhone SE, small Android devices, ~360-390px
   wide) - tighten spacing and text a little further so nothing feels
   cramped or forces horizontal scroll on the smallest screens. */
@media (max-width: 390px) {
	.lsp-stage {
		padding: 40px 14px;
	}

	.lsp-card {
		padding: 26px 16px;
	}

	.lsp-title {
		font-size: 23px;
	}

	.lsp-kicker {
		font-size: 10.5px;
		padding: 5px 10px;
	}

	.lsp-howitworks {
		margin-top: 40px;
	}

	.lsp-pilot-stage {
		padding: 12px;
		gap: 12px;
		border-radius: 16px;
	}

	#lsp-pilot-canvas-holder {
		min-height: 200px;
	}

	.lsp-pilot-ui-mock {
		padding: 14px 12px;
		gap: 10px;
	}

	.lsp-pilot-url-box,
	.lsp-pilot-slug-prefix,
	.lsp-pilot-slug-input {
		font-size: 11px;
	}

	.lsp-pilot-shorten-btn {
		font-size: 12px;
		padding: 10px;
	}

	.lsp-howitworks-steps {
		font-size: 12px;
		padding-left: 18px;
	}
}

/* Fallback for browsers without color-mix() / @property support: degrade
   the glow to a plain, still-attractive shadow using the brand color
   directly, and keep a static gradient border instead of a spinning one. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
	.lsp-card {
		box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75), 0 0 40px -16px var(--lsp-brand);
	}

	.lsp-card::before {
		animation: none;
		background: linear-gradient(135deg, var(--lsp-brand), var(--lsp-accent-sky));
	}

	.lsp-input:focus {
		box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.2);
	}

	.lsp-btn-primary,
	.lsp-btn-primary:hover {
		box-shadow: 0 8px 24px -8px var(--lsp-brand);
	}
}
