/* Gemeinsame Bausteine der Beispielseiten: Chat-Assistent und Beispiel-Hinweis.
   Farben und Schrift kommen von der jeweiligen Seite (CSS-Variablen auf :root). */
:root {
    --chat-akzent: #2f5d50;
    --chat-akzent-text: #fff;
    --chat-schrift: inherit;
    --chat-flaeche: #fff;
    --chat-text: #1f2a2e;
    --chat-leise: #f1f4f2;
}

/* --- Symbole aus dem SVG-Sprite (_/icons.svg): <i class="bi bi-name"><svg><use href="…#name"></svg></i> ----
   Das <i> bleibt der Kasten (Größe über font-size, Farbe über color), das SVG füllt 1em. */
.bi > svg { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; fill: currentColor; }

/* --- Chat ------------------------------------------------------------------ */
.pchat-knopf {
    position: fixed; right: 20px; bottom: 20px; z-index: 1050;
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .8rem 1.15rem; border: 0; border-radius: 999px;
    background: var(--chat-akzent); color: var(--chat-akzent-text);
    font: 600 .95rem/1 var(--chat-schrift);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18); cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.pchat-knopf:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .22); }
.pchat-knopf:focus-visible { outline: 3px solid var(--chat-akzent); outline-offset: 3px; }
.pchat-knopf svg { width: 20px; height: 20px; }
.pchat-knopf.pchat-offen span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* bleibt Name für Screenreader */

.pchat-fenster {
    position: fixed; right: 20px; bottom: 84px; z-index: 1050;
    width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px));
    display: flex; flex-direction: column;
    background: var(--chat-flaeche); color: var(--chat-text);
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
    font-family: var(--chat-schrift);
}
.pchat-fenster[hidden] { display: none; }
.pchat-kopf { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem; background: var(--chat-akzent); color: var(--chat-akzent-text); }
.pchat-kopf strong { display: block; font-size: 1rem; }
.pchat-kopf small { opacity: .9; font-size: .78rem; }   /* .8 ergab auf Salbeigrün nur 4,48:1 */
.pchat-zu { border: 0; background: transparent; color: inherit; font-size: 1.7rem; line-height: 1; padding: 0 .25rem; cursor: pointer; }
.pchat-verlauf { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.pchat-nachricht { max-width: 85%; padding: .65rem .9rem; border-radius: 14px; font-size: .93rem; line-height: 1.5; white-space: pre-wrap; }
.pchat-ki { align-self: flex-start; background: var(--chat-leise); border-bottom-left-radius: 4px; }
.pchat-ich { align-self: flex-end; background: var(--chat-akzent); color: var(--chat-akzent-text); border-bottom-right-radius: 4px; }
.pchat-tippt { display: inline-flex; gap: 4px; padding: .8rem .9rem; }
.pchat-tippt span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .35; animation: pchat-punkt 1s infinite; }
.pchat-tippt span:nth-child(2) { animation-delay: .15s; }
.pchat-tippt span:nth-child(3) { animation-delay: .3s; }
@keyframes pchat-punkt { 50% { opacity: .9; transform: translateY(-2px); } }
.pchat-vorschlaege { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .6rem; }
.pchat-vorschlaege:empty { display: none; }
.pchat-vorschlag { border: 1px solid var(--chat-akzent); background: transparent; color: var(--chat-akzent); border-radius: 999px; padding: .3rem .75rem; font: 500 .8rem/1.3 var(--chat-schrift); cursor: pointer; text-align: left; }
.pchat-vorschlag:hover { background: var(--chat-akzent); color: var(--chat-akzent-text); }
.pchat-eingabe { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid rgba(0, 0, 0, .08); }
.pchat-eingabe input { flex: 1; min-width: 0; border: 1px solid rgba(0, 0, 0, .15); border-radius: 999px; padding: .6rem 1rem; font: inherit; font-size: .95rem; }
.pchat-eingabe input:focus { outline: 2px solid var(--chat-akzent); outline-offset: 1px; }
.pchat-eingabe button { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: var(--chat-akzent); color: var(--chat-akzent-text); display: grid; place-items: center; cursor: pointer; }
.pchat-eingabe button svg { width: 18px; height: 18px; }
.pchat-hinweis { margin: 0; padding: 0 1rem .7rem; font-size: .8rem; line-height: 1.4; opacity: .75; }
@media (prefers-reduced-motion: reduce) { .pchat-knopf, .pchat-tippt span { transition: none; animation: none; } }

/* --- Beispiel-Hinweis (feste Leiste unten links, Rückweg zu HomepageNeu) --- */
.beispiel-hinweis {
    position: fixed; left: 16px; bottom: 20px; z-index: 1040;
    display: flex; align-items: center; gap: .6rem;
    max-width: calc(100vw - 32px - 150px);
    padding: .5rem .85rem .5rem .6rem; border-radius: 999px;
    background: rgba(17, 24, 39, .88); color: #fff;
    font: 500 .8rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.beispiel-hinweis .marke { flex: none; background: #fff; color: #111827; border-radius: 999px; padding: .2rem .55rem; font-weight: 700; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.beispiel-hinweis a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.beispiel-hinweis .lang { display: inline; }
/* Handy: Chat-Knopf nur als Symbol, damit der Hinweis in eine Zeile passt */
@media (max-width: 575.98px) {
    .beispiel-hinweis .lang { display: none; }
    .beispiel-hinweis { max-width: calc(100vw - 32px - 70px); }
    .pchat-knopf { width: 54px; height: 54px; padding: 0; justify-content: center; }
    .pchat-knopf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .pchat-knopf svg { width: 24px; height: 24px; }
}

/* Chatverlauf ist per Tastatur fokussierbar (zum Scrollen langer Verläufe) */
.pchat-verlauf:focus-visible { outline: 3px solid var(--chat-akzent); outline-offset: -3px; }
