.scw {
	--scw-color: #3a2e4a;
	--scw-icon: #fff;
	--scw-tg: #229ed9;
	--scw-sms: #2e9e5b;
	--scw-email: #5b6472;
	--scw-x: 20px;
	--scw-y: 20px;
	--scw-size: 56px;
	--scw-gap: 12px;
	position: fixed;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: var(--scw-gap);
	font-family: inherit;
	line-height: 1.2;
}
.scw--bottom { bottom: calc(var(--scw-y) + env(safe-area-inset-bottom, 0px)); }
.scw--top    { top: calc(var(--scw-y) + env(safe-area-inset-top, 0px)); flex-direction: column-reverse; }
.scw--right  { right: var(--scw-x); align-items: flex-end; }
.scw--left   { left: var(--scw-x);  align-items: flex-start; }
.admin-bar .scw--top { top: calc(var(--scw-y) + 32px); }
@media (max-width: 782px) { .admin-bar .scw--top { top: calc(var(--scw-y) + 46px); } }

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

.scw__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.scw--top .scw__list { flex-direction: column-reverse; }
.scw--right .scw__list { align-items: flex-end; }
.scw--left  .scw__list { align-items: flex-start; }
.scw__list[hidden] { display: none; }

.scw__item {
	margin: 0;
	padding: 0;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .18s ease, transform .18s ease;
}
.scw--top .scw__item { transform: translateY(-8px); }
.scw.is-open .scw__item { opacity: 1; transform: none; }
.scw.is-open .scw__item:nth-child(2) { transition-delay: .03s; }
.scw.is-open .scw__item:nth-child(3) { transition-delay: .06s; }

.scw__link {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none !important;
	color: inherit;
}
.scw--left .scw__link { flex-direction: row-reverse; }

.scw__text {
	background: #fff;
	color: #222;
	font-size: 14px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
	white-space: nowrap;
}

.scw__icon {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--scw-icon);
	box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
	transition: transform .15s ease;
}
.scw__icon svg { width: 22px; height: 22px; display: block; }
.scw__link--telegram .scw__icon { background: var(--scw-tg); }
.scw__link--sms      .scw__icon { background: var(--scw-sms); }
.scw__link--email    .scw__icon { background: var(--scw-email); }
.scw__link:hover .scw__icon { transform: scale(1.06); }

.scw__link:focus-visible,
.scw__toggle:focus-visible {
	outline: 3px solid var(--scw-color);
	outline-offset: 3px;
	border-radius: 999px;
}

.scw__toggle {
	width: var(--scw-size);
	height: var(--scw-size);
	border: 0;
	border-radius: 50%;
	padding: 0;
	margin: 0;
	background: var(--scw-color);
	color: var(--scw-icon);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	position: relative;
	transition: transform .15s ease;
}
.scw__toggle:hover { transform: scale(1.05); }
.scw__toggle-icon { display: inline-flex; }
.scw__toggle-icon svg { width: 26px; height: 26px; display: block; }
.scw__toggle-icon--close { display: none; }
.scw.is-open .scw__toggle-icon--open  { display: none; }
.scw.is-open .scw__toggle-icon--close { display: inline-flex; }

/* Screen-reader only text */
.scw__toggle-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Device visibility */
@media (min-width: 768px) {
	.scw--show-mobile { display: none !important; }
}
@media (max-width: 767px) {
	.scw--show-desktop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.scw__item, .scw__icon, .scw__toggle { transition: none; }
}

@media print {
	.scw { display: none !important; }
}
