/* AWK-TECH-Berater – Chatfenster im Design von awk-tech.de (15.10.2026, Aufbau wie AWK-GAMING-Chat).
   Alles ist auf #awk-chat begrenzt, damit die Website-Styles unberuehrt bleiben.
   Masse in em bzw. "px x --cz": am Handy ist die Website auf 1130px skaliert, --cz = --tf der Website
   (echte Bildschirm-px), am PC 1. Hell/Dunkel folgt dem Website-Schalter (html[data-theme="light"]). */
#awk-chat {
    --cz: 1;
    --unten: 0px;                       /* Hoehe der Warenkorb-Leiste am Handy (chat.js) */
    --c-bg: rgba(16, 18, 24, .82);       /* Glas wie die Karten der Website, Unschärfe dahinter hält es lesbar */
    --c-bg-solid: #101218;
    --c-card: rgba(255, 255, 255, .04);
    --c-card-hover: rgba(255, 255, 255, .07);
    --c-text: #f2f3f5;
    --c-muted: #9aa1ac;
    --c-line: rgba(255, 255, 255, .08);
    --c-accent: #ff6a3d;
    --c-accent2: #ffa23d;
    --c-on-accent: #170a06;
    --c-user: linear-gradient(135deg, rgba(255, 106, 61, .30), rgba(217, 83, 11, .30));
    --c-user-line: rgba(255, 130, 80, .45);
    --c-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(255, 106, 61, .06);
    --c-head: var(--f-display, "Bahnschrift", "Arial Narrow", system-ui, sans-serif);
    --c-chip: var(--f-display, "Bahnschrift", "Arial Narrow", system-ui, sans-serif);
    --c-body: var(--f-body, system-ui, -apple-system, "Segoe UI", Arial, sans-serif);
    --chat-scale: 1;
    --chat-base: 1;                     /* Grundgroesse der Chat-Schrift; Handy hochkant .9 (Nutzer 15.10.: 90 % passt) */
}
html[data-theme="light"] #awk-chat {
    --c-bg: rgba(250, 248, 243, .84);
    --c-bg-solid: #f5f3ee;
    --c-card: rgba(0, 0, 0, .03);
    --c-card-hover: rgba(0, 0, 0, .06);
    --c-text: #17181c;
    --c-muted: #5b616b;
    --c-line: rgba(0, 0, 0, .09);
    --c-accent: #d9530b;
    --c-accent2: #c98a00;
    --c-on-accent: #fff;
    --c-user: linear-gradient(135deg, rgba(217, 83, 11, .13), rgba(201, 138, 0, .13));
    --c-user-line: rgba(217, 83, 11, .35);
    --c-shadow: 0 20px 60px rgba(40, 30, 20, .2), 0 0 30px rgba(217, 83, 11, .08);
}
@media (hover: none) and (pointer: coarse) {
    #awk-chat { --cz: var(--tf, 1); --chat-base: .9; }
    #awk-chat.ist-breit { --chat-base: 1; }   /* Querformat hat eigene, kleinere Liste */
    /* Chat offen (chat.js scrollLock): Seite dahinter scrollt nicht */
    html.awk-chat-offen, html.awk-chat-offen body { overflow: hidden; }
    html.awk-chat-offen #awk-chat .chat-panel { touch-action: pan-y; }
}

#awk-chat, #awk-chat * { box-sizing: border-box; }
#awk-chat [hidden] { display: none !important; }
#awk-chat .wird-zu { pointer-events: none; }   /* waehrend der Schliess-Animation (chat.js) */
#awk-chat button, #awk-chat select, #awk-chat textarea, #awk-chat input { font: inherit; color: inherit; margin: 0; }
#awk-chat button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
#awk-chat a { color: inherit; -webkit-tap-highlight-color: transparent; }
#awk-chat :is(button, a, summary, select, input, textarea):focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
#awk-chat .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ===== Fenster ===== */
#awk-chat .chat-panel {
    position: fixed;
    right: calc(20px * var(--cz));
    bottom: calc(var(--unten) + var(--start-heben, 0px) + 92px * var(--cz));   /* --start-heben: PC neben „Video abspielen“ (script.js der Website) */
    z-index: 1900;                      /* unter Warenkorb-Fenster (2000) und Handy-Auswahlfenster (2200) */
    width: min(calc(410px * var(--cz)), calc(100vw - 24px * var(--cz)));
    height: min(calc(640px * var(--cz)), calc(100vh - var(--unten) - 180px * var(--cz)));
    height: min(calc(640px * var(--cz)), calc(100dvh - var(--unten) - 180px * var(--cz)));   /* Platz fuer die Menueleiste oben */
    min-height: calc(300px * var(--cz));
    display: flex;
    flex-direction: column;
    font: 400 calc(14px * var(--cz))/1.55 var(--c-body);
    color: var(--c-text);
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: calc(18px * var(--cz));
    box-shadow: var(--c-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
            backdrop-filter: blur(18px) saturate(140%);
    overflow: hidden;
    isolation: isolate;
    transform-origin: bottom right;
    animation: awk-chat-in .28s cubic-bezier(.22, .9, .3, 1);
    text-align: left;
    letter-spacing: normal;
}
/* Website (script.js) sperrt am PC waehrend des Scrollens alle Klicks (html.awk-scrollt) – der Chat ist fest
   positioniert und muss klickbar bleiben, sonst reagiert der Knopf z. B. waehrend des Sprungs zum Angebot nicht */
