/*
TopShop — віджет Binotel «Передзвонимо за 30 секунд»

Віджет малює свою форму прямо в нашій сторінці (#bingc-passive), тож
переодягаємо її в нашу модалку. Власну кнопку й смугу-запрошення Binotel
вимкнено налаштуваннями (inc/assets.php), форму відкриває наша кнопка
над «Зв'язатися» (template-parts/common/contact-fab.php).

Стилі Binotel — #id + ланцюжок класів, частина з !important. Тому тут
усе з префіксом «html body #bingc-passive.bingc-passive» і з !important:
інакше їхні правила перемагають. Якщо Binotel перейменує класи, форма
повернеться до їхнього вигляду, але працюватиме.
*/

/* --- Наша кнопка над «Зв'язатися» ---------------------------------------- */

.ts-fab__call {
	position: relative;
	display: grid;
	place-items: center;
	/* Розмір — як у «Зв'язатися» під нею (.ts-fab__btn). */
	width: 60px;
	height: 60px;
	padding: 0;
	color: var(--ts-color-primary);
	background: var(--ts-color-surface);
	border: 1px solid var(--ts-color-border);
	border-radius: var(--ts-radius-full);
	box-shadow: 0 8px 20px rgba(10, 37, 64, 0.16), 0 2px 6px rgba(10, 37, 64, 0.1);
	cursor: pointer;
	transition: transform var(--ts-duration-fast) var(--ts-ease), box-shadow var(--ts-duration-fast) var(--ts-ease);
}

.ts-fab__call[hidden] {
	display: none;
}

.ts-fab__call:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(10, 37, 64, 0.2), 0 2px 6px rgba(10, 37, 64, 0.12);
}

.ts-fab__call:focus-visible {
	outline: 3px solid var(--ts-color-primary-soft);
	outline-offset: 3px;
}

/* «30 с» — щоб з першого погляду відрізнялась від «Зв'язатися». */
.ts-fab__call-badge {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 28px;
	padding: 2px 6px;
	font-size: 11px;
	font-weight: var(--ts-weight-semibold);
	line-height: 14px;
	color: var(--ts-color-primary-contrast);
	background: var(--ts-color-primary);
	border: 2px solid var(--ts-color-surface);
	border-radius: var(--ts-radius-full);
	white-space: nowrap;
}

/* Підпис ліворуч від кнопки: на комп'ютері — при наведенні й фокусі. */
.ts-fab__call-label {
	position: absolute;
	top: 50%;
	right: calc(100% + 12px);
	padding: 6px 12px;
	font-size: var(--ts-text-sm);
	font-weight: var(--ts-weight-medium);
	color: var(--ts-color-surface);
	background: var(--ts-color-text-strong);
	border-radius: var(--ts-radius-md);
	white-space: nowrap;
	opacity: 0;
	transform: translate(6px, -50%);
	transition: opacity var(--ts-duration-fast) var(--ts-ease), transform var(--ts-duration-fast) var(--ts-ease);
	pointer-events: none;
}

.ts-fab__call:hover .ts-fab__call-label,
.ts-fab__call:focus-visible .ts-fab__call-label {
	opacity: 1;
	transform: translate(0, -50%);
}

/* Відкрита панель «Зв'язатися» — кнопка не стирчить між панеллю й хрестиком. */
.ts-fab:has(.ts-fab__panel:not([hidden])) .ts-fab__call {
	display: none;
}

@media (hover: none) {
	.ts-fab__call-label {
		display: none;
	}
}

/* Телефон: «Зв'язатися» там 52px — і ця теж. */
@media (max-width: 1023px) {
	.ts-fab__call {
		width: 52px;
		height: 52px;
	}
}

/* --- Форма Binotel як наша модалка ---------------------------------------- */

html body #bingc-passive.bingc-passive {
	position: fixed !important;
	inset: 0 !important;
	top: 0 !important;
	width: auto !important;
	height: 100% !important;
	z-index: var(--ts-z-modal) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: var(--ts-space-4) !important;
	font-family: var(--ts-font-sans) !important;
}

