/* Shared action controls for STARLAB RU/UZ pages. Loaded after legacy page CSS. */
body.starlab-ui {
	--sl-ui-brand: #8f299d;
	--sl-ui-brand-strong: #962983;
	--sl-ui-brand-hover: #74217f;
	--sl-ui-brand-soft: #f8eef9;
	--sl-ui-focus: #5f1768;
}

/* Keep navigation, social, carousel, tab, accordion, slider and media-CTA controls untouched. */
body.starlab-ui :is(#main, main, .elementor) :where(
	a.starlab-button,
	a.starlab-cw__button,
	a.starlab-cw__grid-button,
	a.starlab-csf-btn,
	button.starlab-csf-btn,
	a.elementor-button,
	a.box-button,
	a.more-link,
	a.read-more,
	a.starlab-query-card__more,
	a[class*="-btn"],
	button[class*="-btn"],
	input[class*="-btn"],
	a[class*="-button"],
	button[class*="-button"],
	a[class*="-cta"],
	button[class*="-cta"],
	:is(a, button)[class~="btn"],
	:is(a, button)[class~="button"],
	:is(a, button)[class~="cta"],
	form :is(button[type="submit"], input[type="submit"], input[type="button"])
):not(:where(.starlab-query__arrow, .starlab-cw__tablist button, .starlab-query-menu__toggle, .starlab-ms365-card-cta, .khw-cta-card, .elementor-cta *, .elementor-widget-media-carousel *, .elementor-widget-slides *, .elementor-widget-nav-menu *, .elementor-widget-social-icons *, .elementor-widget-tabs *, .elementor-widget-accordion *, .elementor-widget-n-tabs *)) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 46px;
	padding: 12px 20px;
	border: 1px solid var(--sl-ui-brand) !important;
	border-radius: 12px !important;
	background: var(--sl-ui-brand-strong) !important;
	box-shadow: none;
	color: #fff !important;
	cursor: pointer;
	font: inherit;
	font-size: 15px !important;
	font-weight: 600 !important;
	letter-spacing: normal;
	line-height: 1.25 !important;
	text-align: center;
	text-decoration: none !important;
	text-shadow: none;
	transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

/* Counter older MU-page rules that used blue/green !important button colours. */
body.starlab-ui #main :is(.starlab-csf-btn, .starlab-csf-lead-submit, .starlab-csf-btn-secondary),
body.starlab-ui main :is(.starlab-csf-btn, .starlab-csf-lead-submit, .starlab-csf-btn-secondary),
body.starlab-ui .elementor :is(.starlab-csf-btn, .starlab-csf-lead-submit, .starlab-csf-btn-secondary) {
	border-color: var(--sl-ui-brand) !important;
	background: var(--sl-ui-brand-strong) !important;
	color: #fff !important;
}

body.starlab-ui :is(#main, main, .elementor) :is(
	.ur1-btn-ghost,
	.ur1-btn-tel,
	.ur1-btn-contact,
	.sl-btn--ghost,
	.sl-kerio-hero__btn--ghost,
	.b2g-cta-btn-secondary,
	.cnt-btn--secondary,
	.starlab-csf-btn-secondary
) {
	background: #fff !important;
	border-color: var(--sl-ui-brand) !important;
	color: var(--sl-ui-brand-strong) !important;
}

body.starlab-ui #main .sl-kerio-hero__btn.sl-kerio-hero__btn--primary {
	background: var(--sl-ui-brand-strong) !important;
	color: #fff !important;
}

body.starlab-ui :is(#main, main, .elementor) :where(
	a.starlab-button,
	a.starlab-cw__button,
	a.starlab-cw__grid-button,
	a.starlab-csf-btn,
	button.starlab-csf-btn,
	a.elementor-button,
	a.box-button,
	a.more-link,
	a.read-more,
	a.starlab-query-card__more,
	a[class*="-btn"],
	button[class*="-btn"],
	input[class*="-btn"],
	a[class*="-button"],
	button[class*="-button"],
	a[class*="-cta"],
	button[class*="-cta"],
	:is(a, button)[class~="btn"],
	:is(a, button)[class~="button"],
	:is(a, button)[class~="cta"],
	form :is(button[type="submit"], input[type="submit"], input[type="button"])
):not(:where(.starlab-query__arrow, .starlab-cw__tablist button, .starlab-query-menu__toggle, .starlab-ms365-card-cta, .khw-cta-card, .elementor-cta *, .elementor-widget-media-carousel *, .elementor-widget-slides *, .elementor-widget-nav-menu *, .elementor-widget-social-icons *, .elementor-widget-tabs *, .elementor-widget-accordion *, .elementor-widget-n-tabs *)):active {
	border-color: var(--sl-ui-brand-hover) !important;
	background: var(--sl-ui-brand-hover) !important;
	color: #fff !important;
	box-shadow: 0 5px 14px rgba(116, 33, 127, .2);
	transform: translateY(-1px);
}