html.awk-scrollt #awk-chat, html.awk-scrollt #awk-chat * { pointer-events: auto !important; }

/* ===== Kopf ===== */
#awk-chat .chat-head {
    display: flex; align-items: center; justify-content: space-between; gap: .6em;
    padding: 1.05em 1em .85em 1.15em; flex: none;
    border-bottom: 1px solid var(--c-line);
    background: linear-gradient(180deg, rgba(255, 106, 61, .07), transparent);
}
#awk-chat .chat-brand { display: flex; align-items: center; gap: .75em; min-width: 0; }
/* kurzes silbernes AWK-Zeichen (images/weitere/logo-awk-zeichen.png) */
#awk-chat .chat-avatar { flex: none; display: block; width: auto; height: 2.5em; filter: drop-shadow(0 0 .45em rgba(255, 106, 61, .28)); }
html[data-theme="light"] #awk-chat .chat-avatar { filter: none; }
#awk-chat .chat-logo { display: block; height: 1.05em; width: auto; max-width: 11em; filter: brightness(1.4) contrast(1.15); }
#awk-chat .chat-brand h2 {
    margin: .3em 0 0; padding: 0; font: 700 .72em/1.2 var(--c-head); letter-spacing: .14em; text-transform: uppercase; color: var(--c-text);
    display: flex; align-items: center; gap: .7em; flex-wrap: wrap;
}
#awk-chat .chat-brand h2 > span { font: 500 .95em/1 var(--c-body); letter-spacing: 0; text-transform: none; color: var(--c-muted); display: inline-flex; align-items: center; gap: .4em; }
#awk-chat .chat-brand h2 i { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: #00ff88; box-shadow: 0 0 .5em #00ff88; }
html[data-theme="light"] #awk-chat .chat-brand h2 i { background: #00cc66; box-shadow: none; }
#awk-chat .head-actions { display: flex; gap: .4em; flex: none; }
#awk-chat .icon-button {
    width: 2.45em; height: 2.45em; display: grid; place-items: center; padding: 0;
    border-radius: 50%; border: 1px solid rgba(127, 127, 127, .3); background: rgba(127, 127, 127, .1); color: var(--c-text);
    transition: color .2s, border-color .2s, background .2s, transform .45s cubic-bezier(.34, 1.4, .64, 1);
}
#awk-chat .icon-button svg { width: 1.1em; height: 1.1em; }
#awk-chat .icon-button:hover { color: var(--c-accent); border-color: var(--c-accent); }
/* Kopf-Knoepfe wie das Schliessen-X im Handy-Auswahlfenster der Website (style.css .awk-blatt__zu): Ruhe = Glas-Kreis,
   aktiv = plastisch gefuellt (Lichtpunkt oben links, eigene Farbe, Rand dunkler, Innenschatten + Schein), Symbol weiss.
   Farben: Design = Gold, Neustart = Gruen, Minimieren = Cyan. PC beim Ueberfahren, Touch beim Antippen (chat.js ist-tipp). */
