/* ==========================================================================
   SMART POST — AI Consultant («Смарти») Pure OLED Gemini Interface (1:1 Стенд)
   ========================================================================== */

:root {
  /* --- 1. ЦВЕТА СЕВЕРНОГО СИЯНИЯ GEMINI --- */
  --ga-color-1: #1a56db;  /* Сапфировый синий */
  --ga-color-2: #008fa0;  /* Неоновый циан / бирюза */
  --ga-color-3: #0d8a4e;  /* Нефритовый изумруд */
  --ga-color-4: #085860;  /* Глубокий океанский тил */

  /* --- 2. НАСТРОЙКИ ЭФФЕКТА --- */
  --ga-speed: 8s;
  --ga-blur: 55px;
  --ga-height: 50%;
  --ga-opacity: 0.9;

  /* --- 3. ЦВЕТА ТЕМЫ (PURE OLED BLACK) --- */
  --gemini-bg: #000000;
  --gemini-surface: #1e1f20;
  --gemini-user-bubble: #1f2022;
  --g-blue: #4285f4;
  --g-purple: #9b72cb;
  --g-pink: #d96570;
}

/* ==========================================================================
   🌀 FLOATING TRIGGER BUTTON (FAB)
   ========================================================================== */
.lai-fab {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 9990;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #131314;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(66, 133, 244, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.lai-fab i {
  color: #f1f3f4;
  line-height: 1;
}

.lai-fab:hover {
  transform: scale(1.08) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(155, 114, 203, 0.5);
}

.lai-fab-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed rgba(52, 211, 153, 0.4);
  pointer-events: none;
  transition: transform 0.4s ease;
}

.lai-fab:hover .lai-fab-ring {
  animation: spin-ring 6s linear infinite;
}

/* 🟢 Зеленый индикатор «Онлайн» вместо отпугивающего шильдика AI */
.lai-fab-online-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  border: 2.5px solid #131314;
  box-shadow: 0 0 8px #34d399;
  pointer-events: none;
  animation: lai-dot-glow 2.5s infinite ease-in-out;
  will-change: transform, opacity;
}

@keyframes lai-dot-glow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* 💬 Всплывающее облачко доверия (Teaser Bubble) */
.lai-teaser-bubble {
  position: fixed;
  bottom: 102px;
  right: 94px;
  z-index: 9989;
  background: rgba(19, 21, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 15px rgba(16, 185, 129, 0.15);
  cursor: pointer;
  max-width: 270px;
  transform: translateX(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lai-teaser-bubble.lai-teaser-visible {
  transform: translateX(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.lai-teaser-bubble:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.25);
}

.lai-teaser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #34d399;
  flex-shrink: 0;
}

.lai-teaser-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: left;
}

.lai-teaser-text strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.lai-teaser-text span {
  font-size: 11.5px;
  color: #94a3b8;
}

.lai-teaser-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}

.lai-teaser-close:hover {
  color: #ffffff;
}

@keyframes spin-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   🪟 CHAT WINDOW (PURE OLED BLACK & AUTO-GROW)
   ========================================================================== */
