.ecb {
  --ecb-border: #e5e7eb;
  --ecb-muted: #6b7280;
  --ecb-text: #111827;
  --ecb-bg: #f8fafc;
  --ecb-panel: #ffffff;
  --ecb-accent: #2563eb;
  --ecb-accent-soft: #eff6ff;
  --ecb-danger: #dc2626;
  --ecb-radius: 10px;
  display: flex;
  position: relative;
  min-height: 560px;
  height: calc(100vh - 220px);
  max-height: 920px;
  border: 1px solid var(--ecb-border);
  border-radius: var(--ecb-radius);
  background: var(--ecb-panel);
  overflow: hidden;
  color: var(--ecb-text);
  font-size: 14px;
}

.ecb * {
  box-sizing: border-box;
}

.ecb-sidebar {
  width: 340px;
  min-width: 300px;
  min-height: 0;
  position: relative;
  z-index: 0;
  border-right: 1px solid var(--ecb-border);
  background: var(--ecb-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 0 0 auto;
  transition: width .22s ease, min-width .22s ease;
}

.ecb-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--ecb-border);
  background: var(--ecb-panel);
  flex: 0 0 auto;
}

.ecb-sidebar__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ecb-muted);
}

.ecb-icon-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ecb-muted);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.ecb-icon-btn:hover {
  background: #f3f4f6;
  color: var(--ecb-text);
  border-color: var(--ecb-border);
}

.ecb.is-sidebar-collapsed .ecb-sidebar {
  width: 48px;
  min-width: 48px;
  cursor: pointer;
}

.ecb.is-sidebar-collapsed .ecb-sidebar__body,
.ecb.is-sidebar-collapsed .ecb-sidebar__foot {
  display: none;
}

.ecb.is-sidebar-collapsed .ecb-sidebar__head {
  flex: 1;
  flex-direction: column-reverse;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  padding: 12px 0 16px;
  border-bottom: 0;
}

.ecb.is-sidebar-collapsed .ecb-sidebar__title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: .12em;
}

.ecb.is-sidebar-collapsed .ecb-icon-btn svg {
  transform: scaleX(-1);
}

.ecb-sidebar__body {
  flex: 1;
  overflow: auto;
  padding: 12px;
}

.ecb-sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--ecb-border);
  background: var(--ecb-panel);
}

.ecb-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  background: var(--ecb-panel);
}

.ecb-main__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ecb-main__body > .ecb-empty,
.ecb-main__body > .ecb-skeleton {
  padding: 24px;
}

.ecb-empty {
  height: 100%;
  min-height: 280px;
  display: grid;
  place-items: center;
  color: var(--ecb-muted);
  text-align: center;
}

