/* ShortURL tool page (/shorturl/, page 22804). Hooks into the Kadence form 22818 layout. */

.sgsu-root {
	--sgsu-h: 35px;
	--sgsu-yellow: #f6c514;
	--sgsu-orange: #f5a524;
	--sgsu-ink: #1a202c;
	--sgsu-muted: #64748b;
	--sgsu-line: rgba(26, 32, 44, 0.14);
	--sgsu-red: #d63638;
	/* --sgsu-accent follows the preview's Kadence highlight colour (set from JS); this is the fallback. */
	--sgsu-accent: #f9c809;
	--sgsu-accent-soft: rgba(249, 200, 9, 0.16);
	--sgsu-accent-soft: color-mix(in srgb, var(--sgsu-accent) 18%, transparent);
	--sgsu-accent-ink: #9a7a00;
	--sgsu-accent-ink: color-mix(in srgb, var(--sgsu-accent), #000 38%);
	--sgsu-switch-on: #34c759;
	--sgsu-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--sgsu-spring: cubic-bezier(0.3, 1.2, 0.5, 1);
	--sgsu-fs: 14px;
}

.sgsu-root .kb-advanced-form .kt-adv-heading22804_055bcf-6d,
.sgsu-root .kb-advanced-form .kt-adv-heading22804_1e66f3-54 {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	margin: 0;
}

.sgsu-root .kb-adv-form-field.kb-field228181c89dc-40 {
	flex: 1 1 auto;
	min-width: 0;
}

/* The name is optional (empty = random), so its asterisk never shows, even before the script. */
.sgsu-root .kb-field228181c89dc-40 .kb-adv-form-required {
	display: none;
}

/* ---------- Skeleton until shorturl.js has built the controls (body.sgsu-ready) ---------- */

.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_055bcf-6d,
.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_1e66f3-54 {
	position: relative;
	color: transparent !important;
	font-size: 0 !important;
}

.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_055bcf-6d {
	width: 68px;
	height: 57px;
}

.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_055bcf-6d::before,
.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_055bcf-6d::after,
.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_1e66f3-54 {
	background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 45%, #eceff3 65%) 0 0 / 300% 100%;
	animation: sgsu-shimmer 1.3s ease-in-out infinite;
}

.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_055bcf-6d::before {
	content: "";
	position: absolute;
	top: 5px;
	left: 0;
	width: 46px;
	height: 10px;
	border-radius: 5px;
}

.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_055bcf-6d::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: var(--sgsu-h);
	border-radius: 999px;
}

.sgsu-root:not(.sgsu-ready) .kb-advanced-form .kt-adv-heading22804_1e66f3-54 {
	align-self: flex-end;
	width: 76px;
	height: var(--sgsu-h);
	border-radius: 999px;
}

.sgsu-root:not(.sgsu-ready) .kt-adv-heading22804_4ef489-13 .kb-adv-text-inner {
	display: inline-block;
	width: min(300px, 70%);
	height: 1.1em;
	overflow: hidden;
	border-radius: 6px;
	color: transparent !important;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.22) 45%, rgba(255, 255, 255, 0.1) 65%) 0 0 / 300% 100%;
	animation: sgsu-shimmer 1.3s ease-in-out infinite;
}

.sgsu-root:not(.sgsu-ready) .kt-adv-heading22804_4ef489-13 .kb-adv-text-inner * {
	color: transparent !important;
	text-decoration-color: transparent !important;
}

@keyframes sgsu-shimmer {
	from { background-position: 100% 0; }
	to { background-position: 0 0; }
}

.sgsu-ready .sgsu-type,
.sgsu-ready .sgsu-switch,
.sgsu-ready .sgsu-label,
.sgsu-ready .sgsu-url {
	animation: sgsu-appear 0.3s ease both;
}

@keyframes sgsu-appear {
	from { opacity: 0; }
	to { opacity: 1; }
}

/*
 * Kadence's global `button:hover, button:focus, button:active` turns every button white on a
 * transparent background, so each control below pins background, color and shadow for all states.
 */

.sgsu-root .sgsu-type:focus-visible,
.sgsu-root .sgsu-switch:focus-visible,
.sgsu-root .sgsu-rand:focus-visible,
.sgsu-opt:focus-visible,
.sgsu-copy:focus-visible,
.sgsu-modal__close:focus-visible {
	outline: 2px solid var(--sgsu-accent);
	outline-offset: 2px;
}

/* ---------- Redirect type trigger ---------- */