html body #bingc-passive.bingc-passive.bingc-passive-closed {
	display: none !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-background {
	position: fixed !important;
	inset: 0 !important;
	z-index: 0 !important;
	background: rgba(4, 22, 42, 0.5) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay {
	position: relative !important;
	top: auto !important;
	z-index: 1 !important;
	width: 100% !important;
	max-width: 440px !important;
	height: auto !important;
	max-height: calc(100vh - var(--ts-space-8)) !important;
	padding: var(--ts-space-6) var(--ts-space-5) var(--ts-space-4) !important;
	overflow-y: auto !important;
	background: var(--ts-color-surface) !important;
	border-radius: var(--ts-radius-xl) !important;
	box-shadow: var(--ts-shadow-lg) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content {
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/*
 * Легкий акцент зверху: м'який відтінок бренду переходить у білий —
 * модалка не «голий» білий прямокутник, але й не банер.
 */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay {
	background: linear-gradient(180deg, var(--ts-color-primary-soft) 0, var(--ts-color-surface) 140px) var(--ts-color-surface) !important;
}

/* Заголовок «Передзвонимо вам за 30 секунд»: значок ліворуч, текст праворуч. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you {
	position: relative !important;
	min-height: 48px !important;
	padding: 0 var(--ts-space-8) 0 64px !important;
	font: var(--ts-weight-semibold) var(--ts-text-xl) / 1.3 var(--ts-font-sans) !important;
	color: var(--ts-color-text-strong) !important;
	text-align: left !important;
}

/* Значок: телефон, а в неробочий час — годинник. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 48px;
	height: 48px;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / 22px no-repeat,
		var(--ts-color-primary);
	border-radius: var(--ts-radius-lg);
	box-shadow: 0 6px 16px -6px var(--ts-color-primary);
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you.bingc-offline-form::before {
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / 24px no-repeat,
		var(--ts-color-primary);
}

/* Неробочий час: «На жаль, зараз у нас неробочий час.» — плашка над заголовком. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you.bingc-offline-form span.small-text:first-child {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	width: fit-content !important;
	margin: 0 0 var(--ts-space-2) !important;
	padding: 3px 10px 3px 8px !important;
	font: var(--ts-weight-semibold) var(--ts-text-xs) / 1.4 var(--ts-font-sans) !important;
	color: var(--ts-color-warning) !important;
	background: var(--ts-color-warning-soft) !important;
	border-radius: var(--ts-radius-full) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you.bingc-offline-form span.small-text:first-child::before {
	content: "";
	width: 6px;
	height: 6px;
	background: currentColor;
	border-radius: 50%;
}

/* Плашка й так стоїть окремим рядком — <br> Binotel дав би зайвий відступ. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you.bingc-offline-form br {
	display: none !important;
}

/* Пояснення в неробочий час — що станеться далі. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you.bingc-offline-form::after {
	content: "Оберіть зручний час — менеджер сам вам зателефонує. Дзвінок для вас безкоштовний.";
	display: block;
	margin-top: var(--ts-space-1);
	font: var(--ts-weight-regular) var(--ts-text-sm) / 1.45 var(--ts-font-sans);
	color: var(--ts-color-muted);
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you * {
	font: inherit !important;
	color: inherit !important;
	text-align: left !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you div.bingc-we-will-call-you-alignment {
	display: block !important;
	width: auto !important;
	height: auto !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you div.bingc-we-will-call-you-alignment div.bingc-we-will-call-you-restriction {
	max-height: none !important;
	overflow: visible !important;
}

/* Пояснення під заголовком — чим це відрізняється від «Замовити дзвінок». */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you:not(.bingc-offline-form)::after {
	content: "Залиште номер — і ми самі зателефонуємо вам протягом 30 секунд. Для вас дзвінок безкоштовний.";
	display: block;
	margin-top: var(--ts-space-2);
	font: var(--ts-weight-regular) var(--ts-text-sm) / 1.45 var(--ts-font-sans);
	color: var(--ts-color-muted);
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you.bingc-offline-form span.small-text {
	display: block !important;
	margin-top: var(--ts-space-2) !important;
	padding: 0 !important;
	font: var(--ts-weight-regular) var(--ts-text-sm) / 1.45 var(--ts-font-sans) !important;
	color: var(--ts-color-muted) !important;
}

/* Форма: поле й кнопка на всю ширину, як у наших формах. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form {
	margin-top: var(--ts-space-5) !important;
	padding: 0 !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form {
	display: flex !important;
	flex-direction: column !important;
	gap: var(--ts-space-3) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form div.bingc-passive-get-phone-form-input-border,
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form span.bingc-sample-countdown-timer {
	display: none !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form input.bingc-passive-get-phone-form-input {
	display: block !important;
	width: 100% !important;
	height: 48px !important;
	padding: 0 var(--ts-space-3) !important;
	/* 16px — менше iOS збільшує сторінку при фокусі. */
	font: var(--ts-weight-regular) 16px / 1.4 var(--ts-font-sans) !important;
	color: var(--ts-color-text) !important;
	background: var(--ts-color-surface) !important;
	border: 1px solid var(--ts-color-border-strong) !important;
	border-radius: var(--ts-radius-md) !important;
	transition: border-color var(--ts-duration-fast) var(--ts-ease), box-shadow var(--ts-duration-fast) var(--ts-ease) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form input.bingc-passive-get-phone-form-input:focus {
	border-color: var(--ts-color-primary) !important;
	box-shadow: 0 0 0 3px var(--ts-color-primary-soft) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form input.bingc-passive-get-phone-form-input.warning {
	border-color: var(--ts-color-danger) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form input.bingc-passive-get-phone-form-input::placeholder {
	font: var(--ts-weight-regular) 16px / 1.4 var(--ts-font-sans) !important;
	color: var(--ts-color-faint) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form a.bingc-passive-phone-form-button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: 48px !important;
	margin: 0 !important;
	font: var(--ts-weight-semibold) var(--ts-text-base) / 1 var(--ts-font-sans) !important;
	color: var(--ts-color-primary-contrast) !important;
	background: var(--ts-color-primary) !important;
	border-radius: var(--ts-radius-md) !important;
	transition: background-color var(--ts-duration-fast) var(--ts-ease) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-get-phone-form form.bingc-passive-get-phone-form a.bingc-passive-phone-form-button:hover {
	background: var(--ts-color-primary-hover) !important;
}

/*
 * Приклад Binotel «067 000 00 00» — не про наш формат (+380, маска з
 * main.js), тож ховаємо: підказка тепер у самому полі.
 */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-phone-sample {
	display: none !important;
}

/* Наша помилка під формою — та сама перевірка, що в «Замовити дзвінок». */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content p.ts-binotel-error {
	margin: var(--ts-space-2) 0 0 !important;
	font: var(--ts-weight-regular) var(--ts-text-sm) / 1.4 var(--ts-font-sans) !important;
	color: var(--ts-color-danger) !important;
}

/*
 * «Вільних менеджерів зараз: 5 / Сьогодні вже передзвонили: 10+» — живі
 * цифри з Binotel: видно, що на тому боці справді хтось є.
 */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-statistics {
	position: relative !important;
	margin: var(--ts-space-4) 0 0 !important;
	padding: var(--ts-space-3) var(--ts-space-3) var(--ts-space-3) calc(var(--ts-space-3) + 18px) !important;
	opacity: 1 !important;
	font: var(--ts-weight-regular) var(--ts-text-sm) / 1.5 var(--ts-font-sans) !important;
	color: var(--ts-color-text) !important;
	background: var(--ts-color-surface-sunken) !important;
	border-radius: var(--ts-radius-md) !important;
}

/* Зелена позначка «на лінії» з м'якою пульсацією. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-statistics::before {
	content: "";
	position: absolute;
	top: calc(var(--ts-space-3) + 6px);
	left: var(--ts-space-3);
	width: 8px;
	height: 8px;
	background: #16a34a;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
	animation: ts-binotel-online 2s ease-out infinite;
}

@keyframes ts-binotel-online {
	0% {
		box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
	}

	70%,
	100% {
		box-shadow: 0 0 0 7px rgba(22, 163, 74, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-statistics::before {
		animation: none;
	}
}

/* Стани після надсилання: «уже телефонуємо», відлік, «передзвонимо пізніше», помилка. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-already-call-you,
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you-later,
html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-something-went-wrong {
	max-width: none !important;
	margin: 0 !important;
	padding: var(--ts-space-4) var(--ts-space-6) var(--ts-space-2) !important;
	font: var(--ts-weight-semibold) var(--ts-text-lg) / 1.35 var(--ts-font-sans) !important;
	color: var(--ts-color-text-strong) !important;
	text-align: center !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-we-will-call-you-later span.small-text {
	display: block !important;
	padding: var(--ts-space-2) 0 0 !important;
	font: var(--ts-weight-regular) var(--ts-text-sm) / 1.45 var(--ts-font-sans) !important;
	color: var(--ts-color-muted) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay div.bingc-passive-content div.bingc-passive-countdown-timer {
	padding: var(--ts-space-2) 0 var(--ts-space-4) !important;
	font: var(--ts-weight-semibold) 40px / 1.1 var(--ts-font-sans) !important;
	font-variant-numeric: tabular-nums;
	color: var(--ts-color-primary) !important;
	text-align: center !important;
}

/*
 * Неробочий час: «Передзвонимо вам о 09 : 00, завтра». Замість синіх
 * плиток Binotel — три поля як наші select: година, хвилини, день.
 * Список відкривається, коли Binotel ставить полю клас «…-hover».
 */
html body #bingc-passive.bingc-passive [class*="date-selection"],
html body #bingc-passive.bingc-passive [class*="date-selection"] * {
	font-family: var(--ts-font-sans) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-get-phone-form-date-selection {
	display: flex !important;
	gap: var(--ts-space-2) !important;
	height: auto !important;
	margin: var(--ts-space-3) 0 0 !important;
	padding: 0 !important;
}

/* Clearfix Binotel у flex-ряду став би порожнім елементом із відступом. */
html body #bingc-passive.bingc-passive div.bingc-passive-get-phone-form-date-selection::before,
html body #bingc-passive.bingc-passive div.bingc-passive-get-phone-form-date-selection::after {
	display: none !important;
}

html body #bingc-passive #bingc-passive-date-selection-select-hour,
html body #bingc-passive #bingc-passive-date-selection-select-minutes,
html body #bingc-passive #bingc-passive-date-selection-select-day {
	position: relative !important;
	float: none !important;
	display: flex !important;
	align-items: center !important;
	flex: 0 0 84px !important;
	width: auto !important;
	height: 48px !important;
	margin: 0 !important;
	padding: 0 32px 0 var(--ts-space-3) !important;
	color: var(--ts-color-text) !important;
	background: var(--ts-color-surface) !important;
	border: 1px solid var(--ts-color-border-strong) !important;
	border-radius: var(--ts-radius-md) !important;
	cursor: pointer !important;
	transition: border-color var(--ts-duration-fast) var(--ts-ease), box-shadow var(--ts-duration-fast) var(--ts-ease) !important;
}

html body #bingc-passive #bingc-passive-date-selection-select-day {
	flex: 1 1 auto !important;
}

html body #bingc-passive #bingc-passive-date-selection-select-hour:hover,
html body #bingc-passive #bingc-passive-date-selection-select-minutes:hover,
html body #bingc-passive #bingc-passive-date-selection-select-day:hover {
	border-color: var(--ts-color-primary) !important;
}

html body #bingc-passive .bingc-passive-date-selection-select-hour-hover#bingc-passive-date-selection-select-hour,
html body #bingc-passive .bingc-passive-date-selection-select-minutes-hover#bingc-passive-date-selection-select-minutes,
html body #bingc-passive .bingc-passive-date-selection-select-day-hover#bingc-passive-date-selection-select-day {
	border-color: var(--ts-color-primary) !important;
	box-shadow: 0 0 0 3px var(--ts-color-primary-soft) !important;
}

/* Вибране значення: 09, 00, «Завтра». */
html body #bingc-passive #bingc-passive-date-selection-selected-hour,
html body #bingc-passive #bingc-passive-date-selection-selected-minutes,
html body #bingc-passive #bingc-passive-date-selection-selected-day {
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	font: var(--ts-weight-semibold) var(--ts-text-base) / 1 var(--ts-font-sans) !important;
	font-variant-numeric: tabular-nums;
	color: var(--ts-color-text-strong) !important;
	text-align: left !important;
	white-space: nowrap !important;
}

/* Стрілка — шеврон select праворуч, як у наших полях. */
html body #bingc-passive.bingc-passive svg.bingc-passive-date-selection-arrows {
	position: absolute !important;
	top: 50% !important;
	right: var(--ts-space-3) !important;
	left: auto !important;
	width: 8px !important;
	height: 12px !important;
	margin: -6px 0 0 !important;
	transform: none !important;
}

