:root {
	--csptl-purple: #520f7d;
	--csptl-purple-2: #7135a0;
	--csptl-turquoise: #8cd2d9;
	--csptl-cyan: #28b9c6;
	--csptl-text: #13213b;
	--csptl-muted: #66758f;
	--csptl-subtle: #94a3b8;
	--csptl-border: #e2e8f0;
}

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

.csptl[hidden],
.csptl__panel[hidden],
.csptl [hidden] {
	display: none !important;
}

/*
 * BuddyBoss/custom topbar styles may override the native [hidden] rule on the
 * launcher that is being replaced. Force the whole legacy control (including
 * its dropdown chevron) out of layout while this plugin is active.
 */
[data-csptl-suppressed="true"] {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.csptl {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	z-index: 99990;
	font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.4;
}

.csptl--fallback {
	position: fixed;
	top: 14px;
	left: 178px;
	z-index: 99990;
}

.csptl__trigger {
	width: 46px;
	height: 46px;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ddd4e7;
	border-radius: 14px;
	background: #fff;
	color: var(--csptl-text);
	box-shadow: 0 2px 6px rgba(25, 18, 55, .08), 0 8px 20px rgba(25, 18, 55, .08);
	cursor: pointer !important;
	appearance: none;
	transition:
		transform 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease,
		box-shadow 180ms ease;
}

/*
 * Some header themes append their own dropdown chevron to every
 * aria-haspopup button. The four-tile launcher is self-explanatory, so prevent
 * that inherited decoration from colliding with the glyph.
 */
#csptl .csptl__trigger::before,
#csptl .csptl__trigger::after {
	display: none !important;
	content: none !important;
}

.csptl__trigger:hover {
	transform: translateY(-1px);
	border-color: rgba(82, 15, 125, .42);
	background: #fcf9ff;
	box-shadow: 0 4px 10px rgba(25, 18, 55, .10), 0 12px 26px rgba(25, 18, 55, .10);
}

.csptl__trigger:focus-visible {
	outline: 2px solid var(--csptl-purple);
	outline-offset: 3px;
	border-color: rgba(82, 15, 125, .52);
	box-shadow: 0 0 0 4px rgba(82, 15, 125, .12), 0 9px 20px rgba(25, 18, 55, .09);
}

.csptl__trigger[aria-expanded="true"] {
	transform: none;
	border-color: rgba(82, 15, 125, .52);
	background: rgba(82, 15, 125, .07);
	box-shadow: 0 0 0 3px rgba(82, 15, 125, .09), 0 11px 26px rgba(25, 18, 55, .12);
}

.csptl__trigger-glyph {
	display: block;
	width: 21px;
	height: 21px;
	overflow: visible;
	pointer-events: none;
}

.csptl__tile {
	transition: filter 180ms ease, transform 180ms ease;
	transform-box: fill-box;
	transform-origin: center;
}

