/* Vision Flow — ИИ-ассистент в чате картинок (vf-assistant.js). Стиль «Обсерватория»: белое золото на космосе. */

/* ---------- тумблер в панели ввода ---------- */
html:root body.veo-generation-body .veo-prompt-control-bar .vf-asst-tgl {
    position: relative; width: 40px; height: 40px; min-width: 40px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; cursor: pointer;
    color: rgba(245, 237, 220, 0.82); background: radial-gradient(circle at 50% 30%, rgba(247, 239, 222, 0.09), rgba(247, 239, 222, 0.02) 70%), #0e0d0b;
    border: 1px solid rgba(236, 224, 198, 0.2); box-shadow: inset 0 1px 0 rgba(255, 252, 245, 0.08), 0 6px 16px rgba(0, 0, 0, 0.4);
    transition: color 0.25s, border-color 0.25s, background 0.3s, box-shadow 0.3s;
}
html:root body.veo-generation-body .veo-prompt-control-bar .vf-asst-tgl:hover { color: #fffaf0; border-color: rgba(236, 224, 198, 0.45); }
.vf-asst-tgl svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; overflow: visible; transition: transform 0.3s cubic-bezier(.22, 1, .36, 1); }
.vf-asst-tgl:hover svg { transform: translateY(-1px); }
.vf-asst-tgl .vf-asst-star { fill: currentColor; stroke: none; transform-box: fill-box; transform-origin: center; animation: vf-asst-tw 2.8s ease-in-out infinite; }
@keyframes vf-asst-tw { 0%, 100% { transform: scale(0.75); opacity: 0.6; } 50% { transform: scale(1.1); opacity: 1; } }
.vf-asst-tgl__led { position: absolute; right: 2px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: #3a362d; box-shadow: 0 0 0 2px #0a0a09; transition: background 0.3s, box-shadow 0.3s; }
html:root body.vf-asst-on.veo-generation-body .veo-prompt-control-bar .vf-asst-tgl {
    color: #1d1a14; border-color: rgba(255, 246, 224, 0.9); background: linear-gradient(180deg, #fffaf0, #e8dcc2 55%, #cbb994);
    box-shadow: 0 0 0 3px rgba(255, 246, 224, 0.12), 0 0 22px rgba(255, 246, 224, 0.35);
}
body.vf-asst-on .vf-asst-tgl__led { background: #fffaf0; box-shadow: 0 0 0 2px #0a0a09, 0 0 10px rgba(255, 246, 224, 0.9); }

/* ---------- режим ассистента: что прячем и что показываем ---------- */
html body.vf-asst-on.veo-generation-body .veo-prompt-control-bar :is(.veo-prompt-send-wrap, #costDisplayDesktopWrap, #veoAutoSendBtn, #veoEnterSendBtn, .vfpg-btn, .vf-tool--keys, .vf-dice) { display: none !important; }
.vf-asst-send { display: none; }
html body.vf-asst-on.veo-generation-body .veo-prompt-control-bar .vf-asst-send {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 8px; border-radius: 999px; cursor: pointer; border: 0;
    font: 700 0.74rem/1 "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #1d1a14; order: 4; margin-left: auto;
    background: linear-gradient(180deg, #fffaf0, #e8dcc2 55%, #cbb994); box-shadow: 0 0 0 1px rgba(255, 246, 224, 0.5), 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 26px rgba(255, 246, 224, 0.18);
    transition: transform 0.2s ease, box-shadow 0.25s;
}
.vf-asst-send svg { width: 28px; height: 28px; padding: 6px; box-sizing: border-box; border-radius: 50%; background: #14120e; fill: none; stroke: #f6eedc; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html body.vf-asst-on .vf-asst-send:hover { box-shadow: 0 0 0 1px rgba(255, 246, 224, 0.8), 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 32px rgba(255, 246, 224, 0.3); }
html body.vf-asst-on .vf-asst-send:active { transform: scale(0.96); }
html body.vf-asst-on .vf-asst-send.is-busy { opacity: 0.55; pointer-events: none; }
html body.vf-asst-on .vf-asst-send.is-busy svg { animation: vf-asst-pulse 1s ease-in-out infinite; }
@keyframes vf-asst-pulse { 50% { transform: translateY(-2px); } }

.vf-asst-head { display: none; }
html body.vf-asst-on .veo-prompt-box > .vf-asst-head {
    display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 8px 8px 8px 10px; border-radius: 14px;
    background: linear-gradient(90deg, rgba(255, 246, 224, 0.1), rgba(255, 246, 224, 0.02)); border: 1px solid rgba(236, 224, 198, 0.22);
    animation: vf-asst-in 0.45s cubic-bezier(.22, 1, .36, 1);
}
@keyframes vf-asst-in { from { opacity: 0; transform: translateY(-6px); } }
.vf-asst-head__ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #1d1a14; background: linear-gradient(180deg, #fffaf0, #d9caa6); }
.vf-asst-head__ic svg, .vf-asst-ava svg, .vf-asst-note__ic svg, .vf-asst-to svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.vf-asst-head__ic .vf-asst-star, .vf-asst-ava .vf-asst-star, .vf-asst-note__ic .vf-asst-star, .vf-asst-to .vf-asst-star { fill: currentColor; stroke: none; }
.vf-asst-head__t { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.vf-asst-head__t b { font: 700 0.8rem/1 "Inter", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: #fffaf0; }
.vf-asst-head__q { font: 500 0.78rem/1.2 "Inter", sans-serif; color: rgba(245, 237, 220, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-asst-head__off { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer; font: 600 0.74rem/1 "Inter", sans-serif; color: #f2e8d3;
    background: transparent; border: 1px solid rgba(236, 224, 198, 0.3); transition: border-color 0.2s, background 0.2s; }
.vf-asst-head__off:hover { border-color: rgba(242, 232, 211, 0.7); background: rgba(255, 250, 240, 0.05); }
html body.vf-asst-on.veo-generation-body .veo-prompt-box {
    border-color: rgba(255, 246, 224, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(255, 246, 224, 0.06), 0 0 40px rgba(255, 246, 224, 0.1), 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}

/* ---------- сообщения в ленте ---------- */
#veoChatMessagesDesktop .vf-asst-row { display: flex; gap: 12px; width: 100%; max-width: 760px; margin: 14px auto; padding: 0 6px; box-sizing: border-box; animation: vf-asst-msg 0.5s cubic-bezier(.22, 1, .36, 1); }
@keyframes vf-asst-msg { from { opacity: 0; transform: translateY(10px); } }
#veoChatMessagesDesktop .vf-asst-row--user { justify-content: flex-end; }
.vf-asst-bubble { border-radius: 18px; padding: 12px 16px; font: 400 0.95rem/1.6 "Inter", sans-serif; color: #f2e8d3; max-width: min(620px, 100%); box-sizing: border-box; }
.vf-asst-bubble p { margin: 0 0 8px; } .vf-asst-bubble p:last-child { margin-bottom: 0; }
.vf-asst-bubble ul { margin: 2px 0 8px; padding: 0; list-style: none; } .vf-asst-bubble ul:last-child { margin-bottom: 0; }
.vf-asst-bubble li { position: relative; padding-left: 16px; margin: 3px 0; }
.vf-asst-bubble li::before { content: ""; position: absolute; left: 3px; top: 0.66em; width: 5px; height: 5px; border-radius: 50%; background: rgba(236, 224, 198, 0.65); }
.vf-asst-bubble b { color: #fffaf0; font-weight: 700; }
.vf-asst-bubble--user { background: linear-gradient(180deg, #1a1813, #0e0d0a); border: 1px solid rgba(236, 224, 198, 0.3); border-bottom-right-radius: 6px; }
.vf-asst-to { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; font: 700 0.62rem/1 "Inter", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(236, 224, 198, 0.55); }
.vf-asst-to svg { width: 12px; height: 12px; }
.vf-asst-ava { flex: none; width: 38px; height: 38px; margin-top: 18px; border-radius: 50%; display: grid; place-items: center; color: #1d1a14;
    background: linear-gradient(180deg, #fffaf0, #d9caa6); box-shadow: 0 0 0 3px rgba(5, 5, 4, 0.9), 0 0 18px rgba(255, 246, 224, 0.28); }
.vf-asst-ava svg { width: 20px; height: 20px; }
.vf-asst-col { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.vf-asst-name { font: 700 0.68rem/1 "Inter", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: #f6eedc; }
.vf-asst-name span { margin-left: 6px; color: rgba(236, 224, 198, 0.45); letter-spacing: 0.1em; }
.vf-asst-bubble--bot { background: radial-gradient(120% 90% at 0% 0%, rgba(247, 239, 222, 0.07), transparent 60%), linear-gradient(180deg, #14120e, #0b0a08);
    border: 1px solid rgba(236, 224, 198, 0.24); border-top-left-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 252, 245, 0.05), 0 12px 28px rgba(0, 0, 0, 0.4); }
.vf-asst-typing { display: flex; align-items: center; gap: 5px; min-height: 22px; }
.vf-asst-typing i { width: 7px; height: 7px; border-radius: 50%; background: #f2e8d3; animation: vf-asst-dot 1.1s ease-in-out infinite; }
.vf-asst-typing i:nth-child(2) { animation-delay: 0.15s; } .vf-asst-typing i:nth-child(3) { animation-delay: 0.3s; }
.vf-asst-typing span { margin-left: 8px; font: italic 600 1rem/1 var(--vf-antiqua, "Cormorant Garamond", Georgia, serif); color: rgba(242, 232, 211, 0.8); }
@keyframes vf-asst-dot { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.vf-asst-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-asst-chip { height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer; font: 600 0.82rem/1 "Inter", sans-serif; color: #f2e8d3;
    background: rgba(255, 250, 240, 0.04); border: 1px solid rgba(236, 224, 198, 0.35); transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s; }
.vf-asst-chip:hover { background: linear-gradient(180deg, #fffaf0, #e8dcc2); color: #1d1a14; border-color: transparent; transform: translateY(-1px); }
.vf-asst-row--bot:not(.is-last) .vf-asst-chips { display: none; }
.vf-asst-retry { height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer; font: 600 0.8rem/1 "Inter", sans-serif; color: #1d1a14; border: 0; background: linear-gradient(180deg, #fffaf0, #d9caa6); }

/* разделитель «ассистент включён / выключен» */
#veoChatMessagesDesktop .vf-asst-sys { display: flex; align-items: center; gap: 12px; max-width: 760px; width: 100%; margin: 18px auto; padding: 0 6px; box-sizing: border-box; }
.vf-asst-sys__line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(236, 224, 198, 0.3), transparent); }
.vf-asst-sys__txt { display: inline-flex; align-items: center; gap: 6px; font: 600 0.72rem/1.3 "Inter", sans-serif; letter-spacing: 0.06em; color: rgba(236, 224, 198, 0.65); text-align: center; }
.vf-asst-sys__txt svg { width: 11px; height: 11px; flex: none; fill: rgba(236, 224, 198, 0.8); }

/* ---------- карточка «Готово к созданию» ---------- */
.vf-asst-card { width: 100%; max-width: 620px; box-sizing: border-box; border-radius: 20px; padding: 16px 18px 14px;
    background: radial-gradient(120% 80% at 100% 0%, rgba(255, 246, 224, 0.1), transparent 55%), linear-gradient(180deg, #17150f, #0b0a08);
    border: 1px solid rgba(255, 246, 224, 0.45); box-shadow: 0 0 0 5px rgba(5, 5, 4, 0.6), 0 0 0 6px rgba(236, 224, 198, 0.08), 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 246, 224, 0.07); }
.vf-asst-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.vf-asst-card__head svg { width: 14px; height: 14px; fill: #fffaf0; filter: drop-shadow(0 0 4px rgba(255, 246, 224, 0.8)); }
.vf-asst-card__head span { font: 700 0.68rem/1 "Inter", sans-serif; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(236, 224, 198, 0.75); }
.vf-asst-card__head b { flex-basis: 100%; font: 700 1.3rem/1.15 var(--vf-antiqua, "Cormorant Garamond", Georgia, serif); color: #fffaf0; }
.vf-asst-card__set { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.vf-asst-card__set span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font: 700 0.78rem/1 "Inter", sans-serif; color: #f6eedc;
    background: rgba(255, 250, 240, 0.05); border: 1px solid rgba(236, 224, 198, 0.22); }
.vf-asst-card__set i { font-style: normal; font-weight: 600; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(236, 224, 198, 0.5); }
.vf-asst-card__prompt { max-height: 150px; overflow: hidden; font-size: 0.9rem !important; line-height: 1.55 !important; color: rgba(242, 232, 211, 0.92);
    -webkit-mask: linear-gradient(180deg, #000 55%, transparent); mask: linear-gradient(180deg, #000 55%, transparent); transition: max-height 0.5s cubic-bezier(.22, 1, .36, 1); }
.vf-asst-card.is-open .vf-asst-card__prompt { max-height: 3000px; -webkit-mask: none; mask: none; }
.vf-asst-card__more { margin: 6px 0 0; padding: 0; border: 0; background: none; cursor: pointer; font: 600 0.78rem/1 "Inter", sans-serif; color: rgba(236, 224, 198, 0.75); text-decoration: underline; text-underline-offset: 3px; }
.vf-asst-card__more:hover { color: #fffaf0; }
.vf-asst-card__why { margin-top: 10px; font: italic 500 1rem/1.4 var(--vf-antiqua, "Cormorant Garamond", Georgia, serif); color: rgba(242, 232, 211, 0.75); }
.vf-asst-card__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.vf-asst-go { height: 44px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; font: 700 0.78rem/1 "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #1d1a14;
    background: linear-gradient(180deg, #fffaf0, #e8dcc2 55%, #cbb994); box-shadow: 0 0 0 1px rgba(255, 246, 224, 0.6), 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 26px rgba(255, 246, 224, 0.2); transition: transform 0.2s, box-shadow 0.25s; }
.vf-asst-go:hover { box-shadow: 0 0 0 1px rgba(255, 246, 224, 0.9), 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 34px rgba(255, 246, 224, 0.32); }
.vf-asst-go:active { transform: scale(0.97); }
.vf-asst-card.is-sent .vf-asst-go, .vf-asst-go:disabled { opacity: 0.6; cursor: default; box-shadow: none; }
.vf-asst-sec { height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; font: 600 0.82rem/1 "Inter", sans-serif; color: #f2e8d3; background: rgba(255, 250, 240, 0.03);
    border: 1px solid rgba(236, 224, 198, 0.3); transition: border-color 0.2s, background 0.2s; }
.vf-asst-sec:hover { border-color: rgba(242, 232, 211, 0.7); background: rgba(255, 250, 240, 0.07); }
.vf-asst-card__note { margin-top: 10px; font: 500 0.72rem/1.4 "Inter", sans-serif; color: rgba(236, 224, 198, 0.45); }

/* ---------- уведомление сверху ---------- */
.vf-asst-note { position: fixed; left: 50%; top: calc(var(--vf-desktop-header-h, 56px) + 14px); z-index: 2147482500; display: flex; align-items: center; gap: 12px;
    width: min(520px, calc(calc(100vw / var(--vf-z, 1)) - 32px)); padding: 12px 16px 12px 12px; box-sizing: border-box; border-radius: 18px; pointer-events: none;
    background: linear-gradient(180deg, rgba(24, 22, 18, 0.98), rgba(10, 10, 9, 0.98)); border: 1px solid rgba(255, 246, 224, 0.4);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 246, 224, 0.1); opacity: 0; transform: translate(-50%, -12px) scale(0.97);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.22, 1, .36, 1); }
.vf-asst-note.is-in { opacity: 1; transform: translate(-50%, 0) scale(1); }
.vf-asst-note__ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #1d1a14; background: linear-gradient(180deg, #fffaf0, #d9caa6); }
.vf-asst-note__ic svg { width: 21px; height: 21px; }
.vf-asst-note b { display: block; margin-bottom: 3px; font: 700 0.95rem/1.2 "Inter", sans-serif; color: #fffaf0; }
.vf-asst-note span { display: block; font: 500 0.82rem/1.45 "Inter", sans-serif; color: rgba(245, 237, 220, 0.7); }

@media (prefers-reduced-motion: reduce) {
    .vf-asst-tgl .vf-asst-star, .vf-asst-typing i, #veoChatMessagesDesktop .vf-asst-row { animation: none !important; }
}
/* ==========================================================================
   Карточка «Готово к созданию» v2 — спокойнее и читаемее: заголовок, одна строка настроек,
   суть промпта, полный промпт по нажатию, одна главная кнопка и две тихие ссылки
   ========================================================================== */
.vf-asst-card { padding: 18px 20px 16px; }
.vf-asst-card__head { margin-bottom: 8px; }
.vf-asst-card__head b { font-size: 1.36rem; line-height: 1.2; margin-top: 4px; }
.vf-asst-card__spec { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 12px;
    font: 600 0.8rem/1.4 "Inter", sans-serif; letter-spacing: 0.02em; color: rgba(236, 224, 198, 0.72); font-feature-settings: "lnum" 1; }
.vf-asst-card__spec i { font-style: normal; color: rgba(236, 224, 198, 0.35); }
.vf-asst-card__sum { margin: 0; font: 500 0.95rem/1.6 "Inter", sans-serif; color: rgba(245, 237, 220, 0.9);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vf-asst-card__more { display: inline-flex; align-items: center; gap: 5px; margin: 10px 0 0; text-decoration: none !important;
    font: 600 0.8rem/1 "Inter", sans-serif; color: rgba(236, 224, 198, 0.7); }
.vf-asst-card__more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s ease; }
.vf-asst-card.is-open .vf-asst-card__more svg { transform: rotate(180deg); }
/* полный промпт — только по нажатию, отдельной подложкой */
.vf-asst-card__prompt { display: none; max-height: none !important; -webkit-mask: none !important; mask: none !important;
    margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(5, 5, 4, 0.45); border: 1px solid rgba(236, 224, 198, 0.1);
    font-size: 0.86rem !important; line-height: 1.55 !important; }
.vf-asst-card.is-open .vf-asst-card__prompt { display: block; }
.vf-asst-card.is-open .vf-asst-card__sum { display: none; }
.vf-asst-card__why, .vf-asst-card__note { display: none !important; }
/* действия: главная кнопка и тихие ссылки рядом */
.vf-asst-card__acts { align-items: center; gap: 6px 18px; margin-top: 16px; }
.vf-asst-link { height: 44px; padding: 0 2px; border: 0; background: none; cursor: pointer;
    font: 600 0.86rem/1 "Inter", sans-serif; color: rgba(242, 232, 211, 0.78); }
.vf-asst-link:hover { color: #fffaf0; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(242, 232, 211, 0.4); }