.sgsu-root button.sgsu-type,
.sgsu-root button.sgsu-type:hover,
.sgsu-root button.sgsu-type:focus,
.sgsu-root button.sgsu-type:active {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	min-width: 0;
	height: var(--sgsu-h);
	margin: 0;
	padding: 0 10px 0 14px;
	border: var(--sgsu-field-bd, 1px solid var(--sgsu-line));
	border-radius: var(--sgsu-field-radius, 99px);
	background: var(--sgsu-field-bg, #fff);
	box-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, 0.04);
	color: var(--sgsu-field-fg, var(--sgsu-ink));
	font: inherit;
	font-size: var(--sgsu-fs);
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.2s, transform 0.2s var(--sgsu-spring);
}

.sgsu-root button.sgsu-type:hover,
.sgsu-root button.sgsu-type[aria-expanded="true"] {
	border-color: var(--sgsu-accent);
	box-shadow: 0 0 0 3px var(--sgsu-accent-soft);
}

.sgsu-root button.sgsu-type:active {
	transform: scale(0.97);
}

.sgsu-type__num {
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}

.sgsu-type__chev {
	width: 14px;
	height: 14px;
	opacity: 0.65;
	transition: transform 0.25s var(--sgsu-ease);
}

.sgsu-type[aria-expanded="true"] .sgsu-type__chev {
	transform: rotate(180deg);
}

.sgsu-type.is-bump .sgsu-type__num {
	display: inline-block;
	animation: sgsu-bump 0.45s var(--sgsu-spring);
}

/* ---------- Redirect dropdown: friendly menu (header, code chips, two-line options, hint) ---------- */

.sgsu-pop {
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.sgsu-pop[hidden] {
	display: none;
}

.sgsu-pop__backdrop {
	position: absolute;
	inset: 0;
	background: transparent;
}

.sgsu-pop__card {
	position: fixed;
	top: 0;
	left: 0;
	box-sizing: border-box;
	width: 292px;
	max-width: calc(100vw - 16px);
	padding: 6px;
	background: rgba(255, 255, 255, 0.97);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 16px;
	box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.25), 0 4px 12px -4px rgba(15, 23, 42, 0.08);
	color: #1d1d1f;
	font-family: var(--sgsu-ff, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 13px;
	-webkit-font-smoothing: antialiased;
	opacity: 0;
	transform: translateY(-4px) scale(0.98);
	transform-origin: top left;
	transition: opacity 0.16s ease, transform 0.2s var(--sgsu-ease);
}

.sgsu-pop__card.is-above {
	transform: translateY(4px) scale(0.98);
	transform-origin: bottom left;
}

.sgsu-pop.is-open .sgsu-pop__card {
	opacity: 1;
	transform: none;
}

.sgsu-pop__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	padding: 8px 8px 10px;
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.sgsu-pop__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 10px;
	background: var(--sgsu-accent-soft);
	color: var(--sgsu-accent-ink);
}

.sgsu-pop__icon svg {
	width: 16px;
	height: 16px;
}

.sgsu-pop__title {
	display: block;
	color: #1d1d1f;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.sgsu-pop__sub {
	display: block;
	margin-top: 1px;
	color: #8e8e93;
	font-size: 11.5px;
	line-height: 1.35;
}

.sgsu-pop button.sgsu-opt,
.sgsu-pop button.sgsu-opt:hover,
.sgsu-pop button.sgsu-opt:focus,
.sgsu-pop button.sgsu-opt:active {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 7px 8px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	box-shadow: none;
	outline: none;
	color: #1d1d1f;
	font: inherit;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.sgsu-pop button.sgsu-opt + .sgsu-opt {
	margin-top: 1px;
}

.sgsu-pop button.sgsu-opt:hover,
.sgsu-pop button.sgsu-opt:focus-visible {
	background: #f5f5f7;
}

.sgsu-pop button.sgsu-opt[aria-selected="true"] {
	background: var(--sgsu-accent-soft);
}

.sgsu-opt__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 42px;
	height: 28px;
	border-radius: 8px;
	background: #f2f2f5;
	color: #1d1d1f;
	font-size: 12.5px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
	transition: background 0.15s ease;
}

.sgsu-opt:hover .sgsu-opt__num {
	background: #e9e9ee;
}

.sgsu-opt[aria-selected="true"] .sgsu-opt__num {
	background: var(--sgsu-accent);
	color: #2b2200;
}

.sgsu-opt__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.sgsu-opt__title {
	color: #1d1d1f;
	font-size: 13px;
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sgsu-opt__desc {
	margin-top: 1px;
	color: #8e8e93;
	font-size: 11.5px;
	font-weight: 400;
}

.sgsu-opt__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	padding: 3px;
	box-sizing: border-box;
	border-radius: 50%;
	background: #d3f5dd;
	color: #1f9d48;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.15s ease, transform 0.2s var(--sgsu-ease);
}

