/* ============================================================================
   Delivery Digital Assistant — floating chat widget
   Trigger: white circle with Presco truck, stacked above existing WhatsApp btn.
   Panel: red-gradient header (Presco brand), bubble messages, quick-actions,
          input. Mobile breakpoint at 560px → full-width sheet from bottom.
   ============================================================================ */

:root {
	--dda-red: #F01A26;
	--dda-red-2: #c11018;
	--dda-ink: #1b1f27;
	--dda-line: #e6e8ec;
	--dda-bubble-user: #1b1f27;
	--dda-bubble-asst: #f3f4f6;
	--dda-z: 9998;
}

/* ---- 2026-05-24: hide WhatsApp floating bubble GLOBALLY (user request) ---- */
html body .whatsapp-float,
html body .whatsapp-float.right,
html body .whatsapp-float.left,
html body a.whatsapp-float,
html body div.whatsapp-float,
html body .whatsapp-float * {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ---- legacy: repositioning rules kept for fallback if WhatsApp re-enabled later ---- */
body .whatsapp-float,
body .whatsapp-float.right,
body .whatsapp-float.left {
	right: auto !important;
	left: 18px !important;
	bottom: 20px !important;
}
@media (max-width: 991px) {
	body .whatsapp-float,
	body .whatsapp-float.right,
	body .whatsapp-float.left {
		left: 14px !important;
		bottom: 20px !important;
	}
}

/* 2026-05-21 — safety-size для .whatsapp-float. OCMOD overlay (где раньше
   определялась width/height) сейчас bypassed (см. site_audit/SITE_ARCHITECTURE.md
   §10a) — без этих правил .whatsapp-float img растягивается на 100% ширины
   экрана (background-color без width/height + width: 100% на img). Дублируем
   sizing inline здесь, чтобы не зависеть от OCMOD. */
body .whatsapp-float {
	width: 60px !important;
	height: 60px !important;
	border-radius: 50% !important;
	background-color: #25d366 !important;
	box-shadow: 2px 2px 10px rgba(0,0,0,.2) !important;
	z-index: 1000 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	overflow: hidden !important;
}
body .whatsapp-float img {
	width: 100% !important;
	height: 100% !important;
	padding: 10px !important;
	box-sizing: border-box !important;
	display: block !important;
}
@media (max-width: 768px) {
	body .whatsapp-float {
		width: 50px !important;
		height: 50px !important;
	}
	body .whatsapp-float img {
		padding: 8px !important;
	}
}
/* reCAPTCHA v3 badge — Google ставит inline-стили, бьём по `!important` */
body .grecaptcha-badge {
	right: auto !important;
	left: 0 !important;
}
body .grecaptcha-badge[style*="visibility: visible"] {
	right: auto !important;
	left: 0 !important;
}

/* ---- trigger button -------------------------------------------------- */
.dda-trigger {
	position: fixed;
	right: 18px;
	bottom: 24px; /* WhatsApp ушёл влево → можно AI прижать к самому низу */
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #eef0f3;
	box-shadow: 0 8px 22px rgba(15, 18, 27, 0.18), 0 2px 6px rgba(15, 18, 27, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: var(--dda-z);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	padding: 0;
	overflow: visible;
}
.dda-trigger:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 12px 28px rgba(15, 18, 27, 0.22), 0 4px 8px rgba(15, 18, 27, 0.10);
}
.dda-trigger:active { transform: translateY(0) scale(0.98); }
.dda-trigger img {
	width: 36px;
	height: 36px;
	object-fit: contain;
	pointer-events: none;
}
.dda-trigger-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	background: var(--dda-red);
	color: #fff;
	font: 700 10px/1 system-ui, sans-serif;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(240, 26, 38, 0.4);
}
.dda-trigger[data-open="true"] { display: none; }

