/* Vchat 0.36.62 — isolated AI Agent Studio modal */
html.vchat-ai-editor-open{overflow:hidden!important}
.vchat-ai-editor-overlay{
  position:fixed!important;inset:0!important;z-index:2147483638!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:24px!important;background:rgba(24,20,47,.52)!important;
  backdrop-filter:blur(7px)!important;-webkit-backdrop-filter:blur(7px)!important;
  opacity:0!important;visibility:hidden!important;pointer-events:none!important;
  transition:opacity .14s ease,visibility .14s ease!important;
  box-sizing:border-box!important;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
.vchat-ai-editor-overlay.is-open{opacity:1!important;visibility:visible!important;pointer-events:auto!important}
.vchat-ai-editor-dialog{
  position:relative!important;z-index:2!important;width:min(820px,calc(100vw - 48px))!important;
  max-height:calc(100dvh - 48px)!important;display:flex!important;flex-direction:column!important;
  overflow:hidden!important;border:1px solid #ded8ea!important;border-radius:22px!important;
  background:#fff!important;box-shadow:0 34px 100px rgba(24,20,47,.32)!important;
  color:#28243e!important;pointer-events:auto!important;isolation:isolate!important;
}
.vchat-ai-editor-head{flex:0 0 auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important;padding:18px 20px!important;border-bottom:1px solid #e9e5f0!important;background:#fff!important}
.vchat-ai-editor-head div{min-width:0!important}.vchat-ai-editor-head small{display:block!important;margin-bottom:3px!important;color:#7568b4!important;font-size:9px!important;font-weight:900!important;letter-spacing:.08em!important;text-transform:uppercase!important}.vchat-ai-editor-head strong{display:block!important;color:#25213c!important;font-size:18px!important;line-height:1.2!important}
.vchat-ai-editor-close{flex:0 0 38px!important;width:38px!important;height:38px!important;display:grid!important;place-items:center!important;margin:0!important;padding:0!important;border:0!important;border-radius:12px!important;background:#f1eef9!important;color:#594a9f!important;font:500 24px/1 inherit!important;cursor:pointer!important;pointer-events:auto!important}
.vchat-ai-editor-scroll{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:20px!important;overscroll-behavior:contain!important;pointer-events:auto!important;background:#fbfafd!important}
.vchat-ai-editor-overlay #vchat-ai-agent-form,.vchat-ai-editor-overlay #vchat-ai-agent-form *{box-sizing:border-box!important;pointer-events:auto!important}
.vchat-ai-editor-overlay #vchat-ai-agent-form{display:grid!important;gap:17px!important;margin:0!important;position:relative!important}
.vchat-ai-editor-overlay .vchat-ai-editor-intro{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;gap:12px!important;align-items:center!important;padding:14px!important;border:1px solid #e4dfed!important;border-radius:15px!important;background:#fff!important}
.vchat-ai-editor-overlay .vchat-ai-editor-intro>span{width:44px!important;height:44px!important;display:grid!important;place-items:center!important;border-radius:13px!important;background:#ece7fb!important;color:#5a49a4!important;font-size:11px!important;font-weight:900!important}.vchat-ai-editor-overlay .vchat-ai-editor-intro strong{font-size:13px!important}.vchat-ai-editor-overlay .vchat-ai-editor-intro p{margin:4px 0 0!important;color:#7d7689!important;font-size:10.5px!important;line-height:1.45!important}
.vchat-ai-editor-overlay .vchat-settings-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:15px 14px!important}.vchat-ai-editor-overlay .vchat-field-full{grid-column:1/-1!important}
.vchat-ai-editor-overlay label{display:block!important;margin:0!important;color:#312c47!important;font-size:10.5px!important;font-weight:800!important;line-height:1.35!important;cursor:default!important}
.vchat-ai-editor-overlay input:not([type=checkbox]),.vchat-ai-editor-overlay select,.vchat-ai-editor-overlay textarea{display:block!important;width:100%!important;min-width:0!important;margin-top:7px!important;padding:11px 12px!important;border:1px solid #d9d3e5!important;border-radius:11px!important;background:#fff!important;color:#2d2940!important;font:600 12px/1.4 inherit!important;outline:none!important;pointer-events:auto!important}.vchat-ai-editor-overlay input:not([type=checkbox]):focus,.vchat-ai-editor-overlay select:focus,.vchat-ai-editor-overlay textarea:focus{border-color:#6754b5!important;box-shadow:0 0 0 3px rgba(103,84,181,.10)!important}.vchat-ai-editor-overlay textarea{resize:vertical!important}.vchat-ai-editor-overlay input[disabled]{background:#f3f1f7!important;color:#8a8496!important}
.vchat-ai-editor-overlay .vchat-ai-editor-section{padding:18px!important;border:1px solid #e4deed!important;border-radius:15px!important;background:#fff!important;overflow:visible!important}.vchat-ai-editor-overlay .vchat-ai-editor-section>strong{display:block!important;margin:0 0 5px!important;font-size:13px!important;line-height:1.3!important}.vchat-ai-editor-overlay .vchat-ai-editor-section>p{margin:0!important;color:#847d90!important;font-size:10.5px!important;line-height:1.5!important}
.vchat-ai-editor-overlay .vchat-ai-check-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important;margin-top:13px!important}.vchat-ai-editor-overlay .vchat-ai-check-grid>label,.vchat-ai-editor-overlay .vchat-ai-channel-checks>label,.vchat-ai-editor-overlay .vchat-ai-auto-toggle{position:relative!important;cursor:pointer!important;user-select:none!important;-webkit-user-select:none!important;touch-action:manipulation!important}
.vchat-ai-editor-overlay .vchat-ai-check-grid>label{display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;gap:10px!important;align-items:start!important;min-height:72px!important;padding:13px!important;border:1px solid #dfd9ea!important;border-radius:12px!important;background:#fff!important}.vchat-ai-editor-overlay .vchat-ai-check-grid>label:hover,.vchat-ai-editor-overlay .vchat-ai-channel-checks>label:hover,.vchat-ai-editor-overlay .vchat-ai-auto-toggle:hover{border-color:#b8addc!important;background:#faf8ff!important}.vchat-ai-editor-overlay .vchat-ai-check-grid>label.is-selected,.vchat-ai-editor-overlay .vchat-ai-channel-checks>label.is-selected,.vchat-ai-editor-overlay .vchat-ai-auto-toggle.is-selected{border-color:#6754b5!important;background:#f2efff!important;box-shadow:0 0 0 2px rgba(103,84,181,.09)!important}.vchat-ai-editor-overlay .vchat-ai-check-grid>label span{min-width:0!important}.vchat-ai-editor-overlay .vchat-ai-check-grid b{display:block!important;font-size:11px!important}.vchat-ai-editor-overlay .vchat-ai-check-grid small{display:block!important;margin-top:4px!important;color:#8b8599!important;font-size:9px!important}
.vchat-ai-editor-overlay input[type=checkbox]{position:relative!important;display:block!important;flex:0 0 20px!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;margin:0!important;padding:0!important;opacity:1!important;visibility:visible!important;appearance:auto!important;-webkit-appearance:auto!important;accent-color:#6754b5!important;cursor:pointer!important;pointer-events:auto!important}
.vchat-ai-editor-overlay .vchat-ai-channel-checks{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin-top:13px!important}.vchat-ai-editor-overlay .vchat-ai-channel-checks>label{display:flex!important;align-items:center!important;gap:9px!important;min-height:50px!important;padding:11px 12px!important;border:1px solid #dfd9ea!important;border-radius:11px!important;background:#fff!important;color:#342f49!important;font-size:11px!important;font-weight:800!important}
.vchat-ai-editor-overlay .vchat-ai-route-options{display:grid!important;grid-template-columns:minmax(180px,.55fr) minmax(0,1fr)!important;gap:12px!important;margin-top:14px!important}.vchat-ai-editor-overlay .vchat-ai-route-options>label{padding:14px!important;border:1px solid #e3deec!important;border-radius:12px!important}.vchat-ai-editor-overlay .vchat-ai-auto-toggle{display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;gap:10px!important;align-items:start!important}.vchat-ai-editor-overlay .vchat-ai-auto-toggle b,.vchat-ai-editor-overlay .vchat-ai-auto-toggle small{display:block!important}.vchat-ai-editor-overlay .vchat-ai-auto-toggle small{margin-top:4px!important;color:#817a90!important;font-size:9px!important}
.vchat-ai-editor-overlay .vchat-ai-routing-explainer{display:grid!important;grid-template-columns:40px minmax(0,1fr)!important;gap:11px!important;align-items:center!important;padding:14px!important;border:1px solid #ded8eb!important;border-radius:14px!important;background:#f7f4ff!important}.vchat-ai-editor-overlay .vchat-ai-routing-explainer>span{width:40px!important;height:40px!important;display:grid!important;place-items:center!important;border-radius:12px!important;background:#6754b5!important;color:#fff!important;font-size:17px!important}.vchat-ai-editor-overlay .vchat-ai-routing-explainer strong{font-size:11.5px!important}.vchat-ai-editor-overlay .vchat-ai-routing-explainer p{margin:3px 0 0!important;color:#777083!important;font-size:9.5px!important;line-height:1.45!important}
.vchat-ai-editor-overlay .vchat-modal-actions{position:sticky!important;bottom:-20px!important;z-index:5!important;display:flex!important;justify-content:flex-end!important;gap:9px!important;margin:4px -20px -20px!important;padding:14px 20px!important;border-top:1px solid #e5e0ec!important;background:rgba(255,255,255,.98)!important;backdrop-filter:blur(10px)!important}.vchat-ai-editor-overlay .vchat-modal-actions button{min-height:42px!important;padding:0 16px!important;border:1px solid #ded8eb!important;border-radius:11px!important;background:#fff!important;color:#594a9f!important;font-size:10.5px!important;font-weight:850!important;cursor:pointer!important;pointer-events:auto!important}.vchat-ai-editor-overlay .vchat-modal-actions button.primary{min-width:155px!important;border-color:#5a49a4!important;background:#5a49a4!important;color:#fff!important}.vchat-ai-editor-overlay .vchat-modal-actions button.primary:hover{background:#493b89!important}.vchat-ai-editor-overlay .vchat-modal-actions button:disabled{opacity:.62!important;cursor:wait!important}
/* Toasts must always remain readable over every modal/overlay. */
body .vchat-toast,#vchat-toast{z-index:2147483647!important;pointer-events:none!important}
@media(max-width:760px){.vchat-ai-editor-overlay{align-items:flex-end!important;padding:0!important}.vchat-ai-editor-dialog{width:100%!important;max-height:94dvh!important;border-radius:24px 24px 0 0!important}.vchat-ai-editor-scroll{padding:16px!important}.vchat-ai-editor-overlay .vchat-settings-grid,.vchat-ai-editor-overlay .vchat-ai-route-options{grid-template-columns:1fr!important}.vchat-ai-editor-overlay .vchat-ai-check-grid,.vchat-ai-editor-overlay .vchat-ai-channel-checks{grid-template-columns:1fr 1fr!important}.vchat-ai-editor-overlay .vchat-modal-actions{bottom:-16px!important;margin:4px -16px -16px!important;padding:14px 16px calc(14px + env(safe-area-inset-bottom))!important}}
@media(max-width:440px){.vchat-ai-editor-overlay .vchat-ai-check-grid,.vchat-ai-editor-overlay .vchat-ai-channel-checks{grid-template-columns:1fr!important}.vchat-ai-editor-overlay .vchat-modal-actions{display:grid!important;grid-template-columns:1fr 1.35fr!important}.vchat-ai-editor-overlay .vchat-modal-actions button{width:100%!important}}