.sgsu-opt__check svg {
	width: 100%;
	height: 100%;
}

.sgsu-opt[aria-selected="true"] .sgsu-opt__check {
	opacity: 1;
	transform: none;
}

.sgsu-pop__foot {
	margin: 4px 0 0 !important;
	padding: 8px 8px 4px;
	border-top: 1px solid rgba(15, 23, 42, 0.06);
	color: #8e8e93;
	font-size: 11px;
	line-height: 1.45;
}

@media (hover: none) {
	.sgsu-pop button.sgsu-opt:hover {
		background: transparent;
	}

	.sgsu-pop button.sgsu-opt[aria-selected="true"]:hover {
		background: var(--sgsu-accent-soft);
	}

	.sgsu-pop button.sgsu-opt:active {
		background: #f5f5f7;
	}
}

@keyframes sgsu-bump {
	0% { transform: scale(1); }
	40% { transform: scale(1.06); }
	100% { transform: scale(1); }
}

/* ---------- Modal (centered on desktop, bottom sheet on phones) ---------- */

.sgsu-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.sgsu-modal[hidden] {
	display: none;
}

.sgsu-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.5);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.sgsu-modal__panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 20px;
	border-radius: 20px;
	background: #fff;
	color: var(--sgsu-ink);
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
	opacity: 0;
	transform: translateY(12px) scale(0.96);
	transition: opacity 0.25s ease, transform 0.35s var(--sgsu-ease);
}

.sgsu-modal.is-open .sgsu-modal__backdrop {
	opacity: 1;
}

.sgsu-modal.is-open .sgsu-modal__panel {
	opacity: 1;
	transform: none;
}

.sgsu-modal__grip {
	display: none;
	width: 40px;
	height: 4px;
	margin: -8px auto 12px;
	border-radius: 4px;
	background: rgba(15, 23, 42, 0.15);
}

.sgsu-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.sgsu-modal__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--sgsu-ink);
}

.sgsu-modal__sub {
	margin: 6px 0 16px;
	color: var(--sgsu-muted);
	font-size: 14px;
	line-height: 1.55;
}

.sgsu-modal button.sgsu-modal__close,
.sgsu-modal button.sgsu-modal__close:hover,
.sgsu-modal button.sgsu-modal__close:focus,
.sgsu-modal button.sgsu-modal__close:active {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.06);
	box-shadow: none;
	color: var(--sgsu-ink);
	font-size: 20px;
	line-height: 34px;
	cursor: pointer;
	transition: background 0.2s;
}

.sgsu-modal button.sgsu-modal__close:hover {
	background: rgba(15, 23, 42, 0.12);
}

html.sgsu-lock,
html.sgsu-lock body {
	overflow: hidden;
}

@media (max-width: 640px) {
	.sgsu-modal {
		align-items: flex-end;
		padding: 0;
	}

	.sgsu-modal__panel {
		max-width: none;
		max-height: 88vh;
		padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
		border-radius: 20px 20px 0 0;
		transform: translateY(100%);
		transition: opacity 0.2s ease, transform 0.4s var(--sgsu-ease);
	}

	.sgsu-modal__grip {
		display: block;
	}
}

/* size:flexible makes the widget follow its wrapper, so both wrapper levels span the panel. */
.sgsu-turnstile {
	display: block;
	width: 100%;
	min-height: 65px;
}

.sgsu-turnstile > div,
.sgsu-turnstile > div > div {
	width: 100% !important;
	max-width: none !important;
}

/* ---------- Name field + random button ---------- */

.sgsu-inputwrap {
	position: relative;
}

.sgsu-inputwrap > input.kb-field {
	width: 100%;
	padding-right: 46px !important;
}

/* Same yellow ring as the Redirect trigger. */
.sgsu-root #kb-adv-form-22818-cpt-id input.kb-field {
	transition: border-color 0.2s, box-shadow 0.2s;
}

.sgsu-root #kb-adv-form-22818-cpt-id input.kb-field:hover,
.sgsu-root #kb-adv-form-22818-cpt-id input.kb-field:focus {
	border-color: var(--sgsu-accent);
	box-shadow: 0 0 0 3px var(--sgsu-accent-soft);
	outline: none;
}

.sgsu-root button.sgsu-rand,
.sgsu-root button.sgsu-rand:hover,
.sgsu-root button.sgsu-rand:focus,
.sgsu-root button.sgsu-rand:active {
	position: absolute;
	top: 50%;
	right: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--sgsu-field-fg, var(--sgsu-ink));
	opacity: 0.7;
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity 0.2s, color 0.2s;
}

.sgsu-root button.sgsu-rand:hover {
	opacity: 1;
	color: var(--sgsu-accent-ink);
}

