/* Kelly 8.13.8: freistehende Ganzkoerperdarstellung */
.kelly-assistant{position:fixed;right:clamp(6px,2vw,30px);bottom:0;z-index:9998;font-family:Arial,sans-serif;color:#15354b;pointer-events:none}
.kelly-launch{position:relative;display:block;width:clamp(125px,18vw,235px);height:clamp(225px,56vh,530px);border:0;padding:0;background:transparent;cursor:pointer;pointer-events:auto;filter:drop-shadow(0 8px 13px #0005)}
.kelly-launch img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom}
.kelly-launch-caption{position:absolute;right:0;bottom:14px;background:#073d64;color:#fff;border:2px solid #fff;border-radius:30px;padding:10px 14px;font-size:14px;font-weight:700;white-space:nowrap;box-shadow:0 5px 18px #0004}
.kelly-dialog{pointer-events:auto;position:absolute;right:calc(100% + 12px);bottom:45px;width:min(350px,calc(100vw - 180px));max-height:min(460px,calc(100dvh - 80px));overflow:auto;background:#fff;border-radius:16px;box-shadow:0 15px 45px #0005;border:1px solid #d8e3ec}
.kelly-dialog[hidden]{display:none!important}.kelly-top{background:#073d64;color:#fff;padding:13px 16px;display:flex;justify-content:space-between;align-items:center}.kelly-top button{background:none;border:0;color:#fff;font-size:27px;cursor:pointer}.kelly-dialog p{padding:14px 16px;margin:0;line-height:1.5}.kelly-actions{display:flex;flex-wrap:wrap;gap:6px;padding:5px 14px}.kelly-actions button{border:1px solid #b7d8f1;border-radius:8px;background:#edf7ff;color:#064675;padding:9px;cursor:pointer;font-weight:600}.kelly-dialog small{display:block;color:#617889;line-height:1.4;padding:12px 16px}.kelly-launch:focus-visible,.kelly-dialog button:focus-visible{outline:3px solid #ffb300;outline-offset:2px}
@media(max-width:700px){.kelly-assistant{right:5px}.kelly-launch{width:120px;height:240px}.kelly-dialog{right:calc(100% + 5px);bottom:12px;width:min(300px,calc(100vw - 135px));max-height:calc(100dvh - 45px)}.kelly-launch-caption{font-size:12px;padding:7px 9px;bottom:7px}}
@media(max-width:390px){.kelly-launch{width:92px;height:185px}.kelly-dialog{width:calc(100vw - 105px)}.kelly-actions button{font-size:12px;padding:7px}}
@media(max-height:500px){.kelly-launch{height:55vh;width:110px}.kelly-dialog{bottom:4px;max-height:calc(100dvh - 12px)}}

.kelly-launch{width:clamp(150px,20vw,270px);height:clamp(260px,66vh,650px)}
.kelly-launch img{filter:drop-shadow(0 7px 13px rgba(0,0,0,.3))}
@media(max-width:700px){.kelly-launch{width:125px;height:270px}}
@media(max-width:390px){.kelly-launch{width:100px;height:205px}}

/* 8.13.10: kompakter Dialog, mobile viewport safety */
.kelly-assistant{right:clamp(4px,1.2vw,16px)}
.kelly-launch{width:clamp(135px,16vw,220px);height:min(60dvh,510px)}
.kelly-dialog{width:min(285px,calc(100vw - 170px));bottom:35px;max-height:min(340px,calc(100dvh - 65px));font-size:13px}
.kelly-top{padding:9px 12px}.kelly-dialog p{padding:10px 12px;line-height:1.4}
.kelly-actions{padding:3px 10px;gap:5px}.kelly-actions button{padding:7px 9px;font-size:12px}
.kelly-dialog small{padding:8px 12px;font-size:11px}
@media(max-width:700px){.kelly-launch{width:110px;height:min(42dvh,270px)}.kelly-dialog{width:min(260px,calc(100vw - 125px));max-height:65dvh;bottom:10px}}
@media(max-width:390px){.kelly-launch{width:88px;height:190px}.kelly-dialog{width:calc(100vw - 100px)}}

/* 8.13.11: Kelly 3D figure; compact responsive display */
.kelly-launch img{object-fit:contain;object-position:center bottom}
@media(max-width:700px){.kelly-dialog{bottom:20px}}

/* 8.13.12: keep Kelly exactly in place; dialog closed until click. */
.kelly-dialog[hidden]{display:none!important}

/* 8.13.16 Suchio-Fragen, ohne Aenderung der Figur */
.kelly-ask{padding:8px 12px;display:block}.kelly-ask label{display:block;font-size:12px;font-weight:600;margin-bottom:5px}.kelly-ask>div{display:flex;gap:5px}.kelly-ask input{min-width:0;flex:1;padding:8px;border:1px solid #bdcbd8;border-radius:7px;font-size:13px}.kelly-ask button{padding:8px 10px;border:0;border-radius:7px;background:#076fbc;color:white;cursor:pointer}.kelly-ask button:disabled{opacity:.6}.kelly-ask span{display:block;font-size:11px;margin-top:5px}.kelly-dialog{overflow-y:auto}

/* Kelly 8.13.29: kompakte Folgefragen und einklappbare Stimmauswahl */
.kelly-dialog{max-height:min(490px,calc(100dvh - 60px));overflow-y:auto;overscroll-behavior:contain}
.kelly-followups{padding:5px 12px 4px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.kelly-followups[hidden]{display:none!important}
.kelly-followups strong{flex:0 0 100%;font-size:12px;margin-bottom:2px;color:#33465a}
.kelly-followups button{border:1px solid #b7d8f1;background:#f0f8ff;color:#064675;border-radius:15px;padding:6px 9px;cursor:pointer;font:inherit;font-size:11px;line-height:1.25;max-width:100%;white-space:normal;text-align:left}
.kelly-followups button:hover,.kelly-followups button:focus-visible{background:#dcefff;outline-offset:2px}
@media(max-width:700px){.kelly-dialog{max-height:calc(100dvh - 35px)}.kelly-followups button{font-size:11px;padding:6px 8px}}

/* Legacy voice selector must not be shown even with older cached markup. */
#kellyDialog .kelly-voice-settings,#kellyDialog #kellyVoice{display:none!important}

/* Kelly: komfortabler Messenger, Figur und ihre Position unveraendert */
.kelly-dialog{width:min(390px,calc(100vw - 170px));max-height:min(620px,calc(100dvh - 35px));font-size:14px}
.kelly-dialog #kellyText{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;font-size:14px}
.kelly-ask>div{align-items:stretch}
.kelly-ask textarea{flex:1;min-width:0;min-height:92px;resize:vertical;padding:11px;border:1px solid #bdcbd8;border-radius:9px;font:inherit;font-size:14px;line-height:1.45}
.kelly-ask textarea:focus{outline:2px solid #69a9d7;outline-offset:1px}
.kelly-ask button{align-self:stretch;font-size:13px;font-weight:700}
.kelly-ask span{min-height:16px}
@media(max-width:700px){.kelly-dialog{width:min(340px,calc(100vw - 125px));max-height:calc(100dvh - 25px)}.kelly-ask textarea{min-height:88px}}
@media(max-width:390px){.kelly-dialog{width:calc(100vw - 100px)}.kelly-ask>div{flex-direction:column}.kelly-ask button{align-self:flex-end}}

/* 8.13.33: Messenger-Eingabe explizit mehrzeilig */
#kellyDialog #kellyAskForm textarea#kellyQuestion{display:block!important;box-sizing:border-box!important;width:100%!important;height:108px!important;min-height:108px!important;max-height:220px!important;resize:vertical!important;line-height:1.5!important;font-size:15px!important;background:#fff!important;color:#172b3a!important}
#kellyDialog #kellyAskForm>div{display:flex;align-items:stretch;gap:8px}
#kellyDialog #kellyAskForm button{min-width:75px}

/* 8.13.34: compact submit button, keep multiline message field */
#kellyDialog #kellyAskForm>div{align-items:flex-end!important}
#kellyDialog #kellyAskForm button{align-self:flex-end!important;height:42px!important;min-height:42px!important;max-height:42px!important;padding:7px 12px!important;line-height:1.2!important}
#kellyDialog #kellyAskForm textarea#kellyQuestion{height:104px!important;min-height:104px!important}

/* 8.13.37: only the answer scrolls; controls remain accessible */
#kellyDialog{display:flex;flex-direction:column;overflow:hidden!important}
#kellyDialog[hidden]{display:none!important}
#kellyDialog .kelly-top{flex:0 0 auto}
#kellyDialog #kellyText{flex:1 1 auto;min-height:52px;max-height:230px;overflow-y:auto;overscroll-behavior:contain}
#kellyDialog .kelly-actions,#kellyDialog #kellyAskForm,#kellyDialog small{flex:0 0 auto}
#kellyDialog #kellyAskForm textarea#kellyQuestion{height:96px!important;min-height:80px!important;max-height:130px!important}
@media(max-height:680px){#kellyDialog #kellyText{max-height:115px}#kellyDialog #kellyAskForm textarea#kellyQuestion{height:76px!important;min-height:65px!important}}

/* 8.13.49: native hidden attribute must override .kelly-ask display:block */
#kellyDialog #kellyRequestForm[hidden]{display:none!important}
#kellyDialog #kellyRequestForm:not([hidden]){display:block;flex:0 1 auto;overflow-y:auto;min-height:0}

/* 8.13.50: Modernes kompaktes DH-Service24 Service-Center. Kelly-Figur bleibt unberuehrt. */
#kellyDialog{width:min(405px,calc(100vw - 165px));max-height:min(555px,calc(100dvh - 34px));background:#f5f8fc;border:1px solid #dce5ef;border-radius:19px;box-shadow:0 18px 55px rgba(11,32,57,.26);font-family:system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#1c3447;gap:0}
#kellyDialog .kelly-top{padding:12px 14px;background:linear-gradient(120deg,#093e69,#086ea6);min-height:55px;box-sizing:border-box}
#kellyDialog .kelly-top strong{display:flex;align-items:center;gap:10px;font-size:14px;letter-spacing:.1px}
#kellyDialog .kelly-service-icon{width:33px;height:33px;border-radius:11px;background:#ffffff25;border:1px solid #ffffff50;display:grid;place-items:center;font-size:17px;font-weight:800;flex-shrink:0}
#kellyDialog .kelly-service-subtitle{display:block;font-size:10px;font-weight:500;opacity:.84;margin-top:2px;letter-spacing:.2px}
#kellyDialog #kellyClose{font-size:24px;width:30px;height:30px;border-radius:9px;line-height:1}
#kellyDialog #kellyClose:hover{background:#ffffff22}
#kellyDialog #kellyText{background:#fff;border:1px solid #e5edf4;border-radius:13px;margin:12px 12px 7px;padding:12px 13px;min-height:64px;max-height:205px;line-height:1.52;font-size:13px;box-shadow:0 2px 8px #102b4010;flex:1 1 auto}
#kellyDialog .kelly-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:5px 12px 8px;flex:0 0 auto}
#kellyDialog .kelly-nav button{padding:9px 4px;background:#fff;border:1px solid #d7e5ef;border-radius:10px;color:#164b71;font-size:12px;font-weight:650;box-shadow:0 1px 3px #163e5a0c}
#kellyDialog .kelly-nav button:hover{background:#e7f4ff}
#kellyDialog #kellyAskForm{padding:9px 12px 7px;background:#f5f8fc;border-top:1px solid #e4ebf2}
#kellyDialog #kellyAskForm label{margin-bottom:6px;color:#324b61;font-size:12px}
#kellyDialog #kellyAskForm>div{gap:7px}
#kellyDialog #kellyAskForm textarea#kellyQuestion{height:74px!important;min-height:70px!important;max-height:150px!important;padding:10px!important;border:1px solid #cbdbe8!important;border-radius:11px!important;background:#fff!important;font-size:13px!important;line-height:1.45!important}
#kellyDialog #kellyAskForm button{height:39px!important;min-height:39px!important;max-height:39px!important;border-radius:10px!important;padding:8px 11px!important;background:#086fae;font-size:12px!important}
#kellyDialog .kelly-tools{display:flex;gap:7px;padding:5px 12px 7px;align-items:center;flex:0 0 auto}
#kellyDialog .kelly-tools button{padding:6px 10px;background:transparent;border:1px solid #d5e2ed;border-radius:9px;color:#315b79;font-size:11px}
#kellyDialog .kelly-tools button:hover{background:#e9f3fc}
#kellyDialog .kelly-tools button:not(#kellySpeak):not(#kellyMute){margin-left:auto;background:#e6f3ff;color:#075a8d;font-weight:700}
#kellyDialog small{padding:7px 12px 10px;font-size:10px;line-height:1.3;color:#647c8c;border-top:1px solid #e7edf4}
#kellyDialog #kellyRequestForm:not([hidden]){padding:13px!important;margin:0 12px 8px;border:1px solid #d8e5ef!important;border-radius:12px;background:#fff;box-shadow:0 4px 15px #0c2f5010;overflow-y:auto;flex:1 1 auto}
#kellyDialog #kellyRequestForm p{padding:6px 0 10px;font-size:12px!important;line-height:1.4}
#kellyDialog #kellyRequestForm label{margin:7px 0 4px;font-size:12px}
#kellyDialog #kellyRequestForm input:not([type=checkbox]),#kellyDialog #kellyRequestForm textarea{width:100%;box-sizing:border-box;border:1px solid #cbdbe8;border-radius:8px;padding:9px;font:inherit;font-size:13px}
#kellyDialog #kellyRequestForm button{margin-top:9px}
#kellyDialog #kellyRequestForm[hidden]{display:none!important}
@media(max-width:700px){#kellyDialog{width:min(360px,calc(100vw - 125px));max-height:calc(100dvh - 25px)}#kellyDialog #kellyText{max-height:160px}}
@media(max-width:390px){#kellyDialog{width:calc(100vw - 100px)}#kellyDialog .kelly-nav button{font-size:10px}#kellyDialog .kelly-service-subtitle{font-size:9px}#kellyDialog #kellyAskForm>div{flex-direction:column}#kellyDialog #kellyAskForm button{align-self:flex-end!important}}
@media(max-height:570px){#kellyDialog #kellyText{min-height:40px;max-height:95px;margin-top:7px}#kellyDialog #kellyAskForm textarea#kellyQuestion{height:58px!important;min-height:55px!important}#kellyDialog small{display:none}}

/* 8.13.51: minimal chat: one scrollable conversation and one-line composer */
#kellyDialog{display:flex!important;flex-direction:column!important;height:min(490px,calc(100dvh - 42px))!important;max-height:calc(100dvh - 42px)!important;overflow:hidden!important;width:min(380px,calc(100vw - 155px))!important}
#kellyDialog[hidden]{display:none!important}
#kellyDialog .kelly-top{flex:0 0 auto!important;min-height:49px!important;padding:9px 13px!important}
#kellyDialog .kelly-nav,#kellyDialog .kelly-followups,#kellyDialog .kelly-input-title,#kellyDialog #kellyAskForm label,#kellyDialog small{display:none!important}
#kellyDialog #kellyChatLog{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;padding:13px 11px!important;display:flex!important;flex-direction:column!important;gap:10px!important;background:#f5f8fc!important}
#kellyDialog #kellyChatLog #kellyText{display:none!important}
#kellyDialog #kellyChatLog:before{content:'Hallo! Ich bin Kelly von DH-Service24. Wie kann ich helfen?';display:block;align-self:flex-start;background:#fff;padding:10px 12px;border-radius:13px 13px 13px 3px;max-width:86%;font-size:13px;line-height:1.5;box-shadow:0 1px 4px #0001}
#kellyDialog #kellyChatLog .kelly-bubble{margin:0!important;padding:10px 12px!important;max-width:88%;width:fit-content;min-height:0!important;max-height:none!important;overflow:visible!important;font-size:13px!important;line-height:1.5!important;border:0!important;box-shadow:none!important;white-space:pre-wrap;overflow-wrap:anywhere}
#kellyDialog #kellyChatLog .kelly-bubble-user{align-self:flex-end;background:#d9efff!important;color:#123f60;border-radius:13px 13px 3px 13px}
#kellyDialog #kellyChatLog .kelly-bubble-assistant{align-self:flex-start;background:#fff!important;border-radius:13px 13px 13px 3px;box-shadow:0 1px 4px #0001!important}
#kellyDialog #kellyAskForm{flex:0 0 auto!important;padding:9px 10px 5px!important;margin:0!important}
#kellyDialog #kellyAskForm>div{display:flex!important;flex-direction:row!important;gap:7px!important;align-items:center!important}
#kellyDialog #kellyAskForm input#kellyQuestion{flex:1 1 auto!important;width:0!important;min-width:0!important;height:39px!important;box-sizing:border-box!important;border:1px solid #cbdbe8!important;border-radius:20px!important;padding:0 13px!important;background:#fff!important;font-size:13px!important}
#kellyDialog #kellyAskForm button{flex:0 0 auto!important;height:39px!important;border-radius:20px!important}
#kellyDialog #kellyStatus{display:block;font-size:10px;min-height:0;padding-top:2px}
#kellyDialog .kelly-tools{flex:0 0 auto!important;justify-content:flex-end!important;padding:4px 10px 8px!important;border-top:0!important}
#kellyDialog .kelly-tools button{font-size:11px!important;padding:5px 9px!important}
#kellyDialog #kellyRequestForm:not([hidden]){position:absolute!important;inset:51px 8px 8px!important;z-index:5!important;margin:0!important;overflow-y:auto!important;max-height:none!important;background:#fff!important}
#kellyDialog #kellyRequestForm[hidden]{display:none!important}
@media(max-width:420px){#kellyDialog{width:calc(100vw - 110px)!important}#kellyDialog #kellyAskForm button{padding:7px!important}}

#kellyDialog #kellyChatLog:before{display:none!important}
#kellyDialog #kellyChatLog #kellyText{display:block!important;align-self:flex-start!important;flex:0 0 auto!important;margin:0!important;max-width:88%!important;max-height:none!important;min-height:0!important;overflow:visible!important;padding:10px 12px!important;background:#fff!important;border-radius:13px 13px 13px 3px!important;box-shadow:0 1px 4px #0001!important}

#kellyDialog #kellyChatLog #kellyText{display:none!important}

/* 8.13.52: Eigenständiges, schließbares Anfragefenster neben dem Chat */
#kellyRequestWindow[hidden]{display:none!important}
#kellyRequestWindow{position:fixed!important;z-index:2147483646!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:min(430px,calc(100vw - 28px))!important;max-height:min(680px,calc(100dvh - 28px))!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border:1px solid #cbd7e2!important;border-radius:16px!important;background:#fff!important;box-shadow:0 16px 55px #0005!important;color:#263746!important}
#kellyRequestWindow .kelly-request-head{display:flex!important;justify-content:space-between!important;align-items:center!important;flex:0 0 auto!important;padding:12px 16px!important;background:#244c6a!important;color:white!important}
#kellyRequestClose{background:transparent!important;color:white!important;border:0!important;font-size:26px!important;line-height:1!important;cursor:pointer!important}
#kellyRequestWindow #kellyRequestForm{position:static!important;inset:auto!important;display:block!important;overflow-y:auto!important;min-height:0!important;flex:1 1 auto!important;margin:0!important;padding:16px!important;background:white!important}
#kellyRequestWindow #kellyRequestForm>strong{display:none!important}
#kellyRequestWindow #kellyRequestForm input:not([type=checkbox]),#kellyRequestWindow #kellyRequestForm textarea{display:block!important;width:100%!important;box-sizing:border-box!important;margin:5px 0 12px!important;padding:9px!important;border:1px solid #cbd7e2!important;border-radius:8px!important;background:#fff!important;color:#263746!important}
#kellyRequestWindow #kellyRequestForm label{display:block;margin:8px 0 3px}
#kellyRequestWindow #kellyRequestForm label:has(input[type=checkbox]){display:flex!important}
#kellyRequestWindow #kellyRequestForm button[type=submit]{margin-top:10px!important;border-radius:8px!important}

#kellyAssistant #kellyRequestWindow[hidden]{display:none!important}
#kellyAssistant #kellyRequestWindow{pointer-events:auto!important}
#kellyAssistant #kellyRequestOpen{display:inline-flex!important;visibility:visible!important;pointer-events:auto!important}

/* 8.13.62 – compact footer, reliable visible contact button */
#kellyDialog .kelly-tools{display:grid!important;grid-template-columns:auto auto minmax(0,1fr)!important;align-items:center!important;justify-content:stretch!important;column-gap:5px!important;flex-wrap:nowrap!important;width:100%!important;box-sizing:border-box!important;min-height:41px!important;overflow:visible!important;padding:4px 10px 8px!important}
#kellyDialog .kelly-tools button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;white-space:nowrap!important;font-size:11px!important;line-height:1.3!important;padding:6px 7px!important;margin:0!important;visibility:visible!important;opacity:1!important}
#kellyDialog .kelly-tools #kellyRequestOpen{display:inline-flex!important;width:100%!important;justify-self:stretch!important;background:#e6f3ff!important;color:#075a8d!important;border:1px solid #b7d8f1!important;font-weight:700!important;position:relative!important;z-index:2!important}
#kellyRequestWindow:not([hidden]){pointer-events:auto!important}