#awk-chat #chat-theme { --k1: #ffc23d; --k2: #ff8a00; }
#awk-chat #clear-selection-chat { --k1: #34e0d0; --k2: #0e8f82; }
#awk-chat #close-popup { --k1: #ff6a3d; --k2: #d9530b; }
#awk-chat .head-actions .icon-button { outline: none; }
#awk-chat .head-actions .icon-button svg { transition: transform .45s cubic-bezier(.34, 1.4, .64, 1); }
#awk-chat .head-actions .icon-button.ist-tipp,
#awk-chat .head-actions .icon-button:focus-visible {
    color: #fff; border-color: color-mix(in srgb, var(--k1) 70%, #fff);
    background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--k1) 55%, #fff) 0%, var(--k1) 38%, color-mix(in srgb, var(--k2) 75%, #000) 100%);
    box-shadow: 0 0 1em color-mix(in srgb, var(--k1) 60%, transparent), inset 0 -.2em .43em rgba(0, 0, 0, .35), inset 0 .15em .3em rgba(255, 255, 255, .35);
}
@media (hover: hover) {
    #awk-chat .head-actions .icon-button:hover {
        color: #fff; border-color: color-mix(in srgb, var(--k1) 70%, #fff);
        background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--k1) 55%, #fff) 0%, var(--k1) 38%, color-mix(in srgb, var(--k2) 75%, #000) 100%);
        box-shadow: 0 0 1em color-mix(in srgb, var(--k1) 60%, transparent), inset 0 -.2em .43em rgba(0, 0, 0, .35), inset 0 .15em .3em rgba(255, 255, 255, .35);
    }
    #awk-chat #close-popup:hover svg { transform: rotate(180deg) scale(1.15); }
    #awk-chat #chat-theme:hover .ic-moon { animation: awk-chat-mond .7s ease-in-out; }
    #awk-chat #chat-theme:hover .ic-sun { animation: awk-chat-sonne .8s cubic-bezier(.34, 1.3, .64, 1); }
    #awk-chat #clear-selection-chat:hover svg { animation: awk-chat-neu .7s cubic-bezier(.34, 1.2, .64, 1); }
}
@media (hover: none) { #awk-chat .head-actions .icon-button:hover:not(.ist-tipp):not(:focus-visible) { color: var(--c-text); border-color: rgba(127, 127, 127, .3); background: rgba(127, 127, 127, .1); } }
#awk-chat #close-popup.ist-tipp svg { transform: rotate(180deg) scale(1.15); }
#awk-chat #chat-theme.ist-tipp .ic-moon { animation: awk-chat-mond2 .7s ease-in-out; }
#awk-chat #chat-theme.ist-tipp .ic-sun { animation: awk-chat-sonne2 .8s cubic-bezier(.34, 1.3, .64, 1); }
#awk-chat #clear-selection-chat.ist-tipp svg { animation: awk-chat-neu2 .7s cubic-bezier(.34, 1.2, .64, 1); }

/* ===== Auswahl & Optionen ===== */
#awk-chat .selection { flex: none; max-height: 45%; overflow: auto; border-bottom: 1px solid var(--c-line); background: var(--c-card); font-size: .86em; scrollbar-width: thin; }
#awk-chat summary { list-style: none; display: flex; align-items: center; gap: .6em; cursor: pointer; padding: .7em 1.35em; color: var(--c-muted); user-select: none; }
#awk-chat summary::-webkit-details-marker { display: none; }
#awk-chat .selection > summary { font: 600 .8em/1.4 var(--c-head); letter-spacing: .1em; text-transform: uppercase; }
#awk-chat #progress { margin-left: auto; color: var(--c-accent); font-family: var(--c-head); }
/* Menü-Knopf (statt Pfeil) – öffnet „Deine Auswahl“ mit Einstellungen, wird offen zum X */
#awk-chat .menu-button { display: grid; place-items: center; width: 2.7em; height: 2.7em; border-radius: .6em; border: 1px solid var(--c-user-line); background: rgba(127, 127, 127, .08); color: var(--c-text); transition: color .2s, border-color .2s, background .2s; }
#awk-chat .menu-button svg { grid-area: 1 / 1; width: 1.45em; height: 1.45em; transition: transform .3s, opacity .2s; }
#awk-chat .menu-button .ic-menu-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
#awk-chat .selection[open] .menu-button { color: var(--c-on-accent); border-color: transparent; background: linear-gradient(135deg, var(--c-accent), var(--c-accent2)); }
#awk-chat .selection[open] .menu-button .ic-menu { opacity: 0; transform: rotate(90deg) scale(.6); }
#awk-chat .selection[open] .menu-button .ic-menu-close { opacity: 1; transform: none; }
#awk-chat .selection > summary:hover .menu-button { color: var(--c-accent); border-color: var(--c-accent); }
#awk-chat .selection[open] > summary:hover .menu-button { color: var(--c-on-accent); }
#awk-chat .selection > summary { padding-top: .45em; padding-bottom: .45em; }
/* Kopfzeile „Deine Auswahl“ bleibt beim Scrollen im offenen Menue oben – Menue-X immer erreichbar,
   statt versehentlich das Fenster-X zu treffen (Nutzer 15.10.) */
#awk-chat .selection[open] > summary { position: sticky; top: 0; z-index: 2; background: var(--c-bg-solid); background: color-mix(in srgb, var(--c-bg-solid) 92%, var(--c-accent)); border-bottom: 1px solid var(--c-line); }
/* Theme-Knopf: Mond im dunklen, Sonne im hellen Design */
#awk-chat #chat-theme svg { grid-area: 1 / 1; }
#awk-chat #chat-theme .ic-sun { display: none; }
html[data-theme="light"] #awk-chat #chat-theme .ic-sun { display: block; }
html[data-theme="light"] #awk-chat #chat-theme .ic-moon { display: none; }
#awk-chat .selection-body { padding: 0 1.35em 1em; }
#awk-chat dl { margin: 0 0 .8em; }
#awk-chat dl > div { display: flex; justify-content: space-between; gap: 1em; padding: .4em 0; border-top: 1px solid var(--c-line); }
#awk-chat dt { color: var(--c-muted); }
#awk-chat dd { margin: 0; text-align: right; font-weight: 600; }
#awk-chat #summary-price { white-space: pre-line; margin-bottom: .8em; padding: .6em .8em; border-radius: .6em; border: 1px solid var(--c-user-line); background: var(--c-user); font-weight: 600; }
#awk-chat .settings { display: flex; justify-content: space-between; align-items: center; gap: .8em; }
#awk-chat .settings label, #awk-chat .settings > span { color: var(--c-muted); display: flex; align-items: center; gap: .5em; }
#awk-chat select { background: var(--c-bg-solid); color: var(--c-text); border: 1px solid var(--c-line); border-radius: .5em; padding: .35em .5em; }
#awk-chat .text-button { background: none; border: 0; padding: .4em 0; color: var(--c-accent); font-weight: 600; }
#awk-chat .text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
#awk-chat .font-setting { margin-top: .9em; padding-top: .8em; border-top: 1px solid var(--c-line); }
#awk-chat .font-setting > label { display: flex; justify-content: space-between; color: var(--c-muted); }
#awk-chat .font-setting output { color: var(--c-accent); font-variant-numeric: tabular-nums; }
#awk-chat .font-controls { display: flex; align-items: center; gap: .7em; padding-top: .3em; }
#awk-chat .font-controls > span { color: var(--c-muted); }
#awk-chat .font-controls > span:nth-of-type(2) { font-size: 1.45em; }
#awk-chat .font-controls input { flex: 1; min-width: 0; accent-color: var(--c-accent); height: 2em; cursor: pointer; }
#awk-chat .font-controls button { background: none; border: 1px solid var(--c-line); border-radius: .5em; color: var(--c-muted); padding: .35em .65em; }
#awk-chat .font-controls button:hover { color: var(--c-accent); border-color: var(--c-accent); }
#awk-chat #privacy-notice { margin-top: .8em; border-top: 1px solid var(--c-line); }
#awk-chat #privacy-notice > summary { padding: .7em 0; color: var(--c-accent); font-weight: 600; }
#awk-chat #privacy-notice > div { color: var(--c-muted); line-height: 1.6; }
#awk-chat #privacy-notice p { margin: 0 0 .6em; }
#awk-chat #privacy-notice a { color: var(--c-accent); }
#awk-chat .contact-links { display: flex; flex-wrap: wrap; gap: .5em; margin-top: .8em; }
#awk-chat .contact-links a {
    text-decoration: none; padding: .45em .8em; border-radius: 999px; border: 1px solid var(--c-line);
    font: 600 1em/1.2 var(--c-chip); letter-spacing: .05em; text-transform: uppercase; color: var(--c-text);
    transition: border-color .2s, color .2s;
}
#awk-chat .contact-links a:hover { color: var(--c-accent); border-color: var(--c-accent); }

