/* LANDING AI — персонаж-орб как на витрине (stock widget) */
.lp-ai-wrap { position: fixed; left: 0; top: 0; width: 96px; height: 96px; z-index: 1040; pointer-events: none; overflow: visible; }
.lp-ai-wrap > * { pointer-events: auto; }
.lp-ai-fab { position: absolute; inset: 0; cursor: grab; display: flex; align-items: center; justify-content: center; animation: lp-ai-float 4s ease-in-out infinite; transition: opacity 0.2s ease, transform 0.15s ease; filter: drop-shadow(0 0 18px rgba(120, 70, 220, 0.6)); touch-action: none; user-select: none; border: none; background: transparent; padding: 0; }
.lp-ai-fab.is-dragging { cursor: grabbing; animation: none; }
.lp-ai-fab.is-hidden { opacity: 0; pointer-events: none; transform: scale(0.85); }
.lp-ai-aura { position: absolute; inset: 0; border-radius: 50%; animation: lp-ai-aura-spin 4s linear infinite; pointer-events: none; }
.lp-ai-aura::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid transparent; background: conic-gradient(from var(--lp-ai-spin, 0deg), #a78bfa44, #7c3aed88, #c4b5fd44, #4f46e500, #a78bfa44) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: destination-out; mask-composite: exclude; }
.lp-ai-aura::after { content: ''; position: absolute; inset: -11px; border: 2px solid transparent; border-radius: 50%; background: conic-gradient(from calc(var(--lp-ai-spin, 0deg) + 60deg), #c4b5fd22, #7c3aed66, #a78bfa22, #4f46e500, #c4b5fd22) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: destination-out; mask-composite: exclude; }
.lp-ai-aura-outer { position: absolute; inset: -16px; border-radius: 50%; border: 1.5px solid transparent; background: conic-gradient(from calc(var(--lp-ai-spin, 0deg) + 120deg), #8b5cf622, #6d28d944, #8b5cf622, transparent, #8b5cf622) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: destination-out; mask-composite: exclude; animation: lp-ai-aura-spin 6s linear infinite reverse; pointer-events: none; }
@keyframes lp-ai-aura-spin { to { transform: rotate(360deg); } }
.lp-ai-orb { position: relative; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle at 38% 35%, #3b1f6a 0%, #1a0a3a 55%, #0d0620 100%); box-shadow: inset 0 4px 12px rgba(167, 139, 250, 0.25), inset 0 -4px 10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(109, 40, 217, 0.35); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: transform 0.1s ease; transform-style: preserve-3d; }
.lp-ai-orb::after { content: ''; position: absolute; top: 8px; left: 18px; width: 24px; height: 10px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, 0.18) 0%, transparent 80%); pointer-events: none; }
.lp-ai-face { position: relative; width: 52px; height: 26px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; box-sizing: border-box; }
.lp-ai-eye { position: relative; width: 14px; height: 22px; background: #fff; border-radius: 8px; overflow: hidden; flex-shrink: 0; transition: transform 0.1s ease; box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); }
@keyframes lp-ai-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 33% { transform: translateY(-5px) rotate(1.5deg); } 66% { transform: translateY(-2px) rotate(-1deg); } }
.lp-ai-bubble { position: fixed; bottom: auto; left: 0; top: 0; background: #fff; color: #333; font-size: 14px; line-height: 1.45; padding: 12px 16px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12); width: min(340px, calc(100vw - 32px)); min-width: 260px; box-sizing: border-box; opacity: 0; --lp-ai-tail: 28px; transform: translate(calc(-100% + var(--lp-ai-tail)), calc(-100% - 10px)) scale(0.9); transform-origin: calc(100% - var(--lp-ai-tail)) 100%; transition: opacity 0.35s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: none; z-index: 1041; cursor: pointer; white-space: normal; }
.lp-ai-bubble.is-show { opacity: 1; transform: translate(calc(-100% + var(--lp-ai-tail)), calc(-100% - 10px)) scale(1); pointer-events: auto; }
.lp-ai-bubble::after { content: ''; position: absolute; bottom: -7px; left: auto; right: var(--lp-ai-tail); margin-right: -7px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.07); }
.lp-ai-bubble.is-free { position: fixed; right: auto; bottom: auto; z-index: 1041; transform-origin: bottom center; }
.lp-ai-chat { position: fixed; width: 360px; height: 500px; min-width: 280px; max-width: min(500px, calc(100vw - 24px)); min-height: 200px; max-height: min(700px, calc(100vh - 24px)); background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); display: none; flex-direction: column; overflow: hidden; border: 1px solid #eee; resize: both; text-align: left; z-index: 1042; font-family: var(--lp-font, system-ui, sans-serif); }
.lp-ai-chat.is-open { display: flex; }
.lp-ai-chat-header { background: var(--v4-primary, #D22D16); color: #fff; padding: 12px 15px; font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; cursor: grab; flex-shrink: 0; gap: 8px; line-height: 1.3; }
.lp-ai-chat-header-title { flex: 1; min-width: 0; }
.lp-ai-chat-header.is-dragging { cursor: grabbing; }
.lp-ai-chat-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; line-height: 1; padding: 0; }
.lp-ai-chat-messages { flex: 1; min-height: 100px; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #f9f9f9; }
.lp-ai-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4; word-break: break-word; }
.lp-ai-msg-bot { background: #fff; color: #333; align-self: flex-start; border: 1px solid #eee; border-bottom-left-radius: 4px; }
.lp-ai-msg-ticket-ok { border: 1px solid #16a34a; font-weight: 600; color: #15803d; }
.lp-ai-msg-user { background: var(--v4-primary, #D22D16); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.lp-ai-msg-thinking { font-style: italic; color: #777; animation: lp-ai-fade 1.5s infinite; }
@keyframes lp-ai-fade { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }
.lp-ai-quick-chips { background: #f9f9f9; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 15px 10px; transition: opacity 0.2s, transform 0.2s; flex-shrink: 0; }
.lp-ai-quick-chips[hidden] { display: none !important; }
.lp-ai-chip { background: #fff; border: 1px solid #ddd; border-radius: 16px; padding: 6px 10px; font-size: 12px; color: #555; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.lp-ai-chip:hover { background: var(--v4-primary-light, #FEF2F0); border-color: var(--v4-primary, #D22D16); color: #333; }
.lp-ai-actions { padding: 0 15px 10px; display: flex; flex-direction: column; gap: 8px; background: #f9f9f9; flex-shrink: 0; }
.lp-ai-actions[hidden] { display: none !important; }
.lp-ai-action-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 10px 14px; border: none; border-radius: 10px; background: var(--v4-primary, #D22D16); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.lp-ai-action-btn:hover { background: var(--v4-primary-hover, #B82510); color: #fff; }
.lp-ai-support-links { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.lp-ai-support-links a { color: var(--v4-primary, #D22D16); text-decoration: none; }
.lp-ai-support-links a:hover { text-decoration: underline; }
.lp-ai-inline-form { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.lp-ai-inline-form__title { margin: 0; font-size: 13px; font-weight: 700; color: #333; }
.lp-ai-inline-form__label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #555; }
.lp-ai-inline-form__input, .lp-ai-inline-form__textarea { width: 100%; border: 1px solid #ccc; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; box-sizing: border-box; }
.lp-ai-inline-form__input:focus, .lp-ai-inline-form__textarea:focus { outline: none; border-color: var(--v4-primary, #D22D16); box-shadow: 0 0 0 3px rgba(210, 45, 22, 0.12); }
.lp-ai-inline-form__check { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; line-height: 1.35; color: #666; }
.lp-ai-inline-form__check a { color: var(--v4-primary, #D22D16); }
.lp-ai-inline-form__msg { margin: 0; font-size: 12px; }
.lp-ai-inline-form__msg.is-error { color: #b42318; }
.lp-ai-inline-form__success { margin: 0; font-size: 13px; color: #067647; line-height: 1.4; }
.lp-ai-privacy-note { padding: 6px 12px 0; font-size: 11px; line-height: 1.35; color: #888; background: #fff; flex-shrink: 0; }
.lp-ai-chat-input { display: flex; align-items: flex-end; padding: 10px; gap: 6px; background: #fff; border-top: 1px solid #eee; flex-shrink: 0; }
.lp-ai-chat-input textarea { flex: 1; border: 1px solid #ccc; border-radius: 12px; padding: 8px 12px; font-size: 14px; outline: none; font-family: inherit; resize: none; overflow-y: auto; line-height: 1.4; min-height: 36px; max-height: calc(1.4em * 4 + 16px); box-sizing: border-box; }
.lp-ai-chat-input textarea:focus { border-color: var(--v4-primary, #D22D16); box-shadow: 0 0 0 3px rgba(210, 45, 22, 0.12); }
.lp-ai-chat-input button { background: var(--v4-primary, #D22D16); border: none; color: #fff; width: 40px; height: 40px; min-width: 40px; border-radius: 50%; cursor: pointer; flex-shrink: 0; align-self: flex-end; display: flex; align-items: center; justify-content: center; padding: 0; transition: background 0.15s, transform 0.1s; }
.lp-ai-chat-input button:disabled { opacity: 0.5; cursor: not-allowed; }
.lp-ai-chat-input button:active { transform: scale(0.9); }
.lp-ai-chat-input button svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 767px) {
  .lp-ai-wrap { display: none !important; }
  .lp-ai-chat { display: none !important; }
  .lp-ai-mob-trigger, .lp-ai-mob-overlay, .lp-ai-mob-sheet, .lp-ai-mob-sheet * { font-family: var(--lp-font, system-ui, sans-serif) !important; box-sizing: border-box; }
  .lp-ai-mob-trigger { position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: linear-gradient(135deg, #1a0a3a 0%, #2d1b69 50%, #1a0a3a 100%); display: flex; align-items: center; padding: 0 16px; gap: 12px; cursor: pointer; z-index: 1040; box-shadow: 0 -4px 20px rgba(109, 40, 217, 0.3); transform: translateY(100%); opacity: 0; transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s; border: none; width: 100%; text-align: left; }
  .lp-ai-mob-trigger.is-visible { transform: translateY(0); opacity: 1; }
  .lp-ai-mob-trigger-glow { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 0%, rgba(167, 139, 250, 0.08) 50%, transparent 100%); animation: lp-ai-mob-glow 3s ease-in-out infinite; }
  @keyframes lp-ai-mob-glow { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
  .lp-ai-mob-trigger-orb { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 38% 35%, #3b1f6a 0%, #1a0a3a 55%, #0d0620 100%); box-shadow: 0 0 12px rgba(109, 40, 217, 0.5); display: flex; align-items: center; justify-content: center; animation: lp-ai-float 4s ease-in-out infinite; }
  .lp-ai-mob-trigger-orb .lp-ai-face { width: 24px; height: 14px; padding: 0 3px; }
  .lp-ai-mob-trigger-orb .lp-ai-eye { width: 7px; height: 11px; border-radius: 4px; box-shadow: 0 0 4px rgba(255, 255, 255, 0.4); }
  .lp-ai-mob-trigger-text { color: rgba(255, 255, 255, 0.9); font-size: 14px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 1; }
  .lp-ai-mob-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 1041; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .lp-ai-mob-overlay.is-active { opacity: 1; pointer-events: auto; }
  .lp-ai-mob-sheet { position: fixed; bottom: 0; left: 0; right: 0; height: 70%; max-height: 100%; background: #fff; border-radius: 16px 16px 0 0; z-index: 1042; display: flex; flex-direction: column; overflow: hidden; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15); text-align: left; }
  .lp-ai-mob-sheet.is-open { transform: translateY(0); }
  .lp-ai-mob-sheet.is-dragging { transition: none !important; }
  .lp-ai-mob-sheet.is-fullscreen { top: 0 !important; bottom: auto !important; border-radius: 0 !important; }
  .lp-ai-mob-handle { width: 40px; height: 4px; background: #ccc; border-radius: 2px; margin: 10px auto 6px; flex-shrink: 0; }
  .lp-ai-mob-header { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; border-bottom: 1px solid #eee; flex-shrink: 0; }
  .lp-ai-mob-header-orb { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 38% 35%, #3b1f6a 0%, #1a0a3a 55%, #0d0620 100%); box-shadow: 0 0 8px rgba(109, 40, 217, 0.4); display: flex; align-items: center; justify-content: center; }
  .lp-ai-mob-header-orb .lp-ai-face { width: 22px; height: 12px; padding: 0 3px; }
  .lp-ai-mob-header-orb .lp-ai-eye { width: 6px; height: 10px; border-radius: 3px; box-shadow: 0 0 3px rgba(255, 255, 255, 0.4); }
  .lp-ai-mob-header-name { font-weight: 700; font-size: 14px; color: #333; flex: 1; line-height: 1.3; min-width: 0; }
  .lp-ai-mob-close { background: none; border: none; font-size: 22px; color: #999; cursor: pointer; padding: 4px; line-height: 1; }
  .lp-ai-mob-sheet .lp-ai-chat-messages { flex: 1; min-height: 0; padding: 12px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .lp-ai-mob-sheet .lp-ai-quick-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 8px 16px; }
  .lp-ai-mob-sheet .lp-ai-quick-chips::-webkit-scrollbar { display: none; }
  .lp-ai-mob-sheet .lp-ai-chip { font-size: 13px; padding: 6px 12px; }
  .lp-ai-mob-sheet .lp-ai-chat-input { padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #eee; flex-shrink: 0; display: flex; align-items: flex-end; gap: 8px; width: 100%; }
  .lp-ai-mob-sheet .lp-ai-chat-input textarea { font-size: 16px !important; }
}
