.editor-ui {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 260px;
  background: rgba(12, 20, 30, 0.95);
  border: 1px solid rgba(182, 209, 234, 0.22);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  color: #f4fbff;
  font-size: 0.9rem;
}

.editor-ui.is-hidden {
  display: none;
}

.editor-ui .editor-header {
  cursor: move;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(182, 209, 234, 0.15);
  font-weight: 700;
  user-select: none;
}

.editor-ui .editor-header-actions {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.editor-ui .editor-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.editor-ui .editor-body {
  padding: 0.65rem 0.75rem 0.8rem;
}

.editor-ui .editor-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.editor-ui .editor-btn {
  border: 1px solid rgba(182, 209, 234, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f4fbff;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.editor-ui .editor-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.editor-ui .editor-status {
  margin-top: 0.5rem;
  color: #b9c8d9;
  font-size: 0.8rem;
}

[contenteditable="true"] {
  outline: 1px dashed rgba(126, 230, 255, 0.35);
  outline-offset: 2px;
}

.editor-image-target {
  outline: 2px solid rgba(50, 208, 127, 0.8) !important;
  outline-offset: 3px;
}

.agent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 14, 0.72);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.agent-modal-overlay.is-hidden {
  display: none;
}

.agent-modal {
  width: min(1100px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: rgba(12, 20, 30, 0.97);
  border: 1px solid rgba(182, 209, 234, 0.22);
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
  color: #f4fbff;
  padding: 0.8rem;
}

.agent-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.agent-modal__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.agent-modal__section {
  border: 1px solid rgba(182, 209, 234, 0.18);
  border-radius: 10px;
  padding: 0.7rem;
}

.agent-modal__section h3 {
  margin-top: 0;
  margin-bottom: 0.55rem;
  color: #f4fbff;
}

.agent-modal__section label {
  color: #d4e7f6;
}

.agent-modal__section textarea,
.agent-modal__section input,
.agent-modal__section select {
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(182, 209, 234, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: #f4fbff;
}

.agent-modal__log-section {
  margin-top: 0.9rem;
}

@media (max-width: 860px) {
  .agent-modal__columns {
    grid-template-columns: 1fr;
  }
}
