/* Швидкий зв'язок — приклеєна кнопка, модальне вікно, шорткод номера. */

.whqc-fab {
	position: fixed;
	right: var(--whqc-side, 20px);
	bottom: var(--whqc-bottom, 80px);
	/* Вище за кнопку «Вгору» теми (z-index 9999), інакше вона перехоплює кліки. */
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--whqc-color, #9cc44e);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	color: #fff;
	cursor: pointer;
	transition: transform .2s ease;
}

.whqc-fab:hover,
.whqc-fab:focus-visible {
	transform: scale(1.08);
}

.whqc-fab svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}

/* Легке «дихання», щоб кнопку помічали. Вимикається для тих,
   хто просив зменшити рух в системних налаштуваннях. */
@media (prefers-reduced-motion: no-preference) {
	.whqc-fab::before {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: 50%;
		background: var(--whqc-color, #9cc44e);
		opacity: .55;
		animation: whqc-pulse 2.4s ease-out infinite;
		z-index: -1;
	}

	@keyframes whqc-pulse {
		0% { transform: scale(1); opacity: .55; }
		70% { transform: scale(1.5); opacity: 0; }
		100% { transform: scale(1.5); opacity: 0; }
	}
}

/* ---- Модальне вікно ---- */

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

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

.whqc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
}

.whqc-modal__box {
	position: relative;
	width: 100%;
	max-width: 380px;
	max-height: 90dvh;
	overflow-y: auto;
	padding: 26px 22px 20px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

.whqc-modal__close {
	position: absolute;
	top: 6px;
	right: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #888;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.whqc-modal__close:hover {
	color: #222;
}

.whqc-modal__title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.3;
}

.whqc-modal__text {
	margin: 0 0 16px;
	color: #666;
	font-size: 14px;
	line-height: 1.45;
}

.whqc-modal__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.whqc-modal__list li {
	margin: 0 0 8px;
	list-style: none;
}

.whqc-channel {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	color: #222 !important;
	text-decoration: none;
	transition: border-color .15s, background .15s;
}

.whqc-channel:hover {
	border-color: #cfcfcf;
	background: #fafafa;
}

.whqc-channel__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: #fff;
}

.whqc-channel__icon svg {
	width: 21px;
	height: 21px;
	fill: currentColor;
}

.whqc-channel--call .whqc-channel__icon { background: #34b233; }
.whqc-channel--viber .whqc-channel__icon { background: #7360f2; }
.whqc-channel--whatsapp .whqc-channel__icon { background: #25d366; }
.whqc-channel--telegram .whqc-channel__icon { background: #2299d5; }
.whqc-channel--messenger .whqc-channel__icon { background: #0084ff; }
.whqc-channel--email .whqc-channel__icon { background: #607d8b; }

.whqc-channel__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.whqc-channel__label {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
}

.whqc-channel__value {
	color: #777;
	font-size: 13px;
	line-height: 1.3;
	word-break: break-word;
}

.whqc-modal__note {
	margin: 14px 0 0;
	color: #888;
	font-size: 12.5px;
	text-align: center;
}

/* ---- Шорткод номера ---- */

.whqc-phone {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	text-decoration: none;
}

.whqc-phone:hover .whqc-phone__text {
	text-decoration: underline;
}

.whqc-phone__icon {
	display: inline-flex;
	color: var(--whqc-color, #9cc44e);
}

.whqc-phone__icon svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

body.whqc-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.whqc-fab {
		width: 52px;
		height: 52px;
	}

	.whqc-fab svg {
		width: 23px;
		height: 23px;
	}

	.whqc-modal__box {
		max-width: 100%;
		padding: 22px 16px 16px;
	}
}
