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

/* ============ НОВОСТИ ============ */
.news-banner { position: relative; border-radius: var(--r-xl); overflow: hidden; margin-bottom: 22px; 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: 26px 30px; position: relative; overflow: hidden; min-height: 168px; }
.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.27 0.06 153), oklch(0.24 0.05 165)); }
[data-theme="dark"] .news-slide.acc-b { background: linear-gradient(120deg, oklch(0.27 0.06 25), oklch(0.24 0.05 40)); }
[data-theme="dark"] .news-slide.acc-c { background: linear-gradient(120deg, oklch(0.27 0.06 250), oklch(0.24 0.05 270)); }
.news-figure { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); color: var(--text); opacity: .10; pointer-events: none; }
.news-content { position: relative; max-width: 64%; }
.news-tag { display: inline-block; 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; }
.news-cta { background: var(--surface); color: var(--accent-deep); margin-top: 14px; box-shadow: var(--shadow-xs); }
.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: 30px; 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-content { max-width: 100%; }
  .news-figure { display: none; }
}

/* ============ ИИ-КАРТОЧКА (дашборд) ============ */
.ai-card { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 20px; border: 1px solid color-mix(in oklch, var(--ai) 24%, var(--border)); background: linear-gradient(135deg, color-mix(in oklch, var(--ai-soft) 70%, var(--surface)), var(--surface)); box-shadow: var(--shadow-sm); }
.ai-card-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; top: -120px; right: -80px; background: radial-gradient(circle, color-mix(in oklch, var(--ai) 30%, transparent), transparent 70%); pointer-events: none; }
.ai-card-head { display: flex; align-items: flex-start; gap: 13px; position: relative; margin-bottom: 16px; }
.ai-orb { width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--ai), var(--accent)); box-shadow: 0 8px 18px color-mix(in oklch, var(--ai) 40%, transparent); position: relative; }
.ai-orb::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 55%); }
.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: 16px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.ai-badge { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ai); background: var(--ai-soft); padding: 2px 7px; border-radius: 20px; }
.ai-card-sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.ai-card-input { display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 8px 0 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); position: relative; transition: border-color .12s, box-shadow .12s; }
.ai-card-input:focus-within { border-color: color-mix(in oklch, var(--ai) 50%, transparent); box-shadow: 0 0 0 3px var(--ai-soft); }
.ai-card-input > svg { color: var(--ai); flex-shrink: 0; }
.ai-card-input input { flex: 1; border: none; outline: none; background: none; font-weight: 500; font-size: 13.5px; min-width: 0; }
.ai-card-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; position: relative; }
.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 13px; transition: all .12s; text-align: left; }
.ai-chip:hover { border-color: color-mix(in oklch, var(--ai) 45%, transparent); color: var(--text); background: var(--ai-soft); }

/* ============ FAB ============ */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 9px; height: 52px; padding: 0 20px 0 16px; border-radius: 30px; color: #fff; background: linear-gradient(135deg, var(--ai), var(--accent)); box-shadow: 0 12px 28px color-mix(in oklch, var(--ai) 40%, transparent); transition: transform .16s, opacity .16s; }
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab.hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }
.ai-fab-label { font-weight: 700; font-size: 14px; }
.ai-fab svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }

/* ============ ИИ-ЧАТ 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); }
.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%; }

.ai-msg { display: flex; gap: 9px; max-width: 92%; }
.ai-msg.user { margin-left: auto; flex-direction: row-reverse; }
.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); }

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