/* ===== Verlauf ===== */
#awk-chat #messages {
    flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
    padding: 1.15em 1.15em .4em; scrollbar-width: thin; scrollbar-color: var(--c-line) transparent;
}
#awk-chat .message { margin: 0 0 1em; overflow-wrap: anywhere; animation: awk-chat-msg .2s ease-out; max-width: 92%; }
#awk-chat .message:not(.user) { padding: .75em .95em; border-radius: .25em 1em 1em 1em; background: var(--c-card); border: 1px solid var(--c-line); }
#awk-chat .label { color: var(--c-accent); font: 700 .62em/1.3 var(--c-head); letter-spacing: .16em; margin-bottom: .45em; }
#awk-chat .message .body { font-size: calc(.93em * var(--chat-scale) * var(--chat-base)); line-height: 1.65; white-space: pre-wrap; }
#awk-chat .message .body a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
#awk-chat .message.user { margin-left: auto; width: fit-content; padding: .6em .9em; border-radius: 1em 1em .25em 1em; background: var(--c-user); border: 1px solid var(--c-user-line); }
#awk-chat .message.user .label { color: var(--c-muted); margin-bottom: .2em; }
/* Hinweis nach dem Neustart (chat.js restartChat), blendet nach 4 s aus */
#awk-chat .reset-note { margin: 0 0 1em; padding: .45em .9em; border-radius: 999px; width: fit-content; font-size: .82em; color: var(--c-accent); border: 1px solid var(--c-user-line); background: var(--c-user); animation: awk-chat-msg .2s ease-out; transition: opacity .5s; }
#awk-chat .reset-note.ist-weg { opacity: 0; }
#awk-chat #typing { padding: 0 1.25em .55em; font-size: .78em; color: var(--c-muted); flex: none; }
#awk-chat #typing > span { display: inline-block; width: .45em; height: .45em; margin-right: .25em; background: var(--c-accent); border-radius: 50%; animation: awk-chat-dot 1s infinite; }
#awk-chat #typing > span:nth-child(2) { animation-delay: .15s; }
#awk-chat #typing > span:nth-child(3) { animation-delay: .3s; }

