/* Vchat 0.36.60 — AI editor interaction + modal hardening */
.vchat-frontend-app #vchat-modal.is-ai-editor{
  display:grid!important;
  place-items:center!important;
  padding:22px!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-dialog{
  width:min(820px,calc(100vw - 44px))!important;
  max-width:820px!important;
  max-height:min(90dvh,900px)!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
  pointer-events:auto!important;
  position:relative!important;
  z-index:1000021!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-head{
  position:relative!important;
  z-index:6!important;
  padding:18px 20px!important;
  background:#fff!important;
  pointer-events:auto!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-body{
  min-height:0!important;
  max-height:none!important;
  height:100%!important;
  padding:20px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  scroll-behavior:auto!important;
  pointer-events:auto!important;
  position:relative!important;
  z-index:2!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-editor,
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-editor *{
  box-sizing:border-box!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-editor{
  position:relative!important;
  z-index:3!important;
  pointer-events:auto!important;
  gap:18px!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-editor-intro{
  margin:0 0 2px!important;
  padding:14px!important;
  border:1px solid #e4deed!important;
  border-radius:14px!important;
  background:#faf9fd!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-settings-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:15px!important;
  align-items:start!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-field-full{grid-column:1/-1!important}
.vchat-frontend-app #vchat-modal.is-ai-editor label,
.vchat-frontend-app #vchat-modal.is-ai-editor input,
.vchat-frontend-app #vchat-modal.is-ai-editor select,
.vchat-frontend-app #vchat-modal.is-ai-editor textarea,
.vchat-frontend-app #vchat-modal.is-ai-editor button{
  pointer-events:auto!important;
  position:relative!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor input:not([type="checkbox"]):not([type="radio"]),
.vchat-frontend-app #vchat-modal.is-ai-editor select,
.vchat-frontend-app #vchat-modal.is-ai-editor textarea{
  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-size:12px!important;
  line-height:1.4!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor textarea{resize:vertical!important}
.vchat-frontend-app #vchat-modal.is-ai-editor input[type="checkbox"],
.vchat-frontend-app #vchat-modal.is-ai-editor input[type="radio"]{
  display:block!important;
  flex:0 0 18px!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  margin:1px 0 0!important;
  padding:0!important;
  opacity:1!important;
  visibility:visible!important;
  cursor:pointer!important;
  appearance:auto!important;
  -webkit-appearance:auto!important;
  z-index:5!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-editor-section{
  padding:18px!important;
  margin:0!important;
  overflow:visible!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-check-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  margin-top:13px!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-check-grid>label{
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
  min-width:0!important;
  min-height:64px!important;
  margin:0!important;
  padding:13px!important;
  cursor:pointer!important;
  overflow:hidden!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-check-grid>label span{min-width:0!important;pointer-events:none!important}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-check-grid>label b,
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-check-grid>label small{
  overflow-wrap:anywhere!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-channel-checks{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin-top:13px!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-channel-checks label{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  min-width:0!important;
  min-height:48px!important;
  margin:0!important;
  padding:11px 12px!important;
  border:1px solid #e0dae9!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#342f49!important;
  font-size:10.5px!important;
  line-height:1.25!important;
  cursor:pointer!important;
  white-space:normal!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .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-frontend-app #vchat-modal.is-ai-editor .vchat-ai-route-options>label{
  margin:0!important;
  padding:14px!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-auto-toggle{
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
  cursor:pointer!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-auto-toggle span{pointer-events:none!important}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-actions{
  position:sticky!important;
  bottom:-20px!important;
  z-index:10!important;
  margin:20px -20px -20px!important;
  padding:14px 20px calc(14px + env(safe-area-inset-bottom))!important;
  border-top:1px solid #e5e0ec!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-actions button{
  min-height:42px!important;
  padding:0 16px!important;
  cursor:pointer!important;
  z-index:12!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-actions button.primary{
  background:#5a49a4!important;
  color:#fff!important;
  border-color:#5a49a4!important;
}
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-actions button.primary:hover,
.vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-actions button.primary:focus{
  background:#493b89!important;
  color:#fff!important;
}
@media(max-width:760px){
  .vchat-frontend-app #vchat-modal.is-ai-editor{align-items:end!important;padding:0!important}
  .vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-dialog{width:100%!important;max-width:none!important;max-height:92dvh!important;border-radius:22px 22px 0 0!important}
  .vchat-frontend-app #vchat-modal.is-ai-editor .vchat-settings-grid,
  .vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-check-grid,
  .vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-channel-checks,
  .vchat-frontend-app #vchat-modal.is-ai-editor .vchat-ai-route-options{grid-template-columns:1fr!important}
  .vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-body{padding:16px!important}
  .vchat-frontend-app #vchat-modal.is-ai-editor .vchat-modal-actions{bottom:-16px!important;margin:18px -16px -16px!important;padding-left:16px!important;padding-right:16px!important}
}