.lai-window {
  position: fixed !important;
  bottom: 16px !important;
  right: 20px !important;
  width: 420px !important;
  max-width: calc(100vw - 24px) !important;
  height: auto !important;
  min-height: 380px !important;
  max-height: calc(100vh - 32px) !important;
  max-height: calc(100dvh - 32px) !important;
  background: rgba(8, 9, 13, 0.94) !important;
  backdrop-filter: blur(40px) saturate(2) !important;
  -webkit-backdrop-filter: blur(40px) saturate(2) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.92), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  border-radius: 32px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 9995 !important;
  font-family: 'Plus Jakarta Sans', 'Manrope', -apple-system, sans-serif !important;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.lai-window.lai-open {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

/* ==========================================================================
   🌌 GEMINI AURORA LAYER (ОРГАНИЧНЫЕ ЛУЧИ РАЗНОЙ ДЛИНЫ — ТОЛЬКО ПРИ ГЕНЕРАЦИИ)
   ========================================================================== */
.gemini-android-aurora {
  position: absolute;
  top: -20px;
  left: -30px;
  right: -30px;
  bottom: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
  overflow: hidden;
}

.lai-window.is-generating .gemini-android-aurora {
  opacity: 1;
  visibility: visible;
}

.gemini-aurora-cloud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background:
    radial-gradient(ellipse at 75% 25%, var(--ga-color-1) 0%, transparent 65%),
    radial-gradient(ellipse at 25% 35%, var(--ga-color-2) 0%, transparent 60%),
    radial-gradient(ellipse at 55% 45%, var(--ga-color-3) 0%, transparent 65%);
  filter: blur(45px);
  mix-blend-mode: screen;
  opacity: 0.75;
  animation: gemini-cloud-morph var(--ga-speed) ease-in-out infinite alternate;
  will-change: transform, filter;
}

.gemini-aurora-rays {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  filter: blur(24px);
  opacity: 0.95;
  pointer-events: none;
}

.gemini-ray {
  position: absolute;
  top: 0;
  transform-origin: top center;
  border-radius: 0 0 60px 60px;
  will-change: transform, opacity;
}

.gemini-ray.ray-1 {
  left: 4%;
  width: 75px;
  height: 55%;
  background: linear-gradient(to bottom, var(--ga-color-1) 0%, var(--ga-color-2) 45%, rgba(0, 143, 160, 0.35) 75%, transparent 100%);
  animation: ray-wave-1 7s infinite alternate ease-in-out;
}

.gemini-ray.ray-2 {
  left: 23%;
  width: 90px;
  height: 80%;
  background: linear-gradient(to bottom, var(--ga-color-2) 0%, var(--ga-color-3) 50%, rgba(13, 138, 78, 0.35) 80%, transparent 100%);
  animation: ray-wave-2 9s infinite alternate ease-in-out;
}

.gemini-ray.ray-3 {
  left: 45%;
  width: 70px;
  height: 48%;
  background: linear-gradient(to bottom, var(--ga-color-1) 0%, var(--ga-color-3) 50%, transparent 100%);
  animation: ray-wave-3 6.5s infinite alternate ease-in-out;
}

.gemini-ray.ray-4 {
  left: 63%;
  width: 85px;
  height: 72%;
  background: linear-gradient(to bottom, var(--ga-color-3) 0%, var(--ga-color-2) 40%, var(--ga-color-4) 75%, transparent 100%);
  animation: ray-wave-4 8s infinite alternate ease-in-out;
}

.gemini-ray.ray-5 {
  left: 80%;
  width: 65px;
  height: 40%;
  background: linear-gradient(to bottom, var(--ga-color-2) 0%, var(--ga-color-1) 50%, transparent 100%);
  animation: ray-wave-5 7.5s infinite alternate ease-in-out;
}

.gemini-aurora-pulse {
  position: absolute;
  top: 15%;
  right: 12%;
  width: 320px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ga-color-3) 0%, var(--ga-color-2) 50%, transparent 75%);
  filter: blur(40px);
  mix-blend-mode: screen;
  opacity: 0.7;
  animation: gemini-pulse-drift var(--ga-speed) ease-in-out infinite alternate;
}

.gemini-aurora-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, transparent 20%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.7) 70%, #000000 90%);
  pointer-events: none;
}

@keyframes ray-wave-1 {
  0% { transform: scaleY(0.85) scaleX(0.9) skewX(-4deg); opacity: 0.6; }
  50% { transform: scaleY(1.18) scaleX(1.1) skewX(3deg); opacity: 0.95; }
  100% { transform: scaleY(0.92) scaleX(1) skewX(-2deg); opacity: 0.7; }
}