.sgsu-rand svg {
	width: 18px;
	height: 18px;
	transition: transform 0.45s var(--sgsu-ease);
}

.sgsu-rand:hover svg {
	transform: rotate(90deg);
}

.sgsu-rand:active svg {
	transform: rotate(90deg) scale(0.9);
}

.sgsu-rand.is-busy {
	pointer-events: none;
}

/* Inline copy of the random-name icon inside the how-to text: same size as the text, centred on its line. */
.sgsu-rand-hint {
	display: inline-block;
	width: 1em;
	height: 1em;
	line-height: 0;
	vertical-align: middle;
	position: relative;
	top: -0.08em;
	color: currentColor;
}

.sgsu-rand-hint svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Uses `rotate` (not `transform`) so the spin stacks on the hover tilt; each 0.7s turn (RAND_TURN in JS) ends at 360°. */
.sgsu-rand.is-busy svg {
	animation: sgsu-roll 0.7s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

@keyframes sgsu-roll {
	from { rotate: 0deg; }
	to { rotate: 360deg; }
}

/* Deep amber on a pale yellow tint: reads as "yellow" but keeps ~6:1 contrast. */
.sgsu-root #kb-adv-form-22818-cpt-id input.kb-field.sgsu-is-random {
	background-color: #fff8dc !important;
	color: #7a5800 !important;
	font-weight: 600;
	transition: color 0.3s ease, background-color 0.3s ease, border-color 0.2s, box-shadow 0.2s;
}

/* ---------- Front / back switch ---------- */

/*
 * Compact pill sized by its text: both words share one grid cell so the width never jumps,
 * and the knob slides between the two padding sides.
 * หลัง (default, aria-checked=false) = white track; หน้า (aria-checked=true) = green track.
 */
.sgsu-root .sgsu-switch {
	--p: 4px;
	--k: calc(var(--sgsu-h) - var(--p) * 2);
}

/* No label above the switch, so its slot sits on the input row's baseline. */
.sgsu-root .kb-advanced-form .kt-adv-heading22804_1e66f3-54 {
	align-self: flex-end;
}

.sgsu-root button.sgsu-switch,
.sgsu-root button.sgsu-switch:hover,
.sgsu-root button.sgsu-switch:focus,
.sgsu-root button.sgsu-switch:active {
	position: relative;
	display: inline-grid;
	align-items: center;
	align-self: flex-start;
	box-sizing: border-box;
	width: auto;
	height: calc(var(--k) + var(--p) * 2);
	min-height: 0;
	margin: 0;
	padding: 0 14px 0 calc(var(--k) + var(--p) + 8px);
	border: 0;
	border-radius: 999px;
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05);
	color: #6e6e73;
	font: inherit;
	font-size: calc(var(--sgsu-fs) - 1px);
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.3s var(--sgsu-ease), box-shadow 0.3s var(--sgsu-ease), color 0.3s ease, padding 0.35s var(--sgsu-ease);
}

.sgsu-root button.sgsu-switch[aria-checked="true"],
.sgsu-root button.sgsu-switch[aria-checked="true"]:hover,
.sgsu-root button.sgsu-switch[aria-checked="true"]:focus,
.sgsu-root button.sgsu-switch[aria-checked="true"]:active {
	padding: 0 calc(var(--k) + var(--p) + 8px) 0 14px;
	background: var(--sgsu-switch-on);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
	color: #fff;
}

.sgsu-switch__knob {
	position: absolute;
	top: var(--p);
	left: var(--p);
	width: var(--k);
	height: var(--k);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14), 0 2px 4px rgba(0, 0, 0, 0.14), 0 1px 1px rgba(0, 0, 0, 0.06);
	transition: left 0.35s var(--sgsu-spring), width 0.18s ease, box-shadow 0.3s ease;
}

.sgsu-switch[aria-checked="true"] .sgsu-switch__knob {
	left: calc(100% - var(--k) - var(--p));
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.08);
}

.sgsu-switch:active .sgsu-switch__knob {
	width: calc(var(--k) + 5px);
}

.sgsu-switch[aria-checked="true"]:active .sgsu-switch__knob {
	left: calc(100% - var(--k) - var(--p) - 5px);
}

.sgsu-switch__txt {
	grid-area: 1 / 1;
	text-align: center;
	transition: opacity 0.2s ease, transform 0.3s var(--sgsu-ease);
}

.sgsu-switch[aria-checked="true"] .sgsu-switch__txt--back,
.sgsu-switch[aria-checked="false"] .sgsu-switch__txt--front {
	opacity: 0;
	transform: scale(0.8);
}

/* ---------- Create button ---------- */