/* ---- panel ----------------------------------------------------------- */
.dda-panel {
	position: fixed;
	right: 18px;
	bottom: 80px;
	width: 380px;
	max-width: calc(100vw - 36px);
	height: 580px;
	max-height: calc(100vh - 100px);
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(15, 18, 27, 0.28), 0 6px 16px rgba(15, 18, 27, 0.12);
	display: none;
	flex-direction: column;
	overflow: hidden;
	z-index: var(--dda-z);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--dda-ink);
}
.dda-panel[data-open="true"] { display: flex; }

.dda-header {
	background: linear-gradient(135deg, var(--dda-red), var(--dda-red-2));
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}
.dda-header-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}
.dda-header-icon img { width: 22px; height: 22px; object-fit: contain; }
.dda-header-text { flex: 1; min-width: 0; }
.dda-header-title {
	font-size: 15px;
	line-height: 1.2;
	font-weight: 800 !important;
	letter-spacing: 0.01em;
	margin: 0;
}
html body .dda-header .dda-header-title,
html body .dda-panel .dda-header-title { font-weight: 800 !important; }
.dda-header-sub {
	font: 500 11.5px/1.3 inherit;
	opacity: 0.92;
	margin: 2px 0 0;
	display: flex;
	align-items: center;
	gap: 6px;
}
.dda-header-sub::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #4ade80;
	box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
}
.dda-header-actions { display: flex; gap: 4px; }
.dda-icon-btn {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255,255,255,0.16);
	color: #fff;
	border: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s ease;
}
.dda-icon-btn:hover { background: rgba(255,255,255,0.28); }
.dda-icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- messages -------------------------------------------------------- */
.dda-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 16px 14px 8px;
	background: #fafbfc;
	scroll-behavior: smooth;
}
.dda-body::-webkit-scrollbar { width: 6px; }
.dda-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.dda-msg {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
	animation: dda-pop 0.22s ease;
}
@keyframes dda-pop {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}
.dda-msg-bubble {
	max-width: 78%;
	padding: 9px 13px;
	border-radius: 14px;
	font: 400 13.5px/1.45 inherit;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
.dda-msg-bubble a,
.dda-msg-bubble a.dda-link {
	color: #2563eb;
	text-decoration: underline;
	text-underline-offset: 2px;
	word-break: break-all;
	font-weight: 600;
}
.dda-msg-bubble a:hover { color: #1d4ed8; }
.dda-msg[data-role="user"] .dda-msg-bubble a { color: #93c5fd; }
.dda-msg-bubble strong { font-weight: 700; }
.dda-msg[data-role="user"] {
	justify-content: flex-end;
}
.dda-msg[data-role="user"] .dda-msg-bubble {
	background: var(--dda-bubble-user);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.dda-msg[data-role="assistant"] .dda-msg-bubble {
	background: var(--dda-bubble-asst);
	color: var(--dda-ink);
	border-bottom-left-radius: 4px;
}
.dda-msg[data-role="error"] .dda-msg-bubble {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
	font-size: 12.5px;
}
.dda-typing {
	display: inline-flex;
	gap: 4px;
	align-items: center;
	padding: 4px 0;
}
.dda-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #9ca3af;
	animation: dda-bounce 1.2s infinite ease-in-out;
}
.dda-typing span:nth-child(2) { animation-delay: 0.15s; }
.dda-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dda-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
	30% { transform: translateY(-4px); opacity: 1; }
}

/* ---- quick actions --------------------------------------------------- */
/* 9 chips — компактнее, все видны сразу без скролла, в 3 ряда × 3 chip. */
.dda-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	padding: 0 12px 10px;
	background: #fafbfc;
	overflow: visible;
}
.dda-quick-btn {
	font: 600 10.5px/1 inherit;
	color: var(--dda-ink);
	background: #fff;
	border: 1px solid var(--dda-line);
	border-radius: 999px;
	padding: 6px 9px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	flex-shrink: 0;
	white-space: nowrap;
	letter-spacing: 0.01em;
}
.dda-quick-btn:hover {
	background: #fff5f5;
	border-color: var(--dda-red);
	color: var(--dda-red);
}

/* ---- input ----------------------------------------------------------- */
.dda-input-bar {
	flex-shrink: 0;
	border-top: 1px solid var(--dda-line);
	background: #fff;
	padding: 10px 12px 12px;
	display: flex;
	gap: 8px;
	align-items: flex-end;
}
.dda-input {
	flex: 1;
	resize: none;
	max-height: 110px;
	min-height: 38px;
	padding: 9px 12px;
	border: 1px solid var(--dda-line);
	border-radius: 10px;
	font: 400 13.5px/1.4 inherit;
	color: var(--dda-ink);
	outline: none;
	background: #fafbfc;
	transition: border-color 0.15s, background 0.15s;
	/* Скрываем визуальный скроллбар (функциональность scroll остаётся) */
	scrollbar-width: none;
	-ms-overflow-style: none;
	overflow-y: auto;
}
.dda-input::-webkit-scrollbar { display: none; width: 0; height: 0; }
.dda-input:focus {
	border-color: var(--dda-red);
	background: #fff;
}
.dda-send {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	border: 0;
	background: linear-gradient(135deg, var(--dda-red), var(--dda-red-2));
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: opacity 0.15s, transform 0.1s;
}
.dda-send:hover { transform: translateY(-1px); }
.dda-send:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
}
.dda-send svg { width: 18px; height: 18px; fill: currentColor; }

