/* ai.css — слайд-баннер новостей, ИИ-карточка, ИИ-чат (drawer) */

/* ============ НОВОСТИ ============ */
.news-banner { position: relative; border-radius: var(--r-xl); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.news-track { display: flex; transition: transform .5s cubic-bezier(.3,.7,.3,1); }
.news-slide { flex: 0 0 100%; min-width: 100%; display: flex; align-items: center; gap: 20px; padding: 24px 62px 34px; position: relative; overflow: hidden; min-height: 176px; }
.news-slide.acc-a { background: linear-gradient(120deg, oklch(0.96 0.04 153), oklch(0.93 0.05 165)); }
.news-slide.acc-b { background: linear-gradient(120deg, oklch(0.96 0.035 25), oklch(0.93 0.05 40)); }
.news-slide.acc-c { background: linear-gradient(120deg, oklch(0.95 0.04 250), oklch(0.93 0.05 270)); }
[data-theme="dark"] .news-slide.acc-a { background: linear-gradient(120deg, oklch(0.31 0.05 155), oklch(0.265 0.03 158)); }
[data-theme="dark"] .news-slide.acc-b { background: linear-gradient(120deg, oklch(0.31 0.05 195), oklch(0.265 0.03 175)); }
[data-theme="dark"] .news-slide.acc-c { background: linear-gradient(120deg, oklch(0.31 0.055 255), oklch(0.265 0.032 230)); }
.news-slide.acc-d { background: linear-gradient(120deg, oklch(0.96 0.05 95), oklch(0.93 0.07 110)); }
[data-theme="dark"] .news-slide.acc-d { background: linear-gradient(120deg, oklch(0.31 0.055 300), oklch(0.265 0.032 280)); }
.news-figure { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); color: var(--text); opacity: .10; pointer-events: none; }
.news-figure-pct { font-family: var(--font-display); font-weight: 800; font-size: 112px; line-height: 1; }
.news-content { position: relative; max-width: 56%; display: flex; flex-direction: column; justify-content: center; }
.news-tag { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-deep); background: color-mix(in oklch, var(--surface) 70%, transparent); padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; }
.news-content h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.news-content p { color: var(--text-2); font-size: 13.5px; margin-top: 6px; max-width: 460px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* кнопка-действие справа, по центру, крупная и кликабельная */
.news-action { margin-left: auto; display: flex; align-items: center; padding-right: 110px; position: relative; z-index: 2; }
.news-cta { background: var(--surface); color: var(--accent-deep); box-shadow: 0 4px 14px rgba(74,155,52,.18); height: 48px; padding: 0 26px; font-size: 14.5px; font-weight: 800; border-radius: 13px; white-space: nowrap; transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .2s, background .15s; }
.news-cta:hover { background: var(--surface); transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 24px rgba(74,155,52,.3); }
.news-cta:active { transform: translateY(0) scale(.99); }
.news-cta:hover { background: var(--accent-soft); }
.news-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: color-mix(in oklch, var(--surface) 78%, transparent); backdrop-filter: blur(4px); display: grid; place-items: center; color: var(--text-2); box-shadow: var(--shadow-sm); transition: background .12s, color .12s; }
.news-arrow:hover { background: var(--surface); color: var(--text); }
.news-arrow.left { left: 14px; transform: translateY(-50%) scaleX(-1); }
.news-arrow.right { right: 14px; }
.news-dots { position: absolute; bottom: 14px; left: 62px; display: flex; gap: 7px; }
.news-dots .nd { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in oklch, var(--text) 25%, transparent); transition: all .16s; }
.news-dots .nd.on { width: 22px; border-radius: 20px; background: var(--accent); }

@media (max-width: 760px) {
  /* баннер стопкой: заголовок/текст сверху, кнопка снизу — без наезда */
  .news-slide { flex-direction: column; align-items: stretch; padding: 18px 44px 26px; min-height: 0; gap: 10px; }
  .news-content { max-width: 100%; }
  .news-content h3 { font-size: 18px; }
  .news-figure { display: none; }
  .news-action { position: static; margin: 6px 0 0; padding-right: 0; justify-content: stretch; }
  .news-action .news-cta { width: 100%; justify-content: center; height: 44px; }
  .news-arrow { width: 30px; height: 30px; }
  .news-arrow.left { left: 6px; }
  .news-arrow.right { right: 6px; }
}