.sgsu-root .kb-btn2093d0-03.kb-button {
	height: var(--sgsu-h);
	white-space: nowrap;
	transition: transform 0.3s var(--sgsu-spring), box-shadow 0.3s ease;
	will-change: transform;
}

.sgsu-root .kb-btn2093d0-03.kb-button,
.sgsu-root .kb-btn2093d0-03.kb-button:hover,
.sgsu-root .kb-btn2093d0-03.kb-button:focus,
.sgsu-root .kb-btn2093d0-03.kb-button:active {
	box-shadow: none;
	transform-origin: center;
}

.sgsu-root .kb-btn2093d0-03.kb-button:hover,
.sgsu-root .kb-btn2093d0-03.kb-button:focus-visible {
	transform: scale(1.05);
}

.sgsu-root .kb-btn2093d0-03.kb-button:active {
	transform: scale(0.98);
}

.sgsu-root .kb-btn2093d0-03.kb-button.is-busy {
	pointer-events: none;
	opacity: 0.85;
}

.sgsu-root .kb-btn2093d0-03.kb-button.is-busy .kt-btn-inner-text::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	border: 2px solid rgba(26, 19, 0, 0.3);
	border-top-color: #1a1300;
	border-radius: 50%;
	vertical-align: -2px;
	animation: sgsu-roll 0.7s linear infinite;
}

.sgsu-root .kb-btn2093d0-03.kb-button.is-done {
	animation: sgsu-pop 0.5s var(--sgsu-spring);
}

@keyframes sgsu-pop {
	0% { transform: scale(1); }
	45% { transform: scale(1.04); }
	100% { transform: scale(1); }
}

/* ---------- Errors ---------- */

.sgsu-root #kb-adv-form-22818-cpt-id input.kb-field[aria-invalid="true"] {
	border-color: var(--sgsu-red) !important;
	box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.12);
}

/* Error dialog: always a small centered card, also on phones (no bottom sheet). */

.sgsu-modal--alert,
.sgsu-modal.sgsu-modal--alert {
	align-items: center;
	padding: 16px;
}

.sgsu-modal--alert .sgsu-modal__panel {
	max-width: 340px;
	padding: 24px 20px 18px;
	border-radius: 20px;
	text-align: center;
	transform: scale(0.94);
	transition: opacity 0.2s ease, transform 0.3s var(--sgsu-spring);
}

.sgsu-modal--alert .sgsu-modal__grip,
.sgsu-modal--alert .sgsu-modal__close {
	display: none !important;
}

.sgsu-modal--alert .sgsu-modal__head {
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.sgsu-modal--alert .sgsu-modal__title {
	font-size: 17px;
	font-weight: 600;
}

.sgsu-alert__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(214, 54, 56, 0.1);
	color: var(--sgsu-red);
}

.sgsu-alert__icon svg {
	width: 26px;
	height: 26px;
}

.sgsu-alert__msg {
	margin: 8px 0 20px !important;
	color: var(--sgsu-muted);
	font-size: 14px;
	line-height: 1.6;
}

.sgsu-modal button.sgsu-alert__ok,
.sgsu-modal button.sgsu-alert__ok:hover,
.sgsu-modal button.sgsu-alert__ok:focus,
.sgsu-modal button.sgsu-alert__ok:active {
	display: block;
	width: 100%;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--sgsu-accent);
	box-shadow: none;
	color: #2b2200;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s var(--sgsu-ease), filter 0.2s;
}

.sgsu-modal button.sgsu-alert__ok:hover {
	filter: brightness(1.04);
	transform: scale(1.02);
}

.sgsu-modal button.sgsu-alert__ok:active {
	transform: scale(0.98);
}

.sgsu-modal button.sgsu-alert__ok:focus-visible {
	outline: 2px solid var(--sgsu-accent-ink);
	outline-offset: 2px;
}

@media (max-width: 640px) {
	.sgsu-modal--alert .sgsu-modal__panel {
		max-height: 88vh;
		padding: 24px 20px 18px;
		border-radius: 20px;
		transform: scale(0.94);
	}
}

@keyframes sgsu-fade {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: none; }
}

.sgsu-shake {
	animation: sgsu-shake 0.4s ease;
}

@keyframes sgsu-shake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-4px); }
	40% { transform: translateX(4px); }
	60% { transform: translateX(-3px); }
	80% { transform: translateX(3px); }
}

/* ---------- Live preview ---------- */

.sgsu-url {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	word-break: break-all;
}

