/* MUDS Chatbot Connector v1.0.5 — compact external chat shell.
   Font sizing INSIDE the cross-origin iframe is controlled by the central MUDS Chatbot v0.3.17. */
.mcc-connector,.mcc-connector *{box-sizing:border-box}
.mcc-connector{--mcc-green:#94C11F;--mcc-text:#21300e;position:fixed!important;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));z-index:2147483000!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.4;color:var(--mcc-text)}
.mcc-connector .mcc-launcher{display:flex;align-items:center;gap:7px;min-height:50px;max-width:220px;padding:4px 10px 4px 4px;background:#fff;color:var(--mcc-text);border:2px solid var(--mcc-green);border-radius:999px;box-shadow:0 6px 22px #19320525;cursor:pointer;font:700 12px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;transition:background .15s ease,transform .15s ease}
.mcc-connector .mcc-launcher:hover{background:#eff7e5;transform:translateY(-2px)}
.mcc-connector .mcc-launcher:focus-visible,.mcc-connector .mcc-close:focus-visible{outline:3px solid #224f07;outline-offset:3px}
.mcc-connector .mcc-avatar,.mcc-connector .mcc-mark{width:39px;height:39px;flex:0 0 39px;border-radius:50%}
.mcc-connector .mcc-avatar{object-fit:contain;background:#f6f9ef}
.mcc-connector .mcc-mark{display:grid;place-items:center;background:var(--mcc-green);color:#21360d;font-weight:800;font-size:21px}
.mcc-connector .mcc-label{white-space:nowrap}
.mcc-connector .mcc-panel{position:absolute;right:0;bottom:62px;width:min(390px,calc(100vw - 24px));height:min(600px,calc(100vh - 104px));height:min(600px,calc(100dvh - 104px));background:#fff;border:2px solid var(--mcc-green);border-radius:15px;box-shadow:0 15px 45px #1627063a;overflow:hidden;isolation:isolate}
.mcc-connector .mcc-panel[hidden],.mcc-connector .mcc-loading[hidden]{display:none!important}
.mcc-connector .mcc-frame-holder,.mcc-connector iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.mcc-connector .mcc-close{position:absolute;top:7px;right:7px;z-index:4;display:grid;place-items:center;width:32px;height:32px;margin:0;padding:0;border:1px solid #c7d3bd;border-radius:8px;background:#fff;color:#264018;font:400 25px/1 Arial,sans-serif;cursor:pointer;box-shadow:0 1px 6px #00000012}
.mcc-connector .mcc-close:hover{background:#edf6e5}
.mcc-connector .mcc-loading{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;gap:10px;padding:20px;background:#fff;color:#3c5130;font-size:13px;text-align:center}
.mcc-connector .mcc-spinner{width:22px;height:22px;border:3px solid #dbe8cb;border-top-color:var(--mcc-green);border-radius:50%;animation:mcc-spin .7s linear infinite}
@keyframes mcc-spin{to{transform:rotate(360deg)}}
@media(max-width:520px){
 .mcc-connector{right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom))}
 .mcc-connector .mcc-launcher{min-height:46px;padding:3px;font-size:12px}
 .mcc-connector .mcc-avatar,.mcc-connector .mcc-mark{width:38px;height:38px;flex-basis:38px}
 .mcc-connector .mcc-label{display:none}
 .mcc-connector[data-mcc-mobile-label="1"] .mcc-launcher{padding-right:10px}
 .mcc-connector[data-mcc-mobile-label="1"] .mcc-label{display:block}
 .mcc-connector .mcc-panel{bottom:56px;width:calc(100vw - 16px);height:calc(100vh - 78px);height:calc(100dvh - 78px);border-radius:13px}
}
@media(prefers-reduced-motion:reduce){.mcc-connector .mcc-launcher{transition:none}.mcc-connector .mcc-launcher:hover{transform:none}.mcc-connector .mcc-spinner{animation:none}}

/* v1.0.3: the centrally hosted iframe provides the larger „Ihre Frage“ heading,
   smaller input placeholder and high-contrast white two-line send button.
   The shell retains responsive dimensions and does not attempt to style the iframe. */
.mcc-connector .mcc-panel{height:min(625px,calc(100dvh - 104px))}
.mcc-connector .mcc-launcher:focus-visible{outline:3px solid #294b10;outline-offset:3px}
@media(max-width:520px){.mcc-connector .mcc-panel{height:calc(100dvh - 78px)}}

/* v1.0.4: keep the entire framed chat in the visual viewport while the
   on-screen keyboard is visible. The main plugin moves the question to the top. */
@media (max-width:520px) {
  .mcc-connector .mcc-panel {
    position:fixed!important;top:var(--mcc-visible-top,8px);left:8px;right:8px;bottom:auto;
    width:auto;max-width:none;max-height:none;
    height:var(--mcc-visible-height,calc(100dvh - 16px));
    border-radius:13px;
  }
  .mcc-connector.mcc-open .mcc-launcher {visibility:hidden}
}

/* v1.0.5: a more comfortable desktop side panel and a launcher 100px higher on phones. */
@media (min-width:521px) {
  .mcc-connector .mcc-panel {
    width:min(520px,calc(100vw - 24px));
    height:min(700px,calc(100dvh - 104px));
  }
}
@media (max-width:520px) {
  .mcc-connector {
    bottom:calc(100px + max(8px,env(safe-area-inset-bottom)))!important;
  }
}

/* v1.0.6: move the launcher relative to v1.0.5, without pushing the open
   chat above the viewport. Keep it independent from the launcher offset. */
@media(min-width:521px){
  .mcc-connector{bottom:calc(200px + max(16px,env(safe-area-inset-bottom)))!important}
  .mcc-connector .mcc-panel{
    position:fixed!important;
    right:max(16px,env(safe-area-inset-right));
    bottom:max(16px,env(safe-area-inset-bottom));
    height:min(700px,calc(100dvh - 32px));
    max-height:calc(100dvh - 32px);
  }
}
@media(max-width:520px){
  /* Additional 100px higher than the previous 100px offset. */
  .mcc-connector{bottom:calc(200px + max(8px,env(safe-area-inset-bottom)))!important}
}
.mcc-connector.mcc-open .mcc-launcher{visibility:hidden}

/* v1.0.7: additional launcher offset relative to v1.0.6.
 * Sitewide desktop: smaller. Shortcode: distinctly larger and another 100px up.
 * The chat panel retains its fixed, viewport-safe position. */
@media (min-width:521px) {
  .mcc-connector:not(.mcc-shortcode) {
    bottom: min(calc(400px + max(16px,env(safe-area-inset-bottom))), calc(100dvh - 54px)) !important;
  }
  .mcc-connector:not(.mcc-shortcode) .mcc-launcher {
    min-height:43px;max-width:190px;padding:3px 9px 3px 3px;
    gap:6px;font-size:11px;border-width:2px;
  }
  .mcc-connector:not(.mcc-shortcode) .mcc-avatar,
  .mcc-connector:not(.mcc-shortcode) .mcc-mark {
    width:32px;height:32px;flex-basis:32px;
  }
  .mcc-connector:not(.mcc-shortcode) .mcc-mark {font-size:18px}
  .mcc-connector.mcc-shortcode {
    bottom: min(calc(500px + max(16px,env(safe-area-inset-bottom))), calc(100dvh - 76px)) !important;
  }
}
@media (max-width:520px) {
  .mcc-connector:not(.mcc-shortcode) {
    bottom: min(calc(300px + max(8px,env(safe-area-inset-bottom))), calc(100dvh - 64px)) !important;
  }
  .mcc-connector.mcc-shortcode {
    bottom: min(calc(400px + max(8px,env(safe-area-inset-bottom))), calc(100dvh - 76px)) !important;
  }
}
.mcc-connector.mcc-shortcode .mcc-launcher {
  min-height:62px;max-width:270px;padding:5px 15px 5px 5px;
  gap:10px;border-width:3px;font-size:15px;
}
.mcc-connector.mcc-shortcode .mcc-avatar,
.mcc-connector.mcc-shortcode .mcc-mark {
  width:46px;height:46px;flex-basis:46px;
}
.mcc-connector.mcc-shortcode .mcc-mark {font-size:25px}
@media (max-width:520px) {
  .mcc-connector.mcc-shortcode .mcc-launcher {min-height:58px;font-size:14px}
  .mcc-connector.mcc-shortcode .mcc-avatar,
  .mcc-connector.mcc-shortcode .mcc-mark {width:44px;height:44px;flex-basis:44px}
}

/* v1.0.8: adjust ONLY the [muds_chatbot_connector] shortcode launcher
 * relative to v1.0.7: +300px on desktop, +150px on mobile.
 * On short viewports clamp to keep the button visible. Sitewide placement
 * remains unchanged; opened chat stays attached to viewport. */
@media (min-width:521px) {
  .mcc-connector.mcc-shortcode {
    bottom:min(calc(800px + max(16px,env(safe-area-inset-bottom))),calc(100dvh - 76px - env(safe-area-inset-top)))!important;
  }
}
@media (max-width:520px) {
  .mcc-connector.mcc-shortcode {
    bottom:min(calc(550px + max(8px,env(safe-area-inset-bottom))),calc(100dvh - 76px - env(safe-area-inset-top)))!important;
  }
}

/* v1.0.9: requested 400px desktop / 300px mobile downward shift RELATIVE
   to v1.0.8, for both sitewide and shortcode launchers. Panel position unchanged.
   Clamp to the visible viewport to prevent clipping on short screens. */
@media(min-width:521px){
  .mcc-connector:not(.mcc-shortcode){bottom:max(16px,env(safe-area-inset-bottom))!important}
  .mcc-connector.mcc-shortcode{bottom: min(calc(400px + max(16px,env(safe-area-inset-bottom))),calc(100dvh - 76px - env(safe-area-inset-top)))!important}
}
@media(max-width:520px){
  .mcc-connector:not(.mcc-shortcode){bottom:max(8px,env(safe-area-inset-bottom))!important}
  .mcc-connector.mcc-shortcode{bottom: min(calc(250px + max(8px,env(safe-area-inset-bottom))),calc(100dvh - 76px - env(safe-area-inset-top)))!important}
}

/* v1.0.11: launcher placement relative to v1.0.9.
 * Shortcode launcher: 100px LOWER on desktop and 150px LOWER on mobile.
 * Keep fixed chat panel and accessible safe-area limits unchanged.
 * Sitewide launcher was already at the bottom and remains unchanged. */
@media (min-width:521px){
  .mcc-connector.mcc-shortcode{
    bottom:min(calc(300px + max(16px,env(safe-area-inset-bottom))),calc(100dvh - 76px - env(safe-area-inset-top)))!important;
  }
  .mcc-connector:not(.mcc-shortcode){bottom:max(16px,env(safe-area-inset-bottom))!important}
}
@media (max-width:520px){
  .mcc-connector.mcc-shortcode{
    bottom:min(calc(100px + max(8px,env(safe-area-inset-bottom))),calc(100dvh - 76px - env(safe-area-inset-top)))!important;
  }
  .mcc-connector:not(.mcc-shortcode){bottom:max(8px,env(safe-area-inset-bottom))!important}
}

/* v1.0.12 – uniform 100px from bottom for both shortcode and sitewide launcher,
   on desktop and mobile. The panel remains independently viewport-safe. */
.mcc-connector,.mcc-connector.mcc-shortcode,.mcc-connector:not(.mcc-shortcode){
  bottom:calc(100px + env(safe-area-inset-bottom,0px))!important;
}
@media(max-width:520px){
 .mcc-connector,.mcc-connector.mcc-shortcode,.mcc-connector:not(.mcc-shortcode){
   bottom:calc(100px + env(safe-area-inset-bottom,0px))!important;
 }
}

/* v1.0.13: same side-drawer layout as the PUBLIC shortcode. Launcher stays 100px above bottom. */
.mcc-connector .mcc-panel{position:fixed!important;top:0!important;bottom:0!important;right:0!important;left:auto!important;width:min(440px,100vw)!important;max-width:none!important;height:100dvh!important;max-height:none!important;border:2px solid #94c11f!important;border-right:0!important;border-radius:16px 0 0 16px!important;box-shadow:-11px 0 40px #172b1336!important}
.mcc-connector,.mcc-connector.mcc-shortcode,.mcc-connector:not(.mcc-shortcode){bottom:calc(100px + env(safe-area-inset-bottom,0px))!important}
@media(max-width:520px){.mcc-connector .mcc-panel{top:var(--mcc-visible-top,0px)!important;bottom:auto!important;height:var(--mcc-visible-height,100dvh)!important;width:100vw!important;border-left:0!important;border-radius:0!important}.mcc-connector,.mcc-connector.mcc-shortcode,.mcc-connector:not(.mcc-shortcode){bottom:calc(100px + env(safe-area-inset-bottom,0px))!important}}
