/* Website-Chat – ruhig, hell, im Stil des Shops */
#mhc-root { --mhc-olive: #4f5634; --mhc-cream: #f6f1e7; --mhc-ink: #2b2925; --mhc-muted: #7a7368; --mhc-line: #e7dfd0; --mhc-ease: cubic-bezier(.2, .8, .2, 1); font-family: Poppins, -apple-system, system-ui, sans-serif; }
#mhc-root *, #mhc-root *::before, #mhc-root *::after { box-sizing: border-box; }

.mhc-fab { position: fixed; right: 20px; bottom: 20px; z-index: 9990; width: 58px; height: 58px; border: 0; border-radius: 50%; background: var(--mhc-olive); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(60, 50, 25, .55), 0 2px 6px rgba(0, 0, 0, .08); transition: transform .35s var(--mhc-ease), box-shadow .35s var(--mhc-ease); }
.mhc-fab:hover { transform: translateY(-2px) scale(1.04); }
.mhc-fab:active { transform: scale(.95); }
.mhc-fab svg { width: 26px; height: 26px; fill: currentColor; transition: transform .35s var(--mhc-ease), opacity .2s; }
#mhc-root.is-open .mhc-fab svg { transform: scale(.6) rotate(-12deg); opacity: 0; }
#mhc-root.is-open .mhc-fab::after { content: "×"; position: absolute; font-size: 30px; line-height: 1; font-weight: 300; }
.mhc-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #c46b2a; border: 2.5px solid #fff; animation: mhc-pop .5s var(--mhc-ease); }

.mhc-panel { position: fixed; right: 20px; bottom: 92px; z-index: 9991; width: 380px; max-width: calc(100vw - 32px); height: min(600px, calc(100vh - 120px)); display: flex; flex-direction: column; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 70px -25px rgba(50, 40, 20, .45), 0 0 0 1px rgba(43, 41, 37, .06); transform-origin: bottom right; animation: mhc-in .38s var(--mhc-ease); }
.mhc-panel[hidden] { display: none; }
.mhc-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; background: var(--mhc-cream); border-bottom: 1px solid var(--mhc-line); }
.mhc-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 20px; box-shadow: 0 6px 14px -8px rgba(60, 50, 25, .5); }
.mhc-ht { flex: 1; min-width: 0; color: var(--mhc-ink); }
.mhc-ht b { display: block; font-size: 15px; font-weight: 600; }
.mhc-ht small { display: block; font-size: 12px; color: var(--mhc-muted); }
.mhc-x { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(43, 41, 37, .06); color: var(--mhc-ink); font-size: 22px; line-height: 1; cursor: pointer; }

.mhc-body { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: linear-gradient(#fff, #fcfaf5); overscroll-behavior: contain; }
.mhc-msgs { display: flex; flex-direction: column; gap: 8px; }
.mhc-m { max-width: 82%; animation: mhc-msg .35s var(--mhc-ease); }
.mhc-m p { margin: 0; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; color: var(--mhc-ink); word-wrap: break-word; }
.mhc-m p a { color: inherit; text-decoration: underline; }
.mhc-m time { display: block; margin-top: 3px; font-size: 10.5px; color: var(--mhc-muted); }
.mhc-them { align-self: flex-start; }
.mhc-them p { background: var(--mhc-cream); border-bottom-left-radius: 6px; }
.mhc-me { align-self: flex-end; text-align: right; }
.mhc-me p { background: var(--mhc-olive); color: #fff; border-bottom-right-radius: 6px; text-align: left; }
.mhc-who { display: block; margin: 0 0 3px 4px; font-size: 11px; font-weight: 600; color: var(--mhc-muted); }
.mhc-m.is-pending p { opacity: .65; }
.mhc-m.is-failed p { background: #b3261e; cursor: pointer; }
.mhc-sys { align-self: center; max-width: 90%; margin: 6px 0; padding: 8px 12px; border-radius: 12px; background: #f1f4ea; color: #4e5a32; font-size: 12.5px; text-align: center; }
.mhc-load { display: flex; gap: 5px; justify-content: center; padding: 30px; }
.mhc-load span { width: 7px; height: 7px; border-radius: 50%; background: var(--mhc-line); animation: mhc-bounce 1s infinite; }
.mhc-load span:nth-child(2) { animation-delay: .15s; } .mhc-load span:nth-child(3) { animation-delay: .3s; }

.mhc-start { padding: 12px 14px 14px; border-top: 1px solid var(--mhc-line); display: flex; flex-direction: column; gap: 8px; background: #fff; }
.mhc-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mhc-chips::-webkit-scrollbar { display: none; }
.mhc-chips button { flex: 0 0 auto; border: 1px solid var(--mhc-line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 500 12.5px/1 inherit; font-family: inherit; color: var(--mhc-ink); cursor: pointer; transition: background .2s, border-color .2s; }
.mhc-chips button:hover { background: var(--mhc-cream); border-color: #d9cfbd; }
.mhc-start textarea, .mhc-start input, .mhc-compose textarea { width: 100%; border: 1px solid var(--mhc-line); border-radius: 14px; padding: 11px 13px; font: 14.5px/1.4 inherit; font-family: inherit; color: var(--mhc-ink); background: #fcfaf5; resize: none; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.mhc-start textarea:focus, .mhc-start input:focus, .mhc-compose textarea:focus { border-color: var(--mhc-olive); background: #fff; box-shadow: 0 0 0 3px rgba(79, 86, 52, .12); }
.mhc-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.mhc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.mhc-note { margin: 0; font-size: 11.5px; color: var(--mhc-muted); }
.mhc-note a { color: var(--mhc-muted); }
.mhc-err { margin: 0; font-size: 12.5px; color: #b3261e; }
.mhc-send { border: 0; border-radius: 999px; padding: 13px; background: var(--mhc-olive); color: #fff; font: 600 15px/1 inherit; font-family: inherit; cursor: pointer; transition: transform .2s, opacity .2s; }
.mhc-send:active { transform: scale(.98); }
.mhc-start.is-busy .mhc-send { opacity: .6; pointer-events: none; }

.mhc-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--mhc-line); background: #fff; }
.mhc-compose[hidden], .mhc-start[hidden] { display: none; }
.mhc-compose textarea { flex: 1; min-height: 42px; max-height: 140px; }
.mhc-compose button { flex: 0 0 42px; height: 42px; border: 0; border-radius: 50%; background: var(--mhc-olive); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .2s; }
.mhc-compose button:active { transform: scale(.92); }
.mhc-compose svg { width: 19px; height: 19px; fill: currentColor; transform: translateX(-1px); }

@keyframes mhc-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes mhc-msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes mhc-pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes mhc-bounce { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-5px); opacity: 1; } }

/* Handy: Chat als Blatt von unten */
@media (max-width: 639px) {
	.mhc-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
	.mhc-panel { left: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: calc(100% - 56px); height: calc(100dvh - 56px); border-radius: 24px 24px 0 0; animation: mhc-sheet .42s var(--mhc-ease); }
	#mhc-root.is-open .mhc-fab { opacity: 0; pointer-events: none; }
	.mhc-start, .mhc-compose { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
	.mhc-start textarea, .mhc-start input, .mhc-compose textarea { font-size: 16px; } /* verhindert Zoom auf iOS */
	html.mhc-lock, html.mhc-lock body { overflow: hidden; }
}
@keyframes mhc-sheet { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #mhc-root * { animation: none !important; transition: none !important; } }