html body #bingc-passive.bingc-passive svg.bingc-passive-date-selection-arrows path {
	fill: var(--ts-color-muted) !important;
}

/* Випадний список. */
html body #bingc-passive #bingc-passive-date-selection-select-hour-list-of-hours-container,
html body #bingc-passive #bingc-passive-date-selection-select-minutes-list-of-minutes-container,
html body #bingc-passive #bingc-passive-date-selection-select-day-list-of-days-container {
	position: absolute !important;
	top: calc(100% + 4px) !important;
	left: -1px !important;
	z-index: 10 !important;
	display: none !important;
	width: auto !important;
	min-width: calc(100% + 2px) !important;
	height: auto !important;
	margin: 0 !important;
	padding: var(--ts-space-1) !important;
	background: var(--ts-color-surface) !important;
	border: 1px solid var(--ts-color-border) !important;
	border-radius: var(--ts-radius-md) !important;
	box-shadow: var(--ts-shadow-lg) !important;
}

/*
 * Години й хвилини — сіткою, а не стовпчиком: десять годин стовпчиком
 * вилазили за низ модалки. Дні — звичайним списком.
 */
html body #bingc-passive .bingc-passive-date-selection-select-hour-hover #bingc-passive-date-selection-select-hour-list-of-hours-container,
html body #bingc-passive .bingc-passive-date-selection-select-minutes-hover #bingc-passive-date-selection-select-minutes-list-of-minutes-container {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(44px, auto)) !important;
	gap: 2px !important;
}