@keyframes ray-wave-2 {
  0% { transform: scaleY(1.05) scaleX(1.1) skewX(2deg); opacity: 0.9; }
  50% { transform: scaleY(0.8) scaleX(0.9) skewX(-3deg); opacity: 0.55; }
  100% { transform: scaleY(1.22) scaleX(1.15) skewX(4deg); opacity: 1; }
}

@keyframes ray-wave-3 {
  0% { transform: scaleY(0.9) scaleX(0.95) translateY(0); opacity: 0.7; }
  50% { transform: scaleY(1.25) scaleX(1.05) translateY(15px); opacity: 1; }
  100% { transform: scaleY(0.85) scaleX(0.9) translateY(-5px); opacity: 0.6; }
}

@keyframes ray-wave-4 {
  0% { transform: scaleY(1.15) scaleX(1) skewX(-3deg); opacity: 0.85; }
  50% { transform: scaleY(0.88) scaleX(1.15) skewX(2deg); opacity: 0.5; }
  100% { transform: scaleY(1.2) scaleX(0.95) skewX(-4deg); opacity: 0.95; }
}

@keyframes ray-wave-5 {
  0% { transform: scaleY(0.8) skewX(3deg); opacity: 0.5; }
  50% { transform: scaleY(1.2) skewX(-2deg); opacity: 0.9; }
  100% { transform: scaleY(0.95) skewX(1deg); opacity: 0.65; }
}

@keyframes gemini-cloud-morph {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); filter: blur(50px) hue-rotate(0deg); }
  33% { transform: translate(4%, 3%) scale(1.08) rotate(3deg); filter: blur(55px) hue-rotate(45deg); }
  66% { transform: translate(-3%, 5%) scale(1.04) rotate(-2deg); filter: blur(50px) hue-rotate(90deg); }
  100% { transform: translate(2%, -2%) scale(0.97) rotate(1deg); filter: blur(52px) hue-rotate(-20deg); }
}

@keyframes gemini-pulse-drift {
  0% { transform: translate(0, 0) scale(1); opacity: 0.65; }
  50% { transform: translate(-80px, 40px) scale(1.25); opacity: 0.9; }
  100% { transform: translate(30px, 60px) scale(0.85); opacity: 0.55; }
}

/* ==========================================================================
   🪟 WINDOW HEADER & TITLE
   ========================================================================== */
.lai-header {
  padding: 14px 18px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.lai-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lai-avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.lai-title-wrap h4 {
  font-size: 15px;
  font-weight: 600;
  color: #f1f3f4;
  margin: 0;
  letter-spacing: -0.2px;
}

.lai-title-wrap span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9aa0a6;
  font-weight: 400;
}

/* 🟢 Премиальная светящаяся точка с глубоким оптическим размытием (Gaussian Blur) */
.lai-status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-right: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 6px #34d399;
}

.lai-status-pulse-dot::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 4px #ffffff, 0 0 8px #34d399;
  z-index: 2;
  animation: lai-core-breath 3.2s ease-in-out infinite;
}

.lai-status-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.95) 0%, rgba(16, 185, 129, 0.65) 40%, rgba(5, 150, 105, 0.2) 65%, transparent 80%);
  filter: blur(5px);
  z-index: 1;
  animation: lai-neon-blur-pulse 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lai-core-breath {
  0%, 100% { opacity: 0.6; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes lai-neon-blur-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); filter: blur(4px); }
  50% { opacity: 0.95; transform: scale(1.65); filter: blur(7px); }
}

.lai-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lai-header-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #9aa0a6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.lai-header-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.08);
}

.lai-header-wa {
  color: #25d366 !important;
  background: rgba(37, 211, 102, 0.12) !important;
}

.lai-header-wa:hover {
  background: rgba(37, 211, 102, 0.25) !important;
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.4);
}

.lai-btn-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #9aa0a6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s ease;
}

.lai-btn-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* ==========================================================================
   💬 MESSAGES AREA & BUBBLES
   ========================================================================== */
.lai-messages {
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: 100%;
  padding: 20px;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 5;
}

