/* Smart Web Apps — HTML WYSIWYG Editor (Quill)
 * - Make Quill Snow theme feel native in Smart Web Apps dark mode.
 */

.swa-quill-wrap {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  overflow: hidden;
}

/* Preview iframe (matches card style) */
.swa-preview-wrap {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
  min-height: 420px;
}

.swa-preview-wrap iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  background: #ffffff;
  resize: vertical;
  overflow: auto;
}

/* Quill toolbar/container */
html[data-bs-theme="dark"] .ql-toolbar.ql-snow {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  background: rgba(0, 0, 0, 0.18);
}
html[data-bs-theme="dark"] .ql-container.ql-snow {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.12);
}

html[data-bs-theme="dark"] .ql-toolbar.ql-snow .ql-stroke {
  stroke: rgba(255, 255, 255, 0.82);
}
html[data-bs-theme="dark"] .ql-toolbar.ql-snow .ql-fill {
  fill: rgba(255, 255, 255, 0.82);
}
html[data-bs-theme="dark"] .ql-toolbar.ql-snow .ql-picker {
  color: rgba(255, 255, 255, 0.9);
}
html[data-bs-theme="dark"] .ql-toolbar.ql-snow .ql-picker-options {
  background: #1b1f23;
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-bs-theme="dark"] .ql-editor {
  min-height: 320px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

html[data-bs-theme="dark"] .ql-editor.ql-blank::before {
  color: rgba(255, 255, 255, 0.45);
}

/* Keep dropdowns visible above cards */
.ql-container {
  position: relative;
  z-index: 0;
}
.ql-toolbar {
  position: relative;
  z-index: 1;
}