.ecb-module {
  background: var(--ecb-panel);
  border: 1px solid var(--ecb-border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.ecb-module.is-collapsed .ecb-module__lessons,
.ecb-module.is-collapsed .ecb-module__actions {
  display: none;
}

.ecb-module__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 8px;
  cursor: pointer;
  user-select: none;
}

.ecb-module__head:hover {
  background: #f9fafb;
}

.ecb-handle {
  width: 18px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  cursor: grab;
  flex: 0 0 auto;
}

.ecb-handle:active {
  cursor: grabbing;
}

.ecb-module__title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.ecb-chevron {
  border: 0;
  background: transparent;
  color: var(--ecb-muted);
  padding: 4px;
  line-height: 1;
}

.ecb-module__lessons {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
  min-height: 8px;
}

.ecb-lesson {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 4px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}

.ecb-lesson:hover {
  background: #f3f4f6;
}

.ecb-lesson.is-active {
  background: var(--ecb-accent-soft);
  border-color: #bfdbfe;
  box-shadow: inset 3px 0 0 var(--ecb-accent);
}

.ecb-lesson__icon {
  width: 18px;
  color: var(--ecb-muted);
  flex: 0 0 auto;
}

.ecb-lesson__title {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.ecb-lesson.is-draft .ecb-lesson__title {
  color: var(--ecb-muted);
}

.ecb-lesson__status {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #d1d5db;
  background: transparent;
  color: #6b7280;
  line-height: 1.4;
}

.ecb-lesson.is-published .ecb-lesson__status {
  background: #e8efe9;
  border-color: #b7c9ba;
  color: #3a5340;
}

.ecb-lesson.is-draft .ecb-lesson__status {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.ecb-module__actions {
  display: flex;
  gap: 8px;
  padding: 0 10px 10px;
}

.ecb-btn {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 4px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.ecb-btn:hover {
  background: #f3f4f6;
  border-color: #c4c4c8;
  color: #111827;
}

.ecb-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.ecb-btn.is-loading {
  opacity: 1;
  pointer-events: none;
}

.ecb-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ecb-spin .6s linear infinite;
  flex: 0 0 auto;
}

.ecb-btn--primary {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}

.ecb-btn--primary:hover {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.ecb-btn--publish {
  background: #e8efe9;
  border-color: #b7c9ba;
  color: #3a5340;
}

.ecb-btn--publish:hover {
  background: #dce8de;
  border-color: #9fb5a3;
  color: #2d4233;
}

.ecb-btn--danger {
  background: #fff;
  color: #7f3d3d;
  border-color: #d7b6b6;
}

.ecb-btn--danger:hover {
  background: #f8eeee;
  border-color: #c79a9a;
  color: #6b2f2f;
}

.ecb-btn--block {
  width: 100%;
}

.ecb-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ecb-muted);
}

.ecb-btn--ghost:hover {
  background: #f3f4f6;
  color: var(--ecb-text);
}

.ecb-btn--sm {
  padding: 6px 10px;
  font-size: 12px;
}

.ecb-editor__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ecb-editor__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 3px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #4b5563;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ecb-editor__badge.is-live {
  background: #e8efe9;
  border-color: #b7c9ba;
  color: #3a5340;
}

.ecb-editor__badge.is-draft {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.ecb-editor__badge.is-unsaved {
  display: none;
  background: #f3eee6;
  border-color: #d9cbb8;
  color: #6b5740;
}

.ecb.is-dirty .ecb-editor__badge.is-unsaved {
  display: inline-flex;
}

.ecb-editor__heading {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
}

.ecb-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.ecb-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ecb-muted);
}

.ecb-field {
  margin-bottom: 16px;
}

.ecb-field > label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 12px;
  color: var(--ecb-muted);
}

.ecb-field--title {
  margin: 0 0 20px;
}

.ecb-field--title input,
.ecb .ecb-title-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ecb-border);
  border-radius: 0;
  padding: 2px 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  background: transparent;
}

.ecb-field--title input:focus,
.ecb .ecb-title-input:focus {
  outline: none;
  border-color: transparent;
  border-bottom-color: var(--ecb-accent);
  box-shadow: none;
}

.ecb-field input:not([type="checkbox"]):not([type="radio"]):not(.ecb-title-input),
.ecb-field textarea,
.ecb-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--ecb-border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  background: #fff;
}

.ecb-field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7280' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.ecb-field textarea {
  min-height: 120px;
  resize: vertical;
}

.ecb-field input:not(.ecb-title-input):focus,
.ecb-field textarea:focus,
.ecb-field select:focus {
  outline: 2px solid #bfdbfe;
  border-color: var(--ecb-accent);
}

.ecb-hint {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 12px;
}

.ecb-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.ecb-field-row .ecb-field {
  flex: 1;
}

.ecb-field--currency {
  flex: 0 0 140px;
}

.ecb-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--ecb-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.ecb-checks .ecb-check {
  margin: 0;
}

.ecb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.ecb-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ecb-editor__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px 24px 20px;
}

.ecb-editor__scroll > .ecb-block:first-of-type,
.ecb-editor__scroll > [data-content-block] > .ecb-block:first-child {
  margin-top: 0;
}

.ecb-toast {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 40;
  max-width: min(360px, calc(100% - 32px));
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: translateY(-8px);
  transition: .2s ease;
  pointer-events: none;
}

.ecb-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ecb-toast.is-error {
  background: #991b1b;
}

.ecb-content-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ecb-border);
  border-radius: 8px;
  overflow: hidden;
}

.ecb-content-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ecb-border);
}

.ecb-content-list li:last-child {
  border-bottom: 0;
}

.ecb-content-list a {
  color: var(--ecb-accent);
  text-decoration: none;
  font-weight: 500;
}

