/* Quick Connect — плаваюча кнопка зв'язку */
.qc {
	--qc-size: 56px;
	--qc-item: 48px;
	--qc-gap: 12px;
	--qc-ease: cubic-bezier(.34, 1.56, .64, 1);
	position: fixed;
	bottom: var(--qc-y, 74px);
	z-index: 997;
	display: flex;
	flex-direction: column;
	align-items: center;
	pointer-events: none;
	font-family: inherit;
}

.qc--right { right: var(--qc-x, 27px); }
.qc--left { left: var(--qc-x, 27px); }

@media (max-width: 1024px) {
	.qc {
		--qc-size: 52px;
		--qc-item: 46px;
		--qc-gap: 10px;
		bottom: var(--qc-y-m, 138px);
	}
	.qc--right { right: var(--qc-x-m, 5px); }
	.qc--left { left: var(--qc-x-m, 5px); }
}

/* Відкритий мобільний фільтр / меню — кнопка не заважає */
.off-canvas-active .qc,
.mobile-navigation-active .qc {
	opacity: 0;
	visibility: hidden;
}

/* ---- головна кнопка ---------------------------------------------------- */
.qc__toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--qc-size);
	height: var(--qc-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--qc-color, #8a8a5c);
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
	cursor: pointer;
	pointer-events: auto;
	transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
	-webkit-tap-highlight-color: transparent;
}

.qc__toggle:hover {
	transform: scale(1.06);
	box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}

.qc__toggle:focus-visible {
	outline: 3px solid var(--qc-color, #8a8a5c);
	outline-offset: 3px;
}

.qc__toggle-icon {
	position: absolute;
	display: flex;
	transition: transform .35s var(--qc-ease), opacity .2s ease;
}

.qc__toggle-icon svg { width: 26px; height: 26px; }
.qc__toggle-icon--close { opacity: 0; transform: rotate(-90deg) scale(.5); }

.qc.is-open .qc__toggle-icon--open { opacity: 0; transform: rotate(90deg) scale(.5); }
.qc.is-open .qc__toggle-icon--close { opacity: 1; transform: none; }

/* пульсація-підказка: кільце розходиться від кнопки, поки її ще не відкривали */
.qc--pulse:not(.is-open):not(.is-seen) .qc__toggle::before,
.qc--pulse:not(.is-open):not(.is-seen) .qc__toggle::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--qc-color, #8a8a5c);
	opacity: .45;
	z-index: -1;
	animation: qc-pulse 2.4s ease-out infinite;
}

.qc--pulse:not(.is-open):not(.is-seen) .qc__toggle::after { animation-delay: 1.2s; }

@keyframes qc-pulse {
	0% { transform: scale(1); opacity: .45; }
	70%, 100% { transform: scale(1.7); opacity: 0; }
}

/* ---- список каналів ---------------------------------------------------- */
.qc__list {
	display: flex;
	flex-direction: column-reverse; /* перший канал — найближчий до кнопки */
	align-items: center;
	gap: var(--qc-gap);
	margin: 0 0 var(--qc-gap);
	padding: 0;
	list-style: none;
}

.qc__item {
	margin: 0;
	padding: 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(calc(var(--qc-size) / 2 + (var(--qc-i) + 1) * 14px)) scale(.4);
	transition:
		transform .32s var(--qc-ease),
		opacity .2s ease,
		visibility 0s linear .32s;
	transition-delay: calc((4 - var(--qc-i)) * 25ms); /* закриття: від верхньої до нижньої */
}

.qc.is-open .qc__item {
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
	transition:
		transform .42s var(--qc-ease),
		opacity .25s ease,
		visibility 0s;
	transition-delay: calc(var(--qc-i) * 45ms); /* відкриття: від нижньої до верхньої */
}

.qc__link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--qc-item);
	height: var(--qc-item);
	border-radius: 50%;
	color: #fff !important;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
	transition: transform .2s ease, box-shadow .2s ease;
	-webkit-tap-highlight-color: transparent;
}

.qc__link:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .26);
}

.qc__link:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

.qc__icon { display: flex; }
.qc__icon svg { width: 22px; height: 22px; }

.qc__link--phone { background: var(--qc-color, #8a8a5c); }
.qc__link--viber { background: #7360f2; }
.qc__link--telegram { background: #27a7e7; }
.qc__link--whatsapp { background: #25d366; }
.qc__link--instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }

/* ---- підписи (десктоп) ------------------------------------------------- */
.qc__label {
	position: absolute;
	top: 50%;
	padding: 6px 12px;
	border-radius: 6px;
	background: #221f1f;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%) translateX(var(--qc-label-shift, 6px));
	transition: opacity .2s ease, transform .2s ease;
}

.qc--right .qc__label { right: calc(100% + 12px); --qc-label-shift: 6px; }
.qc--left .qc__label { left: calc(100% + 12px); --qc-label-shift: -6px; }

@media (hover: hover) and (min-width: 1025px) {
	.qc--labels .qc__link:hover .qc__label,
	.qc--labels .qc__link:focus-visible .qc__label {
		opacity: 1;
		transform: translateY(-50%);
	}
}

@media (max-width: 1024px), (hover: none) {
	.qc__label { display: none; }
}

/* ---- менше руху для тих, хто так налаштував систему ---------------------- */
@media (prefers-reduced-motion: reduce) {
	.qc *,
	.qc *::before,
	.qc *::after {
		animation: none !important;
		transition-duration: .01ms !important;
		transition-delay: 0s !important;
	}
}
