/* ult_callcatcher 1.5.0: без другої плаваючої кнопки — віджет відкривається з меню сайту. */
/* Весь блок кнопки Phonet: після закриття форми віджет знову показує свою кнопку «КНОПКА ЗВ'ЯЗКУ». */
#__telerWdTriggerContent,
#__telerWdTriggerContent * {
	display: none !important;
}

/* Опитування «Ми встигли?» і повідомлення про скаргу (кроки 3–4) та зворотний відлік — прибрані. */
.teler-wd .teler-wd-step[data-step="3"],
.teler-wd .teler-wd-step[data-step="4"],
.teler-wd .teler-wd-timer {
	display: none !important;
}

/* Нижня навігація: «Написати» — іконка повідомлення (маска, як у теми). */
.ds-mobile-bottom-nav-item-icon.ult-cc-nav-write {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm0 2v11h2v2l2.5-2H20V5H4zm3 4.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm0 2v11h2v2l2.5-2H20V5H4zm3 4.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.ult-cc-hidden {
	display: none !important;
}

.teler-wd .ult-cc-consent {
	clear: both;
	position: relative;
	margin-top: 10px;
	font-size: 12px;
	line-height: 1.35;
	color: inherit;
	opacity: .85;
}

.teler-wd .ult-cc-consent a,
.teler-wd .ult-cc-note a {
	color: inherit;
	text-decoration: underline;
}

.teler-wd .ult-cc-note {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 6px;
	background: rgba(255, 255, 255, .12);
	font-size: 14px;
	line-height: 1.4;
}

@media (max-width: 520px) {
	.teler-wd .teler-wd-step.ult-cc-grow {
		top: auto !important;
		bottom: 0 !important;
		height: auto !important;
		max-height: 100vh;
		overflow-y: auto;
		padding-bottom: 28px;
	}

	.teler-wd .teler-wd-step.ult-cc-grow .teler-wd-body,
	.teler-wd .teler-wd-step.ult-cc-grow .teler-wd-content {
		height: auto !important;
	}

	.teler-wd .ult-cc-consent {
		font-size: 11px;
	}
}

/* Стара плаваюча кнопка месенджерів теми та її підкладка — замість них одна кнопка «Зв'язатися». */
#ds_fixed_contact_button,
#ds_fixed_contact_substrate {
	display: none !important;
}

/* Одна плаваюча кнопка «Зв'язатися»: десктоп — справа внизу на місці кнопки теми. */
.ult-cc-fab {
	position: fixed;
	right: 32px;
	bottom: 32px;
	z-index: 1010; /* нижче нижньої навігації теми (10000) */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ds-primary-color, #00a8e8);
	color: var(--ds-primary-color, #00a8e8);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
	cursor: pointer;
	opacity: 0;
	transform: translateY(12px) scale(.9);
	pointer-events: none;
	transition: opacity .3s ease, transform .3s ease;
}

.ult-cc-fab.ult-cc-fab--on {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

/* Завантаження форми: пульсує, доки форма не відкриється. */
.ult-cc-fab.ult-cc-fab--busy {
	animation: ult-cc-pulse 1s ease-in-out infinite;
}

/* Нагадування: один м'який імпульс зрідка (JS), не постійне миготіння. */
.ult-cc-fab.ult-cc-fab--nudge {
	animation: ult-cc-pulse 1.2s ease-out 1;
}

@keyframes ult-cc-pulse {
	0% { box-shadow: 0 0 0 0 rgba(0, 168, 232, .55); }
	100% { box-shadow: 0 0 0 14px rgba(0, 168, 232, 0); }
}

.ult-cc-fab:focus-visible,
.ult-cc-menu__item:focus-visible {
	outline: 3px solid #00171f;
	outline-offset: 2px;
}

/* Меню з трьох дій над кнопкою. */
.ult-cc-menu {
	position: fixed;
	right: 32px;
	bottom: calc(32px + 60px + 12px);
	z-index: 1015;
	display: flex;
	flex-direction: column;
	min-width: 240px;
	max-width: calc(100vw - 32px);
	padding: 8px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(0, 23, 31, .18);
}

.ult-cc-menu[hidden] {
	display: none;
}

.ult-cc-menu__item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 48px;
	padding: 8px 12px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #00171f;
	font: inherit;
	font-size: 16px;
	line-height: 1.2;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.ult-cc-menu__item:hover,
.ult-cc-menu__item:focus {
	background: rgba(0, 168, 232, .08);
	color: #00171f;
	text-decoration: none;
}

.ult-cc-menu__icon {
	display: inline-flex;
	flex: 0 0 36px;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: #fff;
}

.ult-cc-menu__item--call .ult-cc-menu__icon { background: var(--ds-primary-color, #00a8e8); }
.ult-cc-menu__item--viber .ult-cc-menu__icon { background: #7360f2; }
.ult-cc-menu__item--telegram .ult-cc-menu__icon { background: #229ed9; }

@media (prefers-reduced-motion: reduce) {
	.ult-cc-fab,
	.ult-cc-fab.ult-cc-fab--busy,
	.ult-cc-fab.ult-cc-fab--nudge {
		animation: none;
		transition: none;
	}
}

/* Мобільний (нижня навігація теми): кнопка справа над навігацією, «вгору» — над кнопкою. */
@media (max-width: 991.98px) {
	.ult-cc-fab {
		right: 14px;
		bottom: calc(84px + env(safe-area-inset-bottom, 0px));
		width: 52px;
		height: 52px;
	}

	.ult-cc-menu {
		right: 14px;
		bottom: calc(84px + 52px + 12px + env(safe-area-inset-bottom, 0px));
	}

	/* без плаваючої кнопки (кошик, оформлення) меню відкривається з «Написати» одразу над навігацією */
	body:not(.ult-cc-has-fab) .ult-cc-menu {
		bottom: calc(84px + env(safe-area-inset-bottom, 0px));
	}

	body.ult-cc-has-fab #back-top {
		bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important;
	}

	#uptocall-mini {
		display: none !important;
	}
}

/* Відкрите меню перекриває місце стрілки «вгору» — поки воно відкрите, стрілку сховано. */
body.ult-cc-menu-open #back-top {
	visibility: hidden !important;
}

/* Дефект теми (не модуля): таблиці в тексті головної ширші за екран телефона (RU 408–416 px при 390,
   UA 335–343 px при 320) — сторінка розширювалась, фіксовані кнопки й нижня навігація зсувались.
   Лише ці таблиці: на ширину блоку, довгі слова переносяться в клітинці. */
@media (max-width: 575.98px) {
	#common-home .content-block-text table {
		width: 100%;
		max-width: 100%;
		table-layout: fixed;
	}

	#common-home .content-block-text table th,
	#common-home .content-block-text table td {
		overflow-wrap: anywhere;
		word-break: normal;
		hyphens: auto;
	}
}