.ecb-muted {
  color: var(--ecb-muted);
}

.ecb-sortable-ghost {
  opacity: .45;
}

.ecb-sortable-chosen {
  background: #fffbeb;
}

.ecb-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 50;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border-radius: var(--ecb-radius) var(--ecb-radius) 0 0;
  background: transparent;
}

.ecb.is-busy .ecb-progress {
  opacity: 1;
}

.ecb-progress__bar {
  height: 100%;
  width: 32%;
  background: var(--ecb-accent);
  border-radius: 0 2px 2px 0;
  animation: ecb-progress-slide 1.05s ease-in-out infinite;
}

.ecb.is-busy {
  cursor: progress;
}

.ecb.is-busy .ecb-sidebar,
.ecb.is-busy .ecb-main__body,
.ecb.is-busy .ecb-actions--bar,
.ecb.is-busy .ecb-sidebar__foot {
  pointer-events: none;
}

.ecb.is-busy .ecb-icon-btn {
  pointer-events: auto;
}

.ecb-busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(3px);
  color: var(--ecb-muted);
  font-size: 13px;
  pointer-events: none;
}

.ecb.is-busy--overlay .ecb-busy-overlay {
  display: flex;
  pointer-events: auto;
}

.ecb-busy-overlay .ecb-spinner {
  width: 26px;
  height: 26px;
  border-width: 2.5px;
  border-color: #dbe4f0;
  border-right-color: transparent;
  color: var(--ecb-accent);
}

@keyframes ecb-spin {
  to { transform: rotate(360deg); }
}

@keyframes ecb-progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(380%); }
}

.ecb-actions--bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 12px 24px;
  border-top: 1px solid var(--ecb-border);
  background: #fff;
  box-shadow: 0 -6px 16px rgba(15, 23, 42, .05);
  z-index: 4;
}

.ecb-btn--delete {
  margin-left: auto;
}

.ecb-block {
  border: 1px solid var(--ecb-border);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  background: #fff;
}

.ecb-block--notes {
  background: var(--ecb-bg);
  margin-top: 20px;
}

.ecb-block__head {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ecb-muted);
}

.ecb-block__head strong {
  font-weight: 600;
}

.ecb-preview {
  margin-top: 8px;
}

.ecb-preview a {
  color: var(--ecb-accent);
  font-weight: 500;
  text-decoration: none;
}

.ecb-media-preview {
  margin-top: 14px;
  border: 1px solid var(--ecb-border);
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
}

.ecb-media-preview--empty,
.ecb-media-preview__fallback {
  background: #f8fafc;
  color: var(--ecb-muted);
  padding: 18px;
  text-align: center;
}

.ecb-media-preview__fallback a,
.ecb-media-preview__meta a {
  color: var(--ecb-accent);
  text-decoration: none;
  font-weight: 500;
}

.ecb-media-preview__ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.ecb-media-preview__ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ecb-media-preview__video {
  display: block;
  width: 100%;
  max-height: 420px;
  background: #000;
}

.ecb-media-preview__image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #111827;
}

.ecb-media-preview__frame {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  background: #fff;
}

.ecb-media-preview__meta {
  padding: 8px 12px;
  background: #fff;
  border-top: 1px solid var(--ecb-border);
  font-size: 13px;
}

.ecb-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
}

