/* WC Agente IA - Frontend */
.wcai-ask-box{display:flex;gap:.5rem;margin:1rem 0 0 0}
.wcai-ask-box .wcai-input{flex:1;padding:.6rem .8rem;border:1px solid #ddd;border-radius:6px}
.wcai-ask-box .wcai-ask-btn{background:#2b7cff;color:#fff;border:none;border-radius:6px;padding:.6rem 1rem;cursor:pointer}
.wcai-ask-box .wcai-ask-btn:disabled{opacity:.6;cursor:not-allowed}

.wcai-modal{position:fixed;inset:0;display:none;z-index:2147483647 !important}
.wcai-modal[aria-hidden="false"]{display:block}
.wcai-modal__overlay{position:absolute;inset:0;background:rgba(0,0,0,.5);backdrop-filter:saturate(150%) blur(2px);z-index:2147483646 !important}
.wcai-modal__dialog{position:relative;margin:5vh auto 0 auto;width:min(720px,92vw);background:#fff;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.2);padding:1rem 1.2rem 1.2rem 1.2rem;z-index:2147483647 !important}
.wcai-modal__close{position:absolute;right:.6rem;top:.4rem;background:transparent;border:none;font-size:1.8rem;line-height:1;color:#444;cursor:pointer}
.wcai-modal__content{max-height:65vh;overflow:auto;padding-top:.8rem}

/* Máquina de escrever */
#wcai-typing{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;white-space:pre-wrap;border-left:3px solid #2b7cff;padding-left:.8rem}

/* Forçar modal por cima de qualquer elemento do tema quando aberto */
body.wcai-modal-open {
  overflow: hidden !important;
}
body.wcai-modal-open .wcai-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 2147483647 !important;
}
/* Força TODOS os elementos da página abaixo do modal */
body.wcai-modal-open > *:not(.wcai-modal),
body.wcai-modal-open * {
  z-index: 1 !important;
  position: relative !important;
}
/* Garante que o modal e seus filhos fiquem no topo */
body.wcai-modal-open .wcai-modal,
body.wcai-modal-open .wcai-modal * {
  z-index: 2147483647 !important;
}