.lai-messages::-webkit-scrollbar {
  width: 5px;
}

.lai-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.lai-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: lai-fade-in 0.25s ease-out;
}

@keyframes lai-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.lai-msg-bot {
  align-self: flex-start;
  max-width: 100%;
}

.lai-msg-user {
  align-self: flex-end;
  max-width: 82%;
  width: fit-content;
}

/* Clean Pill Bubbles - Apple Liquid Glass */
.lai-msg-user .lai-bubble,
.lai-bubble-user {
  display: inline-block;
  align-self: flex-end;
  background: linear-gradient(135deg, #ff6600, #ff7a1a) !important;
  color: #ffffff !important;
  padding: 11px 16px !important;
  border-radius: 20px 20px 4px 20px !important;
  width: fit-content;
  max-width: 100% !important;
  font-size: 14.5px !important;
  line-height: 1.45 !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(255, 102, 0, 0.35) !important;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  font-weight: 500 !important;
}

.lai-msg-bot .lai-bubble,
.lai-bubble-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  color: #f1f5f9 !important;
  padding: 13px 18px !important;
  border-radius: 20px 20px 20px 6px !important;
  max-width: 100% !important;
  font-size: 14.5px !important;
  line-height: 1.55 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  word-break: normal;
  overflow-wrap: break-word;
}

.lai-bubble-bot strong,
.lai-msg-bot .lai-bubble strong {
  color: #ffffff;
  font-weight: 600;
}

/* Скрываем громоздкие карточки и кнопки для чистого диалога */
.lai-actions-wrap,
.lai-followup-chips {
  display: none !important;
}

.lai-action-btn,
.lai-btn-deeplink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1e1f20;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e3e3e3;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.lai-action-btn:hover,
.lai-btn-deeplink:hover {
  background: #282a2c;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

/* In-Chat Lead Form Card */
.lai-lead-card {
  margin-top: 12px;
  background: rgba(30, 31, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.lai-lead-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lai-lead-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.lai-lead-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.lai-lead-submit {
  background: #282a2c;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lai-lead-submit:hover {
  background: #333538;
}

/* ==========================================================================
   ⌨️ PILL INPUT AREA (GOOGLE GEMINI 1:1)
   ========================================================================== */
#lai-container *,
#lai-container *:focus,
#lai-container *:focus-visible,
.lai-window *,
.lai-window *:focus,
.lai-window *:focus-visible,
.lai-input,
.lai-input:focus,
.lai-input:focus-visible,
.lai-input-pill,
.lai-input-pill:focus,
.lai-input-pill:focus-visible,
.lai-btn-send,
.lai-btn-send:focus,
.lai-btn-send:focus-visible,
.lai-action-btn,
.lai-action-btn:focus,
.lai-action-btn:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
}

.lai-input-wrap {
  position: relative;
  z-index: 15;
  padding: 16px 20px;
  background: transparent;
  display: flex;
  gap: 10px;
}

.lai-input-pill {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 30px !important;
  padding: 4px 6px 4px 18px !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.lai-input-pill:focus-within {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1), 0 8px 25px rgba(0, 0, 0, 0.5) !important;
}

.lai-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 14px !important;
  font-family: inherit !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.lai-input:focus,
.lai-input:focus-visible,
.lai-input:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.lai-input::placeholder {
  color: #80868b !important;
}

.lai-btn-mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent !important;
  border: none !important;
  color: #9aa0a6 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.22s cubic-bezier(0.2, 0, 0, 1);
  flex-shrink: 0;
  margin-right: 4px;
  position: relative;
}

.lai-btn-mic:hover {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.lai-btn-mic.lai-mic-active {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.7), 0 0 28px rgba(239, 68, 68, 0.4);
  animation: lai-mic-pulse 1.35s infinite ease-in-out;
}

@keyframes lai-mic-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.75);
  }
  50% {
    transform: scale(1.14);
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.lai-btn-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #282a2c !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.lai-btn-send:hover {
  transform: scale(1.08);
  background: #383a3d !important;
  color: #fff !important;
}