/* ===== Eingabe ===== */
#awk-chat .composer { flex: none; padding: .75em .9em .7em; border-top: 1px solid var(--c-line); }
/* --luft: Innenabstand, damit der Leuchtschein der Knoepfe nicht eckig abgeschnitten wird (overflow); per negativem Rand ausgeglichen.
   Zeilenabstand = Abstand zum Eingabefeld (Nutzer 15.10.) */
#awk-chat #suggestions {
    --luft: 12px; display: flex; gap: .6em .5em; flex-wrap: wrap; max-height: calc(7.6em + 2 * var(--luft)); overflow: auto; scrollbar-width: thin;
    padding: var(--luft); margin: calc(-1 * var(--luft)) calc(-1 * var(--luft)) calc(.6em - var(--luft));
}
#awk-chat #suggestions:empty { display: none; }
#awk-chat #suggestions button {
    padding: .4em .85em; border-radius: 999px; border: 1px solid var(--c-user-line); background: transparent; color: var(--c-text);
    font: 600 calc(1em * var(--chat-scale) * var(--chat-base))/1.3 var(--c-chip); letter-spacing: .03em; text-align: left;
    transition: border-color .2s, background .2s, color .2s;
}
/* Vorschlaege im Stil der Angebotskarten-Auswahlfelder (style.css .card-buy-option): Verlauf in den Kartenfarben
   im Wechsel PlayStation, Xbox, Switch, Diagnose, weisse Schrift, Schein; hell kraeftiger (Nutzer 14.10.2026) */
