#tih-assist-root{font-family:system-ui,-apple-system,sans-serif;position:fixed;bottom:22px;right:22px;z-index:999999;color:#1c2937}#tih-assist-toggle{background:#125b80;color:white;border:0;border-radius:40px;padding:13px 19px;box-shadow:0 6px 22px #0003;cursor:pointer;font-weight:650}#tih-assist-panel{position:absolute;right:0;bottom:58px;width:min(380px,calc(100vw - 32px));height:min(570px,calc(100vh - 110px));background:white;border:1px solid #dae1e8;border-radius:18px;box-shadow:0 12px 40px #0003;overflow:hidden;display:flex;flex-direction:column}#tih-assist-panel[hidden]{display:none}#tih-assist-panel header{display:flex;justify-content:space-between;align-items:center;background:#125b80;color:white;padding:15px 17px}#tih-assist-close{background:transparent;color:white;border:0;font-size:24px;cursor:pointer}#tih-assist-messages{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px}#tih-assist-messages p{margin:0;padding:11px 13px;border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere;max-width:90%;font-size:14px;line-height:1.45}.tih-bot{background:#eef3f7;align-self:flex-start}.tih-user{background:#dceef8;align-self:flex-end}.tih-choices{display:flex;gap:5px;flex-wrap:wrap;padding:8px 12px}.tih-choices button{background:#f1f6fa;color:#125b80;border:1px solid #cbdfe9;border-radius:20px;padding:7px 9px;cursor:pointer;font-size:12px}#tih-assist-panel small{font-size:10px;line-height:1.35;color:#5d6d79;padding:0 12px 12px}@media(max-width:450px){#tih-assist-root{right:12px;bottom:12px}}

#tih-privacy-area{padding:10px 14px;border-top:1px solid #dae1e8;font-size:12px;line-height:1.5}#tih-privacy-area p{margin:4px 0 8px}#tih-privacy-area label{display:block}#tih-privacy-area a{color:#125b80;text-decoration:underline}

/* v1.2.2: keep the conversation usable on desktop and mobile */
#tih-assist-root,#tih-assist-root *{box-sizing:border-box}
#tih-assist-panel{width:min(410px,calc(100vw - 24px));height:min(650px,calc(100dvh - 100px));max-height:calc(100dvh - 90px);overflow:hidden}
#tih-assist-panel header{flex:0 0 auto}
#tih-assist-messages{flex:1 1 auto;min-height:80px;overflow-y:auto;overscroll-behavior:contain}