/* text-decoration does not reach inline-block children, so each glyph carries its own underline. */
.sgsu-url .sgsu-ch__glyph,
.sgsu-url .sgsu-ch__old {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sgsu-seg {
	display: inline-flex;
	flex-wrap: wrap;
	white-space: pre;
}

.sgsu-url.sgsu-url--copying,
.sgsu-url--copying .sgsu-seg {
	display: inline;
}

.sgsu-url--copying .sgsu-ch__old,
.sgsu-url--copying .sgsu-ch.is-gone {
	display: none;
}

/* No padding on the name, or its underline breaks away from the domain's. */
.sgsu-root mark.sgsu-seg {
	margin: 0;
	padding: 0;
	border-radius: 0;
}

.sgsu-ch {
	position: relative;
	display: inline-block;
	overflow: hidden;
	vertical-align: bottom;
	line-height: inherit;
	transition: max-width 0.3s var(--sgsu-ease);
}

.sgsu-ch__glyph {
	display: inline-block;
}

.sgsu-ch.is-in .sgsu-ch__glyph {
	animation: sgsu-roll-in 0.3s var(--sgsu-ease) both;
	animation-delay: var(--d, 0ms);
}

.sgsu-ch__old {
	position: absolute;
	top: 0;
	left: 0;
	animation: sgsu-roll-out 0.3s var(--sgsu-ease) both;
	animation-delay: var(--d, 0ms);
}

.sgsu-ch.is-gone {
	max-width: 0 !important;
}

.sgsu-ch.is-gone .sgsu-ch__glyph {
	animation: sgsu-roll-out 0.3s var(--sgsu-ease) both;
}

@keyframes sgsu-roll-in {
	from { opacity: 0; transform: translateY(40%); }
	to { opacity: 1; transform: none; }
}

@keyframes sgsu-roll-out {
	from { opacity: 1; transform: none; }
	to { opacity: 0; transform: translateY(-40%); }
}

.sgsu-flip {
	transition: transform 0.5s var(--sgsu-ease);
}

/* ---------- Copy button + tooltip ---------- */

.sgsu-copy {
	cursor: pointer;
	transition: transform 0.2s var(--sgsu-spring);
}

.sgsu-copy:hover {
	transform: scale(1.04);
}

.sgsu-copy:active {
	transform: scale(0.92);
}

.sgsu-copy.is-copied svg {
	animation: sgsu-bump 0.45s var(--sgsu-spring);
}

.sgsu-tip {
	position: fixed;
	z-index: 100001;
	width: max-content;
	max-width: min(360px, calc(100vw - 24px));
	padding: 6px 10px;
	border-radius: 8px;
	background: #111827;
	color: #fff;
	font-size: 13px;
	line-height: 1.3;
	text-align: center;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, 4px);
	transition: opacity 0.18s ease, transform 0.25s var(--sgsu-ease);
}

.sgsu-tip.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

.sgsu-tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: calc(50% + var(--sgsu-tip-shift, 0px));
	margin-left: -5px;
	border: 5px solid transparent;
	border-top-color: #111827;
}

/* ---------- Success: glowing result card, green title, coach mark on copy ---------- */

.sgsu-root .kadence-column22804_3c1b8a-3b > .kt-inside-inner-col {
	transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.sgsu-root .kadence-column22804_3c1b8a-3b > .kt-inside-inner-col.sgsu-is-success {
	border-color: #22c55e !important;
	border-style: solid !important;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16), 0 0 22px rgba(34, 197, 94, 0.32);
	animation: sgsu-glow 1.6s ease-in-out 2;
}

@keyframes sgsu-glow {
	0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16), 0 0 22px rgba(34, 197, 94, 0.32); }
	50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.22), 0 0 36px rgba(34, 197, 94, 0.5); }
}

.sgsu-root .kt-adv-heading22804_74d33f-43.sgsu-title-ok {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #16a34a !important;
	animation: sgsu-appear 0.3s ease both;
}

.sgsu-title-ok__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 22px;
	height: 22px;
	padding: 4px;
	border-radius: 50%;
	background: #d3f5dd;
	color: #1f9d48;
	animation: sgsu-check-pop 0.45s var(--sgsu-spring) both;
}

.sgsu-title-ok__icon svg {
	width: 100%;
	height: 100%;
}

@keyframes sgsu-check-pop {
	from { transform: scale(0); }
	to { transform: none; }
}

.sgsu-root .kt-svg-icons22804_03c2c9-8d {
	position: relative;
}

.sgsu-coach {
	position: absolute;
	top: calc(100% + 14px);
	right: -4px;
	z-index: 5;
	padding: 8px 12px;
	border-radius: 12px;
	background: #fff;
	filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.25)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
	color: #1d1d1f;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translateY(6px) scale(0.9);
	transform-origin: top right;
	transition: opacity 0.2s ease, transform 0.35s var(--sgsu-spring);
}