html body #bingc-passive .bingc-passive-date-selection-select-minutes-hover #bingc-passive-date-selection-select-minutes-list-of-minutes-container {
	grid-template-columns: repeat(4, minmax(44px, auto)) !important;
}

html body #bingc-passive .bingc-passive-date-selection-select-day-hover #bingc-passive-date-selection-select-day-list-of-days-container {
	display: block !important;
}

/* Clearfix Binotel і тут став би першою порожньою клітинкою сітки. */
html body #bingc-passive [class*="date-selection-select"] [class*="-container"]::before,
html body #bingc-passive [class*="date-selection-select"] [class*="-container"]::after {
	display: none !important;
}

/*
 * Колір пунктів Binotel задає своїм CSS з id та !important — перебиваємо
 * трьома id: поле, контейнер, модалка.
 */
html body div#bingc-passive div#bingc-passive-date-selection-select-hour div#bingc-passive-date-selection-select-hour-list-of-hours-container ul li,
html body div#bingc-passive div#bingc-passive-date-selection-select-minutes div#bingc-passive-date-selection-select-minutes-list-of-minutes-container ul li,
html body div#bingc-passive div#bingc-passive-date-selection-select-day div#bingc-passive-date-selection-select-day-list-of-days-container ul li {
	color: var(--ts-color-text) !important;
}

