/* w207 HV-Chat (31.10.2026, Julian): der blaue Knopf unten links oeffnet einen vollen Chat wie die ChatGPT-/Claude-App.
   Baut auf dem vorhandenen Assistenten-Fenster (#hvAssistentModal / .ass2-*) auf: PC grosses Fenster mit Seitenleiste
   (Gespraeche), Handy Vollbild mit Safe-Areas und Tastatur-Hoehe (--hvc-h aus visualViewport). Farben wie UI w96. */
#hvAssistentModal.hvc { padding: 16px; }
#hvAssistentModal.hvc > #hvAssDlg { width: min(1180px, 96vw); max-width: 1180px; height: min(900px, 92vh); flex-direction: row; position: relative; }
#hvcSeite { width: 268px; flex-shrink: 0; display: flex; flex-direction: column; background: #f8fafc; border-right: 1px solid #eef1f5; min-height: 0; }
#hvcHaupt { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; min-height: 0; }
#hvAssDlg.seite-zu #hvcSeite { display: none; }
.hvc-seite-kopf { display: flex; align-items: center; gap: 6px; padding: 12px 10px 8px; }
.hvc-neu { flex: 1; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid #d5dbe3; border-radius: 10px;
           background: #fff; font-size: 13.5px; font-weight: 600; color: #0f172a; cursor: pointer; }
.hvc-neu:hover { border-color: #2563eb; color: #1d4ed8; }
.hvc-neu svg, .hvc-ib svg { width: 17px; height: 17px; }
.hvc-ib { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: none;
          background: transparent; color: #64748b; cursor: pointer; flex-shrink: 0; }
.hvc-ib:hover { background: #eef2f7; color: #0f172a; }
.hvc-liste { flex: 1; overflow-y: auto; padding: 2px 8px 12px; overscroll-behavior: contain; }
.hvc-gruppe { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; padding: 12px 8px 4px; }
.hvc-eintrag { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 10px; min-height: 36px; border-radius: 9px; cursor: pointer; font-size: 13px; color: #334155; position: relative; }
.hvc-eintrag:hover { background: #eef2f7; }
.hvc-eintrag.aktiv { background: #e3ebfa; color: #0f172a; font-weight: 600; }
.hvc-eintrag .tt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hvc-eintrag input { flex: 1; min-width: 0; height: 30px; border: 1px solid #2563eb; border-radius: 7px; padding: 0 8px; font-size: 13px; font-family: inherit; }
.hvc-eintrag .mehr { width: 28px; height: 28px; border: none; background: transparent; border-radius: 7px; color: #64748b; cursor: pointer; visibility: hidden; font-size: 16px; line-height: 1; }
.hvc-eintrag:hover .mehr, .hvc-eintrag.aktiv .mehr { visibility: visible; }
.hvc-eintrag .mehr:hover { background: #dbe3ef; color: #0f172a; }
.hvc-leer-liste { font-size: 12.5px; color: #94a3b8; padding: 12px 10px; line-height: 1.5; }
.hvc-menue { position: absolute; right: 6px; top: 34px; z-index: 50; background: #fff; border: 1px solid #e6eaf0; border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
             padding: 4px; min-width: 160px; }
.hvc-menue button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: none; background: none; padding: 9px 10px; border-radius: 7px; font-size: 13px; color: #0f172a; cursor: pointer; }
.hvc-menue button:hover { background: #f1f5f9; }
.hvc-menue button.rot { color: #b91c1c; }
.hvc-seite-fuss { padding: 10px 14px 14px; font-size: 11.5px; color: #94a3b8; line-height: 1.45; border-top: 1px solid #eef1f5; }
.hvc-burger { display: none; }
#hvAssDlg.seite-zu .hvc-burger { display: inline-flex; }
#hvcHaupt .ass2-head .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hvc-schleier { display: none; }

/* Hauptspalte: Inhalt mittig wie bei ChatGPT */
#hvcHaupt #hvAssChat { padding: 20px max(16px, calc((100% - 800px) / 2)) 12px; gap: 14px; scroll-behavior: auto; }
#hvcHaupt .ass2-foot { padding-left: max(16px, calc((100% - 800px) / 2)); padding-right: max(16px, calc((100% - 800px) / 2)); }
#hvcHaupt .ass2-msg.user { max-width: 78%; font-size: 14px; border-radius: 16px 16px 4px 16px; padding: 10px 14px; }
#hvcHaupt .ass2-msg.ki { max-width: 100%; }
.hvc-anh-zeile { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-self: flex-end; max-width: 78%; }
.hvc-anh-zeile .hvc-anh { background: #eef2f7; }

/* Antwort der KI */
.hvc-antwort { align-self: stretch; font-size: 14.5px; line-height: 1.62; color: #0f172a; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hvc-kopfzeile { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b; }
.hvc-kopfzeile .ki-ico { width: 24px; height: 24px; border-radius: 7px; background: #eff6ff; color: #2563eb; display: inline-flex; align-items: center; justify-content: center; }
.hvc-kopfzeile .ki-ico svg { width: 14px; height: 14px; }
.hvc-schritte { font-size: 12.5px; color: #64748b; }
.hvc-schritte summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.hvc-schritte summary::-webkit-details-marker { display: none; }
.hvc-schritte ol { margin: 6px 0 0 4px; padding-left: 16px; }
.hvc-schritte li { margin: 2px 0; }
.hvc-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: #64748b; }
.hvc-punkt { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; animation: hvcPuls 1s ease-in-out infinite; }
@keyframes hvcPuls { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.hvc-md > :first-child { margin-top: 0; }
.hvc-md > :last-child { margin-bottom: 0; }
.hvc-md p { margin: 0 0 10px; }
.hvc-md ul, .hvc-md ol { margin: 0 0 10px; padding-left: 22px; }
.hvc-md li { margin: 3px 0; }
.hvc-md h3, .hvc-md h4 { font-size: 15px; font-weight: 700; margin: 14px 0 6px; }
.hvc-md h2 { font-size: 16.5px; font-weight: 700; margin: 14px 0 6px; }
.hvc-md code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; background: #f1f5f9; border-radius: 5px; padding: 1px 5px; }
.hvc-md pre { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 12.5px; margin: 0 0 10px; }
.hvc-md pre code { background: none; padding: 0; color: inherit; }
.hvc-md blockquote { margin: 0 0 10px; padding: 4px 12px; border-left: 3px solid #cbd5e1; color: #475569; }
.hvc-md .tab-wrap { overflow-x: auto; margin: 0 0 10px; border: 1px solid #e6eaf0; border-radius: 10px; }
.hvc-md table { border-collapse: collapse; width: 100%; font-size: 13px; }
.hvc-md th { background: #f8fafc; text-align: left; font-weight: 700; color: #334155; }
.hvc-md th, .hvc-md td { padding: 7px 10px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.hvc-md tr:last-child td { border-bottom: none; }
.hvc-md a { color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; }
.hvc-md a.hvc-link { text-decoration: none; background: #eff6ff; border: 1px solid #dbeafe; border-radius: 6px; padding: 0 6px; white-space: nowrap; font-weight: 600; }
.hvc-md a.hvc-link:hover { background: #dbeafe; }
.hvc-cursor::after { content: ''; display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: #2563eb; border-radius: 1px; animation: hvcBlink 1s steps(2) infinite; }
@keyframes hvcBlink { 50% { opacity: 0; } }
.hvc-fehler { font-size: 13.5px; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; }
.hvc-info { font-size: 12.5px; color: #475569; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hvc-werkzeugleiste { display: flex; gap: 2px; }
.hvc-werkzeugleiste button { width: 30px; height: 30px; border: none; background: none; border-radius: 7px; color: #94a3b8; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hvc-werkzeugleiste button:hover { background: #f1f5f9; color: #334155; }
.hvc-werkzeugleiste svg { width: 15px; height: 15px; }

/* Karten (gleiche Bausteine wie der bisherige Assistent) */
.hvc-karten { display: flex; flex-direction: column; gap: 10px; }
.hvc-karte.ass2-msg { align-self: stretch; max-width: 100%; }
.hvc-karte .ass2-row { grid-template-columns: 96px minmax(0, 1fr); }
.hvc-karte .v.vorschau { white-space: pre-wrap; font-weight: 500; max-height: 180px; overflow-y: auto; line-height: 1.5; }
.hvc-karte .alt { color: #64748b; text-decoration: line-through; font-weight: 500; }
.hvc-karte .neu { color: #166534; }
.hvc-karte table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.hvc-karte th, .hvc-karte td { padding: 6px 12px; border-bottom: 1px solid #eef1f5; text-align: left; }
.hvc-karte th { color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.hvc-karte td.zahl, .hvc-karte th.zahl { text-align: right; white-space: nowrap; }
.hvc-treffer { border: 1px solid #e6eaf0; border-radius: 12px; overflow: hidden; background: #fff; }
.hvc-treffer-kopf { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #64748b; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid #eef1f5; }
.hvc-treffer-zeile { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.hvc-treffer-zeile:last-child { border-bottom: none; }
.hvc-treffer-zeile:hover { background: #f8fafc; }
.hvc-treffer-zeile .ico { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; background: #eff6ff; }
.hvc-treffer-zeile .tx { flex: 1; min-width: 0; }
.hvc-treffer-zeile .t1 { font-size: 13px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hvc-treffer-zeile .t2 { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hvc-treffer-zeile .pf { color: #94a3b8; font-size: 16px; }
.hvc-status-zeile { font-size: 12.5px; color: #475569; align-self: center; background: #f1f5f9; border-radius: 999px; padding: 4px 12px; }

/* Leerer Start + Vorschlags-Chips */
#hvAssistentModal.hvc #hvAssLeer .b { max-width: 460px; }
.hvc-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 620px; margin-top: 6px; }
.hvc-chip { display: flex; align-items: flex-start; gap: 8px; text-align: left; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
            font-size: 13px; color: #0f172a; cursor: pointer; line-height: 1.4; min-height: 46px; }
.hvc-chip:hover { border-color: #2563eb; background: #f8fbff; }
.hvc-chip .e { font-size: 15px; line-height: 1.2; }
.hvc-chip .u { display: block; font-size: 11.5px; color: #64748b; margin-top: 1px; }

/* Anhaenge ueber dem Eingabefeld */
#hvcAnhaenge { display: none; gap: 8px; flex-wrap: wrap; }
#hvcAnhaenge.an { display: flex; }
.hvc-anh { display: inline-flex; align-items: center; gap: 8px; max-width: 240px; height: 44px; padding: 4px 6px 4px 4px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; font-size: 12px; color: #334155; }
.hvc-anh .bild { width: 36px; height: 36px; border-radius: 7px; background: #f1f5f9 center/cover no-repeat; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.hvc-anh .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hvc-anh .x { width: 22px; height: 22px; border: none; background: #f1f5f9; border-radius: 50%; color: #64748b; cursor: pointer; flex-shrink: 0; line-height: 1; }
.hvc-anh.laedt .bild { animation: hvcPuls 1s ease-in-out infinite; }
.hvc-anh.fehler { border-color: #fecaca; color: #991b1b; }
.hvc-kamera { display: none !important; }
#hvAssSendBtn.stopp { background: #0f172a; border-color: #0f172a; color: #fff; }

@media (hover: none) and (pointer: coarse) {
    .hvc-kamera { display: inline-flex !important; }
}
@media (max-width: 900px) {
    #hvcSeite { width: 240px; }
}
@media (max-width: 700px) {
    #hvAssistentModal.hvc { padding: 0 !important; align-items: stretch !important; }
    #hvAssistentModal.hvc > #hvAssDlg { width: 100% !important; max-width: 100% !important; height: var(--hvc-h, 100dvh) !important; max-height: var(--hvc-h, 100dvh) !important;
                                        border-radius: 0 !important; border-top: 0 !important; padding-top: env(safe-area-inset-top, 0px); box-shadow: none; }
    #hvcSeite { position: absolute; top: 0; bottom: 0; left: 0; width: 84%; max-width: 320px; z-index: 40; padding-top: env(safe-area-inset-top, 0px);
                transform: translateX(-104%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(15, 23, 42, .25); display: flex !important; }
    #hvAssDlg.seite-offen #hvcSeite { transform: none; }
    .hvc-schleier { position: absolute; inset: 0; z-index: 35; background: rgba(15, 23, 42, .35); }
    #hvAssDlg.seite-offen .hvc-schleier { display: block; }
    .hvc-burger { display: inline-flex !important; }
    .hvc-seite-zu-btn { display: none !important; }
    #hvcHaupt .ass2-head { padding: 8px 8px 8px 6px; }
    #hvcHaupt .ass2-head .ico { display: none; }
    #hvcHaupt .ass2-head { gap: 4px; }
    #hvcHaupt #hvAssChat { padding: 14px 12px 10px; }
    #hvcHaupt .ass2-foot { padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
    #hvcHaupt .ass2-msg.user { max-width: 86%; }
    .hvc-chips { grid-template-columns: 1fr; }
    .hvc-chip:nth-child(n+5) { display: none; }
    #hvcHaupt .ass2-hints { display: none; }
    .hvc-eintrag .mehr { visibility: visible; }
    .hvc-eintrag { min-height: 44px; font-size: 14px; }
    .hvc-karte .ass2-row { grid-template-columns: 1fr; }
    .hvc-karte .ass2-card-f .btn2 { flex: none !important; }   /* flex:1 im Spalten-Layout würde die Höhe auf den Inhalt drücken */
}
@media (prefers-reduced-motion: reduce) {
    .hvc-punkt, .hvc-cursor::after, .hvc-anh.laedt .bild { animation: none; }
    #hvcSeite { transition: none; }
}
