.bb-root {
  --bg: #f6f5f2;
  --panel: #ffffff;
  --border: #e2e0da;
  --text: #2b2a27;
  --muted: #79766e;
  --accent: #8ba33f;
  --accent-dark: #6f8631;
  --danger: #c1543e;
  --radius: 10px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 100dvh;
  background: var(--bg);
  border: 1px solid var(--border);
}
.admin-logged .bb-root {
  min-height: calc(100dvh - 25px);
}
.bb-root * {
  box-sizing: border-box;
}
.bb-sidebar {
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
  max-height: 100%;
}
.bb-preview-pane {
  overflow-y: auto;
  padding: 32px;
}
.bb-root h1 {
  font-size: 16px;
  margin: 0 0 4px;
}
.bb-root .bb-sub {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 20px;
}
.bb-root select,
.bb-root input[type="text"],
.bb-root textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.bb-root textarea {
  resize: vertical;
  min-height: 60px;
}
.bb-root label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin: 10px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.bb-presets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.bb-presets button {
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fbfaf8;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.bb-presets button:hover {
  border-color: var(--accent);
}
.bb-add-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.bb-add-row select {
  flex: 1;
}
.bb-add-row button {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.bb-add-row button:hover {
  background: var(--accent-dark);
}
.bb-block-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #fff;
}
.bb-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}
.bb-block-head .bb-name {
  font-size: 13px;
  font-weight: 600;
}
.bb-block-controls {
  display: flex;
  gap: 4px;
}
.bb-block-controls button {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.bb-block-controls button:hover {
  background: #f0efeb;
  color: var(--text);
}
.bb-block-controls button.bb-remove:hover {
  color: var(--danger);
}
.bb-block-body {
  padding: 0 12px 14px;
  display: none;
}
.bb-block-body.bb-open {
  display: block;
}
.bb-checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.bb-checkbox-row input {
  width: auto;
}
.bb-checkbox-row label {
  margin: 0;
  text-transform: none;
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}
.bb-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.bb-output {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.bb-output button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 8px;
}
.bb-output textarea {
  height: 140px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.bb-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 40px 0;
}
.bb-preview-wrap {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ---- rendered block styles (this part also ships in the site's separate CSS file) ---- */
.bb-block {
  padding: 48px 40px;
}
.bb-row {
  display: flex;
  gap: 40px;
  align-items: center;
}
.bb-row.bb-flip {
  flex-direction: row-reverse;
}
.bb-col {
  flex: 1;
  min-width: 0;
}
.bb-heading {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #222;
}
.bb-rule {
  width: 60px;
  height: 3px;
  background: var(--accent, #8ba33f);
  border: none;
  margin: 0 0 18px;
  border-radius: 2px;
}
.bb-text {
  font-size: 15px;
  line-height: 1.6;
  color: #3d3d3d;
  margin: 0;
}
.bb-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  background: #eee;
}
.bb-list {
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.9;
  color: #3d3d3d;
}
.bb-list b {
  color: #222;
}
.bb-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.bb-switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d8d6cf;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.bb-switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.bb-switch.bb-switch-on {
  background: var(--accent);
}
.bb-switch.bb-switch-on .bb-switch-thumb {
  left: 21px;
}
.bb-switch-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