.sgsu-coach::before {
	content: "";
	position: absolute;
	right: 16px;
	bottom: 100%;
	border: 7px solid transparent;
	border-bottom-color: #fff;
}

.sgsu-coach.is-on {
	opacity: 1;
	transform: none;
	animation: sgsu-bob 1.6s ease-in-out 0.5s infinite;
}

@keyframes sgsu-bob {
	0%, 100% { translate: 0 0; }
	50% { translate: 0 -4px; }
}

/* ---------- Floating panels: QR code + link insights ---------- */

.sgsu-root .sgsu-qr-trigger {
	cursor: pointer;
	border-radius: 4px;
}

.sgsu-root .sgsu-qr-trigger:focus-visible {
	outline: 2px solid var(--sgsu-accent);
	outline-offset: 3px;
}

/* Hidden from the first paint (the body class comes from PHP), until the user opens one. */
.sgsu-root .wp-block-kadence-column.kadence-column22804_6cf69d-39,
.sgsu-root .wp-block-kadence-column.kadence-column22804_426ec1-8c {
	display: none;
}

/* Moved into the form card by JS: blurs exactly the card and hosts the panel. */
.sgsu-root .wp-block-kadence-column.sgsu-layer.is-open {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 40;
	margin: 0;
	border-radius: inherit;
	background: rgba(255, 255, 255, 0.35);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	animation: sgsu-qr-fade 0.2s ease both;
}

.sgsu-root .sgsu-layer.is-open > .kt-inside-inner-col {
	position: relative;
	height: 100%;
	padding: 0;
}

.sgsu-root .sgsu-layer.is-closing {
	animation: sgsu-qr-fade 0.2s ease reverse both;
}

/* Centered near the top of the card; taller than the card, so it hangs below it. */
.sgsu-root .wp-block-kadence-column.sgsu-layer__panel {
	position: absolute;
	top: 16px;
	left: 0;
	right: 0;
	width: 75%;
	min-width: min(100%, 280px);
	margin: 0 auto !important;
	animation: sgsu-qr-in 0.3s var(--sgsu-spring) both;
}

.sgsu-root .sgsu-layer.is-closing .sgsu-layer__panel {
	animation: sgsu-qr-fade 0.2s ease reverse both;
}

/* The insights panel sits in the middle of the card; "safe" keeps its top visible if it is taller. */
.sgsu-root .kadence-column22804_426ec1-8c.is-open > .kt-inside-inner-col {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	justify-content: safe center !important;
	box-sizing: border-box;
	padding: 16px 0 !important;
}

.sgsu-root .wp-block-kadence-column.kadence-column22804_d5e9f3-a9.sgsu-layer__panel {
	position: relative;
	top: auto;
	left: auto;
	right: auto;
	flex: 0 0 auto;
}

.sgsu-root .sgsu-layer__panel > .kt-inside-inner-col {
	position: relative;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), 0 4px 14px rgba(15, 23, 42, 0.08);
}

@keyframes sgsu-qr-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes sgsu-qr-in {
	from { opacity: 0; transform: translateY(14px) scale(0.97); }
	to { opacity: 1; transform: none; }
}

.sgsu-root .kadence-column22804_72def0-13 .kb-image22804_1a6711-de {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
}

.sgsu-root .kadence-column22804_72def0-13 .kb-image22804_1a6711-de img {
	transition: opacity 0.2s ease;
}

/* Never show the mockup code while the real one is being drawn: it could be scanned. */
.sgsu-root .kadence-column22804_72def0-13.is-loading .kb-image22804_1a6711-de img {
	opacity: 0;
}

/* Skeleton until the real code has loaded into the image. */
.sgsu-root .kadence-column22804_72def0-13.is-loading .kb-image22804_1a6711-de {
	aspect-ratio: 1;
}

.sgsu-root .kadence-column22804_72def0-13.is-loading .kb-image22804_1a6711-de::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 8px;
	background: linear-gradient(90deg, #e9ecf0 25%, #f5f6f8 50%, #e9ecf0 75%);
	background-size: 200% 100%;
	animation: sgsu-shimmer 1.2s linear infinite;
}

.sgsu-root .sgsu-layer__panel button.sgsu-layer__close,
.sgsu-root .sgsu-layer__panel button.sgsu-layer__close:hover,
.sgsu-root .sgsu-layer__panel button.sgsu-layer__close:focus,
.sgsu-root .sgsu-layer__panel button.sgsu-layer__close:active {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.55);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
	color: #000;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.sgsu-root .sgsu-layer__panel button.sgsu-layer__close:hover {
	background: rgba(255, 255, 255, 0.8);
}

.sgsu-root .sgsu-layer__panel button.sgsu-layer__close:active {
	transform: scale(0.94);
}

