/* Scoped to the article visual editor so it does not restyle the admin shell. */
#stealth-cms-editor {
  --ve-primary: hsl(207 90% 54%);
  --ve-border: #e2e8f0;
  --ve-muted: #64748b;
  font-size: 14px;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
}
#stealth-cms-editor .cms-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 17rem);
  gap: 0.75rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}
#stealth-cms-editor .cms-canvas-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#stealth-cms-editor .cms-surface-wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: #eef2f7;
  border: 1px solid var(--ve-border);
  border-radius: 1rem;
  padding: 0;
}
#stealth-cms-editor .cms-side-col {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
#stealth-cms-editor .cms-format-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
  margin: 0 0 0.4rem;
  padding: 0.35rem 0.65rem;
  background: #fff;
  border: 1px solid var(--ve-border);
  border-radius: 0.85rem;
}
#stealth-cms-editor .cms-format-sep {
  width: 1px;
  height: 1.25rem;
  background: var(--ve-border);
  margin: 0 0.25rem;
}
#stealth-cms-editor .cms-toolbox h3,
#stealth-cms-editor .cms-props-card h3 { margin-top: 0; font-size: 0.95rem; }
#stealth-cms-editor .cms-toolbox,
#stealth-cms-editor .cms-props-card {
  background: #fff;
  border: 1px solid var(--ve-border);
  border-radius: 1rem;
  padding: 0.85rem;
}
#stealth-cms-editor .cms-props-card { position: static; }
#stealth-cms-editor .cms-toolbox-group {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ve-muted);
  margin: 0.75rem 0 0.35rem;
}
#stealth-cms-editor .cms-widget-list { display: flex; flex-direction: column; gap: 0.375rem; }
#stealth-cms-editor .cms-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px dashed var(--ve-border);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: grab;
  user-select: none;
}
#stealth-cms-editor .cms-widget i {
  width: 0.95rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ve-muted);
  pointer-events: none;
}
#stealth-cms-editor .cms-widget:active { cursor: grabbing; }
#stealth-cms-editor .cms-widget.is-armed { outline: 2px solid #2563eb; background: #dbeafe; }
#stealth-cms-editor .cms-widget.is-armed i { color: #2563eb; }
#stealth-cms-editor .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: var(--ve-primary);
  color: #fff;
  border: none;
  padding: 0.35rem 0.7rem;
  border-radius: 0.6rem;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
}
#stealth-cms-editor .btn-outline {
  background: transparent;
  color: #0f172a;
  border: 1px solid var(--ve-border);
}
#stealth-cms-editor .btn-outline:hover { background: #f8fafc; }
#stealth-cms-editor .btn-sm { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
#stealth-cms-editor .btn:disabled { opacity: 0.45; cursor: not-allowed; }
#stealth-cms-editor .text-muted { color: var(--ve-muted); font-size: 0.75rem; }
#stealth-cms-editor .cms-props-grid {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.45rem 0.65rem;
  align-items: center;
  font-size: 0.8125rem;
}
#stealth-cms-editor .cms-props-grid input,
#stealth-cms-editor .cms-props-grid select,
#stealth-cms-editor textarea {
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--ve-border);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}
#stealth-cms-editor .cms-props-row-btns { display: flex; flex-wrap: wrap; gap: 0.35rem; }
#stealth-cms-editor .cms-props-actions { margin-top: 0.75rem; }
#stealth-cms-editor .cms-subtabs { display: none; }
@media (max-width: 900px) {
  #stealth-cms-editor .cms-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(12rem, 1fr) minmax(10rem, 38%);
  }
}
