.uma-sa-floating-wrap{position:fixed;right:20px;bottom:20px;z-index:999999;font-family:Arial,sans-serif}.uma-sa-root{--uma-color:#c8102e;position:relative}.uma-sa-launch{border:0;border-radius:999px;background:var(--uma-color);color:#fff;padding:14px 18px;font-weight:700;cursor:pointer;box-shadow:0 5px 18px rgba(0,0,0,.22)}.uma-sa-panel{position:absolute;right:0;bottom:58px;width:360px;max-width:calc(100vw - 30px);height:500px;background:#fff;border:1px solid #ddd;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.25);overflow:hidden;display:flex;flex-direction:column}.uma-sa-header{background:#111;color:#fff;padding:14px 16px;display:flex;justify-content:space-between;align-items:center}.uma-sa-close{background:none;border:0;color:#fff;font-size:24px;cursor:pointer}.uma-sa-messages{padding:14px;flex:1;overflow:auto;background:#f7f7f7}.uma-sa-msg{max-width:86%;margin:0 0 10px;padding:10px 12px;border-radius:12px;line-height:1.4;white-space:pre-wrap}.uma-sa-msg.user{margin-left:auto;background:#e8e8e8}.uma-sa-msg.assistant{background:#fff;border:1px solid #e3e3e3}.uma-sa-form{display:flex;border-top:1px solid #ddd}.uma-sa-input{flex:1;border:0;padding:13px;min-width:0}.uma-sa-form button{border:0;background:var(--uma-color);color:#fff;padding:0 16px;font-weight:700}.uma-sa-actions{padding:8px;display:flex;gap:6px;border-top:1px solid #eee}.uma-sa-actions button{flex:1;font-size:12px;padding:7px;background:#fff;border:1px solid #ccc;border-radius:6px;cursor:pointer}@media(max-width:600px){.uma-sa-floating-wrap{right:10px;bottom:10px}.uma-sa-panel{position:fixed;right:10px;bottom:70px;width:calc(100vw - 20px);height:min(75vh,560px)}}
.uma-sa-form-panel{padding:12px;background:#fff;border-top:1px solid #ddd;max-height:420px;overflow:auto}.uma-sa-form-title{font-weight:700;margin-bottom:10px}.uma-sa-capture{display:grid;gap:8px}.uma-sa-capture input,.uma-sa-capture select,.uma-sa-capture textarea{width:100%;box-sizing:border-box;border:1px solid #ccc;border-radius:6px;padding:9px;font:inherit}.uma-sa-capture textarea{min-height:60px;resize:vertical}.uma-sa-form-buttons{display:flex;gap:8px}.uma-sa-form-buttons button{flex:1;padding:9px;border:0;border-radius:6px;background:var(--uma-color);color:#fff;font-weight:700;cursor:pointer}.uma-sa-form-buttons button+button{background:#777}.uma-sa-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}

.uma-sa-external-launch{cursor:pointer;border:0;border-radius:6px;padding:10px 16px;background:var(--uma-color,#c8102e);color:#fff;font-weight:700}

.uma-sa-quick-actions{display:flex;gap:6px;flex-wrap:wrap;padding:8px 10px;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#fafafa}
.uma-sa-quick-actions button,.uma-sa-quick-actions a{appearance:none;border:1px solid #ddd;background:#fff;color:#222;border-radius:999px;padding:6px 10px;font-size:12px;line-height:1.2;text-decoration:none;cursor:pointer}
.uma-sa-quick-actions button:hover,.uma-sa-quick-actions a:hover{border-color:var(--uma-color,#c8102e)}
@media (max-width:600px){
  .uma-sa-floating-wrap .uma-sa-root{max-width:calc(100vw - 20px)}
  .uma-sa-panel{max-height:80vh}
  .uma-sa-quick-actions{gap:5px}
  .uma-sa-quick-actions button,.uma-sa-quick-actions a{font-size:11px;padding:6px 8px}
}

/* v0.6.1 compact chatbot */
.uma-sa-panel{width:min(340px,calc(100vw - 24px));max-height:min(560px,calc(100vh - 90px))}
.uma-sa-messages{max-height:260px}
@media (max-width:600px){
  .uma-sa-floating-wrap{right:8px!important;bottom:8px!important}
  .uma-sa-launch{font-size:12px!important;padding:7px 10px!important;min-height:34px!important}
  .uma-sa-panel{width:280px!important;max-width:calc(100vw - 16px)!important;max-height:60vh!important;border-radius:10px!important}
  .uma-sa-header{padding:8px 10px!important;font-size:13px!important}
  .uma-sa-messages{max-height:170px!important;padding:7px!important;font-size:12px!important}
  .uma-sa-msg{padding:6px 8px!important;margin:4px 0!important}
  .uma-sa-quick-actions{padding:5px 6px!important;gap:4px!important}
  .uma-sa-quick-actions button,.uma-sa-quick-actions a{font-size:10px!important;padding:5px 7px!important}
  .uma-sa-form{padding:6px!important;gap:5px!important}
  .uma-sa-input{font-size:12px!important;padding:7px!important}
  .uma-sa-form button{font-size:11px!important;padding:7px 9px!important}
  .uma-sa-actions{padding:5px!important;gap:4px!important}
  .uma-sa-actions button{font-size:10px!important;padding:5px 7px!important}
  .uma-sa-form-panel{padding:8px!important;max-height:300px!important}
}

/* v0.6.2: ensure the close button can actually hide the panel */
.uma-sa-panel[hidden]{display:none!important}

/* Definitively compact mobile footprint */
@media (max-width:600px){
  .uma-sa-floating-wrap{right:6px!important;bottom:6px!important}
  .uma-sa-panel{
    position:fixed!important;
    right:6px!important;
    bottom:58px!important;
    width:260px!important;
    max-width:calc(100vw - 12px)!important;
    height:360px!important;
    max-height:calc(100vh - 80px)!important;
    min-height:0!important;
    border-radius:9px!important;
  }
  .uma-sa-launch{
    font-size:11px!important;
    line-height:1.1!important;
    padding:6px 9px!important;
    min-height:30px!important;
  }
  .uma-sa-header{padding:7px 9px!important;font-size:12px!important}
  .uma-sa-close{font-size:20px!important;line-height:20px!important;padding:0 3px!important}
  .uma-sa-messages{max-height:none!important;padding:6px!important;font-size:11px!important}
  .uma-sa-msg{max-width:90%!important;padding:5px 7px!important;margin:3px 0!important;line-height:1.3!important}
  .uma-sa-quick-actions{padding:4px!important;gap:3px!important}
  .uma-sa-quick-actions button,.uma-sa-quick-actions a{font-size:9px!important;padding:4px 6px!important}
  .uma-sa-actions{padding:4px!important;gap:3px!important}
  .uma-sa-actions button{font-size:9px!important;padding:4px 5px!important}
  .uma-sa-form{min-height:34px!important}
  .uma-sa-input{font-size:11px!important;padding:7px!important}
  .uma-sa-form button{font-size:10px!important;padding:0 9px!important}
}

/* v0.6.3 final state rules */
.uma-sa-panel:not(.uma-sa-open){display:none!important}
.uma-sa-panel.uma-sa-open{display:flex!important}
@media (max-width:600px){
  .uma-sa-floating-wrap{right:5px!important;bottom:5px!important}
  .uma-sa-panel.uma-sa-open{
    width:250px!important;
    max-width:calc(100vw - 10px)!important;
    height:330px!important;
    max-height:calc(100vh - 70px)!important;
    right:5px!important;
    bottom:50px!important;
  }
}

/* v0.6.4: compact mobile mode targets the actual UMA root/panel regardless of theme wrapper */
@media screen and (max-width: 600px){
  .uma-sa-root.uma-sa-compact-mobile{
    --uma-mobile-panel-width:220px;
  }
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-panel{
    width:220px!important;
    max-width:220px!important;
    height:300px!important;
    max-height:calc(100vh - 72px)!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-messages{
    max-height:125px!important;
    min-height:0!important;
  }
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-header{
    min-height:28px!important;
    padding:5px 7px!important;
  }
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-quick-actions{
    max-height:54px!important;
    overflow:hidden!important;
  }
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-form-panel{
    max-height:190px!important;
    overflow:auto!important;
  }
}

/* v0.6.5: mobile compact */
@media screen and (max-width:600px){
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-panel{
    width:220px!important;
    max-width:220px!important;
    height:300px!important;
    max-height:calc(100vh - 72px)!important;
    min-height:0!important;
  }
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-messages{max-height:125px!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-header{padding:5px 7px!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-quick-actions{padding:4px!important;gap:3px!important}
}

/* v0.6.6: extra-small mobile footprint */
@media screen and (max-width:600px){
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-panel{
    width:190px!important;
    max-width:190px!important;
    height:260px!important;
    max-height:calc(100vh - 62px)!important;
    border-radius:8px!important;
  }
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-header{padding:4px 6px!important;font-size:11px!important;min-height:24px!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-close{font-size:17px!important;line-height:17px!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-messages{max-height:105px!important;padding:4px!important;font-size:10px!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-msg{padding:4px 5px!important;margin:2px 0!important;line-height:1.2!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-quick-actions{max-height:43px!important;padding:3px!important;gap:2px!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-quick-actions button,
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-quick-actions a{font-size:8px!important;padding:3px 5px!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-input{font-size:10px!important;padding:5px!important}
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-form button{font-size:9px!important;padding:0 6px!important}
}

/* v0.6.7: hard mobile sizing at every chatbot wrapper level */
@media screen and (max-width:600px){
  .uma-sa-floating-wrap,
  .uma-sa-floating-wrap .uma-sa-root,
  .uma-sa-root.uma-sa-compact-mobile{
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
  }
  .uma-sa-floating-wrap .uma-sa-panel,
  .uma-sa-root.uma-sa-compact-mobile .uma-sa-panel{
    box-sizing:border-box!important;
    width:180px!important;
    max-width:180px!important;
    min-width:180px!important;
    height:240px!important;
    max-height:240px!important;
    min-height:240px!important;
    right:5px!important;
    bottom:46px!important;
  }
  .uma-sa-floating-wrap .uma-sa-panel *{
    box-sizing:border-box!important;
  }
}

@media screen and (max-width:600px){
  body.uma-sa-mobile-host .uma-sa-floating-wrap .uma-sa-panel{
    width:180px!important;
    max-width:180px!important;
    min-width:180px!important;
    height:240px!important;
    max-height:240px!important;
    min-height:240px!important;
  }
}

/* v0.6.9: device-detected mobile sizing. This bypasses unreliable viewport breakpoints. */
.uma-sa-root.uma-sa-device-mobile .uma-sa-panel{
  box-sizing:border-box!important;
  width:220px!important;
  max-width:220px!important;
  min-width:220px!important;
  height:300px!important;
  max-height:300px!important;
  min-height:300px!important;
}
.uma-sa-root.uma-sa-device-mobile .uma-sa-messages{
  max-height:125px!important;
  min-height:0!important;
}
.uma-sa-root.uma-sa-device-mobile .uma-sa-header{
  padding:5px 7px!important;
  font-size:12px!important;
}
.uma-sa-root.uma-sa-device-mobile .uma-sa-quick-actions{
  padding:4px!important;
  gap:3px!important;
}
.uma-sa-root.uma-sa-device-mobile .uma-sa-quick-actions button,
.uma-sa-root.uma-sa-device-mobile .uma-sa-quick-actions a{
  font-size:9px!important;
  padding:4px 6px!important;
}

/* v0.7.0 fallback only; JavaScript applies the same dimensions inline. */
.uma-sa-root.uma-sa-device-mobile .uma-sa-panel{
  width:220px!important;
  max-width:220px!important;
  min-width:220px!important;
  height:300px!important;
  max-height:300px!important;
  min-height:300px!important;
}

/* v0.8.2 final hidden-state rule */
.uma-sa-panel[hidden]{display:none!important}

/* v0.8.3: explicit closed state is set in the HTML before JS initialization. */