html body div#bingc-passive div#bingc-passive-date-selection-select-hour div#bingc-passive-date-selection-select-hour-list-of-hours-container ul li:hover,
html body div#bingc-passive div#bingc-passive-date-selection-select-minutes div#bingc-passive-date-selection-select-minutes-list-of-minutes-container ul li:hover,
html body div#bingc-passive div#bingc-passive-date-selection-select-day div#bingc-passive-date-selection-select-day-list-of-days-container ul li:hover {
	color: var(--ts-color-primary) !important;
	background: var(--ts-color-primary-soft) !important;
}

/* Фон пунктів Binotel (синій) — так само трьома id. */
html body div#bingc-passive div#bingc-passive-date-selection-select-hour div#bingc-passive-date-selection-select-hour-list-of-hours-container ul li,
html body div#bingc-passive div#bingc-passive-date-selection-select-minutes div#bingc-passive-date-selection-select-minutes-list-of-minutes-container ul li,
html body div#bingc-passive div#bingc-passive-date-selection-select-day div#bingc-passive-date-selection-select-day-list-of-days-container ul li {
	background: none !important;
}

html body div#bingc-passive div#bingc-passive-date-selection-select-hour div#bingc-passive-date-selection-select-hour-list-of-hours-container ul li:hover,
html body div#bingc-passive div#bingc-passive-date-selection-select-minutes div#bingc-passive-date-selection-select-minutes-list-of-minutes-container ul li:hover,
html body div#bingc-passive div#bingc-passive-date-selection-select-day div#bingc-passive-date-selection-select-day-list-of-days-container ul li:hover {
	background: var(--ts-color-primary-soft) !important;
}

