/**
 * Stuggi Frontend-Widget. 1:1 aus dem Claude-Design "Stuggi Frontend" übernommen
 * (Variante A – die Standard-/Final-Variante). Werte exakt aus dem Design.
 * Fonts lokal (siehe fonts/fonts.css).
 */

.stuggi-root {
	--st-accent: #8a5a2b;
	--st-accent-dark: #66421f;
	--st-ink: #2a221c;
	--st-inks: #6b5d50;
	--st-cream: #f7f2ea;
	--st-bot: #f1e8da;
	--st-hair: #e2d6c4;
	--st-oak: #c89a64;
	--st-wal: #5b3a21;
	--st-online: #8fe39a;
	--st-serif: 'Newsreader', Georgia, serif;
	--st-sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
	--st-gr: repeating-linear-gradient(118deg, rgba(44,36,32,.08) 0 2px, transparent 2px 11px), repeating-linear-gradient(118deg, rgba(44,36,32,.05) 0 1px, transparent 1px 27px);
	--st-shadow: 0 22px 55px -16px rgba(60,40,22,.45), 0 8px 18px -10px rgba(60,40,22,.3);
	font-family: var(--st-sans);
	font-size: 14px;
	line-height: 1.5;
	color: var(--st-ink);
	/* Eigene Typografie-Basis, damit Stuggi NICHT die Schriftstärke/Laufweite des
	   Host-Themes erbt (sonst wirkt der Text auf jeder Seite unterschiedlich). */
	font-weight: 400;
	letter-spacing: normal;
	font-style: normal;
	text-transform: none;
}
.stuggi-root, .stuggi-root * { letter-spacing: normal; }
.stuggi-root *, .stuggi-root *::before, .stuggi-root *::after { box-sizing: border-box; }

