/* Jonas – Chat der Webseite */
.jonas-knopf { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: inline-flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 22px 6px 6px; border: 0; border-radius: 999px; background: var(--rot); color: #FFFFFF; font: 700 17px/1 var(--body); box-shadow: 0 8px 24px rgba(28, 31, 36, .28); cursor: pointer; }
.jonas-knopf:hover { background: var(--rot-dunkel); }
.jonas-knopf-bild { position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%; overflow: hidden; background: var(--graphit); border: 2px solid #FFFFFF; display: grid; place-items: center; font: 800 20px var(--display); }
.jonas-knopf-bild img, .jonas-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jonas-knopf::after { content: ""; position: absolute; left: 46px; bottom: 8px; width: 12px; height: 12px; border-radius: 50%; background: #2FB463; border: 2px solid var(--rot); }
.jonas-knopf--offen { display: none; }

.jonas { position: fixed; right: 20px; bottom: 20px; z-index: 901; width: 400px; max-width: calc(100vw - 32px); height: 620px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--linie); border-radius: 18px; box-shadow: 0 18px 48px rgba(28, 31, 36, .3); overflow: hidden; font-size: 16px; }
.jonas[hidden] { display: none; }
.jonas--inline { position: static; width: 100%; max-width: none; height: 640px; max-height: none; box-shadow: none; z-index: auto; }

.jonas-kopf { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--graphit); color: #FFFFFF; }
.jonas-bild { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; border: 2px solid #FFFFFF; background: var(--rot); display: grid; place-items: center; font: 800 18px var(--display); }
.jonas-titel { display: grid; line-height: 1.25; flex: 1; min-width: 0; }
.jonas-titel b { font: 700 18px var(--display); }
.jonas-titel span { font-size: 13px; color: #C9CCD1; }
.jonas-zu { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: #FFFFFF; font-size: 28px; line-height: 1; cursor: pointer; }
.jonas-zu:hover { background: var(--graphit-2); }

.jonas-verlauf { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--grund); }
.jonas-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.jonas-msg--jonas { align-self: flex-start; background: #FFFFFF; border: 1px solid var(--linie); border-bottom-left-radius: 4px; }
.jonas-msg--kunde { align-self: flex-end; background: var(--graphit); color: #FFFFFF; border-bottom-right-radius: 4px; }
.jonas-hinweis { padding: 10px 14px; border-radius: 10px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; }
.jonas-hinweis--warn { background: #FBE9EB; color: #8A0012; }
.jonas-hinweis--ok { background: #E6F4EC; color: #155D38; font-weight: 600; }

.jonas-schnell { display: flex; flex-wrap: wrap; gap: 8px; }
.jonas-schnell[hidden] { display: none; }
.jonas-schnell button { min-height: 40px; padding: 6px 14px; border: 1px solid var(--rot); border-radius: 999px; background: #FFFFFF; color: var(--rot); font: 600 15px var(--body); cursor: pointer; }
.jonas-schnell button:hover { background: var(--rot); color: #FFFFFF; }

.jonas-tippt { align-self: flex-start; display: flex; align-items: center; gap: 4px; padding: 10px 14px; background: #FFFFFF; border: 1px solid var(--linie); border-radius: 14px; }
.jonas-tippt[hidden] { display: none; }
.jonas-tippt span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: jonas-punkt 1.2s infinite ease-in-out; }
.jonas-tippt span:nth-child(2) { animation-delay: .15s; }
.jonas-tippt span:nth-child(3) { animation-delay: .3s; }
.jonas-tippt em { margin-left: 8px; font-size: 13px; color: var(--text-3); font-style: normal; }
@keyframes jonas-punkt { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .jonas-tippt span { animation: none; } }

.jonas-eingabe { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 4px; border-top: 1px solid var(--linie); background: #FFFFFF; }
.jonas-eingabe[hidden] { display: none; }
.jonas-eingabe textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 10px 12px; border: 1px solid #C9C4BB; border-radius: 10px; font: 400 16px/1.4 var(--body); color: var(--text); resize: none; }
.jonas-los { width: 44px; height: 44px; flex: none; border: 0; border-radius: 10px; background: var(--rot); color: #FFFFFF; cursor: pointer; display: grid; place-items: center; }
.jonas-los:disabled { opacity: .5; cursor: wait; }
.jonas-los svg { width: 20px; height: 20px; }
.jonas-falle { position: absolute; left: -9999px; width: 1px; height: 1px; }
.jonas-klein { margin: 0; padding: 4px 14px 10px; font-size: 12.5px; line-height: 1.4; color: var(--text-3); background: #FFFFFF; }
.jonas-klein[hidden] { display: none; }

.jonas-formular { display: grid; gap: 10px; padding: 12px 14px 14px; border-top: 1px solid var(--linie); background: #FFFFFF; overflow-y: auto; max-height: 60%; }
.jonas-formular .jonas-klein { padding: 0; }
.jonas-formular label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.jonas-formular input[type=text], .jonas-formular input[type=tel], .jonas-formular input[type=email], .jonas-formular textarea { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #C9C4BB; border-radius: 8px; font: 400 16px var(--body); }
.jonas-formular textarea { min-height: 80px; resize: vertical; }
.jonas-zustimmung { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; font-size: 13px !important; color: var(--text-2); }
.jonas-zustimmung input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.jonas-senden { min-height: 46px; border: 0; border-radius: 8px; background: var(--rot); color: #FFFFFF; font: 700 16px var(--body); cursor: pointer; }
.jonas-senden:disabled { opacity: .6; }

@media (max-width: 600px) {
  .jonas:not(.jonas--inline) { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; border-radius: 0; border: 0; }
  .jonas-knopf { right: 12px; bottom: 12px; }
  .jonas-knopf-text { display: none; }
  .jonas-knopf { padding: 5px; min-height: 0; }
  .jonas-knopf::after { left: 44px; bottom: 6px; }
  .jonas--inline { height: 560px; }
}

/* Gruß neben dem Knopf (wie früher das Rückruf-Fenster) */
.jonas-gruss { position: fixed; right: 20px; bottom: 96px; z-index: 899; max-width: 300px; display: flex; align-items: flex-start; gap: 4px; padding: 12px 8px 12px 16px; background: #FFFFFF; border: 1px solid var(--linie); border-radius: 14px; box-shadow: 0 10px 28px rgba(28, 31, 36, .22); animation: jonas-rein .35s ease-out; }
.jonas-gruss::after { content: ""; position: absolute; right: 34px; bottom: -8px; width: 14px; height: 14px; background: #FFFFFF; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); transform: rotate(45deg); }
.jonas-gruss-text { border: 0; background: none; padding: 0; text-align: left; font: 600 15px/1.4 var(--body); color: var(--text); cursor: pointer; }
.jonas-gruss-zu { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text-3); font-size: 20px; line-height: 1; cursor: pointer; }
.jonas-gruss-zu:hover { background: var(--grund); }
@keyframes jonas-rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .jonas-gruss { animation: none; } }
@media (max-width: 600px) { .jonas-gruss { right: 12px; bottom: 80px; max-width: calc(100vw - 24px); } }

/* Notdienst-Bedingungen zum Anhaken */
.jonas-notdienst { display: grid; gap: 10px; padding: 12px 14px; background: #FFFFFF; border: 2px solid var(--rot); border-radius: 12px; font-size: 14px; line-height: 1.4; }
.jonas-notdienst .jonas-klein { padding: 0; background: none; color: #8A0012; }
.jonas-nein { min-height: 38px; border: 1px solid #C9C4BB; border-radius: 8px; background: #FFFFFF; color: var(--text-2); font: 600 14px var(--body); cursor: pointer; }

/* Kontaktdaten-Formular im Chat */
.jonas-daten { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 14px; background: #FFFFFF; border: 2px solid var(--graphit); border-radius: 12px; font-size: 14px; }
.jonas-daten > b, .jonas-daten .breit { grid-column: 1 / -1; }
.jonas-daten label { display: grid; gap: 3px; font-weight: 600; font-size: 13px; }
.jonas-daten label[hidden] { display: none; }
.jonas-daten input[type=text], .jonas-daten input[type=tel], .jonas-daten input[type=email], .jonas-daten select { width: 100%; min-height: 40px; padding: 7px 9px; border: 1px solid #C9C4BB; border-radius: 8px; font: 400 16px var(--body); color: var(--text); background: #FFFFFF; }
.jonas-daten .fehlt { border-color: var(--rot); background: #FBE9EB; }
.jonas-daten .jonas-klein { padding: 0; background: none; color: #8A0012; }
.jonas-daten .jonas-zustimmung { font-weight: 400 !important; }
@media (max-width: 420px) { .jonas-daten { grid-template-columns: 1fr; } }