#awk-chat #suggestions button {
    --akz: #ff6a3d; --akz2: #d9530b; --mitte: 0%; --grund: #0a0b0e; --a1: 44%; --a2: 40%;
    color: #fff; font-weight: 700; border: 1px solid transparent; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    background: linear-gradient(135deg, color-mix(in srgb, var(--akz) var(--a1), var(--grund)) 0%, color-mix(in srgb, var(--akz) var(--a1), var(--grund)) var(--mitte), color-mix(in srgb, var(--akz2) var(--a2), var(--grund)) 100%) border-box;
    box-shadow: 0 0 10px color-mix(in srgb, var(--akz) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: filter .2s, box-shadow .2s, transform .2s;
}
#awk-chat #suggestions button:nth-child(4n+2) { --akz: #34e0d0; --akz2: #0e8f82; }
#awk-chat #suggestions button:nth-child(4n+3) { --akz: #ffc23d; --akz2: #ff8a00; }
#awk-chat #suggestions button:nth-child(4n+4) { --akz: #6b8cff; --akz2: #3d5bd9; }
html[data-theme="light"] #awk-chat #suggestions button { --grund: #2b1d14; --a1: 80%; --a2: 76%; text-shadow: 0 1px 2px rgba(40, 20, 10, .5); }
#awk-chat #suggestions button:is(:hover, :focus-visible) { color: #fff; filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 0 12px color-mix(in srgb, var(--akz) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2); }
@media (hover: none) { #awk-chat #suggestions button:hover:not(:focus-visible) { filter: none; transform: none; box-shadow: 0 0 10px color-mix(in srgb, var(--akz) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, .14); } }
#awk-chat #suggestions button:disabled { opacity: .5; cursor: wait; }
#awk-chat form { display: flex; align-items: flex-end; gap: .55em; margin: 0; padding: .4em .4em .4em .9em; border-radius: 1.6em; border: 1px solid var(--c-line); background: var(--c-card); transition: border-color .2s, box-shadow .2s; }
#awk-chat form:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(255, 106, 61, .14); }
#awk-chat textarea {
    flex: 1; min-width: 0; width: 100%; max-height: 6.5em; padding: .5em 0; border: 0; outline: 0; resize: none; background: none;
    color: var(--c-text); font-size: calc(.93em * var(--chat-scale) * var(--chat-base)); line-height: 1.5;
}
/* Website-Formularstil (Rahmen/Leuchten bei Fokus) im Chatfeld aufheben – der Rahmen sitzt am Formular */
#awk-chat textarea, #awk-chat textarea:focus, #awk-chat textarea:hover { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: none !important; border-radius: 0 !important; }
#awk-chat textarea::placeholder { color: var(--c-muted); opacity: 1; }
#awk-chat #send {
    flex: none; width: 2.5em; height: 2.5em; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent2)); color: var(--c-on-accent);
    transition: box-shadow .2s, transform .2s;
}
#awk-chat #send:hover { box-shadow: 0 0 1.1em rgba(255, 106, 61, .45); transform: translateY(-1px); }
#awk-chat #send:disabled { opacity: .5; transform: none; box-shadow: none; }
#awk-chat #send svg { width: 1.25em; height: 1.25em; }
#awk-chat .privacy { text-align: center; font-size: .72em; color: var(--c-muted); padding-top: .55em; }
#awk-chat .privacy button { background: none; border: 0; padding: 0 .15em; color: var(--c-accent); text-decoration: underline; font-size: inherit; }

/* ===== Startknopf unten rechts ===== */
#awk-chat .launcher-wrap {
    position: fixed; right: calc(20px * var(--cz)); bottom: calc(var(--unten) + var(--start-heben, 0px) + 20px * var(--cz)); z-index: 1901;
    display: flex; align-items: center; gap: calc(12px * var(--cz));
    font: 500 calc(14px * var(--cz))/1.4 var(--c-body);
    transition: opacity .25s ease, transform .25s ease;
}
/* verdeckt sonst Links im Fussbereich (chat.js dodge) -> kurz ausblenden */
#awk-chat .launcher-wrap.ist-verdeckt { opacity: 0; transform: scale(.8); pointer-events: none; }
/* Hinweis ausserhalb des Flusses: der Startknopf bleibt beim Einblenden exakt an seiner Stelle
   (wichtig fuer die Lage neben „Video abspielen“); Zentrierung per translate, die Einblend-Animation nutzt transform */
#awk-chat #launcher-hint {
    /* PC: ueber dem Startknopf (links daneben sitzt „Video abspielen“), rechtsbuendig, hoechstens 2 Zeilen */
    position: absolute; right: 0; bottom: calc(100% + 12px * var(--cz));
    width: max-content; max-width: min(calc(330px * var(--cz)), calc(100vw - 40px * var(--cz)));
    padding: .55em .95em; border-radius: 999px; color: var(--c-text);
    background: var(--c-bg); border: 1px solid var(--c-user-line); box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    animation: awk-chat-in .35s ease-out;
}
#awk-chat #launcher {
    position: relative; width: calc(60px * var(--cz)); height: calc(60px * var(--cz)); padding: 0;
    display: grid; place-items: center; border-radius: 50%;
    border: 1px solid rgba(255, 140, 90, .6); color: #170a06;
    background: linear-gradient(135deg, #ff8a5c, #e8531c);
    box-shadow: 0 6px 24px rgba(217, 83, 11, .45), 0 0 18px rgba(255, 106, 61, .35);
    transition: transform .25s cubic-bezier(.34, 1.4, .64, 1), box-shadow .25s;
}
#awk-chat #launcher:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 8px 30px rgba(217, 83, 11, .55), 0 0 26px rgba(255, 106, 61, .5); }
/* sanfter Puls-Ring, solange der Chat noch nie geoeffnet wurde */
#awk-chat #launcher::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid #ff6a3d; opacity: 0; pointer-events: none; }
#awk-chat .launcher-wrap.ist-neu #launcher::after { animation: awk-chat-ring 2.6s ease-out infinite; }
#awk-chat #launcher svg { grid-area: 1 / 1; width: calc(27px * var(--cz)); height: calc(27px * var(--cz)); transition: transform .3s, opacity .2s; }
#awk-chat #launcher .ic-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
#awk-chat #launcher[aria-expanded="true"] .ic-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
#awk-chat #launcher[aria-expanded="true"] .ic-close { opacity: 1; transform: none; }

