/* Floating question button and small form ("Fragen?"), bottom right. Uses the site's design variables with fallbacks. */
.chat-widget { --chat-ink: var(--ink, var(--text-primary, #1f2a24)); --chat-muted: var(--muted, var(--text-muted, #5f6b63)); --chat-line: var(--line, var(--border, #d9d3c5)); --chat-surface: var(--cream, var(--surface, #fffdf8)); --chat-accent: var(--forest, var(--primary-dark, #2f4a3a)); position: fixed; right: 1rem; bottom: var(--chat-bottom, 1rem); z-index: 60; display: grid; justify-items: end; gap: .6rem; color: var(--chat-ink); font-family: inherit; }
.chat-widget__toggle { min-height: 2.75rem; padding: .55rem 1.3rem; border: 0; border-radius: 999px; background: var(--chat-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgb(0 0 0 / .22); }
.chat-widget__toggle:focus-visible, .chat-widget__close:focus-visible, .chat-widget__submit:focus-visible { outline: 3px solid #e0b64a; outline-offset: 2px; }
.chat-widget--hidden-for-bar .chat-widget__toggle { visibility: hidden; pointer-events: none; }
.chat-widget__panel { width: min(22rem, calc(100vw - 2rem)); max-height: calc(100vh - 6rem); /* open panel always rests at the corner */ overflow: auto; box-sizing: border-box; padding: 1rem; border: 1px solid var(--chat-line); border-radius: .75rem; background: var(--chat-surface); box-shadow: 0 8px 28px rgb(0 0 0 / .22); }
.chat-widget__panel[hidden] { display: none; }
.chat-widget__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--chat-bottom, .6rem); }
.chat-widget__close { width: 2.25rem; height: 2.25rem; border: 0; background: transparent; color: var(--chat-ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.chat-widget__form { display: grid; gap: .6rem; }
.chat-widget__form label { display: grid; gap: .25rem; font-weight: 600; font-size: .95rem; }
.chat-widget__form input, .chat-widget__form textarea { font: inherit; padding: .55rem .65rem; border: 1px solid var(--chat-line); border-radius: .45rem; background: #fff; color: #1f2a24; caret-color: #1f2a24; box-sizing: border-box; width: 100%; }
.chat-widget__form textarea { resize: vertical; white-space: pre-wrap; }
.chat-widget__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chat-widget__hint { margin: 0; color: var(--chat-muted); font-size: .85rem; }
.chat-widget__submit { min-height: 2.75rem; border: 0; border-radius: 999px; background: var(--chat-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.chat-widget__submit:disabled { opacity: .6; cursor: default; }
.chat-widget__status { margin: 0; color: var(--chat-muted); }
.chat-widget__status--error { color: #9b2c2c; }
/* Shared thread rendering (guest portal and reply page). */
.chat-thread { display: grid; gap: .6rem; margin: .6rem 0; }
.chat-message { padding: .6rem .8rem; border: 1px solid var(--portal-line, #d9d3c5); border-radius: .6rem; background: #fff; color: #1f2a24; max-width: 90%; }
.chat-message--guest { justify-self: end; background: color-mix(in srgb, var(--portal-accent, #2f4a3a) 10%, #fff); }
.chat-message p { margin: 0; }
.chat-message__meta { color: #5f6b63; font-size: .8rem; margin-bottom: .2rem !important; }
.chat-message__body { color: #1f2a24; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form textarea { font: inherit; padding: .7rem .8rem; border: 1px solid var(--portal-line, #d9d3c5); border-radius: .5rem; background: #fff; color: #1f2a24; caret-color: #1f2a24; box-sizing: border-box; width: 100%; white-space: pre-wrap; }
@media (max-width: 480px) { .chat-widget { right: .6rem; bottom: var(--chat-bottom, .6rem); } }
.chat-first-hint { margin: 0 0 .75rem; color: var(--chat-muted, inherit); opacity: .85; font-size: .8rem; line-height: 1.4; }
.chat-first-hint[hidden] { display: none; }
.chat-widget__form input::placeholder, .chat-widget__form textarea::placeholder, .chat-form textarea::placeholder { color: #6b726d; }
/* Brand and personal note at the top of every guest chat window (Ray, 27 November 2026): logo 40 px, golden sentence. */
.chat-brand__logo { display: block; height: 40px; width: auto; flex: none; }
.chat-personal-note { margin: .35rem 0 .75rem; color: var(--gold, var(--primary, #83651F)); font-weight: 600; font-size: .95rem; line-height: 1.35; }
.chat-widget__header { gap: .6rem; }
.chat-widget__title { flex: 1; }
.chat-widget__thread { max-height: 40vh; overflow: auto; }
.chat-widget__toggle { position: relative; max-width: min(21rem, calc(100vw - 2rem)); line-height: 1.3; text-align: center; }
.chat-widget__label--short { display: none; }
@media (max-width: 640px) { .chat-widget__label--long { display: none; } .chat-widget__label--short { display: inline; } }
.chat-widget__toggle--unread::after { content: ''; position: absolute; top: -.15rem; right: -.15rem; width: .8rem; height: .8rem; border-radius: 50%; background: #b3261e; border: 2px solid #fff; }
.chat-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