/* Модалка прокручується (overflow), і відкритий список обрізався б її краєм. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay:has([class*="date-selection-select"][class*="-hover"]) {
	overflow: visible !important;
}

/* Два ul годин Binotel — одна сітка: пункти стають прямими дітьми контейнера. */
html body #bingc-passive #bingc-passive-date-selection-select-hour-list-of-hours-container ul,
html body #bingc-passive #bingc-passive-date-selection-select-minutes-list-of-minutes-container ul {
	display: contents !important;
}

html body #bingc-passive #bingc-passive-date-selection-select-day-list-of-days-container ul {
	float: none !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	background: none !important;
	border: 0 !important;
}

html body #bingc-passive #bingc-passive-date-selection-select-hour-list-of-hours-container ul li,
html body #bingc-passive #bingc-passive-date-selection-select-minutes-list-of-minutes-container ul li,
html body #bingc-passive #bingc-passive-date-selection-select-day-list-of-days-container ul li {
	text-align: left !important;
	list-style: none !important;
}

html body #bingc-passive #bingc-passive-date-selection-select-hour-list-of-hours-container ul li,
html body #bingc-passive #bingc-passive-date-selection-select-minutes-list-of-minutes-container ul li {
	text-align: center !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay [class*="date-selection-select"] ul li {
	float: none !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 8px var(--ts-space-3) !important;
	font: var(--ts-weight-regular) var(--ts-text-sm) / 1.3 var(--ts-font-sans) !important;
	font-variant-numeric: tabular-nums;
	color: var(--ts-color-text) !important;
	white-space: nowrap !important;
	background: none !important;
	border: 0 !important;
	border-radius: var(--ts-radius-sm) !important;
	cursor: pointer !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay [class*="date-selection-select"] ul li:hover {
	color: var(--ts-color-primary) !important;
	background: var(--ts-color-primary-soft) !important;
}

/* Хрестик — як у наших модалках. */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay a.bingc-passive-close-button {
	position: absolute !important;
	top: var(--ts-space-3) !important;
	right: var(--ts-space-3) !important;
	z-index: 2 !important;
	display: grid !important;
	place-items: center !important;
	width: 44px !important;
	height: 44px !important;
	opacity: 1 !important;
	border-radius: var(--ts-radius-md) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay a.bingc-passive-close-button:hover {
	background: var(--ts-color-surface-sunken) !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay a.bingc-passive-close-button svg {
	width: 16px !important;
	height: 16px !important;
}

html body #bingc-passive.bingc-passive div.bingc-passive-overlay a.bingc-passive-close-button svg polygon {
	fill: var(--ts-color-muted) !important;
}

/* Підпис «Віртуальна АТС» не потрібен (рішення власника). */
html body #bingc-passive.bingc-passive div.bingc-passive-overlay a.bingc-powered-by {
	display: none !important;
}

/* Смуга-запрошення знизу (на випадок, якщо налаштування не спрацює). */
html body #bingc-active.bingc-active {
	display: none !important;
}

/* Телефон: шторка знизу на всю ширину, як наші модалки. */
@media (max-width: 599px) {
	html body #bingc-passive.bingc-passive {
		align-items: flex-end !important;
		padding: 0 !important;
	}

	html body #bingc-passive.bingc-passive div.bingc-passive-overlay {
		max-width: none !important;
		max-height: 92dvh !important;
		padding: var(--ts-space-5) var(--ts-space-4) calc(var(--ts-space-4) + env(safe-area-inset-bottom, 0px)) !important;
		border-radius: var(--ts-radius-xl) var(--ts-radius-xl) 0 0 !important;
	}
}