/* ============ ИИ-КАРТОЧКА (дашборд) ============ */
.ai-card { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px 24px; border: 1px solid color-mix(in oklch, var(--ai) 30%, var(--border)); background-color: var(--surface); background-image: linear-gradient(135deg, color-mix(in oklch, var(--ai-soft) 85%, var(--surface)), var(--surface) 62%); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 14px 40px -22px color-mix(in oklch, var(--ai) 60%, transparent); }
.ai-card-glow { position: absolute; width: 280px; height: 280px; border-radius: 50%; top: -130px; right: -70px; background: radial-gradient(circle, color-mix(in oklch, var(--ai) 34%, transparent), transparent 70%); pointer-events: none; animation: aiGlow1 11s ease-in-out infinite; }
.ai-card-glow2 { position: absolute; width: 200px; height: 200px; border-radius: 50%; bottom: -120px; left: 30%; background: radial-gradient(circle, color-mix(in oklch, var(--accent) 22%, transparent), transparent 70%); pointer-events: none; animation: aiGlow2 13s ease-in-out infinite; }
@keyframes aiGlow1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-22px,18px) scale(1.1); } }
@keyframes aiGlow2 { 0%,100% { transform: translate(0,0) scale(1); opacity:.8; } 50% { transform: translate(26px,-14px) scale(1.14); opacity:1; } }
.ai-card-head { display: flex; align-items: flex-start; gap: 14px; position: relative; margin-bottom: 18px; }
.ai-orb { width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background-color: var(--ai); background-image: linear-gradient(140deg, var(--ai), var(--accent)); box-shadow: 0 10px 22px -6px color-mix(in oklch, var(--ai) 60%, transparent); position: relative; z-index: 1; isolation: isolate; }
.ai-orb::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), transparent 55%); z-index: 1; }
.ai-orb > svg { position: relative; z-index: 2; }
.ai-orb.sm { width: 36px; height: 36px; border-radius: 11px; }
.ai-orb.lg { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto; }
.ai-card-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-badge { font-size: 11px; line-height: 1; font-weight: 800; letter-spacing: .01em; color: #fff; background: linear-gradient(135deg, var(--ai), var(--accent)); height: 24px; padding: 0 11px 0 9px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; box-shadow: 0 3px 8px -2px color-mix(in oklch, var(--ai) 60%, transparent); vertical-align: middle; }
.ai-badge svg { flex-shrink: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.ai-card-sub { color: var(--text-2); font-size: 13.5px; line-height: 1.5; margin-top: 5px; max-width: 560px; }
.ai-card-input { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 7px 0 14px; border-radius: 14px; background: color-mix(in oklch, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1.5px solid var(--border); position: relative; transition: border-color .14s, box-shadow .14s, background .14s; }
.ai-card-input:focus-within { border-color: color-mix(in oklch, var(--ai) 60%, transparent); box-shadow: 0 0 0 4px var(--ai-soft); background: var(--surface); }
.ai-card-input-ic { color: var(--ai); flex-shrink: 0; display: grid; place-items: center; }
.ai-card-input input { flex: 1; border: none; outline: none; background: none; font-weight: 500; font-size: 14px; min-width: 0; color: var(--text); }
.ai-card-go { flex-shrink: 0; height: 40px; padding: 0 16px 0 14px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1; color: #fff; font-weight: 700; font-size: 13.5px; background: linear-gradient(135deg, var(--ai), var(--accent)); box-shadow: 0 6px 16px -6px color-mix(in oklch, var(--ai) 70%, transparent); transition: transform .14s, box-shadow .14s, filter .14s; }
.ai-card-go svg { display: block; flex-shrink: 0; transition: transform .16s ease; }
.ai-card-go span { line-height: 1; }
.ai-card-input-ic svg { display: block; }
.ai-card-go:hover { filter: brightness(1.05); box-shadow: 0 9px 22px -6px color-mix(in oklch, var(--ai) 75%, transparent); }
.ai-card-go:hover svg { transform: translateX(3px); }
.ai-card-go:active { transform: scale(.96); }
.ai-card-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; position: relative; }
.ai-chips-label { font-size: 12px; font-weight: 700; color: var(--text-3); margin-right: 2px; }
.ai-chip { font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px; transition: transform .14s, border-color .14s, color .14s, background .14s; text-align: left; }
.ai-chip:hover { border-color: color-mix(in oklch, var(--ai) 50%, transparent); color: var(--ai); background: var(--ai-soft); transform: translateY(-2px); }
.ai-card-chips .ai-chip { opacity: 0; animation: ai-chip-in .42s ease forwards; }
.ai-card-chips .ai-chip:nth-child(2) { animation-delay: .05s; }
.ai-card-chips .ai-chip:nth-child(3) { animation-delay: .12s; }
.ai-card-chips .ai-chip:nth-child(4) { animation-delay: .19s; }
@keyframes ai-chip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ai-card { transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s ease, border-color .25s ease; }
.ai-card:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 22px 50px -24px color-mix(in oklch, var(--ai) 70%, transparent); border-color: color-mix(in oklch, var(--ai) 48%, var(--border)); }
.ai-card::after { content: ''; position: absolute; top: 0; left: -60%; width: 42%; height: 100%; background: linear-gradient(100deg, transparent, color-mix(in oklch, var(--ai) 13%, transparent), transparent); transform: skewX(-18deg); opacity: 0; pointer-events: none; }
.ai-card:hover::after { animation: ai-shimmer 1.1s ease; }
@keyframes ai-shimmer { 0% { left: -60%; opacity: 0; } 25% { opacity: 1; } 100% { left: 130%; opacity: 0; } }
.ai-card:hover .ai-orb { animation: ai-orb-spin .7s cubic-bezier(.4,.1,.2,1); }
@keyframes ai-orb-spin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(8deg) scale(1.1); } 100% { transform: rotate(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .ai-card-glow, .ai-card-glow2, .ai-card-chips .ai-chip { animation: none !important; } .ai-card-chips .ai-chip { opacity: 1; } }

/* ============ FAB ============ */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 9px; height: 54px; padding: 0 22px 0 18px; border-radius: 30px; color: #fff; background: linear-gradient(135deg, var(--ai), var(--accent)); background-size: 180% 180%; box-shadow: 0 12px 28px color-mix(in oklch, var(--ai) 42%, transparent); transition: transform .18s cubic-bezier(.3,.7,.3,1), box-shadow .18s; position: fixed; overflow: visible; animation: aiFabGrad 6s ease infinite, aiFabFloat 3.6s ease-in-out infinite; }
@keyframes aiFabGrad { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes aiFabFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
/* пульсирующее кольцо-ореол */
.ai-fab::before { content: ''; position: absolute; inset: -4px; border-radius: 34px; border: 2px solid color-mix(in oklch, var(--ai) 60%, transparent); opacity: 0; animation: aiFabRing 2.8s ease-out infinite; pointer-events: none; }
@keyframes aiFabRing { 0% { transform: scale(.9); opacity: .6; } 70% { transform: scale(1.18); opacity: 0; } 100% { opacity: 0; } }
/* блик пробегает по кнопке */
.ai-fab::after { content: ''; position: absolute; top: 0; left: -40%; width: 35%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); border-radius: 30px; animation: aiFabShine 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes aiFabShine { 0% { left: -40%; } 45%,100% { left: 130%; } }
.ai-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 18px 38px color-mix(in oklch, var(--ai) 55%, transparent); animation-play-state: paused; }
.ai-fab:active { transform: translateY(-1px) scale(.99); }
.ai-fab.hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }
.ai-fab-label { font-weight: 800; font-size: 14px; position: relative; z-index: 1; }
.ai-fab svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); position: relative; z-index: 1; animation: aiFabSpark 2.4s ease-in-out infinite; }
@keyframes aiFabSpark { 0%,100% { transform: scale(1) rotate(0); } 45% { transform: scale(1.18) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .ai-fab, .ai-fab::before, .ai-fab::after, .ai-fab svg { animation: none; } }

/* ============ ИИ-ЧАТ DRAWER ============ */
.ai-drawer-scrim { position: fixed; inset: 0; background: oklch(0.2 0.02 270 / .4); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 70; }
.ai-drawer-scrim.show { opacity: 1; pointer-events: auto; }
.ai-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 94vw; background: var(--bg); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 80; transform: translateX(100%); transition: transform .28s cubic-bezier(.3,.7,.3,1); display: flex; flex-direction: column; }
.ai-drawer.open { transform: none; }
.ai-dr-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ai-dr-title { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.ai-dr-status { font-size: 11.5px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.ai-dr-status .od { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); animation: aiOnline 2s ease-in-out infinite; }
@keyframes aiOnline { 0%,100% { box-shadow: 0 0 0 0 var(--green-soft); } 50% { box-shadow: 0 0 0 4px transparent; } }
/* орб в шапке мягко дышит */
.ai-dr-head .ai-orb.sm { animation: aiOrbBreathe 3.4s ease-in-out infinite; }
@keyframes aiOrbBreathe { 0%,100% { box-shadow: 0 4px 14px -4px var(--ai); } 50% { box-shadow: 0 6px 22px -2px var(--ai); transform: scale(1.04); } }
.ai-dr-head .icon-btn { position: relative; }
.ai-close .ai-x { display: grid; place-items: center; transform: rotate(45deg); }

.ai-dr-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.ai-welcome { text-align: center; padding: 24px 8px; }
.ai-welcome .aw-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; margin-top: 14px; }
.ai-welcome .aw-sub { color: var(--text-2); font-size: 13px; margin-top: 5px; }
.ai-welcome-chips { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.ai-welcome-chips .ai-chip { width: 100%; text-align: left; }
/* появление приветственного экрана: каскад орб → заголовок → подзаголовок → чипы */
.ai-welcome > .ai-orb.lg { opacity: 0; animation: awPop .5s cubic-bezier(.34,1.56,.64,1) .04s forwards; }
.ai-welcome .aw-title { opacity: 0; animation: awUp .44s ease .16s forwards; }
.ai-welcome .aw-sub { opacity: 0; animation: awUp .44s ease .24s forwards; }
.ai-welcome-chips .ai-chip { opacity: 0; animation: awUp .44s ease forwards; }
.ai-welcome-chips .ai-chip:nth-child(1) { animation-delay: .32s; }
.ai-welcome-chips .ai-chip:nth-child(2) { animation-delay: .39s; }
.ai-welcome-chips .ai-chip:nth-child(3) { animation-delay: .46s; }
.ai-welcome-chips .ai-chip:nth-child(4) { animation-delay: .53s; }
.ai-welcome-chips .ai-chip:nth-child(5) { animation-delay: .60s; }
.ai-welcome-chips .ai-chip:hover { transform: translateX(3px); }
/* иконка в чипе-примере */
.ai-chip { display: inline-flex; align-items: center; gap: 8px; }
.ai-chip-ic { display: inline-flex; flex-shrink: 0; color: var(--ai); opacity: .85; transition: transform .16s ease; }
.ai-chip:hover .ai-chip-ic { transform: scale(1.12); opacity: 1; }
.ai-welcome-chips .ai-chip { justify-content: flex-start; }
/* анимированный плейсхолдер: буквы появляются по очереди */
.ai-input-wrap { position: relative; flex: 1; display: flex; }
.ai-input-wrap input { flex: 1; width: 100%; }
.ai-ph { position: absolute; left: 16px; right: 44px; top: 0; bottom: 0; display: flex; align-items: center; pointer-events: none; font-size: 13.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.ai-ph-txt { font-family: var(--font-mono, ui-monospace, monospace); letter-spacing: .2px; }
.ai-ph-cursor { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 2px; background: var(--ai); border-radius: 1px; animation: aiPhBlink 1s steps(2) infinite; }
@keyframes aiPhBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ai-ph-txt { font-family: inherit; } }
@keyframes awPop { from { opacity: 0; transform: scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes awUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ai-welcome > .ai-orb.lg, .ai-welcome .aw-title, .ai-welcome .aw-sub, .ai-welcome-chips .ai-chip { animation: none !important; opacity: 1 !important; }
}

.ai-msg { display: flex; gap: 9px; max-width: 92%; animation: aiMsgIn .34s cubic-bezier(.22,.8,.3,1); }
.ai-msg.user { margin-left: auto; flex-direction: row-reverse; animation: aiMsgInR .34s cubic-bezier(.22,.8,.3,1); }
@keyframes aiMsgIn { from { opacity: 0; transform: translateY(10px) translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes aiMsgInR { from { opacity: 0; transform: translateY(10px) translateX(6px); } to { opacity: 1; transform: none; } }
.ai-msg-av { width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--ai), var(--accent)); }
.ai-msg-body { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.ai-bubble { padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.ai-msg.assistant .ai-bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.ai-msg.user .ai-bubble { background: var(--accent); color: var(--accent-contrast); border-bottom-right-radius: 5px; }
.ai-bubble.typing { display: flex; gap: 4px; align-items: center; }
.ai-bubble.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: aiTyping 1.2s infinite; }
.ai-bubble.typing span:nth-child(2) { animation-delay: .2s; }
.ai-bubble.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiTyping { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* rec card inside chat */
.rec-card { border: 1px solid var(--accent-soft-bd); border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.rec-head { display: flex; align-items: center; gap: 11px; padding: 13px 14px; }
.rec-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; flex-shrink: 0; }
.rec-name { font-weight: 700; font-size: 13.5px; }
.rec-specs { font-size: 11.5px; color: var(--text-3); margin-top: 1px; font-family: var(--font-mono); }
.rec-badge { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-deep); background: var(--accent-soft); padding: 3px 8px; border-radius: 20px; }
.rec-foot { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.rec-price { font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.rec-price small { font-size: 11px; color: var(--text-3); font-weight: 600; font-family: var(--font-ui); }

.ai-dr-input { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.ai-dr-input input { flex: 1; height: 42px; border: 1px solid var(--border); border-radius: 22px; padding: 0 16px; outline: none; background: var(--bg); font-size: 13.5px; transition: border-color .12s, box-shadow .12s; }
.ai-dr-input input:focus { border-color: color-mix(in oklch, var(--ai) 50%, transparent); box-shadow: 0 0 0 3px var(--ai-soft); }
.ai-send { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--ai), var(--accent)); transition: opacity .12s, transform .1s; }
.ai-send:disabled { opacity: .4; cursor: not-allowed; }
.ai-send:not(:disabled):hover { transform: scale(1.05); }
.ai-send svg { transition: transform .18s ease; }
.ai-send:not(:disabled):hover svg { transform: translateX(2px); }
.ai-send:not(:disabled):active { transform: scale(.92); }
/* карточка-рекомендация: появление с подсветкой */
.ai-msg-body .rec-card, .ai-msg-body [class*="rec"] { animation: aiRecIn .4s cubic-bezier(.22,.9,.3,1) .1s both; }
@keyframes aiRecIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ai-msg, .ai-msg.user, .ai-dr-status .od, .ai-dr-head .ai-orb.sm, .ai-msg-body .rec-card, .ai-msg-body [class*="rec"] { animation: none !important; }
}

@media (max-width: 520px) { .ai-fab-label { display: none; } .ai-fab { padding: 0; width: 52px; justify-content: center; } }

/* ============ Анимации ИИ-карточки на дашборде ============ */
.ai-card { transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s ease, border-color .25s ease; }
.ai-card:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -16px color-mix(in oklch, var(--ai) 55%, transparent); border-color: color-mix(in oklch, var(--ai) 45%, var(--border)); }
/* медленно дрейфующее свечение */
.ai-card-glow { animation: ai-glow-drift 9s ease-in-out infinite; }
@keyframes ai-glow-drift { 0%,100% { transform: translate(0,0) scale(1); opacity: .9; } 50% { transform: translate(-26px,22px) scale(1.12); opacity: 1; } }
/* пульсирующая орб-иконка с мягким дыханием */
.ai-orb { animation: ai-orb-breathe 3.4s ease-in-out infinite; }
@keyframes ai-orb-breathe { 0%,100% { box-shadow: 0 6px 18px -6px color-mix(in oklch, var(--ai) 70%, transparent); } 50% { box-shadow: 0 8px 26px -4px color-mix(in oklch, var(--ai) 90%, transparent); } }
.ai-card:hover .ai-orb { animation: ai-orb-spin .7s cubic-bezier(.4,.1,.2,1); }
@keyframes ai-orb-spin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(8deg) scale(1.1); } 100% { transform: rotate(0) scale(1); } }
/* блик-полоса по карточке при наведении */
.ai-card::after { content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(100deg, transparent, color-mix(in oklch, var(--ai) 14%, transparent), transparent); transform: skewX(-18deg); opacity: 0; pointer-events: none; }
.ai-card:hover::after { animation: ai-shimmer 1.1s ease; }
@keyframes ai-shimmer { 0% { left: -60%; opacity: 0; } 25% { opacity: 1; } 100% { left: 130%; opacity: 0; } }
/* поле ввода — пульс рамки для привлечения внимания, гаснет при фокусе */
.ai-card-input { animation: ai-input-attn 3.8s ease-in-out infinite; }
.ai-card-input:focus-within { animation: none; }
@keyframes ai-input-attn { 0%,92%,100% { box-shadow: 0 0 0 0 transparent; } 96% { box-shadow: 0 0 0 4px var(--ai-soft); } }
/* чипы-примеры: подъём и заливка при наведении, лёгкий каскад появления */
.ai-chip { transition: transform .14s ease, background .14s ease, color .14s ease, border-color .14s ease; }
.ai-chip:hover { transform: translateY(-2px); background: var(--ai-soft); color: var(--ai); border-color: color-mix(in oklch, var(--ai) 45%, transparent); }
.ai-card-chips .ai-chip { opacity: 0; animation: ai-chip-in .4s ease forwards; }
.ai-card-chips .ai-chip:nth-child(1) { animation-delay: .05s; }
.ai-card-chips .ai-chip:nth-child(2) { animation-delay: .13s; }
.ai-card-chips .ai-chip:nth-child(3) { animation-delay: .21s; }
@keyframes ai-chip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* кнопка «Спросить» — стрелка чуть едет вправо при наведении */
.ai-card-input .btn svg { transition: transform .16s ease; }
.ai-card-input .btn:hover svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .ai-card-glow, .ai-orb, .ai-card-input, .ai-card-chips .ai-chip { animation: none !important; }
  .ai-card-chips .ai-chip { opacity: 1; }
}

/* Мобильный фикс блока ИИ-подбора: базовые правила .ai-card-* живут ЗДЕСЬ (ai.css грузится
   ПОСЛЕ components.css), поэтому и мобильные оверрайды должны быть здесь — иначе одинаковая
   специфичность + порядок загрузки → база выигрывает и строка ввода не переносится, а
   зелёная кнопка вылезает на чипы «Популярное». Тут кнопка уходит на отдельную строку. */
@media (max-width: 480px) {
  .ai-card-input { flex-wrap: wrap; height: auto; padding: 8px; row-gap: 8px; }
  .ai-card-input input { flex: 1 1 100%; min-width: 0; height: 36px; }
  .ai-card-input-ic { order: -1; }
  .ai-card-go { flex: 1 1 100%; width: 100%; justify-content: center; }
  .ai-card-go span { display: inline; }
}