/* Gemini Thinking State Card */
.gemini-thinking-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(30, 31, 32, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: gemini-card-float 2.5s ease-in-out infinite alternate;
}

.gemini-star-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  animation: gemini-star-spin 3s ease-in-out infinite;
}

.gemini-shimmer-text {
  background: linear-gradient(90deg, #4285f4 0%, #9b72cb 35%, #d96570 70%, #f8a55f 90%, #4285f4 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gemini-text-shimmer 2s linear infinite;
  font-weight: 600;
  font-size: 14px;
}

/* ==========================================================================
   ⚡ DYNAMIC SMART FOLLOW-UPS & MESSAGE ACTION TOOLBAR
   ========================================================================== */
.lai-bot-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
  max-width: 90%;
  animation: fadeIn 0.3s ease-out;
}

.lai-followup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.lai-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 5px 11px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.lai-chip-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.lai-chip-wa {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.3);
  color: #4ade80;
}

.lai-chip-wa:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: #22c55e;
  color: #ffffff;
}

.lai-msg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.lai-msg-feedback {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lai-msg-tool-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
  font-family: inherit;
}

.lai-msg-tool-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

.lai-msg-tool-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.lai-msg-tool-btn.active-dislike {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.lai-msg-tool-btn span {
  font-size: 11px;
}

@keyframes gemini-text-shimmer {
  to { background-position: 250% 0; }
}

@keyframes gemini-star-spin {
  0% { transform: scale(0.9) rotate(0deg); }
  50% { transform: scale(1.2) rotate(180deg); }
  100% { transform: scale(0.9) rotate(360deg); }
}

@keyframes gemini-card-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* ==========================================================================
   🔥 PROMO WIDGET (HOT LTL OFFER - FLOATING DIRECTLY ABOVE SMARTY AI)
   ========================================================================== */
.lai-promo-widget {
  position: fixed;
  bottom: 172px;
  right: 24px;
  z-index: 9988;
  display: flex;
  align-items: center;
  animation: lai-promo-float 4s ease-in-out infinite, lai-promo-pop-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* Card Container */
.lai-promo-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(24, 18, 14, 0.96) 0%, rgba(15, 15, 18, 0.98) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 18px;
  padding: 10px 14px 11px;
  width: 224px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(255, 102, 0, 0.4);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75),
              0 0 25px rgba(255, 102, 0, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.18);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

/* Animated multi-color glowing neon border effect */
.lai-promo-card::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 19.5px;
  background: linear-gradient(90deg, #ff6600, #ffaa00, #ef4444, #f59e0b, #ff6600);
  background-size: 300% 100%;
  z-index: -1;
  opacity: 0.8;
  animation: promo-border-flow 4s linear infinite;
}

/* Inner backdrop layer to keep text readable */
.lai-promo-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(22, 17, 15, 0.96) 0%, rgba(13, 14, 17, 0.98) 100%);
  z-index: -1;
}

/* Ambient glow ring / aura behind the card */
.lai-promo-glow-ring {
  position: absolute;
  top: -24px;
  right: -24px;
  width: 95px;
  height: 95px;
  background: radial-gradient(circle, rgba(255, 102, 0, 0.5) 0%, rgba(239, 68, 68, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: promo-ambient-glow 3s ease-in-out infinite alternate;
}

.lai-promo-card:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9),
              0 0 35px rgba(255, 102, 0, 0.5),
              inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.lai-promo-card:hover::before {
  opacity: 1;
  animation-duration: 2s;
}

/* Badge Row */
.lai-promo-badge-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.lai-promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 102, 0, 0.2);
  border: 1px solid rgba(255, 102, 0, 0.45);
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #ffaa55;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.3);
}

.lai-promo-flame {
  display: inline-block;
  font-size: 12px;
  animation: promo-flame-flicker 1.8s ease-in-out infinite;
  transform-origin: 50% 80%;
  filter: drop-shadow(0 0 6px rgba(255, 102, 0, 0.9));
}