.ecb-question {
  border: 1px solid var(--ecb-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fafafa;
}

.ecb-question__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ecb-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.ecb-choice .ecb-check {
  margin: 0;
  white-space: nowrap;
}

.ecb-choice [data-remove-choice] {
  position: relative;
  z-index: 1;
}

.ecb-choice input[data-choice-content] {
  width: 100%;
  border: 1px solid var(--ecb-border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

@media (max-width: 720px) {
  .ecb-choice {
    grid-template-columns: 1fr;
  }

  .ecb-field-row {
    flex-direction: column;
  }

  .ecb-field--currency {
    flex: 1 1 auto;
  }
}

@media (max-width: 960px) {
  .ecb {
    flex-direction: column;
    min-height: auto;
    height: auto;
    max-height: none;
  }

  .ecb-sidebar {
    width: 100%;
    min-width: 0;
    max-height: 40vh;
  }

  .ecb.is-sidebar-collapsed .ecb-sidebar {
    width: 100%;
    min-width: 0;
    max-height: 48px;
  }

  .ecb.is-sidebar-collapsed .ecb-sidebar__head {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 8px 16px;
  }

  .ecb.is-sidebar-collapsed .ecb-sidebar__title {
    writing-mode: horizontal-tb;
    transform: none;
    letter-spacing: .04em;
  }
}

.ecb-modal[hidden] {
  display: none !important;
}

.ecb-modal,
.ecb-modal * {
  box-sizing: border-box;
}

.ecb-modal {
  --ecb-border: #e5e7eb;
  --ecb-muted: #6b7280;
  --ecb-text: #111827;
  --ecb-bg: #f8fafc;
  --ecb-panel: #ffffff;
  --ecb-accent: #2563eb;
  --ecb-accent-soft: #eff6ff;
  --ecb-danger: #dc2626;
  --ecb-radius: 10px;
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 24px;
  color: var(--ecb-text);
  font-size: 14px;
}

.ecb-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, .45);
}

.ecb-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}

.ecb-modal__head,
.ecb-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ecb-border);
}

.ecb-modal__foot {
  justify-content: flex-end;
  border-bottom: 0;
  border-top: 1px solid var(--ecb-border);
}

.ecb-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.ecb-modal__close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--ecb-muted);
  cursor: pointer;
}

.ecb-modal__body {
  padding: 16px;
}

.ecb-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.ecb-type-card {
  appearance: none;
  display: block;
  width: 100%;
  border: 1px solid var(--ecb-border);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  color: var(--ecb-text);
  font: inherit;
  font-weight: 600;
}

.ecb-type-card.is-active,
.ecb-type-card:hover {
  border-color: var(--ecb-accent);
  background: var(--ecb-accent-soft);
  color: var(--ecb-accent);
}

.ecb-upload {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 14px;
  background: #f8fafc;
  margin-bottom: 12px;
}

.ecb-upload__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ecb-upload__name {
  font-size: 13px;
  color: var(--ecb-muted);
}

.ecb-upload__progress {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  display: none;
}

.ecb-upload__progress.is-visible {
  display: block;
}

.ecb-upload__bar {
  height: 100%;
  width: 0;
  background: var(--ecb-accent);
  transition: width .15s ease;
}

.ecb-or {
  margin: 10px 0;
  text-align: center;
  color: var(--ecb-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ecb-skeleton {
  display: grid;
  gap: 10px;
  padding: 4px 0;
}

.ecb-skeleton--main {
  max-width: 640px;
}

.ecb-skeleton__line,
.ecb-skeleton__block {
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
  background-size: 200% 100%;
  animation: ecb-shimmer 1.2s ease-in-out infinite;
}

.ecb-skeleton__line {
  height: 14px;
}

.ecb-skeleton__line--lg {
  height: 28px;
  width: 70%;
}

.ecb-skeleton__line--sm {
  width: 40%;
}

.ecb-skeleton__block {
  height: 88px;
}

@keyframes ecb-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.ecb-html-wrap {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--ecb-border);
  border-radius: 8px;
  background: var(--ecb-bg);
  overflow: hidden;
}

.ecb-html-wrap.is-ready {
  overflow: visible;
  border: 0;
  background: transparent;
  min-height: 0;
}

.ecb-html-wrap::before {
  content: attr(data-loading);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ecb-muted);
  font-size: 13px;
  pointer-events: none;
}

.ecb-html-wrap.is-ready::before {
  display: none;
}

.ecb-html-wrap.is-fallback textarea.ecb-html-editor {
  opacity: 1;
}

.ecb .ecb-html-editor {
  width: 100%;
  min-height: 420px;
  opacity: 0;
}

.ecb .tox-tinymce {
  border-radius: 8px !important;
  border-color: var(--ecb-border) !important;
}

.ecb .tox .tox-toolbar,
.ecb .tox .tox-toolbar__primary {
  background: #f8fafc !important;
}

/* Orchid/Bootstrap overlays sit high; keep TinyMCE dialogs usable */
.tox-tinymce-aux,
.tox.tox-tinymce-aux {
  z-index: 12050 !important;
}