body.starlab-ui :is(#main, main, .elementor) :is(.ur1-btn-ghost, .ur1-btn-tel, .ur1-btn-contact, .sl-btn--ghost, .sl-kerio-hero__btn--ghost, .b2g-cta-btn-secondary, .cnt-btn--secondary, .starlab-csf-btn-secondary):active {
	background: var(--sl-ui-brand-soft) !important;
	color: var(--sl-ui-brand-hover) !important;
}

/* Card calls to action need a larger, consistently tappable target than their text-link defaults. */
body.starlab-ui :is(#main, main, .elementor) :is(.starlab-catalog__body > a, .starlab-ms365-card-cta) {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--sl-ui-brand) !important;
	border-radius: 12px !important;
	background: var(--sl-ui-brand-soft) !important;
	color: var(--sl-ui-brand-strong) !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none !important;
}

body.starlab-ui :is(#main, main, .elementor) :is(.starlab-catalog__body > a, .starlab-ms365-card-cta) span {
	flex: 0 0 auto;
	color: currentColor;
	font-size: 1.15em;
}

body.starlab-ui :is(#main, main, .elementor) :is(.starlab-catalog__body > a, .starlab-ms365-card-cta):active {
	border-color: var(--sl-ui-brand-hover) !important;
	background: var(--sl-ui-brand) !important;
	color: #fff !important;
	box-shadow: 0 5px 14px rgba(116, 33, 127, .2);
}

body.starlab-ui .starlab-footer .starlab-footer__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 20px;
	border: 1px solid #fff !important;
	border-radius: 12px !important;
	background: var(--sl-ui-brand-strong) !important;
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
}

body.starlab-ui .starlab-footer .starlab-footer__cta:active {
	background: var(--sl-ui-brand-hover) !important;
	box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
	transform: translateY(-1px);
}

@media (hover: hover) {
	body.starlab-ui :is(#main, main, .elementor) :where(
		a.starlab-button,
		a.starlab-cw__button,
		a.starlab-cw__grid-button,
		a.starlab-csf-btn,
		button.starlab-csf-btn,
		a.elementor-button,
		a.box-button,
		a.more-link,
		a.read-more,
		a.starlab-query-card__more,
		a[class*="-btn"],
		button[class*="-btn"],
		input[class*="-btn"],
		a[class*="-button"],
		button[class*="-button"],
		a[class*="-cta"],
		button[class*="-cta"],
		:is(a, button)[class~="btn"],
		:is(a, button)[class~="button"],
		:is(a, button)[class~="cta"],
		form :is(button[type="submit"], input[type="submit"], input[type="button"])
	):not(:where(.starlab-query__arrow, .starlab-cw__tablist button, .starlab-query-menu__toggle, .starlab-ms365-card-cta, .khw-cta-card, .elementor-cta *, .elementor-widget-media-carousel *, .elementor-widget-slides *, .elementor-widget-nav-menu *, .elementor-widget-social-icons *, .elementor-widget-tabs *, .elementor-widget-accordion *, .elementor-widget-n-tabs *)):hover {
		border-color: var(--sl-ui-brand-hover) !important;
		background: var(--sl-ui-brand-hover) !important;
		color: #fff !important;
		box-shadow: 0 5px 14px rgba(116, 33, 127, .2);
		transform: translateY(-1px);
	}

	body.starlab-ui :is(#main, main, .elementor) :is(.ur1-btn-ghost, .ur1-btn-tel, .ur1-btn-contact, .sl-btn--ghost, .sl-kerio-hero__btn--ghost, .b2g-cta-btn-secondary, .cnt-btn--secondary, .starlab-csf-btn-secondary):hover {
		background: var(--sl-ui-brand-soft) !important;
		color: var(--sl-ui-brand-hover) !important;
	}

	body.starlab-ui :is(#main, main, .elementor) :is(.starlab-catalog__body > a, .starlab-ms365-card-cta):hover {
		border-color: var(--sl-ui-brand-hover) !important;
		background: var(--sl-ui-brand) !important;
		color: #fff !important;
		box-shadow: 0 5px 14px rgba(116, 33, 127, .2);
	}

	body.starlab-ui .starlab-footer .starlab-footer__cta:hover {
		background: var(--sl-ui-brand-hover) !important;
		box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
		transform: translateY(-1px);
	}
}

body.starlab-ui :is(#main, main, .elementor, .starlab-footer) :is(a, button, input):focus-visible {
	outline: 3px solid var(--sl-ui-focus) !important;
	outline-offset: 3px;
}

body.starlab-ui :is(#main, main, .elementor) :is(a, button, input)[disabled],
body.starlab-ui :is(#main, main, .elementor) :is(a, button, input)[aria-disabled="true"],
body.starlab-ui :is(#main, main, .elementor) :is(a, button, input).is-disabled {
	cursor: not-allowed;
	opacity: .55;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	body.starlab-ui :is(#main, main, .elementor, .starlab-footer) :is(a, button, input) { transition: none !important; }
	body.starlab-ui :is(#main, main, .elementor, .starlab-footer) :is(a, button, input):is(:hover, :active) { transform: none; }
}
