.mgbwc{--mgbwc-accent:#183e35;max-width:560px;border:1px solid #dbe3df;border-radius:16px;overflow:hidden;background:#fff;color:#183029;box-shadow:0 8px 30px #122b2414;font:inherit}.mgbwc *{box-sizing:border-box}.mgbwc-head{padding:18px 20px;background:var(--mgbwc-accent);color:#fff;display:flex;align-items:center;gap:10px}.mgbwc-dot{width:9px;height:9px;border-radius:50%;background:#a5ddbd}.mgbwc-messages{height:320px;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:20px;background:#fafcfb}.mgbwc-bubble{padding:12px 15px;border-radius:13px;max-width:88%;white-space:pre-wrap;line-height:1.5;font-size:15px;overflow-wrap:anywhere}.mgbwc-bot{background:#edf2ef;align-self:flex-start}.mgbwc-user{background:var(--mgbwc-accent);color:white;align-self:flex-end}.mgbwc-link{display:block;margin-top:10px;text-decoration:underline;color:inherit;font-weight:600}.mgbwc-form{display:flex;gap:8px;padding:14px;border-top:1px solid #e7ece9}.mgbwc-form input{min-width:0;flex:1;border:1px solid #d0dbd5;border-radius:9px;padding:11px;font:inherit;color:#183029;background:#fff}.mgbwc-form button{border:0;border-radius:9px;background:var(--mgbwc-accent);color:white;padding:11px 16px;cursor:pointer;font:inherit}.mgbwc-form button:disabled{opacity:.55;cursor:wait}.mgbwc-foot{text-align:center;font-size:11px;color:#65776e;padding:0 10px 12px}
/* Flytande webbchatt – diskret launcher, inspirerad av MGB GDPR-widget. */
.mgbwc-floating{position:fixed;right:22px;bottom:22px;z-index:2147482000;font-family:inherit}
.mgbwc-launcher{appearance:none!important;display:flex!important;align-items:center!important;justify-content:center!important;width:60px!important;height:60px!important;padding:0!important;border:1px solid #dfe5e1!important;border-radius:50%!important;background:#fff!important;color:#1f3d2b!important;box-shadow:0 6px 24px rgba(16,32,22,.16)!important;cursor:pointer!important;transition:box-shadow .18s,transform .18s!important}
.mgbwc-launcher:hover{transform:translateY(-2px);box-shadow:0 9px 28px rgba(16,32,22,.23)!important}
.mgbwc-launcher:focus-visible,.mgbwc-close:focus-visible{outline:3px solid #4a9e6b;outline-offset:3px}
.mgbwc-panel{position:absolute;bottom:76px;right:0;width:min(380px,calc(100vw - 28px));box-shadow:0 14px 44px rgba(16,32,22,.2);border-radius:16px}
.mgbwc-panel[hidden]{display:none!important}
.mgbwc-panel .mgbwc{max-width:none;width:100%;box-shadow:none}
.mgbwc-panel .mgbwc-head{padding:15px 18px}
.mgbwc-panel .mgbwc-messages{height:min(350px,calc(100dvh - 265px));min-height:160px}
.mgbwc-close{margin-left:auto!important;appearance:none!important;background:transparent!important;border:0!important;color:#fff!important;font-size:27px!important;line-height:1!important;padding:2px 5px!important;cursor:pointer!important}
@media(max-width:480px){.mgbwc-floating{right:14px;bottom:14px}.mgbwc-panel{bottom:72px}.mgbwc-launcher{width:54px!important;height:54px!important}}

/* Version 1.3: tydlig launcher och diskret välkomstbubbla. */
.mgbwc-floating .mgbwc-launcher{background:#214632!important;color:#fff!important;border:1px solid #214632!important;width:60px!important;height:60px!important;box-shadow:0 8px 26px rgba(21,53,34,.23)!important}
.mgbwc-floating .mgbwc-launcher:hover{background:#183a29!important;box-shadow:0 10px 30px rgba(21,53,34,.3)!important}
.mgbwc-teaser{position:absolute;right:76px;bottom:1px;width:260px;max-width:calc(100vw - 110px);background:#fff;color:#27352d;border:1px solid #dce4df;border-radius:16px;padding:14px 16px 13px;box-shadow:0 9px 30px rgba(20,45,31,.15);font:inherit;line-height:1.45}
.mgbwc-teaser[hidden]{display:none!important}
.mgbwc-teaser-brand{display:flex;align-items:center;gap:8px;font-size:13px;color:#214632;margin-bottom:8px}
.mgbwc-teaser-mark{display:inline-flex;align-items:center;justify-content:center;background:#e8f0ea;color:#214632;width:29px;height:29px;border-radius:50%;font-size:17px}
.mgbwc-teaser-dismiss{position:absolute;right:8px;top:6px;background:transparent!important;border:0!important;color:#6a7c71!important;font-size:20px!important;line-height:1!important;padding:3px 6px!important;cursor:pointer!important}
.mgbwc-teaser-action{display:block;text-align:left;width:100%;padding:0!important;margin:0!important;background:transparent!important;border:0!important;color:#27352d!important;cursor:pointer!important;font:inherit!important;font-size:13px!important;line-height:1.5!important}
.mgbwc-teaser-cta{display:block;color:#53745c;margin-top:8px;font-size:12px;font-weight:600}
.mgbwc-teaser-action:focus-visible,.mgbwc-teaser-dismiss:focus-visible{outline:2px solid #4a9e6b;outline-offset:3px}
@media(max-width:480px){.mgbwc-floating .mgbwc-launcher{width:56px!important;height:56px!important}.mgbwc-teaser{right:68px;width:230px;max-width:calc(100vw - 100px)}}

/* v1.5: compact, theme-resistant composer for floating and shortcode chat. */
.mgbwc .mgbwc-form{display:block!important;padding:12px 14px 7px!important;border-top:1px solid #e7ece9!important;background:#fff!important;margin:0!important}
.mgbwc .mgbwc-composer{display:flex!important;flex-direction:column!important;gap:6px!important;width:100%!important;border:1px solid #dce4df!important;border-radius:15px!important;background:#fff!important;padding:10px 11px 9px!important;box-shadow:none!important;transition:border-color .15s,box-shadow .15s!important}
.mgbwc .mgbwc-composer:focus-within{border-color:#638d72!important;box-shadow:0 0 0 2px rgba(67,125,85,.10)!important}
.mgbwc .mgbwc-composer textarea{display:block!important;resize:none!important;overflow-y:auto!important;min-height:25px!important;max-height:112px!important;width:100%!important;height:25px;flex:none!important;min-width:0!important;box-sizing:border-box!important;margin:0!important;padding:1px 0!important;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:#253c30!important;font-family:inherit!important;font-size:14px!important;font-weight:400!important;line-height:1.55!important;letter-spacing:normal!important;text-transform:none!important}
.mgbwc .mgbwc-composer textarea:focus{border:0!important;outline:0!important;box-shadow:none!important}
.mgbwc .mgbwc-composer textarea::placeholder{color:#8b9c91!important;opacity:1!important;font-size:14px!important}
.mgbwc .mgbwc-composer-bottom{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:33px!important}
.mgbwc .mgbwc-composer-hint{font-size:11px!important;line-height:1.4!important;color:#82968a!important}
.mgbwc .mgbwc-composer .mgbwc-send{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 34px!important;width:34px!important;height:34px!important;min-height:34px!important;max-width:34px!important;border:0!important;border-radius:10px!important;padding:0!important;margin:0!important;background:#1c4033!important;color:#fff!important;box-shadow:none!important;cursor:pointer!important;transition:background .15s!important}
.mgbwc .mgbwc-composer .mgbwc-send:hover{background:#2b5b44!important}
.mgbwc .mgbwc-composer .mgbwc-send:focus-visible{outline:2px solid #5c9870!important;outline-offset:2px!important}
.mgbwc .mgbwc-composer .mgbwc-send:disabled{opacity:.5!important;cursor:wait!important}
.mgbwc .mgbwc-foot{padding:0 12px 10px!important;font-size:10px!important;line-height:1.5!important}

/* v1.6: only the send icon on the composer bottom row. */
.mgbwc .mgbwc-composer-bottom{justify-content:flex-end!important}

/* v1.8: mobil. iOS zoomar in hela sidan när ett textfält med mindre än 16 px text får fokus.
   På pekskärmar och smala skärmar är textfältet därför 16 px. Panelen fyller bredden och
   anpassar höjden efter den synliga ytan (även när tangentbordet är uppe). */
@media (hover:none),(pointer:coarse),(max-width:768px){
 .mgbwc .mgbwc-composer textarea,.mgbwc .mgbwc-composer textarea::placeholder{font-size:16px!important}
 .mgbwc .mgbwc-composer textarea{min-height:26px!important;line-height:1.5!important}
}
@media (max-width:480px){
 .mgbwc-panel{position:fixed!important;left:10px!important;right:10px!important;bottom:84px!important;width:auto!important}
 .mgbwc-panel .mgbwc-messages{height:min(340px,calc(100dvh - 300px))!important;min-height:140px!important}
}

/* v1.9.1: dölj etiketten "Din fråga" visuellt även om temat saknar .screen-reader-text (finns kvar för skärmläsare). */
.mgbwc .screen-reader-text{border:0!important;clip:rect(1px,1px,1px,1px)!important;clip-path:inset(50%)!important;height:1px!important;width:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;word-wrap:normal!important}

/* v2.1: lead magnet guide-optin bubbla */
.mgbwc-guide-optin{background:#1f3d2b!important;color:#f4f1e9!important;max-width:96%!important;padding:14px 16px 15px!important}
.mgbwc-guide-title{font-weight:700;font-size:13px;letter-spacing:.03em;text-transform:uppercase;color:#a5ddbd;margin-bottom:6px}
.mgbwc-guide-desc{font-size:14px;line-height:1.5;margin-bottom:12px;color:#e8e4d8}
.mgbwc-guide-desc strong{color:#fff}
.mgbwc-guide-form{display:flex;gap:7px;flex-wrap:wrap;align-items:stretch}
.mgbwc-guide-email{flex:1;min-width:0;border:1px solid rgba(255,255,255,.25)!important;border-radius:8px!important;padding:9px 11px!important;font:inherit!important;font-size:14px!important;color:#1f3d2b!important;background:#f4f1e9!important;outline:0!important}
.mgbwc-guide-email:focus{border-color:rgba(255,255,255,.6)!important;box-shadow:0 0 0 2px rgba(165,221,189,.3)!important}
.mgbwc-guide-btn{flex:0 0 auto;border:0!important;border-radius:8px!important;padding:9px 15px!important;background:#3a8c5c!important;color:#fff!important;font:inherit!important;font-size:13px!important;font-weight:600!important;cursor:pointer!important;white-space:nowrap;transition:background .15s!important}
.mgbwc-guide-btn:hover{background:#2f6b45!important}
.mgbwc-guide-btn:disabled{opacity:.6!important;cursor:wait!important}
.mgbwc-guide-thanks{font-size:14px;color:#a5ddbd;padding:4px 0}
.mgbwc-guide-thanks a{color:#a5ddbd!important;font-weight:700}
@media(max-width:420px){.mgbwc-guide-form{flex-direction:column}.mgbwc-guide-btn{width:100%!important}}

/* ThriveBox 1999: dold klickutlösare, men kvar i DOM för Thrive Leads. */
.mgbwc-thrivebox-trigger{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important;}
.mgbwc-guide-error{width:100%;font-size:12px;color:#fff0cf;}