.lai-promo-sparkle {
  color: #fbbf24;
  font-size: 10px;
  animation: promo-sparkle-spin 3.5s linear infinite;
  opacity: 0.85;
}

/* Price & Arrow Row */
.lai-promo-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 3px;
}

.lai-promo-price {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(90deg, #ffffff 0%, #fed7aa 35%, #ff8833 70%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: promo-text-shimmer 3.5s linear infinite;
  letter-spacing: -0.3px;
}

.lai-promo-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 102, 0, 0.22);
  border: 1px solid rgba(255, 102, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #ff9933;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.lai-promo-card:hover .lai-promo-arrow {
  transform: translateX(3px);
  background: #ff6600;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.8);
}

/* Subtitle description */
.lai-promo-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: #cbd5e1;
  line-height: 1.35;
  white-space: normal;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Close button */
.lai-promo-close {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(22, 22, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.lai-promo-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.15);
}

/* Dismissed state */
.lai-promo-widget.lai-promo-dismissed {
  opacity: 0 !important;
  transform: translateY(12px) scale(0.85) !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Hidden when Smarty AI chat window is open */
.lai-promo-widget.lai-promo-chat-open,
.lai-window.lai-open ~ .lai-promo-widget,
#lai-window.lai-open ~ #lai-promo-widget {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(10px) scale(0.9) !important;
  visibility: hidden !important;
}

/* Keyframe Animations */
@keyframes lai-promo-pop-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lai-promo-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes promo-border-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}

@keyframes promo-ambient-glow {
  0% {
    opacity: 0.35;
    transform: scale(0.95);
  }
  100% {
    opacity: 0.8;
    transform: scale(1.25);
  }
}

@keyframes promo-flame-flicker {
  0%, 100% {
    transform: scale(1) rotate(-3deg);
  }
  25% {
    transform: scale(1.22) rotate(4deg);
  }
  50% {
    transform: scale(0.95) rotate(-2deg);
  }
  75% {
    transform: scale(1.18) rotate(3deg);
  }
}

@keyframes promo-sparkle-spin {
  0% {
    transform: rotate(0deg) scale(0.85);
    opacity: 0.7;
  }
  50% {
    transform: rotate(180deg) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: rotate(360deg) scale(0.85);
    opacity: 0.7;
  }
}

@keyframes promo-text-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Mobile Responsiveness: Скрываем плавающую круглую кнопку и тизер на мобильных (всё доступно в навбаре) */
@media (max-width: 768px) {
  .lai-fab,
  #lai-fab,
  .lai-teaser-bubble,
  #lai-teaser {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Промо-виджет на мобильных парит аккуратно над нижним навбаром */
  .lai-promo-widget {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    right: 14px;
    z-index: 9988;
  }

  .lai-promo-card {
    width: 205px;
    padding: 8px 12px 9px;
    border-radius: 16px;
  }

  .lai-promo-price {
    font-size: 16px;
  }

  .lai-promo-sub {
    font-size: 10px;
  }

  /* Чат-окно Смарти: парит ВЫШЕ навбара (навбар всегда виден и доступен снизу) */
  .lai-window {
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: calc(100% - 28px) !important;
    max-width: 480px !important;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    height: calc(100dvh - 104px - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - 104px - env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 28px !important;
    z-index: 9995 !important;
    
    /* Эффект морфинга: окно раскрывается из центральной кнопки Смарти */
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(40px) scale(0.12) !important;
    transform-origin: 50% calc(100% + 40px) !important;
    filter: blur(8px) !important;
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-radius 0.35s ease,
                filter 0.3s ease !important;
  }

  /* Состояние открытого чата: полное раскрытие */
  .lai-window.lai-open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
    border-radius: 30px !important;
    filter: blur(0) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
  }
}

html.lai-scroll-locked,
body.lai-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}