.sgsu-root .sgsu-layer__panel button.sgsu-layer__close svg {
	width: 22px;
	height: 22px;
}

.sgsu-root .sgsu-layer__panel button.sgsu-layer__close:focus-visible,
.sgsu-root .sgsu-qr-dl:focus-visible {
	outline: 2px solid var(--sgsu-accent);
	outline-offset: 2px;
}

.sgsu-root .sgsu-qr-dl {
	cursor: pointer;
}

/* ---------- Link insights: click count, copy, reports ---------- */

.sgsu-root .sgsu-info-count .kb-adv-text-inner {
	transition: color 0.2s ease;
}

.sgsu-root .sgsu-info-count.is-empty .kb-adv-text-inner {
	color: #9aa3af;
	font-size: max(14px, 0.5em);
	font-weight: 400;
}

.sgsu-root .sgsu-info-count.is-loading .kb-adv-text-inner {
	color: transparent;
	border-radius: 6px;
	background: linear-gradient(90deg, #e9ecf0 25%, #f5f6f8 50%, #e9ecf0 75%);
	background-size: 200% 100%;
	animation: sgsu-shimmer 1.2s linear infinite;
}

.sgsu-root .sgsu-info-count.is-in .kb-adv-text-inner {
	display: inline-block;
	animation: sgsu-qr-in 0.35s var(--sgsu-spring) both;
}

.sgsu-root .sgsu-info-copy,
.sgsu-root .sgsu-info-dl,
.sgsu-root .kb-btn22804_bf71d2-d7.kb-button {
	cursor: pointer;
}

.sgsu-root .sgsu-info-copy {
	border-radius: 4px;
	transition: opacity 0.15s ease;
}

.sgsu-root .sgsu-info-copy:hover {
	opacity: 0.7;
}

.sgsu-root .sgsu-info-copy.is-copied {
	color: #16a34a;
}

.sgsu-root .sgsu-info-copy:focus-visible,
.sgsu-root .sgsu-info-dl:focus-visible,
.sgsu-root .kb-btn22804_bf71d2-d7.kb-button:focus-visible {
	outline: 2px solid var(--sgsu-accent);
	outline-offset: 2px;
}

.sgsu-root .sgsu-info-dl.is-disabled {
	opacity: 0.45;
}

.sgsu-root .sgsu-info-dl.is-busy,
.sgsu-root .kb-btn22804_bf71d2-d7.kb-button.is-busy {
	pointer-events: none;
	opacity: 0.7;
	cursor: progress;
}

.sgsu-root .sgsu-info-dl.is-busy svg {
	animation: sgsu-pulse 0.9s ease-in-out infinite;
}

@keyframes sgsu-pulse {
	50% { opacity: 0.35; }
}

/* ---------- Link insights: lookup field + search button on one row ---------- */

.sgsu-root .kadence-column22804_e1ecd5-54 > .kt-inside-inner-col {
	flex-wrap: nowrap !important;
	align-items: flex-end !important;
}

.sgsu-root .kadence-column22804_e1ecd5-54 .wp-block-kadence-advanced-form {
	flex: 1 1 0 !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
}

.sgsu-root .kadence-column22804_e1ecd5-54 .kb-field22967144487-a1,
.sgsu-root .kadence-column22804_e1ecd5-54 #field22967144487-a1 {
	width: 100% !important;
	max-width: none !important;
}

.sgsu-root .kb-btns22804_c92735-0e {
	flex: 0 0 auto !important;
	width: auto !important;
}

.sgsu-root .kb-btn22804_bf71d2-d7.kb-button {
	width: auto !important;
	white-space: nowrap;
}

/* ---------- Small screens: let the row wrap ---------- */

@media (max-width: 767px) {
	.sgsu-root .kadence-column22804_e3bf67-e9 > .kt-inside-inner-col {
		flex-wrap: wrap !important;
		row-gap: 12px !important;
		column-gap: 8px !important;
	}

	.sgsu-root .kb-adv-form-field.kb-field228181c89dc-40 {
		order: -1;
		flex: 1 1 100%;
	}

	/* Shares the Redirect + switch row and takes the remaining width; wraps below on very narrow phones. */
	.sgsu-root .kb-adv-form-field.kb-field2093d0-03 {
		flex: 1 1 100px;
		min-width: 100px;
		align-self: flex-end;
	}

	.sgsu-root .kb-btn2093d0-03.kb-button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sgsu-root *,
	.sgsu-modal *,
	.sgsu-pop *,
	.sgsu-tip {
		animation-duration: 1ms !important;
		animation-delay: 0ms !important;
		transition-duration: 1ms !important;
	}
}
