/* =============================================
   Blog Block Builder — public render styles
   ============================================= */

/* ── Text block ──────────────────────────────── */
.bb-text p  { margin-bottom: 18px; }
.bb-text ul,
.bb-text ol { margin-bottom: 18px; padding-left: 22px; }
.bb-text li { margin-bottom: 6px; }
.bb-text a  { color: var(--blue, #4A80F0); text-decoration: underline; text-underline-offset: 3px; }

/* ── Section block (H2 + text) ───────────────── */
.bb-section { margin: 44px 0 24px; }
.bb-section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text, #1A1D23);
  line-height: 1.3;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #E8ECF4;
  position: relative;
}
.bb-section-title::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 48px; height: 2px;
  background: var(--blue, #4A80F0);
  border-radius: 2px;
}
.bb-section-text { font-size: 16px; line-height: 1.75; color: var(--text, #1A1D23); }

/* ── Image block ─────────────────────────────── */
.bb-image { margin: 28px 0; }
.bb-image img {
  width: 100%;
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.bb-image figcaption {
  font-size: 13px;
  color: var(--text-muted, #9CA3AF);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
  font-style: italic;
}

/* ── Quote block ─────────────────────────────── */
.bb-quote {
  position: relative;
  padding: 28px 28px 24px 56px;
  margin: 32px 0;
  background: linear-gradient(135deg, #F0F5FF 0%, #EBF1FE 100%);
  border-radius: 16px;
  overflow: hidden;
}
.bb-quote-mark {
  position: absolute;
  top: -8px; left: 16px;
  font-size: 80px;
  font-family: Georgia, serif;
  color: var(--blue, #4A80F0);
  opacity: .15;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.bb-quote p {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.7;
  font-style: italic;
  color: var(--text, #1A1D23);
  font-weight: 500;
}
.bb-quote cite {
  display: block;
  font-size: 13px;
  color: var(--blue, #4A80F0);
  font-style: normal;
  font-weight: 700;
}

/* ── Code block ──────────────────────────────── */
.bb-code-wrap { margin: 24px 0; }
.bb-code-lang {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #9CA3AF;
  background: #2A2E38;
  padding: 4px 12px;
  border-radius: 8px 8px 0 0;
  margin-bottom: -1px;
}
.bb-code {
  background: #1E222C;
  color: #E2E8F0;
  border-radius: 12px;
  padding: 20px 22px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 13.5px;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.2);
}

/* ── List block ──────────────────────────────── */
.bb-list {
  margin: 4px 0 20px;
  padding-left: 0;
  list-style: none;
}
.bb-list li {
  margin-bottom: 10px;
  line-height: 1.7;
  padding-left: 26px;
  position: relative;
}
.bb-list--unordered li::before {
  content: '';
  position: absolute;
  left: 6px; top: 10px;
  width: 6px; height: 6px;
  background: var(--blue, #4A80F0);
  border-radius: 50%;
}
.bb-list--ordered {
  counter-reset: bb-ol;
}
.bb-list--ordered li::before {
  counter-increment: bb-ol;
  content: counter(bb-ol) '.';
  position: absolute;
  left: 0;
  color: var(--blue, #4A80F0);
  font-weight: 700;
  font-size: 14px;
}

/* ── Checklist block ─────────────────────────── */
.bb-checklist {
  margin: 4px 0 20px;
  padding: 0;
  list-style: none;
}
.bb-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #F0F2F5;
}
.bb-checklist-item:last-child { border-bottom: none; }
.bb-checklist-check {
  width: 20px; height: 20px;
  border: 2px solid #D0D6E2;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  flex-shrink: 0; margin-top: 1px;
}
.bb-checklist-item--done .bb-checklist-check {
  background: var(--blue, #4A80F0);
  border-color: var(--blue, #4A80F0);
}
.bb-checklist-item--done .bb-checklist-text {
  color: var(--text-muted, #9CA3AF);
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,.2);
}
.bb-checklist-text { line-height: 1.6; flex: 1; }

/* ── Table block ─────────────────────────────── */
.bb-table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #E4E8EF;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.bb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.bb-table th {
  background: #F4F6FB;
  font-weight: 700;
  color: var(--text, #1A1D23);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid #E4E8EF;
  white-space: nowrap;
}
.bb-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #F0F2F5;
  color: var(--text, #1A1D23);
  line-height: 1.5;
}
.bb-table tr:last-child td { border-bottom: none; }
.bb-table tr:nth-child(even) td { background: #FAFBFD; }

/* ── Embed block ─────────────────────────────── */
.bb-embed { margin: 28px 0; }
.bb-embed-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.bb-embed-frame iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.bb-embed-link {
  display: block;
  padding: 16px 20px;
  background: #F4F6FB;
  border: 1px solid #E4E8EF;
  border-radius: 12px;
  color: var(--blue, #4A80F0);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.bb-embed-link:hover { background: #EBF1FE; }
.bb-embed-caption {
  font-size: 13px;
  color: var(--text-muted, #9CA3AF);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* ── CTA block ───────────────────────────────── */
.bb-cta {
  background: linear-gradient(135deg, #1E4DC4 0%, #4A80F0 60%, #6FA3FF 100%);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  color: #fff;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}
.bb-cta::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.bb-cta::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.bb-cta h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
  position: relative; z-index: 1;
}
.bb-cta p {
  font-size: 16px;
  opacity: .88;
  margin-bottom: 24px;
  position: relative; z-index: 1;
  max-width: 480px; margin-left: auto; margin-right: auto;
}
.bb-cta-btn {
  display: inline-block;
  background: rgba(255,255,255,.95);
  color: var(--blue, #2155C4);
  padding: 13px 32px;
  border-radius: 12px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: background .15s, transform .15s, box-shadow .15s;
  position: relative; z-index: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.bb-cta-btn:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  text-decoration: none;
}

/* ── Divider block ───────────────────────────── */
.bb-divider-wrap { margin: 40px 0; text-align: center; }
.bb-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #D0D6E2 30%, #D0D6E2 70%, transparent);
}

/* ── Two-column block ────────────────────────── */
.bb-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 24px 0;
}
.bb-col p  { margin-bottom: 14px; }
.bb-col ul,
.bb-col ol { padding-left: 18px; margin-bottom: 14px; }

/* ── Callout block ───────────────────────────── */
.bb-callout {
  display: flex;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 14px;
  margin: 28px 0;
}
.bb-callout--info    { background: #EFF6FF; border: 1px solid #BFDBFE; }
.bb-callout--warning { background: #FFFBEB; border: 1px solid #FDE68A; }
.bb-callout--success { background: #F0FDF4; border: 1px solid #BBF7D0; }
.bb-callout--danger  { background: #FEF2F2; border: 1px solid #FECACA; }

.bb-callout-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; margin-top: 1px;
}
.bb-callout--info    .bb-callout-icon { background: #DBEAFE; }
.bb-callout--warning .bb-callout-icon { background: #FEF3C7; }
.bb-callout--success .bb-callout-icon { background: #DCFCE7; }
.bb-callout--danger  .bb-callout-icon { background: #FEE2E2; }

.bb-callout-body { flex: 1; min-width: 0; }
.bb-callout-label {
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 5px;
}
.bb-callout--info    .bb-callout-label { color: #1D4ED8; }
.bb-callout--warning .bb-callout-label { color: #B45309; }
.bb-callout--success .bb-callout-label { color: #15803D; }
.bb-callout--danger  .bb-callout-label { color: #B91C1C; }
.bb-callout-text { font-size: 15px; line-height: 1.7; color: var(--text, #1A1D23); }

/* ── Steps block ─────────────────────────────── */
.bb-steps { margin: 32px 0; display: flex; flex-direction: column; gap: 0; }
.bb-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  position: relative;
  padding-bottom: 28px;
}
.bb-step:last-child { padding-bottom: 0; }
.bb-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17px; top: 40px;
  width: 2px;
  height: calc(100% - 12px);
  background: linear-gradient(to bottom, #4A80F0 0%, #C5D8FF 100%);
  border-radius: 2px;
}
.bb-step-badge {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2155C4, #4A80F0);
  color: #fff;
  font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(74,128,240,.35);
  position: relative; z-index: 1;
}
.bb-step-body  { flex: 1; padding-top: 5px; }
.bb-step-title { font-weight: 700; font-size: 16px; margin-bottom: 5px; color: var(--text, #1A1D23); }
.bb-step-text  { font-size: 15px; color: var(--text-muted, #6B7280); line-height: 1.65; }

/* ── Cards block ─────────────────────────────── */
.bb-cards { display: grid; gap: 18px; margin: 28px 0; }
.bb-cards--2col { grid-template-columns: 1fr 1fr; }
.bb-cards--3col { grid-template-columns: repeat(3, 1fr); }
.bb-cards--4col { grid-template-columns: repeat(4, 1fr); }

.bb-card {
  background: #fff;
  border: 1px solid #E8ECF4;
  border-radius: 16px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: box-shadow .2s ease, transform .2s ease;
}
.bb-card:hover {
  box-shadow: 0 8px 28px rgba(74,128,240,.12);
  transform: translateY(-3px);
}
.bb-card-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #EBF1FE, #D6E4FF);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.bb-card-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 8px; color: var(--text, #1A1D23);
  line-height: 1.3;
}
.bb-card-text {
  font-size: 14px; color: var(--text-muted, #6B7280);
  line-height: 1.65;
}

/* ── TOC block ───────────────────────────────── */
.bb-toc {
  background: #F8FAFF;
  border: 1px solid #DDE5F8;
  border-radius: 14px;
  padding: 22px 26px;
  margin: 28px 0;
}
.bb-toc-title {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--blue, #4A80F0);
  margin-bottom: 14px;
}
.bb-toc-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.bb-toc-item a {
  color: var(--text, #1A1D23);
  text-decoration: none;
  font-size: 15px; line-height: 1.5;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .12s;
}
.bb-toc-item a::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--blue, #4A80F0);
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .4;
}
.bb-toc-item a:hover { color: var(--blue, #4A80F0); }
.bb-toc-item a:hover::before { opacity: 1; }
.bb-toc-h3 { padding-left: 20px; }
.bb-toc-h3 a { font-size: 14px; color: var(--text-muted, #6B7280); }
.bb-toc-h3 a::before { width: 4px; height: 4px; }
.bb-toc-empty { font-size: 13px; color: var(--text-muted, #9CA3AF); margin: 0; }

/* ─────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .bb-two-col { grid-template-columns: 1fr; gap: 16px; }
  .bb-cta { padding: 28px 20px; }
  .bb-cta h3 { font-size: 20px; }
  .bb-cta p { font-size: 14px; }
  .bb-cards--3col,
  .bb-cards--4col { grid-template-columns: 1fr 1fr; }
  .bb-cards--2col { grid-template-columns: 1fr; }
  .bb-quote { padding: 22px 18px 18px 42px; }
}


/* =============================================
   Admin panel — floating panel styles
   ============================================= */

.aep-header {
  padding: 14px 16px; background: #1A1D23; color: #fff;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.aep-header-title { font-weight: 800; font-size: 13px; }
.aep-header-sub { font-size: 11px; color: #9CA3AF; margin-top: 1px; }
.aep-close { background: none; border: none; color: #9CA3AF; cursor: pointer; font-size: 18px; line-height: 1; padding: 0; }
.aep-close:hover { color: #fff; }

.aep-tabs { display: flex; border-bottom: 1px solid #F0F2F5; flex-shrink: 0; }
.aep-tab {
  flex: 1; padding: 10px 4px; font-size: 11px; font-weight: 700; text-align: center;
  cursor: pointer; border: none; background: none; color: #9CA3AF;
  border-bottom: 2px solid transparent; transition: color .12s, border-color .12s;
}
.aep-tab.active { color: #4A80F0; border-bottom-color: #4A80F0; }

.aep-body { padding: 16px; overflow-y: auto; flex: 1; min-height: 0; }

.aep-field { margin-bottom: 12px; }
.aep-label {
  display: block; font-size: 11px; font-weight: 700; color: #9CA3AF;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px;
}
.aep-input, .aep-textarea {
  width: 100%; padding: 7px 10px; border: 1.5px solid #D0D6E2;
  border-radius: 7px; font-size: 12px; font-family: inherit;
  outline: none; resize: vertical; background: #fff; color: #1A1D23;
  box-sizing: border-box;
}
.aep-input:focus, .aep-textarea:focus { border-color: #4A80F0; }
.aep-char { font-size: 10px; color: #B0B8C5; text-align: right; margin-top: 2px; }
.aep-char.warn { color: #E65100; }

.aep-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid #F5F7FA; margin-bottom: 8px;
}
.aep-toggle-label { font-size: 12px; font-weight: 600; }
.aep-toggle-sub { font-size: 11px; color: #9CA3AF; }

.aep-footer {
  padding: 12px 16px; border-top: 1px solid #F0F2F5;
  display: flex; gap: 8px; flex-shrink: 0;
}
.aep-btn {
  flex: 1; padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 700;
  border: none; cursor: pointer; text-align: center; transition: background .12s;
  font-family: inherit;
}
.aep-btn-primary { background: #4A80F0; color: #fff; }
.aep-btn-primary:hover { background: #3B71F0; }
.aep-btn-secondary { background: #F0F2F5; color: #1A1D23; }
.aep-btn-secondary:hover { background: #E4E8EF; }
.aep-btn-edit { background: #1A1D23; color: #fff; }
.aep-btn-edit:hover { background: #2d3748; }
.aep-save-status { font-size: 11px; color: #9CA3AF; text-align: center; padding: 4px 0; }
.aep-save-status.ok  { color: #18B078; }
.aep-save-status.err { color: #C62828; }

/* Quick-add special blocks grid */
.bbe-quickadd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.bbe-qa-btn {
  padding: 9px 8px;
  border: 1.5px solid #E4E8EF;
  border-radius: 9px;
  background: #F9FAFB;
  color: #4c5461;
  font-size: 11px; font-weight: 700;
  cursor: pointer; text-align: center;
  font-family: inherit;
  transition: border-color .1s, background .1s, color .1s;
}
.bbe-qa-btn:hover { border-color: #4A80F0; background: #EBF1FE; color: #4A80F0; }

/* ─────────────────────────────────────────────
   Editor.js overrides & theme
   ───────────────────────────────────────────── */
body.bbe-editor-open { margin-right: 340px; transition: margin-right .2s; }

#blocks-edit {
  outline: none;
  min-height: 200px;
}

/* Editor.js core — match article typography */
.codex-editor {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ce-block__content {
  max-width: 100%;
  margin: 0;
}
.codex-editor--narrow .ce-block__content,
.codex-editor--narrow .ce-toolbar__content {
  max-width: 100%;
}

.ce-toolbar {
    right: auto;
}

/* Paragraph placeholder */
.ce-paragraph[data-placeholder]:empty::before {
  color: #B0B8C5;
}

/* Toolbar + button */
.ce-toolbar__plus {
  color: #4A80F0;
}
.ce-toolbar__plus:hover {
  background: #EBF1FE;
  color: #2155C4;
}
.ce-toolbar__settings-btn:hover {
  background: #F0F2F5;
}

/* Block selection highlight */
.ce-block--selected .ce-block__content {
  background: rgba(74,128,240,.04);
  border-radius: 8px;
}

/* Inline toolbar */
.ce-inline-toolbar {
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  border: 1px solid #E4E8EF;
}
.ce-inline-tool:hover { background: #EBF1FE; color: #4A80F0; }
.ce-inline-tool--active { color: #4A80F0; }

/* Popover (block type picker) */
.ce-popover {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  border: 1px solid #E4E8EF;
}
.ce-popover-item:hover { background: #F0F4FF; }
.ce-popover-item--active { background: #EBF1FE; color: #4A80F0; }
.ce-popover-item__icon { border-radius: 8px; }

/* Header blocks in editor */
.ce-header { font-weight: 800; color: var(--text, #1A1D23); line-height: 1.3; }

/* Quote in editor */
.cdx-quote { border-left: none; }
.cdx-quote__text {
  border-left: 4px solid var(--blue, #4A80F0) !important;
  padding-left: 18px !important;
  font-style: italic;
}

/* Code in editor */
.ce-code__textarea {
  background: #1E222C !important;
  color: #E2E8F0 !important;
  border-radius: 10px !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
  font-size: 13px !important;
  border: none !important;
  padding: 16px 18px !important;
}

/* Table in editor */
.tc-table { border-radius: 10px; overflow: hidden; border: 1px solid #E4E8EF; }
.tc-cell { border-color: #E4E8EF !important; }

/* Warning (callout) in editor */
.cdx-warning { border-radius: 12px; border: 1px solid #FDE68A; background: #FFFBEB; }
.cdx-warning__title { font-weight: 700; }

/* Delimiter in editor */
.ce-delimiter::before { color: #D0D6E2; }

/* SimpleImage in editor */
.simple-image img { border-radius: 10px; }
.simple-image__caption { color: var(--text-muted, #9CA3AF); font-size: 13px; }

/* Embed in editor */
.embed-tool__preloader { border-radius: 10px; }
.embed-tool__embed { border-radius: 10px; }

/* ─────────────────────────────────────────────
   Custom Editor.js tools — in-editor styles
   ───────────────────────────────────────────── */

/* Section tool */
.cdx-section { padding: 4px 0; }
.cdx-section-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text, #1A1D23);
  outline: none;
  border-bottom: 2px solid #E8ECF4;
  padding-bottom: 10px;
  margin-bottom: 10px;
  display: block;
  cursor: text;
}
.cdx-section-title:empty::before {
  content: attr(data-placeholder);
  color: #B0B8C5; pointer-events: none;
}
.cdx-section-text {
  font-size: 16px; line-height: 1.75;
  outline: none; min-height: 40px; cursor: text;
}
.cdx-section-text:empty::before {
  content: attr(data-placeholder);
  color: #B0B8C5; pointer-events: none;
}

/* Callout tool */
.cdx-callout {
  display: flex; gap: 14px;
  padding: 16px 20px; border-radius: 12px; margin: 4px 0;
}
.cdx-callout--info    { background: #EFF6FF; border: 1px solid #BFDBFE; }
.cdx-callout--warning { background: #FFFBEB; border: 1px solid #FDE68A; }
.cdx-callout--success { background: #F0FDF4; border: 1px solid #BBF7D0; }
.cdx-callout--danger  { background: #FEF2F2; border: 1px solid #FECACA; }
.cdx-callout-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; outline: none; cursor: text;
}
.cdx-callout--info    .cdx-callout-icon { background: #DBEAFE; }
.cdx-callout--warning .cdx-callout-icon { background: #FEF3C7; }
.cdx-callout--success .cdx-callout-icon { background: #DCFCE7; }
.cdx-callout--danger  .cdx-callout-icon { background: #FEE2E2; }
.cdx-callout-body { flex: 1; min-width: 0; }
.cdx-callout-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; margin-bottom: 5px; outline: none; cursor: text;
}
.cdx-callout--info    .cdx-callout-label { color: #1D4ED8; }
.cdx-callout--warning .cdx-callout-label { color: #B45309; }
.cdx-callout--success .cdx-callout-label { color: #15803D; }
.cdx-callout--danger  .cdx-callout-label { color: #B91C1C; }
.cdx-callout-label:empty::before,
.cdx-callout-text:empty::before {
  content: attr(data-placeholder); color: #B0B8C5; pointer-events: none;
}
.cdx-callout-text { font-size: 15px; line-height: 1.7; outline: none; cursor: text; }
.cdx-callout-variants {
  display: flex; gap: 4px; padding: 6px 4px 2px; margin-top: 4px;
}
.cdx-callout-var {
  width: 28px; height: 28px; border: 2px solid transparent;
  border-radius: 8px; background: #F0F2F5; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: border-color .1s; padding: 0;
}
.cdx-callout-var.active { border-color: #4A80F0; background: #EBF1FE; }
.cdx-callout-var:hover { border-color: #C5CCDA; }

/* CTA tool */
.cdx-cta { }
.cdx-cta .bb-cta h3,
.cdx-cta .bb-cta p { outline: none; cursor: text; }
.cdx-cta .bb-cta h3:empty::before,
.cdx-cta .bb-cta p:empty::before {
  content: attr(data-placeholder); opacity: .5; pointer-events: none;
}
.cdx-cta-row { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cdx-cta-btn { outline: none; cursor: text; min-width: 60px; }
.cdx-cta-url {
  padding: 6px 12px; border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 8px; background: rgba(255,255,255,.15); color: #fff;
  font-size: 12px; font-family: inherit; outline: none; width: 180px;
  box-sizing: border-box;
}
.cdx-cta-url::placeholder { color: rgba(255,255,255,.6); }
.cdx-cta-url:focus { border-color: #fff; background: rgba(255,255,255,.25); }

/* Cards tool */
.cdx-cards-wrap { }
.cdx-cards-toolbar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid #F0F2F5;
}
.cdx-cards-label { font-size: 11px; font-weight: 700; color: #9CA3AF; flex: 1; }
.cdx-cards-cols {
  font-size: 11px; padding: 3px 8px; border: 1.5px solid #D0D6E2;
  border-radius: 6px; background: #fff; cursor: pointer; outline: none;
  font-family: inherit;
}
.cdx-cards-add {
  font-size: 11px; font-weight: 700; padding: 4px 12px;
  background: #4A80F0; color: #fff; border: none;
  border-radius: 6px; cursor: pointer; font-family: inherit;
}
.cdx-cards-add:hover { background: #3B71F0; }

/* Steps tool */
.cdx-steps-wrap { }

/* Shared: contenteditable in custom tools */
.cdx-editable {
  outline: none; cursor: text; min-height: 1em;
}
.cdx-editable:empty::before {
  content: attr(data-placeholder); color: #B0B8C5; pointer-events: none;
}

/* Item delete buttons */
.bbe-item-del {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px;
  background: rgba(255,255,255,.9); border: 1px solid #D0D6E2;
  color: #9CA3AF; border-radius: 50%;
  font-size: 12px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 5; padding: 0;
  transition: background .1s, border-color .1s, color .1s;
}
.bbe-item-del:hover { background: #FEE2E2; border-color: #C62828; color: #C62828; }

/* Add item button */
.bbe-add-item-btn {
  width: 100%; margin-top: 10px;
  padding: 8px; border: 2px dashed #D0D6E2; border-radius: 8px;
  background: transparent; color: #9CA3AF;
  cursor: pointer; font-size: 12px; font-family: inherit;
  transition: border-color .1s, color .1s;
}
.bbe-add-item-btn:hover { border-color: #4A80F0; color: #4A80F0; }

/* ─────────────────────────────────────────────
   Admin inline edit mode (title/cover)
   ───────────────────────────────────────────── */
.admin-edit-mode [data-editable] {
  outline: 2px dashed transparent;
  border-radius: 4px;
  transition: outline-color .12s;
  cursor: pointer;
}
.admin-edit-mode [data-editable]:hover { outline-color: #4A80F0; }
.admin-edit-mode [data-editable][contenteditable="true"] {
  outline-color: #4A80F0; outline-style: solid;
  background: rgba(74,128,240,.04); cursor: text;
}
.admin-edit-badge {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  background: #4A80F0; color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 14px;
  border-radius: 20px; z-index: 9996; pointer-events: none;
}
.bbe-header-editable {
  outline: 2px dashed rgba(74,128,240,.6) !important;
  outline-offset: 4px; border-radius: 4px; cursor: text;
  transition: outline-color .12s;
}
.bbe-header-editable:focus {
  outline-color: #4A80F0 !important; outline-style: solid !important;
}

/* Body WYSIWYG editor (legacy body field) */
#aep-body-editor { display: none; margin-bottom: 24px; }
.aep-inline-wrap { border: 2px solid #4A80F0; border-radius: 10px; overflow: hidden; }
.aep-inline-bar {
  background: #4A80F0; color: #fff; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700;
}
.aep-inline-bar-hint { font-size: 11px; opacity: .75; }
.aep-inline-done {
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4);
  color: #fff; padding: 5px 14px; border-radius: 6px;
  cursor: pointer; font-weight: 700; font-size: 12px;
}
.aep-inline-done:hover { background: rgba(255,255,255,.35); }
.admin-edit-mode [data-editable="body"] { cursor: pointer; }