/* Vom Chat ausgefuelltes Kontaktformular-Feld kurz hervorheben (app.js fillForm) */
:is(#f-name, #f-contact, #f-ort, #f-msg).awk-chat-gefuellt { box-shadow: 0 0 0 3px rgba(255, 106, 61, .6), 0 0 24px rgba(255, 106, 61, .3) !important; transition: box-shadow .4s; }

@keyframes awk-chat-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes awk-chat-msg { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes awk-chat-dot { 50% { opacity: .2; } }
@keyframes awk-chat-mond { 0%, 100% { transform: none; } 30% { transform: rotate(-28deg) scale(1.12); } 60% { transform: rotate(16deg); } 80% { transform: rotate(-6deg); } }
@keyframes awk-chat-mond2 { 0%, 100% { transform: none; } 30% { transform: rotate(-28deg) scale(1.12); } 60% { transform: rotate(16deg); } 80% { transform: rotate(-6deg); } }
@keyframes awk-chat-sonne { from { transform: rotate(0) scale(.7); } to { transform: rotate(180deg) scale(1); } }
@keyframes awk-chat-sonne2 { from { transform: rotate(0) scale(.7); } to { transform: rotate(180deg) scale(1); } }
@keyframes awk-chat-neu { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes awk-chat-neu2 { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes awk-chat-ring { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.45); } }

/* Touch: groessere Tippflaechen, kein Hinweis-Kaertchen (Platz) */
@media (hover: none) and (pointer: coarse) {
    /* Hinweis auch am Handy/Tablet, notfalls zweizeilig; passt er nicht, blendet chat.js (hintFit) ihn aus */
    /* Touch: links neben dem Startknopf (kein Video-Knopf), Zentrierung per translate */
    #awk-chat #launcher-hint { right: calc(100% + 12px * var(--cz)); bottom: 50%; translate: 0 50%; max-width: calc(100vw - 100px * var(--cz)); border-radius: 1.1em; line-height: 1.35; font-size: .86em; }   /* .86: „24-Stunden-Berater“ passt ab 390px in 2 Zeilen */
    #awk-chat #suggestions button { padding: .6em 1em; }
    /* iPhone zoomt automatisch in Eingabefelder mit Schrift unter 16 echten Pixeln (danach Fenster verschoben/abgeschnitten,
       Nutzer-Video 15.10.) -> Eingabe mindestens 16,5 Bildschirm-px (--cz = Seiten-px je Bildschirm-px) */
    #awk-chat textarea { font-size: max(calc(.93em * var(--chat-scale) * var(--chat-base)), calc(16.5px * var(--cz))); }
    #awk-chat .selection > summary { min-height: 2.9em; }
    #awk-chat .icon-button { width: 2.8em; height: 2.8em; }
    #awk-chat .chat-panel { right: calc(10px * var(--cz)); width: calc(100vw - 20px * var(--cz)); max-width: calc(520px * var(--cz)); }
    #awk-chat .launcher-wrap { right: calc(14px * var(--cz)); bottom: calc(var(--unten) + 14px * var(--cz)); }
    #awk-chat #launcher { width: calc(54px * var(--cz)); height: calc(54px * var(--cz)); }
    #awk-chat #launcher svg { width: calc(25px * var(--cz)); height: calc(25px * var(--cz)); }
    #awk-chat #suggestions { max-height: calc(6.6em + 2 * var(--luft)); }
    #awk-chat .chat-panel { bottom: calc(var(--unten) + 78px * var(--cz)); height: min(calc(680px * var(--cz)), calc(100dvh - var(--unten) - 100px * var(--cz))); }
}
/* niedrige Fenster (Handy quer) */
@media (max-height: 560px) and (hover: hover) {
    #awk-chat .chat-panel { bottom: 86px; height: calc(100dvh - 100px); min-height: 240px; }
    #awk-chat #suggestions { max-height: calc(4em + 2 * var(--luft)); }
    #awk-chat .privacy { display: none; }
}
/* ===== Breitformat (chat.js ist-breit: Handy/Tablet quer, flache Fenster) =====
   Fenster nutzt die volle Hoehe neben dem Startknopf; Verlauf links, Auswahl + Vorschlaege + Eingabe rechts. */
#awk-chat.ist-breit .chat-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 21em);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "head head" "msgs sel" "msgs comp" "typ comp";
    top: calc(10px * var(--cz));
    bottom: calc(var(--unten) + 10px * var(--cz));
    right: calc(92px * var(--cz));
    height: auto; min-height: 0; max-height: none;
    width: min(calc(860px * var(--cz)), calc(100vw - 104px * var(--cz)));
    max-width: none;
}
#awk-chat.ist-breit .chat-head { grid-area: head; padding: .6em .9em .55em 1em; }
#awk-chat.ist-breit .chat-avatar { height: 2.1em; }
#awk-chat.ist-breit .icon-button { width: 2.3em; height: 2.3em; }
#awk-chat.ist-breit .selection { grid-area: sel; max-height: none; border-left: 1px solid var(--c-line); }
/* Menue offen: rechte Spalte gehoert ganz dem Menue (sonst laege es unter dem Eingabefeld), X schliesst es wieder */
#awk-chat.ist-breit .chat-panel.menue-offen { grid-template-areas: "head head" "msgs sel" "msgs sel" "typ sel"; }
#awk-chat.ist-breit .chat-panel.menue-offen .composer { display: none; }
#awk-chat.ist-breit #messages { grid-area: msgs; padding-top: .9em; }
#awk-chat.ist-breit #typing { grid-area: typ; }
#awk-chat.ist-breit .composer {
    grid-area: comp; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end;
    border-top: 0; border-left: 1px solid var(--c-line); padding: .7em .8em .6em;
}
/* Vorschlaege als kompakte Liste, die den Platz ueber der Eingabe fuellt und scrollt (Handy quer war zu knapp, Nutzer 15.10.) */
#awk-chat.ist-breit #suggestions {
    --luft: 10px; flex: 1 1 auto; min-height: calc(2.6em + 2 * var(--luft)); max-height: none; margin-bottom: calc(.5em - var(--luft));
    flex-direction: column; flex-wrap: nowrap; gap: .4em; align-content: stretch;
}
#awk-chat.ist-breit #suggestions button { flex: none; width: 100%; padding: .4em .8em; border-radius: .65em; font-size: calc(.86em * var(--chat-scale) * var(--chat-base)); line-height: 1.25; }
#awk-chat.ist-breit #suggestions button:is(:hover, :focus-visible) { transform: none; }
#awk-chat.ist-breit .selection > summary { min-height: 0; padding-top: .3em; padding-bottom: .3em; }
#awk-chat.ist-breit .menu-button { width: 2.3em; height: 2.3em; }
#awk-chat.ist-breit .composer { padding: .55em .7em .45em; }
#awk-chat.ist-breit form { padding: .25em .3em .25em .8em; }
#awk-chat.ist-breit textarea { padding: .35em 0; }
#awk-chat.ist-breit #send { width: 2.2em; height: 2.2em; }
#awk-chat.ist-breit .privacy { font-size: .64em; line-height: 1.3; padding-top: .4em; }
#awk-chat.ist-breit .message { max-width: 96%; }
@media (hover: none) and (pointer: coarse) {
    #awk-chat.ist-breit .chat-panel { right: calc(78px * var(--cz)); width: min(calc(860px * var(--cz)), calc(100vw - 88px * var(--cz))); }
}
/* „Desktop-Website“ am Handy: Website verkleinert die Seite per zoom (html.awk-desktop-zoom) -> Chat ausgleichen,
   Masse kommen dann wie ueberall aus --cz (chat.js) */
html.awk-desktop-zoom #awk-chat { zoom: calc(1 / var(--awk-dz, 1)); }

@media (prefers-reduced-motion: reduce) {
    #awk-chat *, #awk-chat *::before, #awk-chat *::after { animation: none !important; transition: none !important; }
}