#tih-assist-panel .tih-choices{flex:0 0 auto}
#tih-assist-panel small{display:block;flex:0 0 auto;padding:0 12px 6px}
#tih-upload-area{flex:0 0 auto;border-top:1px solid #e0e8ed;padding:5px 12px;font-size:12px;max-height:150px;overflow:auto}
#tih-upload-area[hidden],#tih-privacy-area[hidden],#tih-pool-area[hidden]{display:none!important}
#tih-upload-area summary{cursor:pointer;color:#125b80;font-weight:600;padding:5px 0;list-style:revert}
#tih-upload-area .tih-upload-inner{padding:4px 0 8px}
#tih-upload-area p{margin:3px 0 7px;font-size:11px;line-height:1.4}
#tih-upload-input{max-width:100%;font-size:11px}
#tih-upload-list{overflow-wrap:anywhere;font-size:11px}
#tih-privacy-area,#tih-pool-area{flex:0 0 auto;max-height:115px;overflow:auto;padding:7px 12px;font-size:11px}
#tih-submit-area{flex:0 0 auto;padding:0 12px 7px;max-height:85px;overflow:auto}
#tih-submit-area button{max-width:100%;font-size:12px;padding:7px 9px;cursor:pointer}
@media(max-width:450px){#tih-assist-panel{height:min(630px,calc(100dvh - 90px));right:0}}

#tih-submit-area button[hidden]{display:none!important}
#tih-submit-area button:not([hidden]){display:inline-block;background:#087ba4;color:#fff;border:0;border-radius:9px;font-weight:650;padding:11px 14px;font-size:14px}
#tih-privacy-area{flex:0 0 auto;padding:8px 12px;max-height:150px;overflow:auto;font-size:12px}
#tih-pool-area{flex:0 0 auto;padding:6px 12px;max-height:100px;overflow:auto;font-size:12px}
#tih-submit-area{max-height:100px;overflow:visible}

/* v1.5.1: readable conversation and persistent completion control */
#tih-assist-panel{width:min(590px,calc(100vw - 24px));height:min(820px,calc(100dvh - 55px));max-height:calc(100dvh - 55px)}
#tih-assist-messages{min-height:190px;flex:1 1 55%;overflow-y:auto}
#tih-upload-area{max-height:120px}#tih-upload-area:not([open]){padding-top:4px;padding-bottom:4px}
#tih-privacy-area{max-height:105px;overflow-y:auto}#tih-pool-area{max-height:66px;overflow-y:auto}
#tih-submit-area{min-height:0;max-height:none;overflow:visible;padding:5px 12px 12px}
#tih-submit-area button:not([hidden]){min-height:42px;font-size:15px;padding:10px 18px}
#tih-submit-area button:first-child:not([hidden]){background:#167d48}
@media(max-width:450px){#tih-assist-panel{width:calc(100vw - 20px);height:calc(100dvh - 38px);max-height:calc(100dvh - 38px)}#tih-assist-messages{min-height:160px}}

/* v1.5.2: Abschluss bleibt sichtbar; Dokumente und Datenschutz im eigenen Scrollbereich */
#tih-assist-panel{width:min(620px,calc(100vw - 24px));height:min(850px,calc(100dvh - 40px));max-height:calc(100dvh - 40px)}
#tih-assist-messages{flex:1 1 auto;min-height:170px;max-height:none;overflow-y:auto;scrollbar-gutter:stable}
#tih-upload-area{flex:0 0 auto;max-height:95px;overflow-y:auto}
#tih-privacy-area{flex:0 0 auto;max-height:95px;overflow-y:auto}
#tih-pool-area{flex:0 0 auto;max-height:75px;overflow-y:auto}
#tih-submit-area{flex:0 0 auto;position:relative;z-index:2;background:#fff;border-top:1px solid #dae1e8;padding:9px 12px;overflow:visible}
#tih-submit-area button:not([hidden]){font-weight:700;font-size:15px;min-height:46px}
#tih-submit-area button:first-child:not([hidden]){background:#14783e;color:#fff}
#tih-submit-area button:disabled{opacity:.57;cursor:not-allowed}
@media(max-width:450px){#tih-assist-panel{height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}#tih-assist-messages{min-height:110px}#tih-privacy-area{max-height:80px}}

/* v1.6.2: Always-visible close control, including at small viewport heights. */
#tih-assist-panel{box-sizing:border-box;min-height:0;max-height:min(850px,calc(100dvh - 110px));overflow:hidden}
#tih-assist-panel>header{position:relative;z-index:20;flex:0 0 60px;min-height:60px;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;padding:10px 12px 10px 20px;background:#125b80;color:#fff}
#tih-assist-panel>header strong{font-size:18px;line-height:1.2}
#tih-assist-close{position:relative;flex:0 0 44px;width:44px;height:44px;display:grid;place-items:center;margin:0 0 0 auto;padding:0;border:2px solid #ffffffa6;border-radius:50%;background:#ffffff25;color:#fff;font-size:30px;font-weight:600;line-height:1;cursor:pointer;opacity:1;visibility:visible;pointer-events:auto}
#tih-assist-close:hover,#tih-assist-close:focus-visible{background:#fff;color:#125b80;outline:2px solid #fff;outline-offset:2px}
#tih-assist-panel>*:not(header){min-height:0}
@media(max-width:450px){#tih-assist-panel{max-height:calc(100dvh - 86px);height:calc(100dvh - 86px)}#tih-assist-root{bottom:12px}}

/* v2.1.0 mobile-first accessibility: sticky inputs and usable reading area */
#tih-assist-root{max-width:100vw;--tih-blue:#125b80}
#tih-assist-panel{display:flex;flex-direction:column;isolation:isolate}
#tih-assist-messages{min-height:100px!important;flex:1 1 0!important;overflow-y:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}



#tih-submit-area button:not([hidden]){min-height:48px;max-width:100%;white-space:normal}
#tih-privacy-area{max-height:min(110px,20dvh);overflow-y:auto}
#tih-upload-area{max-height:min(95px,20dvh);overflow-y:auto}
#tih-assist-close{touch-action:manipulation}
@media(max-width:600px){
 #tih-assist-root{right:8px;bottom:max(8px,env(safe-area-inset-bottom));left:8px;display:flex;justify-content:flex-end}
 #tih-assist-panel{position:fixed;inset:env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0!important;width:100vw!important;height:auto!important;max-height:none!important;border-radius:0;bottom:env(safe-area-inset-bottom)!important;right:0!important;}
 #tih-assist-panel>header{flex-basis:54px;min-height:54px}
 #tih-assist-messages{padding:12px;min-height:0!important}
 
 #tih-assist-panel small{font-size:11px}
 #tih-submit-area{padding-bottom:max(10px,env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){}

/* v2.1.1 responsive handset fixes: VisualViewport keyboard, iOS safe areas and touch targets */
#tih-assist-root,#tih-assist-panel{box-sizing:border-box}
#tih-assist-panel{overscroll-behavior:contain}
#tih-assist-messages{overflow-wrap:anywhere;overscroll-behavior:contain}
#tih-assist-panel button,#tih-assist-panel summary{touch-action:manipulation}
#tih-assist-panel input[type="checkbox"]{width:18px;height:18px;vertical-align:middle}
#tih-assist-panel label{overflow-wrap:anywhere}
@media(max-width:600px){
 #tih-assist-root{position:fixed;inset:auto 0 max(8px,env(safe-area-inset-bottom)) 0;width:100%;pointer-events:none;padding:0 10px}
 #tih-assist-root>#tih-assist-toggle,#tih-assist-panel{pointer-events:auto}
 #tih-assist-toggle{min-height:48px;max-width:calc(100vw - 20px)}
 #tih-assist-panel{position:fixed!important;left:0!important;right:0!important;top:var(--tih-viewport-top,0px)!important;bottom:auto!important;inset:auto 0 auto 0!important;top:var(--tih-viewport-top,0px)!important;height:var(--tih-viewport-height,100dvh)!important;max-height:var(--tih-viewport-height,100dvh)!important;width:100%!important;min-height:0!important;transform:none!important;border:0;border-radius:0;box-shadow:none}
 #tih-assist-panel>header{flex:0 0 auto;min-height:52px;padding:6px 12px max(6px,env(safe-area-inset-top))}
 #tih-assist-panel>header strong{font-size:17px}
 #tih-assist-messages{min-height:0!important;flex:1 1 0!important;padding:10px 12px}
 #tih-assist-messages p{font-size:15px;line-height:1.45;max-width:95%}
 .tih-choices{flex:0 0 auto;max-height:67px;overflow-y:auto;padding:5px 8px}
 .tih-choices button{min-height:40px;font-size:13px;padding:8px 12px}
 
 
 
 #tih-assist-panel>small{flex:0 0 auto;max-height:44px;overflow-y:auto;padding:3px 10px;font-size:11px}
 #tih-upload-area,#tih-privacy-area,#tih-pool-area{flex:0 1 auto;min-height:0;overflow-y:auto}
 #tih-upload-area{max-height:76px}
 #tih-privacy-area{max-height:92px}
 #tih-pool-area{max-height:72px}
 #tih-submit-area{flex:0 0 auto;padding:4px 9px max(8px,env(safe-area-inset-bottom))!important;max-height:78px;overflow-y:auto}
 #tih-submit-area button{min-height:44px;max-width:100%}
}
@media(max-width:600px) and (max-height:480px){
 #tih-assist-panel>header{min-height:44px;padding-top:3px;padding-bottom:3px}
 #tih-assist-close{height:40px;width:40px;flex-basis:40px}
 #tih-assist-panel>small{max-height:30px}
 .tih-choices{max-height:45px}
 #tih-upload-area{max-height:48px}
 #tih-privacy-area{max-height:58px}
 #tih-pool-area{max-height:48px}
}

/* Klares Auswahlmenü unterhalb der Kontaktantwort */
.tih-process-choices{display:flex;flex-wrap:wrap;gap:10px;padding:12px 14px;background:#fff;border-top:1px solid #dbe6eb;}
.tih-process-choices[hidden]{display:none!important;}
.tih-process-choice{flex:1 1 160px;min-height:46px;border-radius:10px;border:1px solid #13798e;background:#087d90;color:#fff;font-weight:600;cursor:pointer;padding:10px;}
.tih-process-choice:last-child{background:#fff;color:#14546a;border-color:#a7bdc5;}
.tih-process-choice:focus-visible{outline:3px solid #f4aa42;outline-offset:3px;}
@media(max-width:600px){.tih-process-choices{flex-direction:column;gap:8px;padding:10px}.tih-process-choice{width:100%;flex:auto;min-height:48px}}

.tih-intro-continue{display:inline-block;margin-top:18px;padding:12px 24px;border:0;border-radius:9px;background:#087c92;color:#fff;font-size:16px;font-weight:700;cursor:pointer;min-height:45px}.tih-intro-continue:disabled{opacity:.6}

/* v2.2.2: latest message remains visible after asynchronous layout changes */
#tih-assist-messages{scroll-behavior:auto;overflow-anchor:none;min-height:0;}
/* Version 2.3: Strukturierte Antworten statt Freitext-Chat */

#tih-step-form{display:flex;flex-wrap:wrap;gap:10px;padding:12px 16px;border-top:1px solid #e3e9ed;background:#fff;max-height:42vh;overflow:auto;align-items:flex-end}
#tih-step-form:empty{display:none}
#tih-step-form .tih-field{display:flex;flex-direction:column;gap:5px;flex:1 1 180px;min-width:0;font-size:14px;font-weight:600;color:#1e4656}
#tih-step-form .tih-field input,#tih-step-form .tih-field textarea{width:100%;box-sizing:border-box;border:1px solid #8eaab8;border-radius:8px;padding:10px 12px;font:inherit;color:#162d36;background:white}
#tih-step-form .tih-step-action{border:0;border-radius:8px;background:#087e90;color:#fff;padding:11px 15px;cursor:pointer;font-weight:650;min-height:44px;white-space:normal}
#tih-step-form .tih-step-action.tih-secondary{background:#f3f7f8;color:#1d596b;border:1px solid #a9c5cc}
#tih-step-form .tih-step-action:disabled{opacity:.5;cursor:wait}
@media(max-width:600px){#tih-step-form{padding:10px;max-height:38vh;gap:8px}#tih-step-form .tih-field{flex-basis:100%}#tih-step-form .tih-step-action{flex:1 1 42%;font-size:14px}}

/* Vorlesen pro Nachricht, barrierearme Bedienung */
.tih-read-button{display:block;margin:8px 0 0 auto;padding:5px 10px;border:1px solid #80a9b5;border-radius:8px;background:#f2f9fb;color:#18596a;font:inherit;font-size:12px;cursor:pointer;max-width:100%}.tih-read-button:focus-visible{outline:3px solid #1c7f93;outline-offset:2px}

#tih-language{max-width:135px;min-width:95px;border-radius:7px;padding:5px;background:white;color:#152333;font-size:13px} #tih-assist-panel header{gap:7px}

#tih-language-flags{display:flex;gap:5px;align-items:center;margin-left:auto;margin-right:8px}#tih-language-flags .tih-language-flag{border:2px solid transparent;background:transparent;padding:3px 6px;border-radius:8px;font-size:23px;cursor:pointer;line-height:1.25;min-width:38px}#tih-language-flags .tih-language-flag.active{border-color:white;background:rgba(255,255,255,.22)}#tih-language-flags .tih-language-flag:focus-visible{outline:3px solid #fff;outline-offset:2px}

/* v2.3.45: Embeddable full-width form; no fixed popup on shortcode pages. */
.tih-assist-inline-host{width:100%;max-width:1040px;margin:0 auto 36px;min-width:0;}
.tih-assist-inline-host #tih-assist-root{position:static!important;inset:auto!important;width:100%!important;max-width:100%!important;display:block!important;pointer-events:auto!important;padding:0!important;margin:0!important;z-index:auto!important;}
.tih-assist-inline-host #tih-assist-toggle{display:none!important;}
.tih-assist-inline-host #tih-assist-panel{position:relative!important;inset:auto!important;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;transform:none!important;width:100%!important;max-width:100%!important;height:min(850px,85dvh)!important;min-height:530px!important;max-height:none!important;border:1px solid #d8e4ec!important;border-radius:16px!important;box-shadow:0 10px 32px #0c33501c!important;}
.tih-assist-inline-host #tih-assist-close{display:none!important;}
.tih-assist-inline-host #tih-assist-messages{min-height:200px!important;}
@media(max-width:600px){.tih-assist-inline-host #tih-assist-panel{height:min(760px,85dvh)!important;min-height:450px!important;border-radius:12px!important;}.tih-assist-inline-host #tih-assist-root{display:block!important;}.tih-assist-inline-host{margin:0 auto 20px;}}