.dda-foot {
	flex-shrink: 0;
	font: 400 10.5px/1.2 inherit;
	color: #9ca3af;
	text-align: center;
	padding: 0 12px 8px;
	background: #fff;
}

/* ---- mobile: panel becomes bottom sheet ----------------------------- */
@media (max-width: 560px) {
	.dda-panel {
		right: 0;
		bottom: 0;
		width: 100vw;
		max-width: 100vw;
		height: 88vh;
		max-height: 88vh;
		border-radius: 18px 18px 0 0;
	}
	.dda-trigger {
		right: 14px;
		bottom: 124px;
		width: 52px;
		height: 52px;
	}
	.dda-trigger img { width: 32px; height: 32px; }
}


/* ============================================================================
   2026-05-19 — Landing view (genzi.lv-style): channels + Start a new chat
   ============================================================================ */

/* === View switching === */
.dda-view { display: none; flex: 1 1 auto; min-height: 0; }
.dda-panel[data-view="landing"] .dda-view--landing { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dda-panel[data-view="chat"]    .dda-view--chat    { display: flex; flex-direction: column; }
/* Default state (если data-view не установлен): landing */
.dda-panel:not([data-view]) .dda-view--landing { display: block; overflow-y: auto; }

/* === Hero title on landing (под header'ом, белым на красном фоне) === */
.dda-hero-title {
	background: linear-gradient(135deg, var(--dda-red), var(--dda-red-2));
	color: #ffffff;
	font: 800 22px/1.2 inherit;
	margin: 0;
	padding: 0 16px 20px;
	letter-spacing: -0.01em;
}
/* Растягиваем header-фон ниже title — для эффекта как у genzi.lv */
.dda-panel[data-view="landing"] .dda-header,
.dda-panel:not([data-view]) .dda-header { padding-bottom: 4px; }

/* === Welcome card (белая, всплывает над hero) === */
.dda-welcome-card {
	background: #ffffff;
	border-radius: 14px;
	margin: 16px 14px 14px;
	padding: 14px 14px 14px;
	box-shadow: 0 4px 14px rgba(15,18,27,.08), 0 1px 3px rgba(15,18,27,.06);
	border: 1px solid #eef0f3;
	position: relative;
	z-index: 2;
}
.dda-welcome-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.dda-welcome-avatar {
	width: 44px; height: 44px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #eef0f3;
	display: flex; align-items: center; justify-content: center;
}
.dda-welcome-avatar img { width: 26px; height: 26px; object-fit: contain; }
.dda-online-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #e8f9f0;
	color: #0a8a5f;
	font: 700 11px/1 inherit;
	letter-spacing: 0.04em;
	padding: 6px 10px;
	border-radius: 20px;
}
.dda-online-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: #20c47a;
	box-shadow: 0 0 0 3px rgba(32, 196, 122, 0.2);
}
.dda-welcome-text {
	font-size: 13.5px;
	line-height: 1.45;
	font-weight: 400;
	color: #3a3f4a;
	margin: 0 0 14px;
}
html body .dda-welcome-text strong,
html body .dda-welcome-card .dda-welcome-text strong { font-weight: 800 !important; }
.dda-start-chat {
	width: 100%;
	background: linear-gradient(135deg, var(--dda-red), var(--dda-red-2));
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 13px 14px;
	font: 700 14.5px/1.2 inherit;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	transition: transform .15s ease, box-shadow .15s ease;
	box-shadow: 0 4px 12px rgba(240, 26, 38, 0.24);
}
.dda-start-chat:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(240, 26, 38, 0.32);
}
.dda-start-chat:active { transform: translateY(0); }
.dda-start-chat svg { width: 18px; height: 18px; flex-shrink: 0; }

