/* Noah Raw · Anfrage-Assistent. Farben und Schriften aus stil.css (:root). */

/* Schwebende Knöpfe: Chat oben, WhatsApp darunter; offen verschwinden sie hinter dem Chat */
.schwebe__ruf--chat { background: var(--glut-hell); color: var(--tinte); }
.schwebe__ruf--chat:hover { background: #fff; }
.schwebe__ruf .chat-ikon { width: 1.4rem; height: 1.4rem; }
.chat-ikon * { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chat-offen .schwebe { opacity: 0; pointer-events: none; transform: translateY(.6rem); }
.schwebe { transition: opacity .3s, transform .4s var(--kurve); }

/* Hinweisblase über dem Chat-Knopf */
.chat-hinweis { position: relative; max-width: 17rem; background: var(--papier); color: var(--tinte); border-radius: 1.1rem 1.1rem .3rem 1.1rem; box-shadow: 0 18px 40px -14px rgba(31,26,21,.45), 0 0 0 1px rgba(31,26,21,.08); animation: hinweis-auf .6s var(--kurve) both; }
.chat-hinweis__text { display: block; width: 100%; text-align: left; font: inherit; font-size: .95rem; line-height: 1.4; color: inherit; background: none; border: 0; padding: .9rem 3rem .9rem 1rem; cursor: pointer; border-radius: inherit; }
.chat-hinweis__zu { position: absolute; top: .1rem; right: .1rem; width: 2.75rem; height: 2.75rem; border: 0; background: none; color: var(--tinte-2); font-size: 1.3rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.chat-hinweis__zu:hover { background: var(--papier-2); }
@keyframes hinweis-auf { from { opacity: 0; transform: translateY(.6rem) scale(.96); } }

/* Die Tafel */
.chat { position: fixed; z-index: 60; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); width: min(24rem, calc(100vw - 2rem)); height: min(40rem, calc(100dvh - 6rem)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; background: var(--papier); color: var(--tinte); border-radius: 1.2rem; box-shadow: 0 30px 70px -20px rgba(31,26,21,.55), 0 0 0 1px rgba(31,26,21,.08); overflow: hidden; opacity: 0; transform: translateY(1rem) scale(.98); transform-origin: 100% 100%; transition: opacity .25s, transform .35s var(--kurve); font-size: 1rem; }
.chat.ist-offen { opacity: 1; transform: none; }
.chat[hidden] { display: none; }

.chat__kopf { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .9rem .9rem .9rem 1rem; background: var(--nacht); color: var(--hell-auf-nacht); }
.chat__bild { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--rost); color: #fff; }
.chat__bild .chat-ikon { width: 1.5rem; height: 1.5rem; }
.chat__titel { min-width: 0; outline: none; }
.chat__titel h2 { font-family: var(--display); font-size: 1.12rem; font-weight: 500; line-height: 1.2; margin: 0; color: #fff; }
.chat__titel p { margin: .15rem 0 0; font-size: .8rem; color: #cbbfb0; }
.chat__zu { width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.chat__zu:hover { background: rgba(255,255,255,.1); }
.chat :focus-visible { outline: 2px solid var(--rost); outline-offset: 2px; }
.chat__kopf :focus-visible { outline-color: var(--glut); }

.chat__verlauf { overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1rem .6rem; display: flex; flex-direction: column; gap: .55rem; scroll-behavior: smooth; }
.chat__blase { max-width: 88%; padding: .7rem .9rem; border-radius: 1rem; line-height: 1.45; font-size: .97rem; overflow-wrap: anywhere; white-space: pre-line; animation: blase-auf .35s var(--kurve) both; }
.chat__blase--bot { align-self: flex-start; background: #fff; border: 1px solid rgba(31,26,21,.08); border-bottom-left-radius: .3rem; }
.chat__blase--nutzer { align-self: flex-end; background: var(--rost); color: #fff; border-bottom-right-radius: .3rem; }
@keyframes blase-auf { from { opacity: 0; transform: translateY(.4rem); } }
.chat__link { color: var(--rost); font-weight: 600; text-underline-offset: .18em; }
.chat__inline { display: inline; font: inherit; font-weight: 600; color: var(--rost); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }

.chat__tippt { display: inline-flex; gap: .3rem; padding: .85rem 1rem; }
.chat__tippt span { width: .45rem; height: .45rem; border-radius: 50%; background: var(--tinte-2); opacity: .35; animation: tippt 1s infinite; }
.chat__tippt span:nth-child(2) { animation-delay: .15s; } .chat__tippt span:nth-child(3) { animation-delay: .3s; }
@keyframes tippt { 50% { opacity: 1; transform: translateY(-2px); } }

.chat__wahl { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0 1rem .6rem; }
.chat__wahl:empty { display: none; }
.chat__wahlknopf { font: inherit; font-size: .9rem; font-weight: 600; color: var(--tinte); background: var(--papier-2); border: 1.5px solid transparent; border-radius: 2rem; padding: .55rem .95rem; min-height: 2.75rem; cursor: pointer; transition: background .25s, border-color .25s, transform .3s var(--kurve); }
.chat__wahlknopf:hover { border-color: var(--rost); background: #fff; transform: translateY(-1px); }

.chat__karte { align-self: stretch; background: #fff; border: 1px solid rgba(31,26,21,.1); border-radius: 1rem; padding: .9rem 1rem 1rem; animation: blase-auf .4s var(--kurve) both; }
.chat__karte dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem .9rem; margin: 0 0 .9rem; font-size: .93rem; }
.chat__karte dt { color: var(--tinte-2); }
.chat__karte dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.chat__aktionen { display: grid; gap: .45rem; }
.chat__aktion { display: flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .6rem 1rem; border-radius: 2rem; border: 1.5px solid var(--tinte); color: var(--tinte); font-weight: 600; font-size: .93rem; text-decoration: none; text-align: center; transition: background .25s, color .25s; }
.chat__aktion:hover { background: var(--tinte); color: var(--papier); }
.chat__aktion--wa { background: var(--rost); border-color: var(--rost); color: #fff; }
.chat__aktion--wa:hover { background: var(--rost-tief); border-color: var(--rost-tief); color: #fff; }
.chat__klein { margin: .7rem 0 0; font-size: .8rem; color: var(--tinte-2); }

.chat__eingabe { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; padding: .6rem .8rem; border-top: 1px solid rgba(31,26,21,.1); background: var(--papier); }
.chat__eingabe input { min-width: 0; font: inherit; font-size: 1rem; color: var(--tinte); background: #fff; border: 1.5px solid rgba(31,26,21,.18); border-radius: 2rem; padding: .65rem 1rem; min-height: 2.9rem; }
.chat__eingabe input:focus { outline: none; border-color: var(--rost); }
.chat__senden { width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 0; background: var(--rost); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat__senden:hover { background: var(--rost-tief); }
.chat__senden svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.chat__fuss { margin: 0; padding: .1rem 1rem .75rem; font-size: .72rem; line-height: 1.35; color: var(--tinte-2); background: var(--papier); }

/* Handy: als Blatt von unten, volle Breite */
@media (max-width: 600px) {
  .chat { right: 0; left: 0; bottom: 0; width: 100%; height: min(88dvh, 44rem); border-radius: 1.2rem 1.2rem 0 0; transform: translateY(100%); transform-origin: 50% 100%; padding-bottom: env(safe-area-inset-bottom); }
  .chat.ist-offen { transform: none; }
  .chat__blase { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  .chat, .chat-hinweis, .chat__blase, .chat__karte, .schwebe { transition: none; animation: none; }
  .chat__tippt span { animation: none; opacity: .6; }
}
