#ai-popup {
  position: absolute;
  left: 0;
  right: 0;
  top: 80px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 16px 20px 12px 20px;
  z-index: 998;
  border-radius: 8px;
  min-width: 320px;
  width: calc(100% - 30px);
  margin: 15px;
}
#ai-popup .ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
#ai-popup .ai-header span {
  font-weight: bold;
}
#ai-popup .ai-header #ai-cancel {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  border-radius: 5px;
}
#ai-popup .ai-header #ai-cancel:hover {
  background: lightblue;
}

#ai-popup #ai-preview {
  display: none;
  margin-bottom: 4px;
  padding: 10px;
  background: #f7f7f7;
  border-radius: 4px;
  border: 1px solid #eee;
  color: #222;
  max-height: 180px;
  overflow: auto;
  position: relative;
}
#ai-popup #ai-actions {
  display: none;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}
#ai-popup #ai-actions span {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
#ai-popup #ai-insert {
  background: #0060ce;
  color: white;
}

#ai-popup #ai-insert.desactived {
    background-color: #006ce7;
    color: rgba(255, 255, 255, .5);
    cursor: not-allowed;
}

#ai-popup #ai-retry {
  background-color: #e3e3e3;
  color: black;
}

#ai-popup #ai-retry.desactived {
    background-color: #f0f0f0;
    color: rgba(34, 47, 62, .5);
    cursor: not-allowed;
}

#ai-popup #ai-stop {
  background-color: #e3e3e3;
  color: black;
}

#ai-popup #ai-stop.desactived {
    background-color: #f0f0f0;
    color: rgba(34, 47, 62, .5);
    cursor: not-allowed;
}

#ai-popup .ai-input-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
#ai-popup #ai-input {
  flex: 1;
  padding: 2px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#ai-popup #ai-send {
  padding: 5px;
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
#ai-popup #ai-send.desactived{
    background: grey;
    cursor:not-allowed
}
#ai-popup #ai-loader {
  position: absolute;
  display: none;
  text-align: center;
  margin-bottom: 8px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,.75);
  z-index: 10;
}
#ai-popup #ai-loader .ai-loader-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

#ai-popup #ai-loader img {
  width: 30px;
}

.tox-tinymce-aux{
  z-index: 997!important;
}