/* === Channels section === */
.dda-channels-section {
	background: #ffffff;
	border-radius: 14px;
	margin: 0 14px 16px;
	padding: 12px 4px 4px;
	box-shadow: 0 4px 14px rgba(15,18,27,.06), 0 1px 3px rgba(15,18,27,.04);
	border: 1px solid #eef0f3;
}
.dda-channels-head {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #1f2329;
	font: 700 13px/1 inherit;
	padding: 4px 12px 12px;
}
.dda-channels-head svg {
	width: 16px; height: 16px;
	color: #5b5f66;
}
.dda-channels-list { display: flex; flex-direction: column; }
.dda-channel {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	text-decoration: none;
	color: #1f2329;
	border-top: 1px solid #f1f3f6;
	transition: background .15s ease;
}
.dda-channel:hover { background: #f9fafb; }
.dda-channel-icon {
	width: 34px; height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	flex-shrink: 0;
}
.dda-channel-icon svg { width: 18px; height: 18px; }
.dda-channel-label {
	flex: 1;
	font: 600 14.5px/1 inherit;
}
.dda-channel-arrow {
	color: #9ca0a6;
	display: flex;
	align-items: center;
}
.dda-channel-arrow svg { width: 14px; height: 14px; }

/* === Mobile: full-screen takeover (как у genzi.lv) === */
@media (max-width: 560px) {
	.dda-panel {
		right: 0 !important;
		bottom: 0 !important;
		left: 0;
		top: 0;
		width: 100vw !important;
		height: 100vh !important;
		max-width: 100vw !important;
		max-height: 100vh !important;
		border-radius: 0 !important;
	}
	.dda-hero-title {
		font-size: 26px;
		padding: 8px 18px 24px;
	}
	.dda-welcome-card,
	.dda-channels-section {
		margin-left: 16px;
		margin-right: 16px;
	}
}


/* ============================================================================
   2026-05-20 — Bottom contact dock (WhatsApp / Phone / Email) + tablet fullscreen
   На mobile + tablet портрете скрываем middle Channels-секцию и заменяем
   её на sticky bottom-dock из 3 крупных контактов — как у genzi.lv (Chatway).
   ============================================================================ */

/* Bottom contact dock — по умолчанию скрыт, показывается на mobile (см. @media ниже) */
.dda-bottom-dock {
	display: none;
	background: #fff;
	border-top: 1px solid #eef0f3;
	padding: 10px 8px;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 6px;
	flex-shrink: 0;
}
.dda-dock-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 4px;
	border-radius: 12px;
	text-decoration: none;
	color: #1f2329;
	transition: background .15s ease, transform .12s ease;
	-webkit-tap-highlight-color: transparent;
}
.dda-dock-btn:hover { background: #f6f7f9; }
.dda-dock-btn:active { transform: scale(.97); background: #f0f1f4; }
.dda-dock-icon {
	width: 44px; height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	box-shadow: 0 2px 6px rgba(15,18,27,.14);
}
.dda-dock-icon svg { width: 22px; height: 22px; }
.dda-dock-label {
	font: 600 11.5px/1 inherit;
	color: #5b5f66;
	letter-spacing: 0.02em;
}

/* Subtle landing-footer "Powered by AI" */
.dda-foot-landing {
	display: none;
	text-align: center;
	padding: 6px 12px 10px;
	font: 400 10.5px/1.2 inherit;
	color: #9ca3af;
	background: #fff;
	flex-shrink: 0;
}

/* Fix horizontal overflow */
.dda-panel { overflow-x: hidden; }
.dda-view--landing,
.dda-view--chat { overflow-x: hidden; box-sizing: border-box; }
.dda-welcome-card,
.dda-channels-section { box-sizing: border-box; }

/* ============================================================================
   MOBILE & TABLET-PORTRAIT (≤768px) — full-screen takeover + bottom-dock
   Breakpoint расширен с 560 до 768 — iPad portrait и крупные phones теперь
   тоже открывают чат как отдельную страницу на весь экран.
   ============================================================================ */
@media (max-width: 768px) {
	/* Full-screen panel */
	.dda-panel {
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		top: 0 !important;
		width: 100vw !important;
		height: 100vh !important;
		height: 100dvh !important;     /* iOS Safari dynamic viewport */
		max-width: 100vw !important;
		max-height: 100vh !important;
		max-height: 100dvh !important;
		border-radius: 0 !important;
	}
	.dda-trigger {
		right: 14px;
		bottom: 124px;
		width: 52px;
		height: 52px;
	}
	.dda-trigger img { width: 32px; height: 32px; }

	.dda-hero-title {
		font-size: 26px;
		padding: 8px 18px 24px;
	}
	/* 2026-05-21: welcome-card получает явный margin-top чтобы был отступ от
	   красного header'а (раньше слипались). */
	.dda-welcome-card {
		margin: 16px 16px 14px !important;
	}
	.dda-channels-section {
		margin-left: 16px !important;
		margin-right: 16px !important;
	}

	/* 2026-05-21: на mobile ПОКАЗЫВАЕМ Channels-секцию как список (тот же
	   layout что на desktop — строки WhatsApp / Phone / Email с arrow >).
	   Bottom-dock и landing-spacer СКРЫВАЕМ — юзер просил «нормально как на ПК». */
	.dda-channels-section { display: block !important; }
	.dda-bottom-dock { display: none !important; }
	.dda-landing-spacer { display: none !important; }

	/* Foot-landing оставляем visible под Channels */
	.dda-panel[data-view="landing"] .dda-foot-landing,
	.dda-panel:not([data-view]) .dda-foot-landing { display: block; }

	/* Landing-view: убираем flex-column (не нужен без spacer'а) */
	.dda-panel[data-view="landing"] .dda-view--landing,
	.dda-panel:not([data-view]) .dda-view--landing {
		display: block !important;
		overflow-y: auto !important;
	}

	/* Close button — более заметная (semi-transparent white) */
	.dda-icon-btn {
		background: rgba(255,255,255,0.20);
	}
	.dda-icon-btn:hover,
	.dda-icon-btn:active {
		background: rgba(255,255,255,0.35);
	}
}


/* ============================================================================
   2026-05-20 — Polished motion: panel slide-up, stagger fade-in, pulse,
   hover-lift, heartbeat. Все timing'и cubic-bezier(.4,0,.2,1) / (.16,1,.3,1)
   для consistent material-feel. Reduced-motion fallback в конце.
   ============================================================================ */

/* === Panel entry: scale+fade на desktop, slide-up на mobile === */
@keyframes dda-panel-pop {
	from { opacity: 0; transform: scale(.94) translateY(10px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes dda-panel-slideup {
	from { opacity: 0.6; transform: translateY(100%); }
	to   { opacity: 1; transform: translateY(0); }
}
.dda-panel[data-open="true"] {
	animation: dda-panel-pop .26s cubic-bezier(.4,0,.2,1) both;
	transform-origin: bottom right;
}
@media (max-width: 768px) {
	.dda-panel[data-open="true"] {
		animation: dda-panel-slideup .34s cubic-bezier(.16,1,.3,1) both;
		transform-origin: bottom center;
	}
}

/* === Trigger button: idle bob — лёгкий толчок раз в 5 сек чтобы привлечь внимание === */
@keyframes dda-trigger-bob {
	0%, 88%, 100% { transform: translateY(0); }
	92%           { transform: translateY(-5px); }
	96%           { transform: translateY(-2px); }
}
.dda-trigger:not([data-open="true"]) {
	animation: dda-trigger-bob 5.5s ease-in-out infinite;
}
.dda-trigger:hover { animation-play-state: paused; }

/* === Stagger fade-in внутренних элементов landing === */
@keyframes dda-fade-up {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}
.dda-panel[data-open="true"] .dda-hero-title       { animation: dda-fade-up .36s .06s cubic-bezier(.4,0,.2,1) both; }
.dda-panel[data-open="true"] .dda-welcome-card     { animation: dda-fade-up .42s .14s cubic-bezier(.4,0,.2,1) both; }
.dda-panel[data-open="true"] .dda-channels-section { animation: dda-fade-up .42s .22s cubic-bezier(.4,0,.2,1) both; }
.dda-panel[data-open="true"] .dda-dock-btn:nth-child(1) { animation: dda-fade-up .32s .24s cubic-bezier(.4,0,.2,1) both; }
.dda-panel[data-open="true"] .dda-dock-btn:nth-child(2) { animation: dda-fade-up .32s .30s cubic-bezier(.4,0,.2,1) both; }
.dda-panel[data-open="true"] .dda-dock-btn:nth-child(3) { animation: dda-fade-up .32s .36s cubic-bezier(.4,0,.2,1) both; }
.dda-panel[data-open="true"] .dda-foot-landing     { animation: dda-fade-up .28s .42s cubic-bezier(.4,0,.2,1) both; }

/* === Start-chat кнопка: мягкий pulse-glow для CTA === */
@keyframes dda-pulse-glow {
	0%, 100% { box-shadow: 0 4px 12px rgba(240, 26, 38, 0.24); }
	50%      { box-shadow: 0 6px 18px rgba(240, 26, 38, 0.40), 0 0 0 4px rgba(240, 26, 38, 0.10); }
}
.dda-start-chat {
	animation: dda-pulse-glow 2.8s ease-in-out infinite;
	animation-delay: 1s;
}
.dda-start-chat:hover { animation-play-state: paused; }

/* Маленькая стрелка-самолётик на Start-chat — slide-right на hover */
.dda-start-chat svg { transition: transform .22s cubic-bezier(.4,0,.2,1); }
.dda-start-chat:hover svg { transform: translateX(4px) rotate(-6deg); }

/* === ONLINE-индикатор: heartbeat-пульс === */
@keyframes dda-online-pulse {
	0%, 100% { box-shadow: 0 0 0 3px rgba(32, 196, 122, 0.20); }
	50%      { box-shadow: 0 0 0 7px rgba(32, 196, 122, 0.06); }
}
.dda-online-dot { animation: dda-online-pulse 2.2s ease-in-out infinite; }

/* Маленькая зелёная точка в header-sub — тоже heartbeat */
.dda-header-sub::before { animation: dda-online-pulse 2.2s ease-in-out infinite; }

/* === View-switch landing ↔ chat: cross-fade вместо instant === */
.dda-view {
	transition: opacity .18s ease;
}
/* Когда панель в landing — chat-view невидим (но в DOM), и наоборот.
   .dda-view сам имеет display:none по default'у — переопределяем для fade-эффекта. */
.dda-panel[data-view="chat"] .dda-view--chat {
	animation: dda-fade-up .26s cubic-bezier(.4,0,.2,1) both;
}

/* === Dock-btn: усиленный hover/active lift === */
.dda-dock-btn { will-change: transform; }
.dda-dock-icon {
	transition: transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s ease;
}
.dda-dock-btn:hover .dda-dock-icon {
	transform: translateY(-3px) scale(1.08);
	box-shadow: 0 8px 16px rgba(15,18,27,.20);
}
.dda-dock-btn:active .dda-dock-icon {
	transform: translateY(-1px) scale(1.02);
}

/* === Close-X: lite rotation on hover === */
.dda-icon-btn[data-act="close"] {
	transition: background .15s ease, transform .25s cubic-bezier(.4,0,.2,1);
}
.dda-icon-btn[data-act="close"]:hover {
	transform: rotate(90deg);
}

/* === Welcome avatar: subtle float === */
@keyframes dda-avatar-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-2px); }
}
.dda-welcome-avatar img,
.dda-header-icon img { animation: dda-avatar-float 3.4s ease-in-out infinite; }

/* === Message bubble — уже есть `dda-pop` keyframe в базовом блоке, не дублируем === */

/* === Quick-action chips: stagger при первом показе === */
.dda-quick .dda-quick-btn {
	opacity: 0;
	animation: dda-fade-up .28s cubic-bezier(.4,0,.2,1) forwards;
}
.dda-quick .dda-quick-btn:nth-child(1) { animation-delay: .02s; }
.dda-quick .dda-quick-btn:nth-child(2) { animation-delay: .05s; }
.dda-quick .dda-quick-btn:nth-child(3) { animation-delay: .08s; }
.dda-quick .dda-quick-btn:nth-child(4) { animation-delay: .11s; }
.dda-quick .dda-quick-btn:nth-child(5) { animation-delay: .14s; }
.dda-quick .dda-quick-btn:nth-child(6) { animation-delay: .17s; }
.dda-quick .dda-quick-btn:nth-child(7) { animation-delay: .20s; }
.dda-quick .dda-quick-btn:nth-child(8) { animation-delay: .23s; }
.dda-quick .dda-quick-btn:nth-child(9) { animation-delay: .26s; }
.dda-quick-btn:hover {
	transform: translateY(-1px);
}
.dda-quick-btn { transition: background .15s, border-color .15s, color .15s, transform .15s ease; }

/* === Send button: scale-down при отправке === */
.dda-send {
	transition: opacity .15s, transform .12s cubic-bezier(.4,0,.2,1), box-shadow .15s;
}
.dda-send:hover { transform: translateY(-1px) scale(1.04); }
.dda-send:active { transform: translateY(0) scale(.96); }
.dda-send svg { transition: transform .2s cubic-bezier(.4,0,.2,1); }
.dda-send:hover svg { transform: translateX(2px) rotate(-8deg); }

/* === Trigger button: pulsing ring (ambient) — едва заметный === */
.dda-trigger:not([data-open="true"])::after {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 2px solid rgba(240, 26, 38, 0.35);
	animation: dda-ring-pulse 2.6s ease-out infinite;
	pointer-events: none;
}
@keyframes dda-ring-pulse {
	0%   { opacity: 0.6; transform: scale(1); }
	100% { opacity: 0;   transform: scale(1.35); }
}

/* === Reduced motion: respect user's OS preference === */
@media (prefers-reduced-motion: reduce) {
	.dda-panel,
	.dda-view,
	.dda-view--chat,
	.dda-trigger,
	.dda-trigger::after,
	.dda-start-chat,
	.dda-online-dot,
	.dda-header-sub::before,
	.dda-hero-title,
	.dda-welcome-card,
	.dda-welcome-avatar img,
	.dda-header-icon img,
	.dda-channels-section,
	.dda-dock-btn,
	.dda-dock-icon,
	.dda-quick-btn,
	.dda-send,
	.dda-send svg,
	.dda-start-chat svg,
	.dda-icon-btn[data-act="close"],
	.dda-foot-landing {
		animation: none !important;
		transition: none !important;
	}
}

/* 2026-08-18 — канал Phone (tel:) показываем только на телефонах (мобильный
   брейкпоинт виджета — max-width: 768px); на десктопе/планшете кнопку скрываем.
   Откат: удалить блок. */
@media (min-width: 769px) {
	.dda-channel[data-channel="phone"],
	.dda-dock-btn[data-channel="phone"] { display: none !important; }
}