/* -------------------------------------------------- Keyframes (aus Design) */
@keyframes stPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(143,227,154,.55); } 60% { box-shadow: 0 0 0 6px rgba(143,227,154,0); } }
@keyframes stType { 0%,80%,100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes stSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes stPop { from { opacity: 0; transform: scale(.85) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes stSheet { from { transform: translateY(100%); } to { transform: none; } }

/* -------------------------------------------------------------- Launcher */
/* Defensiver Reset: Fremd-Themes (v. a. Elementor/Hello) drücken <button>-Elementen
   sonst Rahmen, Padding, border-radius und appearance auf und zerlegen das Widget.
   Deshalb hier bewusst hart zurücksetzen, damit Stuggi auf JEDEM Theme gleich aussieht. */
.stuggi-root button {
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
	line-height: normal;
	text-transform: none;
	letter-spacing: normal;
	min-width: 0;
	min-height: 0;
}
.stuggi-launcher {
	position: fixed;
	/* Mitte exakt auf der Achse üblicher Floating-Buttons (z. B.
	   Buttonizer-Telefon: 56px hoch bei bottom 5vh → Mitte 5vh + 28px;
	   64px-Launcher braucht dafür bottom 5vh - 4px). */
	bottom: calc(5vh - 4px);
	z-index: 99998;
	width: 64px !important;
	height: 64px !important;
	border-radius: 50% !important;
	background: transparent !important;
	box-shadow: 0 16px 32px -8px rgba(60,40,22,.55), 0 5px 12px rgba(60,40,22,.3);
	cursor: pointer;
	border: 0 !important;
	padding: 0 !important;
	margin: 0;
	transition: transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}
.stuggi-pos-left .stuggi-launcher { left: 24px; }
.stuggi-pos-right .stuggi-launcher { right: 24px; }
.stuggi-launcher:hover {
	transform: scale(1.14) translateY(-7px) rotate(-5deg);
	box-shadow: 0 30px 56px -10px rgba(60,40,22,.62), 0 12px 24px rgba(60,40,22,.42), 0 0 0 7px rgba(138,90,43,.16);
}
.stuggi-launcher:focus-visible { outline: 3px solid var(--st-accent); outline-offset: 4px; }
.stuggi-launcher-img {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	overflow: hidden;
	background: #efe6d8;
	box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
}
.stuggi-launcher-img img { width: 112%; height: 112%; object-fit: cover; position: absolute; top: -6%; left: -6%; }
.stuggi-launcher-dot {
	position: absolute; right: 4px; bottom: 4px; width: 13px; height: 13px; border-radius: 50%;
	background: var(--st-online); border: 2px solid #fff; animation: stPulse 2.4s ease-in-out infinite; z-index: 2;
}
.stuggi-launcher-badge {
	position: absolute; top: -1px; right: -1px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
	background: #c0492b; color: #fff; font-size: 11px; font-weight: 700; display: none; place-items: center;
	border: 2px solid #fff; z-index: 3;
}
.stuggi-has-unread .stuggi-launcher-badge { display: grid; }

/* --------------------------------------------------------------- Tooltip */
.stuggi-tooltip {
	position: fixed; bottom: calc(5vh + 6px); z-index: 99997; max-width: 212px;
	background: #fff; color: var(--st-ink); padding: 11px 28px 11px 14px;
	box-shadow: 0 14px 32px -8px rgba(60,40,22,.4); border: 1px solid var(--st-hair);
	font-size: 13.5px; line-height: 1.42; cursor: pointer;
	opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.stuggi-pos-left .stuggi-tooltip { left: 102px; border-radius: 15px 15px 15px 5px; }
.stuggi-pos-right .stuggi-tooltip { right: 102px; border-radius: 15px 15px 5px 15px; }
.stuggi-tooltip.is-visible { opacity: 1; pointer-events: auto; animation: stPop .45s cubic-bezier(.2,.9,.3,1.3) both; }
.stuggi-tooltip-x { position: absolute; top: 5px; right: 6px; width: 18px; height: 18px; border: none; background: transparent; color: #9c8b78; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }

/* ------------------------------------------------------------- Chat-Panel */
.stuggi-panel {
	position: fixed; bottom: 24px; z-index: 99999;
	width: 384px; max-width: calc(100vw - 40px);
	height: min(644px, calc(100vh - 48px));
	background: var(--st-cream);
	border-radius: 22px;
	box-shadow: var(--st-shadow);
	border: 1px solid rgba(226,214,196,.7);
	display: flex; flex-direction: column; overflow: hidden;
	opacity: 0; pointer-events: none;
}
.stuggi-pos-left .stuggi-panel { left: 24px; transform-origin: bottom left; }
.stuggi-pos-right .stuggi-panel { right: 24px; transform-origin: bottom right; }
.stuggi-root.is-open .stuggi-panel { opacity: 1; pointer-events: auto; animation: stPop .32s cubic-bezier(.2,.85,.25,1) both; }

/* Header */
.stuggi-header {
	background: var(--st-gr), linear-gradient(150deg, #5b3a21, #8a5a2b 62%, #9a6a35);
	color: var(--st-cream);
	padding: 15px 16px;
	display: flex; align-items: center; gap: 12px; flex: 0 0 auto; position: relative;
}
.stuggi-avatar {
	width: 44px; height: 44px; border-radius: 50%; overflow: hidden; position: relative; flex: 0 0 auto;
	background: #efe6d8; box-shadow: 0 0 0 2px rgba(247,242,234,.5), 0 2px 6px rgba(0,0,0,.25);
}
.stuggi-avatar img { width: 114%; height: 114%; object-fit: cover; position: absolute; top: -7%; left: -7%; }
.stuggi-head-meta { flex: 1 1 auto; min-width: 0; }
.stuggi-name { font-family: var(--st-serif); font-weight: 500; font-size: 19px; line-height: 1.08; letter-spacing: .01em; }
.stuggi-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .92; margin-top: 2px; }
.stuggi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-online); flex: 0 0 auto; animation: stPulse 2.2s ease-in-out infinite; }
.stuggi-close {
	width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(247,242,234,.16);
	color: var(--st-cream); cursor: pointer; font-size: 13px; display: grid; place-items: center; flex: 0 0 auto;
	margin-left: 4px; transition: background .2s ease, transform .2s ease;
}
.stuggi-close:hover { background: rgba(247,242,234,.3); transform: rotate(90deg); }
.stuggi-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Messages */
.stuggi-messages {
	flex: 1 1 auto; overflow-y: auto; overflow-x: hidden;
	padding: 15px 14px; display: flex; flex-direction: column; gap: 11px; background: transparent;
}
.stuggi-row { display: flex; gap: 8px; align-items: flex-end; animation: stSlide .3s ease both; }
.stuggi-row-user { justify-content: flex-end; }
.stuggi-row-bot { justify-content: flex-start; }
.stuggi-msg { padding: 10px 13px; max-width: 80%; font-size: 14px; line-height: 1.5; width: fit-content; word-break: break-word; white-space: pre-wrap; }
.stuggi-msg-bot { background: var(--st-bot); color: var(--st-ink); border-radius: 16px 16px 16px 6px; }
.stuggi-msg-user { background: linear-gradient(135deg, var(--st-accent), var(--st-accent-dark)); color: var(--st-cream); border-radius: 16px 16px 6px 16px; box-shadow: 0 1px 3px rgba(60,40,22,.14); }
.stuggi-msg-success { background: #edf5e7; color: #34502b; border: 1px solid #cde3bf; border-radius: 16px 16px 16px 6px; max-width: 84%; display: flex; gap: 9px; align-items: flex-start; font-weight: 500; }
.stuggi-msg-success .stuggi-check { flex: 0 0 auto; width: 19px; height: 19px; border-radius: 50%; background: #5aa469; color: #fff; display: grid; place-items: center; font-size: 12px; margin-top: 1px; }

/* Typing */
.stuggi-typing { display: none; gap: 8px; align-items: flex-end; justify-content: flex-start; }
.stuggi-typing.is-active { display: flex; }
.stuggi-typing-bubble { background: var(--st-bot); padding: 12px 14px; border-radius: 16px 16px 16px 6px; display: inline-flex; gap: 5px; align-items: center; }
.stuggi-typing-bubble span { width: 7px; height: 7px; border-radius: 50%; background: #b89a72; display: inline-block; animation: stType 1.3s infinite ease-in-out; }
.stuggi-typing-bubble span:nth-child(2) { animation-delay: .18s; }
.stuggi-typing-bubble span:nth-child(3) { animation-delay: .36s; }

/* Quick-reply chips */
.stuggi-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 2px; }
.stuggi-chip { background: #fff; color: var(--st-accent); border: 1px solid var(--st-hair); padding: 8px 14px; border-radius: 18px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; line-height: 1.2; transition: filter .15s ease, transform .15s ease; }
.stuggi-chip:hover { filter: brightness(.96); transform: translateY(-1px); }

/* Markdown in Bot-Antworten */
.stuggi-msg-bot strong { font-weight: 700; }
.stuggi-msg-bot em { font-style: italic; }

/* Tipp-Cursor (Schreibmaschinen-Animation) */
.stuggi-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; background: var(--st-accent); vertical-align: -2px; animation: stCaret .9s steps(1) infinite; }
@keyframes stCaret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* Lead-CTA-Button (öffnet erst auf Klick das Formular) */
.stuggi-cta { display: inline-flex; align-items: center; gap: 7px; background: linear-gradient(135deg, var(--st-accent), var(--st-accent-dark)); color: #fff; border-color: transparent; font-weight: 600; padding: 9px 16px; box-shadow: 0 2px 7px rgba(60,40,22,.2); }
.stuggi-cta:hover { filter: brightness(1.07); transform: translateY(-1px); }
.stuggi-cta svg { width: 15px; height: 15px; }

/* Footer / input */
.stuggi-footer { flex: 0 0 auto; background: rgba(255,253,250,.72); border-top: 1px solid var(--st-hair); }
.stuggi-inputbar { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 5px; }
.stuggi-input {
	flex: 1 1 auto; resize: none; border: 1px solid var(--st-hair); border-radius: 20px; padding: 9px 14px;
	font: inherit; font-size: 14px; line-height: 1.4; max-height: 120px; height: 40px; outline: none; background: #fff; color: var(--st-ink);
}
.stuggi-input:focus { border-color: var(--st-accent); }
.stuggi-send {
	width: 40px; height: 40px; border-radius: 50%; border: none;
	background: linear-gradient(135deg, var(--st-accent), var(--st-accent-dark)); color: var(--st-cream);
	cursor: pointer; display: grid; place-items: center; flex: 0 0 auto;
	box-shadow: 0 4px 10px -4px rgba(60,40,22,.5); transition: transform .2s ease, filter .2s ease;
}
.stuggi-send:hover { filter: brightness(1.08); transform: scale(1.07); }
.stuggi-send:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.stuggi-send svg { width: 17px; height: 17px; }
.stuggi-footnote { text-align: center; font-size: 10px; color: var(--st-inks); padding: 0 0 7px; opacity: .75; }

/* Lead-Formular-Karte */
.stuggi-lead { background: #fff; border: 1px solid var(--st-hair); border-radius: 16px; padding: 15px; box-shadow: 0 8px 22px -10px rgba(60,40,22,.25); display: flex; flex-direction: column; gap: 11px; margin: 4px 0 2px; animation: stSlide .3s ease both; }
.stuggi-lead-title { font-family: var(--st-serif); font-weight: 600; font-size: 16.5px; color: var(--st-ink); display: flex; align-items: center; gap: 9px; margin: 0; }
.stuggi-lead-title svg { color: var(--st-accent); flex: 0 0 auto; }
.stuggi-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stuggi-lead label.stuggi-l { font-size: 11.5px; font-weight: 600; color: var(--st-inks); margin-bottom: 4px; display: block; }
.stuggi-lead input, .stuggi-lead select, .stuggi-lead textarea {
	width: 100%; border: 1px solid var(--st-hair); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 13.5px;
	outline: none; background: #fcf9f4; color: var(--st-ink); box-sizing: border-box;
}
.stuggi-lead textarea { resize: vertical; min-height: 56px; line-height: 1.4; }
.stuggi-lead select { appearance: auto; }
.stuggi-lead input.stuggi-err, .stuggi-lead select.stuggi-err { border-color: #cf6a4a; background: #fdf1ec; }
.stuggi-hint { font-size: 11px; color: var(--st-inks); margin-top: -4px; }
.stuggi-consent { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; }
.stuggi-consent input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--st-accent); flex: 0 0 auto; }
.stuggi-consent span { font-size: 12px; line-height: 1.45; color: var(--st-inks); }
.stuggi-consent a { color: var(--st-accent); text-decoration: underline; }
.stuggi-form-error { display: none; background: #fdece4; color: #a23b1e; border: 1px solid #f0c4b2; border-radius: 10px; padding: 8px 11px; font-size: 12.5px; }
.stuggi-form-error.is-active { display: block; }
.stuggi-lead-submit { width: 100%; background: linear-gradient(135deg, var(--st-accent), var(--st-accent-dark)); color: var(--st-cream); border: none; border-radius: 12px; padding: 12px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 18px -8px rgba(60,40,22,.5); }
.stuggi-lead-submit:hover { filter: brightness(1.06); }
.stuggi-lead-submit:disabled { opacity: .6; cursor: default; }
.stuggi-lead-note { font-size: 11px; color: var(--st-inks); text-align: center; opacity: .8; }
.stuggi-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------- Mobile */
@media (max-width: 480px) {
	.stuggi-root:not(.stuggi-inline) .stuggi-panel {
		inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0;
		left: 0 !important; right: 0 !important; bottom: 0;
	}
	.stuggi-root.is-open:not(.stuggi-inline) .stuggi-panel { animation: stSheet .34s cubic-bezier(.2,.85,.25,1) both; }
	.stuggi-launcher { width: 56px; height: 56px; }
	.stuggi-pos-left .stuggi-launcher { left: 16px; }
	.stuggi-pos-right .stuggi-launcher { right: 16px; }
}

/* --------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
	.stuggi-root *, .stuggi-panel, .stuggi-row, .stuggi-dot, .stuggi-launcher-dot, .stuggi-typing-bubble span, .stuggi-tooltip {
		animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
	}
}

.stuggi-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ====================================================== Inline-Sektion */
.stuggi-inline { position: static; display: block; max-width: 1140px; margin: 0 auto; }
.stuggi-inline .stuggi-section {
	background: radial-gradient(130% 150% at 0% 0%, #6b4423 0%, #4a2f18 55%, #382414 100%);
	border-radius: 28px; padding: 38px; display: flex; gap: 44px; align-items: center; flex-wrap: wrap;
	position: relative; overflow: hidden; box-shadow: 0 34px 64px -26px rgba(60,40,22,.55);
}
.stuggi-inline .stuggi-section::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(118deg, rgba(0,0,0,.12) 0 2px, transparent 2px 13px); opacity: .5; pointer-events: none; }
.stuggi-illu-right .stuggi-section { flex-direction: row-reverse; }
.stuggi-section-illu { position: relative; flex: 0 0 auto; width: 240px; max-width: 100%; margin: 0 auto; display: flex; justify-content: center; }
.stuggi-section-illu .stuggi-illu-circle { width: 230px; height: 230px; border-radius: 50%; overflow: hidden; position: relative; box-shadow: 0 20px 40px -14px rgba(0,0,0,.5), 0 0 0 6px rgba(247,242,234,.08); background: #efe6d8; }
.stuggi-section-illu img { width: 108%; height: 108%; object-fit: cover; position: absolute; top: -4%; left: -4%; }
.stuggi-section-main { position: relative; flex: 1 1 320px; min-width: 260px; color: var(--st-cream); }
.stuggi-section-eyebrow { color: #e7b87a; font-weight: 600; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; }
.stuggi-section-heading { font-family: var(--st-serif); font-weight: 500; font-size: clamp(28px,3.6vw,39px); line-height: 1.08; margin: 12px 0 0; }
.stuggi-section-text { font-size: 16px; line-height: 1.64; color: rgba(247,242,234,.82); margin: 16px 0 22px; max-width: 48ch; }
.stuggi-section-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 26px; }
.stuggi-section-li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: rgba(247,242,234,.9); }
.stuggi-illu-right .stuggi-section-li, .stuggi-inline.stuggi-illu-right .stuggi-section-main { } /* Ausrichtung bleibt links lesbar */
.stuggi-section-tick { color: #8fe39a; font-weight: 700; }
@media (max-width: 760px) { .stuggi-section-li { justify-content: center; } }
.stuggi-section-cta { background: var(--st-cream); color: var(--st-wal); border: none; border-radius: 14px; padding: 14px 24px; font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; box-shadow: 0 14px 28px -12px rgba(0,0,0,.5); transition: filter .2s ease, transform .2s ease; }
.stuggi-section-cta:hover { filter: brightness(1.04); transform: translateY(-1px); }

@media (max-width: 760px) {
	.stuggi-inline .stuggi-section, .stuggi-illu-right .stuggi-section { flex-direction: column; text-align: center; padding: 26px; gap: 22px; }
	.stuggi-section-illu { width: auto; }
	.stuggi-section-illu .stuggi-illu-circle { width: 170px; height: 170px; }
}

/* ---- Leistungs-Karte ([[CARD]]) ---- */
.stuggi-card { background: #fff; border: 1px solid var(--st-hair); border-radius: 16px; overflow: hidden; max-width: 86%; box-shadow: 0 8px 22px -12px rgba(60,40,22,.28); animation: stSlide .3s ease both; }
.stuggi-card-img { display: block; width: 100%; height: 118px; object-fit: cover; }
.stuggi-card-body { padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 6px; }
.stuggi-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stuggi-card-title { font-family: var(--st-serif); font-weight: 600; font-size: 15.5px; color: var(--st-ink); }
.stuggi-card-price { background: var(--st-cream); color: var(--st-accent-dark); border: 1px solid var(--st-hair); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
.stuggi-card-text { font-size: 13px; line-height: 1.5; color: var(--st-inks); }
.stuggi-card-link { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--st-accent); text-decoration: none; margin-top: 2px; }
.stuggi-card-link:hover { text-decoration: underline; }

/* ---- Kontakt-Bubble ([[HUMAN]]) ---- */
.stuggi-human { background: #fff; border: 1px solid var(--st-hair); border-radius: 16px; padding: 12px 14px; max-width: 86%; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 22px -12px rgba(60,40,22,.28); animation: stSlide .3s ease both; }
.stuggi-human-title { font-family: var(--st-serif); font-weight: 600; font-size: 15px; color: var(--st-ink); }
.stuggi-human-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--st-cream); border: 1px solid var(--st-hair); color: var(--st-accent-dark); font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 12px; text-decoration: none; transition: filter .15s ease, transform .15s ease; }
.stuggi-human-btn:hover { filter: brightness(.97); transform: translateY(-1px); }
.stuggi-human-btn svg { flex: 0 0 auto; color: var(--st-accent); }

/* ---- Foto-Upload ---- */
.stuggi-attach { flex: 0 0 auto; width: 38px; height: 38px; border: none; background: transparent; color: var(--st-accent); cursor: pointer; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease; }
.stuggi-attach:hover { background: var(--st-cream, #f5efe6); }
.stuggi-attach svg { width: 19px; height: 19px; }
.stuggi-attach.is-busy { opacity: .5; cursor: default; }
.stuggi-attach-pv { position: relative; display: inline-block; margin: 13px 0 9px 14px; }
.stuggi-attach-pv img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--st-hair); display: block; }
.stuggi-attach-pv.is-busy img { opacity: .55; }
.stuggi-attach-x { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; border: none; background: #2b2115; color: #fff; font-size: 11px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fffdfa, 0 1px 3px rgba(60,40,22,.3); transition: transform .15s ease, background .15s ease; }
.stuggi-attach-x:hover { background: #000; transform: scale(1.1); }
.stuggi-msg-photo { display: block; max-width: 200px; width: 100%; border-radius: 12px; margin-bottom: 6px; }

/* ============================================================
   THEME-ARMOR: erzwingt Stuggis Button-/Feld-Formen gegen
   aggressive Fremd-Theme-/Elementor-Styles (z. B. Hello Elementor
   drückt <button> einen 1px-Rahmen + 3px-Radius + Padding auf).
   !important + .stuggi-root-Scope, damit Stuggi auf JEDEM Theme
   identisch aussieht. Chip behält bewusst seinen feinen Rahmen.
   ============================================================ */
.stuggi-root .stuggi-send,
.stuggi-root .stuggi-close,
.stuggi-root .stuggi-attach,
.stuggi-root .stuggi-attach-x { border: 0 !important; border-radius: 50% !important; padding: 0 !important; flex: 0 0 auto !important; }
/* Feste Maße erzwingen (Theme schrumpft die runden Buttons sonst auf Icon-Größe). */
.stuggi-root .stuggi-send { width: 40px !important; height: 40px !important; }
.stuggi-root .stuggi-close { width: 32px !important; height: 32px !important; }
.stuggi-root .stuggi-attach { width: 38px !important; height: 38px !important; }
.stuggi-root .stuggi-lead-submit { border: 0 !important; border-radius: 12px !important; padding: 12px !important; }
.stuggi-root .stuggi-section-cta { border: 0 !important; border-radius: 14px !important; padding: 14px 24px !important; }
.stuggi-root .stuggi-chip { border: 1px solid var(--st-hair) !important; border-radius: 18px !important; padding: 8px 14px !important; }
.stuggi-root .stuggi-cta { border: 1px solid transparent !important; border-radius: 18px !important; padding: 9px 16px !important; }

/* Farben + Hintergründe erzwingen: das Theme drückt <button> sonst eine eigene
   Textfarbe (z. B. Magenta) und transparenten Hintergrund auf. */
.stuggi-root .stuggi-chip { color: var(--st-accent) !important; background: #fff !important; }
/* Weißer Hover NUR für echte Starter-Chips, NICHT den CTA (der ist auch .stuggi-chip). */
.stuggi-root .stuggi-chip:not(.stuggi-cta):hover,
.stuggi-root .stuggi-chip:not(.stuggi-cta):focus { background: #fff !important; }
.stuggi-root .stuggi-attach { color: var(--st-accent) !important; background: transparent !important; }
.stuggi-root .stuggi-close { color: var(--st-cream) !important; }
.stuggi-root .stuggi-send { color: var(--st-cream) !important; }
/* CTA "Rückruf vereinbaren" ist .stuggi-chip.stuggi-cta -> der Chip-Armor oben
   machte ihn WEISS (unsichtbar). Brauner Verlauf + weiße Schrift + Icon/Text
   nebeneinander (inline-flex) in ALLEN Zuständen (auch :hover/:focus) erzwingen. */
.stuggi-root .stuggi-cta,
.stuggi-root .stuggi-cta:hover,
.stuggi-root .stuggi-cta:focus,
.stuggi-root .stuggi-lead-submit,
.stuggi-root .stuggi-lead-submit:hover {
	background: linear-gradient(135deg, var(--st-accent), var(--st-accent-dark)) !important;
	color: #fff !important;
}
.stuggi-root .stuggi-cta {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 7px !important;
}
.stuggi-root .stuggi-section-cta,
.stuggi-root .stuggi-section-cta:hover { background: var(--st-cream) !important; color: var(--st-wal) !important; }

/* Bilder: das Theme klemmt img{max-width:100%} und staucht Launcher-Pferd UND
   Header-Avatar (die nutzen 112–114% + negativen Offset zum Zentrieren). */
.stuggi-root .stuggi-launcher-img img,
.stuggi-root .stuggi-avatar img { max-width: none !important; }

/* Schriftgrößen/-gewichte der Buttons erzwingen (das Theme setzt 16px/400,
   dadurch werden Chips & Schließen-X viel zu groß). */
.stuggi-root .stuggi-chip { font-size: 13px !important; font-weight: 500 !important; }
.stuggi-root .stuggi-cta { font-size: 13px !important; font-weight: 600 !important; }
.stuggi-root .stuggi-close { font-size: 13px !important; }
.stuggi-root .stuggi-lead-submit { font-size: 14.5px !important; font-weight: 600 !important; }
.stuggi-root .stuggi-section-cta { font-size: 15.5px !important; font-weight: 700 !important; }

/* Icon-Buttons: Theme drückt display:block auf -> Icons verrutschen. Zentrierung
   (grid/flex) + Schließen-Hintergrund + block-SVGs (kein inline-Baseline-Gap). */
.stuggi-root .stuggi-send,
.stuggi-root .stuggi-close { display: grid !important; place-items: center !important; }
.stuggi-root .stuggi-attach { display: inline-flex !important; align-items: center !important; justify-content: center !important; }
.stuggi-root .stuggi-close { background: rgba(247,242,234,.16) !important; }
.stuggi-root button svg { display: block !important; }
/* Foto-Upload: Vorschau-Box, Entfernen-"×" und Chat-Bild gegen Theme-Styles
   (Rosa-×, verzerrte/vergrößerte Bilder durch img{max-width:100%}) schützen. */
.stuggi-root .stuggi-attach-x { background: #2b2115 !important; color: #fff !important; width: 20px !important; height: 20px !important; min-width: 0 !important; min-height: 0 !important; line-height: 1 !important; font-size: 11px !important; border-radius: 50% !important; }
.stuggi-root .stuggi-attach-pv { margin: 13px 0 9px 14px !important; }
.stuggi-root .stuggi-attach-pv img { width: 56px !important; height: 56px !important; max-width: none !important; border: 1px solid var(--st-hair) !important; }
.stuggi-root .stuggi-msg-photo { max-width: 200px !important; width: 100% !important; height: auto !important; border-radius: 12px !important; }
/* Teaser-Schließen-X: kein Theme-Rahmen/Hintergrund, richtige Größe/Farbe. */
.stuggi-root .stuggi-tooltip-x {
	border: 0 !important;
	background: transparent !important;
	color: #9c8b78 !important;
	font-size: 13px !important;
	padding: 0 !important;
	width: 18px !important;
	height: 18px !important;
	min-width: 0 !important;
	border-radius: 50% !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: color .15s ease, background .15s ease !important;
}
.stuggi-root .stuggi-tooltip-x:hover,
.stuggi-root .stuggi-tooltip-x:focus-visible {
	color: var(--st-ink) !important;
	background: rgba(43, 33, 21, .09) !important;
}

/* Lead-Formularfelder + Chat-Eingabe: Stuggis Feld-Design gegen die Theme-Feld-
   Styles (Rahmen, Radius, Padding, Hintergrund, Schatten) hart durchsetzen. */
.stuggi-root .stuggi-lead input,
.stuggi-root .stuggi-lead select,
.stuggi-root .stuggi-lead textarea {
	box-sizing: border-box !important;
	border: 1px solid var(--st-hair) !important;
	border-radius: 10px !important;
	padding: 9px 11px !important;
	background: #fcf9f4 !important;
	color: var(--st-ink) !important;
	font-size: 13.5px !important;
	box-shadow: none !important;
	min-height: 0 !important;
}
.stuggi-root .stuggi-input {
	box-sizing: border-box !important;
	border: 1px solid var(--st-hair) !important;
	border-radius: 20px !important;
	background: #fff !important;
	box-shadow: none !important;
}
.stuggi-root .stuggi-consent input { width: 18px !important; height: 18px !important; }

/* ============================================================
   Solange Stuggis Chat offen ist: schwebende Fremd-Buttons der Seite
   (Buttonizer, WhatsApp-/Anruf-Buttons u. Ä.) ausblenden, damit sie
   nicht über dem Panel/Sende-Button liegen — besonders auf Mobil.
   ============================================================ */
html.stuggi-chat-open .buttonizer,
html.stuggi-chat-open .buttonizer-group,
html.stuggi-chat-open [class*="buttonizer-group"],
html.stuggi-chat-open .joinchat,
html.stuggi-chat-open .ht-ctc-chat,
html.stuggi-chat-open .ht_ctc_chat_wrap,
html.stuggi-chat-open .wp-chatbot-floating,
html.stuggi-chat-open .fb_dialog { display: none !important; }
