/* Shared styles for <HtmlEditor/> (Quill snow) — used by all admin email/description fields. */
.html-editor-wrapper .ql-toolbar.ql-snow {
  border-color: #e2e8f0;
  border-radius: 8px 8px 0 0;
  flex-wrap: wrap;
  row-gap: 4px;
}

.html-editor-wrapper .ql-container.ql-snow {
  border-color: #e2e8f0;
  border-radius: 0 0 8px 8px;
  font-size: 15px;
}

.html-editor-wrapper .ql-editor {
  min-height: inherit;
  /* Optional caller-set cap (HtmlEditor MaxHeight → --ql-editor-max-h): the content area
     scrolls internally past this height instead of growing the whole page. The toolbar is a
     sibling, so it stays fixed above the scroll area. Unset = none (unbounded, no scroll). */
  max-height: var(--ql-editor-max-h, none);
  overflow-y: auto;
}

/* Images: default responsive; actual width comes from inline style when user resizes. */
.html-editor-wrapper .ql-editor img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  cursor: pointer;
  border-radius: 4px;
}

/* Keep toolbar usable on smaller widths. */
.html-editor-wrapper .ql-snow .ql-formats {
  margin-right: 8px;
}

/* Floating size bar (created in html-editor.js) */
#ae-quill-image-bar.ae-quill-image-bar {
  display: none;
  position: fixed;
  z-index: 10000;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(420px, calc(100vw - 16px));
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  font-family: var(--bs-font-sans-serif, system-ui, sans-serif);
}

.ae-quill-image-bar__label {
  font-weight: 600;
  color: #64748b;
  margin-right: 2px;
}

.ae-quill-image-bar button {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  border-radius: 6px;
  padding: 4px 8px;
  line-height: 1.2;
  cursor: pointer;
  font-size: 12px;
}

.ae-quill-image-bar button:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e293b;
}

.ae-quill-image-bar__sep {
  width: 1px;
  height: 20px;
  background: #e2e8f0;
  margin: 0 2px;
}

.ae-quill-image-bar__input {
  width: 7rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}

.ae-quill-image-bar__apply {
  font-weight: 600;
}