.csptl__tile--purple { fill: #520f7d; }
.csptl__tile--turquoise { fill: #8cd2d9; }
.csptl__tile--violet { fill: #9a5bc4; }
.csptl__tile--cyan { fill: #28b9c6; }

.csptl__trigger:hover .csptl__tile,
.csptl__trigger:focus-visible .csptl__tile,
.csptl__trigger[aria-expanded="true"] .csptl__tile {
	filter: saturate(1.12) contrast(1.04);
	transform: scale(1.04);
}

.csptl__tooltip {
	position: absolute;
	top: calc(100% + 10px);
	left: 50%;
	z-index: 999999;
	padding: 6px 10px;
	border: 1px solid var(--csptl-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 3px 10px rgba(16, 33, 62, .09);
	color: var(--csptl-text);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, -3px);
	pointer-events: none;
	transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.csptl__trigger:hover + .csptl__tooltip,
.csptl__trigger:focus-visible + .csptl__tooltip {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	transition-delay: 0s;
}

.csptl[data-open] .csptl__tooltip {
	opacity: 0;
	visibility: hidden;
}

.csptl__panel {
	position: fixed;
	left: var(--csptl-panel-left, 12px);
	top: var(--csptl-panel-top, 76px);
	z-index: 999999;
	width: var(--csptl-panel-width, 374px);
	max-width: calc(100vw - 24px);
	max-height: var(--csptl-panel-max-height, calc(100dvh - 92px));
	padding: 13px 9px 9px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow: hidden;
	border: 1px solid rgba(82, 15, 125, .11);
	border-radius: 19px;
	background: rgba(255, 255, 255, .985);
	box-shadow:
		0 20px 55px rgba(20, 14, 45, .16),
		0 5px 18px rgba(20, 14, 45, .08);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	animation: csptl-panel-in 180ms ease;
}

@keyframes csptl-panel-in {
	from { opacity: 0; transform: scale(.975) translateY(-5px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

.csptl__search {
	position: relative;
	flex: 0 0 auto;
}

.csptl__search > .csptl-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	width: 17px;
	height: 17px;
	color: var(--csptl-subtle);
	transform: translateY(-50%);
	pointer-events: none;
}

.csptl__search-input {
	width: 100% !important;
	height: 45px !important;
	min-height: 45px !important;
	margin: 0 !important;
	padding: 0 15px 0 42px !important;
	border: 1px solid #ddd4e7 !important;
	border-radius: 13px !important;
	background: #f8fafc !important;
	box-shadow: inset 0 1px 2px rgba(16, 33, 62, .025) !important;
	color: var(--csptl-text) !important;
	font: inherit !important;
	font-size: 13px !important;
	line-height: 45px !important;
	outline: none !important;
	appearance: none;
	transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.csptl__search-input:focus {
	border-color: var(--csptl-purple) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px rgba(82, 15, 125, .12) !important;
}

.csptl__search-input::-webkit-search-cancel-button {
	cursor: pointer;
}

.csptl__scroll {
	flex: 1 1 auto;
	min-height: 0;
	max-height: 100%;
	padding: 1px 5px 4px 1px;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: rgba(82, 15, 125, .46) rgba(82, 15, 125, .06);
}

.csptl__scroll::-webkit-scrollbar { width: 8px; }
.csptl__scroll::-webkit-scrollbar-track {
	background: rgba(82, 15, 125, .055);
	border-radius: 999px;
}
.csptl__scroll::-webkit-scrollbar-thumb {
	border: 2px solid transparent;
	border-radius: 999px;
	background: rgba(82, 15, 125, .42);
	background-clip: padding-box;
}
.csptl__scroll::-webkit-scrollbar-thumb:hover {
	background: rgba(82, 15, 125, .62);
	background-clip: padding-box;
}

.csptl__scroll-hint {
	position: absolute;
	right: 9px;
	bottom: 9px;
	left: 9px;
	height: 36px;
	border-radius: 0 0 15px 15px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .98));
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.csptl__panel[data-scrollable="true"][data-scroll-end="false"] .csptl__scroll-hint {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.csptl__platforms {
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.csptl__platform-heading {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 29px;
	padding: 0 4px 5px;
}

.csptl__platform-logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 148px;
	max-height: 29px;
	object-fit: contain;
	object-position: left center;
	flex: 0 0 auto;
}

.csptl__platform--cyberspace .csptl__platform-logo {
	max-width: 128px;
	max-height: 32px;
}

.csptl__platform--profilio .csptl__platform-logo {
	max-width: 105px;
	max-height: 25px;
}

.csptl__platform--lubbezposrednio .csptl__platform-logo {
	width: 142px;
	height: 30px;
	padding: 3px 6px;
	border: 1px solid #e7eaf0;
	border-radius: 8px;
	background: #fff;
	object-fit: contain;
}

.csptl__platform-name {
	font-size: 15px;
	color: var(--csptl-text);
}

.csptl__platform-line {
	height: 1px;
	min-width: 20px;
	flex: 1 1 auto;
	background: #e8edf4;
}

.csptl__items {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.csptl__item {
	display: grid !important;
	grid-template-columns: 38px minmax(0, 1fr) 16px;
	align-items: center;
	gap: 9px;
	min-height: 56px;
	padding: 7px 8px !important;
	border: 1px solid transparent;
	border-radius: 12px;
	background: transparent;
	color: inherit !important;
	text-decoration: none !important;
	box-shadow: none;
	transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.csptl__item:hover {
	border-color: #e7ecf3;
	background: #f8fafc;
	box-shadow: 0 4px 12px rgba(16, 33, 62, .045);
}

.csptl__item:focus-visible {
	outline: 2px solid var(--csptl-purple);
	outline-offset: 1px;
	background: rgba(82, 15, 125, .035);
}

.csptl__item-icon {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ded9e6;
	border: 1px solid color-mix(in srgb, var(--csptl-app-color) 22%, #e2e8f0);
	border-radius: 12px;
	background: #faf8fc;
	background: color-mix(in srgb, var(--csptl-app-color) 8%, #fff);
	color: var(--csptl-app-color);
	transition: border-color 180ms ease, background-color 180ms ease;
}

.csptl__item-icon .csptl-icon {
	width: 19px;
	height: 19px;
}

.csptl__item:hover .csptl__item-icon {
	border-color: color-mix(in srgb, var(--csptl-app-color) 44%, #cbd5e1);
	background: color-mix(in srgb, var(--csptl-app-color) 11%, #fff);
}

.csptl__item-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.csptl__item-title-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px 6px;
	min-width: 0;
}

.csptl__item-title {
	color: var(--csptl-text);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
}

.csptl__item-sub {
	color: var(--csptl-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.38;
}

.csptl__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 19px;
	padding: 2px 7px;
	border: 1px solid rgba(82, 15, 125, .13);
	border-radius: 999px;
	background: rgba(82, 15, 125, .075);
	color: #5b2183;
	font-size: 10px;
	font-weight: 750;
	line-height: 1.2;
	white-space: nowrap;
}

.csptl__item > .csptl-icon {
	width: 16px;
	height: 16px;
	color: #94a3b8;
	transition: transform 180ms ease, color 180ms ease;
}

.csptl__item:hover > .csptl-icon {
	color: var(--csptl-purple);
	transform: translateX(2px);
}

.csptl__stores {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
	margin-top: 6px;
	padding: 0 4px;
}

.csptl__store {
	display: grid !important;
	grid-template-columns: 18px minmax(0, 1fr) 14px;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	padding: 7px 9px !important;
	border: 1px solid var(--csptl-border);
	border-radius: 11px;
	background: #fff;
	color: var(--csptl-text) !important;
	font-size: 12.5px;
	line-height: 1.2;
	text-decoration: none !important;
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.csptl__store:hover {
	transform: translateY(-1px);
	border-color: rgba(21, 155, 143, .30);
	box-shadow: 0 4px 11px rgba(16, 33, 62, .055);
}

.csptl__store .csptl-icon {
	width: 17px;
	height: 17px;
	color: #159b8f;
}

.csptl__store .csptl-icon:last-child {
	width: 14px;
	height: 14px;
	color: #94a3b8;
}

.csptl__empty {
	margin: 6px 4px 10px;
	padding: 14px 12px;
	border: 1px dashed #cbd5e1;
	border-radius: 13px;
	background: #f8fafc;
	color: var(--csptl-muted);
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
}

.csptl__community {
	margin-top: 13px;
	padding: 12px 4px 3px;
	border-top: 1px solid #e8edf4;
}

.csptl__section-title {
	margin: 0 0 8px !important;
	padding: 0 !important;
	color: var(--csptl-subtle) !important;
	font-size: 10px !important;
	font-weight: 800 !important;
	line-height: 1.4 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.csptl__community-links {
	display: grid;
	grid-template-columns: repeat(4, 40px);
	gap: 8px;
	justify-content: start;
}

.csptl__community-link {
	width: 40px;
	height: 40px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--csptl-border);
	border-color: color-mix(in srgb, var(--csptl-social-color) 20%, #e2e8f0);
	border-radius: 11px;
	background: #fff;
	background: color-mix(in srgb, var(--csptl-social-color) 5%, #fff);
	color: var(--csptl-social-color) !important;
	text-decoration: none !important;
	box-shadow: 0 1px 3px rgba(16, 33, 62, .04);
	transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.csptl__community-link:hover {
	transform: translateY(-1px);
	border-color: color-mix(in srgb, var(--csptl-social-color) 42%, #cbd5e1);
	background: color-mix(in srgb, var(--csptl-social-color) 10%, #fff);
	color: var(--csptl-social-color) !important;
	box-shadow: 0 5px 14px color-mix(in srgb, var(--csptl-social-color) 15%, transparent);
}

.csptl__community-link:focus-visible {
	outline: 2px solid var(--csptl-purple);
	outline-offset: 2px;
}

.csptl__community-link svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

@media (max-width: 539px) {
	.csptl__panel {
		padding: 10px 7px 7px;
		border-radius: 17px;
	}

	.csptl__item {
		grid-template-columns: 36px minmax(0, 1fr) 15px;
		gap: 8px;
		padding: 7px 6px !important;
	}

	.csptl__item-icon {
		width: 36px;
		height: 36px;
		border-radius: 11px;
	}

	.csptl__item-title { font-size: 13.5px; }
	.csptl__item-sub { font-size: 12.5px; }
}

@media (max-height: 700px) {
	.csptl__platforms { gap: 10px; }
	.csptl__item { min-height: 52px; padding-block: 5px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.csptl *,
	.csptl *::before,
	.csptl *::after {
		scroll-behavior: auto !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

@media (forced-colors: active) {
	.csptl__trigger,
	.csptl__panel,
	.csptl__item,
	.csptl__store,
	.csptl__community-link {
		border: 1px solid CanvasText;
	}
}
