/* Fullscreen shell (fallback + shared) */
html.ab-editor-open,
body.ab-editor-open {
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  background: #0f172a !important;
}
body.ab-editor-open #wpadminbar,
body.ab-editor-open #adminmenumain,
body.ab-editor-open #adminmenuback,
body.ab-editor-open #adminmenuwrap,
body.ab-editor-open #wpfooter,
body.ab-editor-open .notice,
body.ab-editor-open #screen-meta,
body.ab-editor-open #screen-meta-links {
  display: none !important;
}
body.ab-editor-open #wpcontent,
body.ab-editor-open #wpbody,
body.ab-editor-open #wpbody-content {
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
}
.ab-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Multi-select on canvas */
.ab-document--editor .ab-node.is-multi-selected {
  outline: 2px solid #a78bfa !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}
.ab-document--editor .ab-node.is-multi-selected.is-selected {
  outline-color: #7c3aed !important;
}
#ab-layers li.is-multi {
  background: rgba(124, 58, 237, 0.22) !important;
  box-shadow: inset 3px 0 0 #a78bfa;
}

/* Floating multi-select action bar */
.ab-multi-bar {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 100050;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #1e1b4b;
  border: 1px solid #4c1d95;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-width: min(920px, calc(100vw - 24px));
}
.ab-multi-bar__count {
  font: 700 12px/1.2 system-ui, sans-serif;
  color: #e9d5ff;
  margin-right: 4px;
  white-space: nowrap;
}
.ab-multi-bar__btn {
  font-size: 12px !important;
  padding: 8px 12px !important;
  white-space: nowrap;
}
.ab-multi-bar__hint {
  font: 500 11px/1.3 system-ui, sans-serif;
  color: #a5b4fc;
  margin-left: 4px;
}

/* Row container alignment toolbar (props panel) */
.ab-row-align {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ab-row-align__lab {
  font: 600 11px/1.2 system-ui, sans-serif;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ab-row-align__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ab-row-align__btn {
  min-width: 40px;
  height: 36px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
.ab-row-align__btn:hover {
  border-color: #7c3aed;
  color: #fff;
}
.ab-row-align__btn.is-on {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.ab-back-btn {
  flex-shrink: 0;
}
.ab-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #e2e8f0;
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  /* Dark scrollbars (Firefox + Chromium/WebKit) */
  scrollbar-width: thin;
  scrollbar-color: #475569 #0f172a;
}
.ab-root *,
.ab-panel,
.ab-canvas-wrap,
.ab-props,
#ab-props,
#ab-site-settings,
.ab-widgets-scroll,
.ab-layers {
  scrollbar-width: thin;
  scrollbar-color: #475569 #0f172a;
}
.ab-root *::-webkit-scrollbar,
.ab-panel::-webkit-scrollbar,
.ab-canvas-wrap::-webkit-scrollbar,
#ab-props::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.ab-root *::-webkit-scrollbar-track,
.ab-panel::-webkit-scrollbar-track,
.ab-canvas-wrap::-webkit-scrollbar-track,
#ab-props::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 8px;
}
.ab-root *::-webkit-scrollbar-thumb,
.ab-panel::-webkit-scrollbar-thumb,
.ab-canvas-wrap::-webkit-scrollbar-thumb,
#ab-props::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 8px;
  border: 2px solid #0f172a;
}
.ab-root *::-webkit-scrollbar-thumb:hover,
.ab-panel::-webkit-scrollbar-thumb:hover,
.ab-canvas-wrap::-webkit-scrollbar-thumb:hover,
#ab-props::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}
.ab-top {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 10px;
  background: #0a0a0a;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}
.ab-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ab-brand {
  font-weight: 800;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.06em;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ab-brand--img {
  background: transparent;
  padding: 0;
  object-fit: contain;
  display: block;
}
.ab-rail-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 2px;
}
.ab-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
  color: #f8fafc;
  text-align: center;
}
.ab-status { font-size: 11px; color: #94a3b8; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-status.is-dirty { color: #fbbf24; }
.ab-status.is-ok { color: #34d399; }
.ab-status.is-err { color: #f87171; max-width: min(420px, 36vw); white-space: normal; overflow: visible; text-overflow: unset; line-height: 1.25; }
.ab-top-actions { display: flex; gap: 4px; align-items: center; }

/* Icon-only buttons (Elementor-style top bar) */
.ab-icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.ab-icon-btn svg { width: 18px; height: 18px; display: block; }
.ab-icon-btn:hover { background: #1e293b; color: #f8fafc; }
.ab-icon-btn.is-active { background: #7c3aed; color: #fff; }
.ab-icon-btn--primary { background: #7c3aed; color: #fff; }
.ab-icon-btn--primary:hover { background: #6d28d9; color: #fff; }

.ab-btn {
  appearance: none;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font: 600 12px system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ab-btn:hover { background: #334155; }
.ab-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ab-btn--primary { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.ab-btn--primary:hover { background: #6d28d9; }
.ab-btn--ghost { background: transparent; }
.ab-btn--danger { background: #7f1d1d; border-color: #991b1b; color: #fecaca; width: 100%; }
.ab-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  transition: grid-template-columns .2s ease;
  position: relative;
}
/* Individual sidebar collapse (arrow on each edge) */
.ab-body--left-collapsed {
  grid-template-columns: 0 1fr 300px;
}
.ab-body--right-collapsed {
  grid-template-columns: 280px 1fr 0;
}
.ab-body--left-collapsed.ab-body--right-collapsed {
  grid-template-columns: 0 1fr 0;
}
.ab-body--left-collapsed .ab-panel--left,
.ab-body--right-collapsed .ab-panel--right {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border-color: transparent;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
}
/* Full-page preview: hide both sidebars */
.ab-body--focus {
  grid-template-columns: 0 minmax(0, 1fr) 0 !important;
}
.ab-body--focus .ab-panel--left,
.ab-body--focus .ab-panel--right {
  overflow: hidden;
  border: 0;
  opacity: 0;
  pointer-events: none;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
}
/* Edge chevrons to collapse/expand each panel */
.ab-panel-rail {
  position: absolute;
  top: 50%;
  z-index: 40;
  transform: translateY(-50%);
  width: 18px;
  height: 56px;
  padding: 0;
  margin: 0;
  border: 1px solid #334155;
  background: #1e1b4b;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 12px/1 system-ui, sans-serif;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: background .15s, color .15s, left .2s, right .2s;
}
.ab-panel-rail:hover {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}
.ab-panel-rail--left {
  left: 272px; /* just inside left panel edge */
  border-radius: 0 8px 8px 0;
  border-left: 0;
}
.ab-panel-rail--right {
  right: 292px;
  border-radius: 8px 0 0 8px;
  border-right: 0;
}
.ab-body--left-collapsed .ab-panel-rail--left {
  left: 0;
  border-radius: 0 8px 8px 0;
  border-left: 0;
  background: #7c3aed;
  color: #fff;
  border-color: #6d28d9;
}
.ab-body--right-collapsed .ab-panel-rail--right {
  right: 0;
  border-radius: 8px 0 0 8px;
  border-right: 0;
  background: #7c3aed;
  color: #fff;
  border-color: #6d28d9;
}
.ab-body--focus .ab-panel-rail {
  display: none;
}
/* Expand canvas area when sidebars hidden — but still honor tablet/mobile widths */
.ab-body--focus .ab-canvas-wrap {
  padding: 16px 0 !important;
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important; /* scroll da página sem painéis laterais */
  display: block; /* não flex:flex com height 100% engolia o overflow */
  background: #020617;
  box-sizing: border-box;
}
.ab-body--focus .ab-canvas {
  max-width: none !important;
  width: 100% !important;
  margin: 0 auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: calc(100vh - 48px);
  height: auto !important;
  overflow: visible !important;
  background: transparent !important;
  display: block;
}
/* Desktop fullscreen = full bleed (like public page) */
.ab-body--focus .ab-page-preview.ab-bp-desktop,
.ab-body--focus .ab-page-preview:not(.ab-bp-tablet):not(.ab-bp-mobile) {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
/* Tablet / mobile MUST keep device frame even in fullscreen */
.ab-body--focus .ab-page-preview.ab-bp-tablet {
  max-width: 768px !important;
  width: 100% !important;
  margin: 12px auto !important;
  box-shadow: 0 0 0 1px #7c3aed, 0 20px 50px rgba(0, 0, 0, 0.45) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
.ab-body--focus .ab-page-preview.ab-bp-mobile {
  max-width: 390px !important;
  width: 100% !important;
  margin: 12px auto !important;
  box-shadow: 0 0 0 1px #7c3aed, 0 20px 50px rgba(0, 0, 0, 0.45) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}
.ab-body--focus .ab-page-preview.ab-bp-tablet .ab-page-body,
.ab-body--focus .ab-page-preview.ab-bp-mobile .ab-page-body {
  max-width: 100% !important;
  width: 100% !important;
}
.ab-body--focus .ab-page-preview.ab-bp-desktop .ab-page-body,
.ab-body--focus .ab-page-preview:not(.ab-bp-tablet):not(.ab-bp-mobile) .ab-page-body {
  max-width: none !important;
  width: 100% !important;
}
.ab-body--focus .ab-document,
.ab-body--focus .ab-document--editor {
  max-width: none !important;
  width: 100% !important;
}
.ab-panel {
  position: relative;
  background: #0b1220;
  border-right: 1px solid #1e293b;
  overflow: auto;
  min-height: 0;
}
.ab-panel--right { border-right: 0; border-left: 1px solid #1e293b; }
.ab-panel-hd {
  position: sticky; top: 0; z-index: 2;
  padding: 12px 14px;
  font: 700 11px/1 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #0b1220;
  border-bottom: 1px solid #1e293b;
}
.ab-panel-bd { padding: 12px; }

/* Widget catalog (Elementor Elements panel) */
/* Category searchable list */
.ab-cat-search-box { display: flex; flex-direction: column; gap: 8px; }
.ab-cat-filter {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #334155 !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
}
.ab-cat-select {
  width: 100% !important;
  min-height: 140px !important;
  max-height: 180px !important;
  border: 1px solid #334155 !important;
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 6px !important;
  font: 13px system-ui, sans-serif !important;
}
.ab-cat-select option {
  padding: 6px 8px;
  background: #0f172a;
  color: #e2e8f0;
}
.ab-cat-select option:checked,
.ab-cat-select option:hover {
  background: #4c1d95;
  color: #fff;
}

/* Search all widgets */
.ab-elem-search-wrap {
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0b1220;
  padding-bottom: 4px;
}
.ab-elem-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #1e293b !important;
  background: #111827 !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
  padding: 9px 12px !important;
  font: 13px system-ui, sans-serif !important;
}
.ab-elem-search:focus {
  border-color: #7c3aed !important;
  outline: none;
}
.ab-cat-group {
  font: 600 9px system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

/* Element name: type prefix + input (no separate Tipo frame) */
.ab-field-name-inline {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 6px;
  border: 1px solid #334155;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
}
.ab-name-type {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font: 700 11px/1 system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a78bfa;
  background: #1e1b4b;
  border-right: 1px solid #334155;
  white-space: nowrap;
  flex-shrink: 0;
}
.ab-name-input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #f8fafc !important;
  padding: 10px 12px !important;
  font: 13px system-ui, sans-serif !important;
  box-shadow: none !important;
}
.ab-name-input:focus {
  outline: none;
  background: #111827 !important;
}

/* Single active device badge (not a full 3-icon group) */
.ab-dev-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.18);
  flex-shrink: 0;
}
.ab-dev-badge svg { width: 14px; height: 14px; }

/* Style-breakpoint switcher (edit styles only) */
.ab-style-bp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  flex-wrap: wrap;
}
.ab-style-bp-label {
  font: 600 11px system-ui, sans-serif;
  color: #94a3b8;
  margin-right: 4px;
}
.ab-style-bp-btn {
  width: 32px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ab-style-bp-btn:hover { color: #e2e8f0; background: #1e293b; }
.ab-style-bp-btn.is-on { color: #fff; background: #7c3aed; }
.ab-style-bp-btn svg { width: 16px; height: 16px; }
.ab-style-bp-name {
  font: 600 12px system-ui, sans-serif;
  color: #c4b5fd;
  margin-left: 4px;
}

/* Alignment icon group (Elementor-like) */
.ab-align-group {
  display: inline-flex;
  gap: 2px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 3px;
}
.ab-align-btn {
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ab-align-btn:hover { color: #e2e8f0; background: #1e293b; }
.ab-align-btn.is-on { color: #fff; background: #7c3aed; }
.ab-align-btn svg { display: block; }

/* Multi-image gallery media field */
.ab-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  min-height: 40px;
}
.ab-gallery-thumbs--empty {
  grid-column: 1 / -1;
  padding: 16px;
  text-align: center;
  color: #64748b;
  font: 12px system-ui, sans-serif;
  border: 1px dashed #334155;
  border-radius: 8px;
  background: #0f172a;
}
.ab-gallery-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #334155;
  background: #0f172a;
}
.ab-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ab-gallery-thumb__rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.ab-gallery-thumb__rm:hover { background: #7c3aed; }
.ab-gallery-media-pick,
.ab-gallery-media-clear {
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

/* Accordion items repeater */
.ab-acc-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ab-acc-item {
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #0f172a;
  padding: 12px;
}
.ab-acc-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ab-acc-item__head strong {
  font: 700 12px system-ui, sans-serif;
  color: #c4b5fd;
}
.ab-acc-item__lab {
  display: block;
  font: 600 10px system-ui, sans-serif;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 8px 0 4px;
}
.ab-acc-item__title,
.ab-acc-item__content {
  width: 100%;
  box-sizing: border-box;
}
.ab-acc-item__media {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.ab-acc-item__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #334155;
}
.ab-acc-item__noimg {
  font: 12px system-ui, sans-serif;
  color: #64748b;
  padding: 8px 10px;
  border: 1px dashed #334155;
  border-radius: 8px;
}
.ab-acc-item__pick,
.ab-acc-item__img-clear,
.ab-acc-item__rm {
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}
.ab-acc-item-add { width: 100% !important; }

/* Icon list repeater */
.ab-il-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ab-il-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 6px 8px;
}
.ab-il-item__preview {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: #1e293b;
  border-radius: 6px;
  flex-shrink: 0;
}
.ab-il-item__text {
  flex: 1 1 auto;
  min-width: 0;
}
.ab-il-item__icon-btn,
.ab-il-item__rm,
.ab-il-add {
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.ab-il-item__rm {
  font-size: 16px;
  padding: 4px 8px !important;
}

/* Social items repeater */
.ab-soc-list { display: flex; flex-direction: column; gap: 8px; }
.ab-soc-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 6px 8px;
}
.ab-soc-item__badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font: 700 11px system-ui, sans-serif;
  flex-shrink: 0;
}
.ab-soc-item__net { flex: 0 0 120px; max-width: 38%; }
.ab-soc-item__url { flex: 1 1 auto; min-width: 0; }
.ab-soc-item__rm, .ab-soc-add {
  width: auto !important;
  flex-shrink: 0;
}

/* Page search */
.ab-page-search-input { margin-bottom: 8px; }
.ab-page-search-select {
  width: 100%;
  min-height: 120px;
  border: 1px solid #475569 !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  border-radius: 8px;
  padding: 6px;
}

/* Google Fonts picker modal */
.ab-gf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000001;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.ab-gf-modal__panel {
  width: min(920px, 100%);
  height: min(720px, 94vh);
  background: #0b1220;
  border: 1px solid #1e293b;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e2e8f0;
}
.ab-gf-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid #1e293b;
}
.ab-gf-modal__head strong {
  font: 700 16px system-ui, sans-serif;
  color: #f8fafc;
}
.ab-gf-modal__sub {
  margin: 4px 0 0;
  font: 12px system-ui, sans-serif;
  color: #94a3b8;
}
.ab-gf-modal__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.ab-gf-modal__close:hover { background: #334155; }
.ab-gf-modal__toolbar {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid #1e293b;
  background: #0f172a;
}
.ab-gf-modal__search,
.ab-gf-modal__sample {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #020617;
  color: #f8fafc;
  padding: 10px 12px;
  font: 13px system-ui, sans-serif;
}
.ab-gf-modal__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ab-gf-cat {
  border: 1px solid #334155;
  background: #111827;
  color: #94a3b8;
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}
.ab-gf-cat.is-on {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.ab-gf-modal__grid {
  flex: 1 1 auto;
  overflow: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #475569 #0f172a;
}
.ab-gf-card {
  appearance: none;
  text-align: left;
  border: 1px solid #1e293b;
  background: #111827;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .12s, box-shadow .12s, transform .12s;
  color: #e2e8f0;
}
.ab-gf-card:hover {
  border-color: #a78bfa;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.ab-gf-card.is-on {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.35);
  background: #1e1b4b;
}
.ab-gf-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.ab-gf-card__name {
  font: 700 12px system-ui, sans-serif;
  color: #c4b5fd;
}
.ab-gf-card__cat {
  font: 600 10px system-ui, sans-serif;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ab-gf-card__preview {
  font-size: 22px;
  line-height: 1.35;
  color: #f8fafc;
  word-break: break-word;
  min-height: 2.6em;
}
.ab-gf-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #1e293b;
  background: #0f172a;
}
.ab-gf-modal__hint {
  font: 12px system-ui, sans-serif;
  color: #64748b;
}
.ab-gf-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ab-gf-row .ab-custom-input { flex: 1 1 auto; min-width: 0; }
.ab-gf-row .ab-gf-open,
.ab-field-gf-launch .ab-gf-open {
  width: auto !important;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Icon picker field */
.ab-icon-pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ab-icon-pick-preview {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  color: #f8fafc;
}
.ab-icon-pick-input {
  flex: 1 1 80px;
  min-width: 70px;
}
.ab-icon-pick-open {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  width: auto !important;
}
.ab-icon-pick-open svg { width: 14px; height: 14px; }

/* Icon library modal */
.ab-icon-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.ab-icon-modal__panel {
  width: min(920px, 100%);
  height: min(640px, 92vh);
  background: #f8fafc;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #0f172a;
}
.ab-icon-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
.ab-icon-modal__head strong {
  font: 700 15px system-ui, sans-serif;
  flex-shrink: 0;
}
.ab-icon-modal__search {
  flex: 1 1 auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font: 13px system-ui, sans-serif;
  background: #fff;
  color: #0f172a;
}
.ab-icon-modal__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.ab-icon-modal__close:hover { background: #e2e8f0; }
.ab-icon-modal__body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 0;
}
.ab-icon-modal__cats {
  border-right: 1px solid #e2e8f0;
  background: #fff;
  padding: 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ab-icon-cat {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font: 600 12px system-ui, sans-serif;
  color: #475569;
  cursor: pointer;
}
.ab-icon-cat:hover { background: #f1f5f9; color: #0f172a; }
.ab-icon-cat.is-on { background: #ede9fe; color: #5b21b6; }
.ab-icon-modal__grid-wrap {
  overflow: auto;
  padding: 14px;
  background: #f1f5f9;
}
.ab-icon-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
}
.ab-icon-tile {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 12px 6px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 84px;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.ab-icon-tile:hover {
  border-color: #a78bfa;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.ab-icon-tile.is-on {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25);
  background: #f5f3ff;
}
.ab-icon-tile__glyph {
  font-size: 1.5rem;
  line-height: 1;
  color: #334155;
}
.ab-icon-tile__name {
  font: 500 10px/1.2 system-ui, sans-serif;
  color: #64748b;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ab-icon-modal__foot {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  justify-content: flex-end;
}
.ab-icon-modal__insert:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 720px) {
  .ab-icon-modal__body { grid-template-columns: 1fr; }
  .ab-icon-modal__cats {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
}

/* Switch Sim/Não — must beat .ab-field label / #ab-props input */
.ab-field-switch { margin-bottom: 12px; }
.ab-field.ab-field-switch > label.ab-switch-row,
label.ab-switch-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  width: 100%;
  margin-bottom: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: inherit !important;
  font: inherit !important;
}
.ab-switch-label {
  font: 600 12px system-ui, sans-serif !important;
  color: #e2e8f0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}
.ab-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-shrink: 0;
}
/* Hide native checkbox completely (never let #ab-props input restyle it) */
.ab-switch input[type="checkbox"],
.ab-settings-toggle input[type="checkbox"],
.ab-toggle input[type="checkbox"],
#ab-props .ab-switch input,
#ab-props .ab-settings-toggle input,
#ab-props .ab-toggle input,
#ab-props input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}
.ab-switch-ui {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #334155;
  position: relative;
  transition: background .15s;
  flex-shrink: 0;
  display: block;
  box-sizing: border-box;
}
.ab-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.ab-switch.is-on .ab-switch-ui { background: #7c3aed; }
.ab-switch.is-on .ab-switch-ui::after { transform: translateX(18px); }
.ab-switch-text {
  font: 600 11px system-ui, sans-serif !important;
  color: #94a3b8 !important;
  min-width: 28px;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.ab-switch.is-on .ab-switch-text { color: #c4b5fd !important; }

/* Element tabs — icon-only row (Gutenberg-style) */
.ab-elem-tabs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-around;
  gap: 0;
  margin: 0 0 12px;
  position: sticky;
  top: 42px;
  z-index: 1;
  background: #0b1220;
  border-bottom: 2px solid #1e293b;
  overflow-x: auto;
  scrollbar-width: none;
}
.ab-elem-tabs::-webkit-scrollbar { display: none; }
.ab-elem-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: #94a3b8;
  border-radius: 0;
  padding: 10px 12px;
  cursor: pointer;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.ab-elem-tab:hover { color: #e2e8f0; }
.ab-elem-tab.is-active {
  background: transparent;
  color: #c4b5fd;
  border-bottom-color: #7c3aed;
}
.ab-elem-tab__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.ab-elem-tab__ico svg {
  width: 20px;
  height: 20px;
}
.ab-elem-pane { min-height: 40px; }

.ab-widget-group-title {
  font: 700 11px/1 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin: 14px 0 8px;
}
.ab-widget-group-title:first-child { margin-top: 0; }

/* Divisor entre subgrupos do painel Layout (Seções | Seção interna | Containers | Barra lateral) */
.ab-layout-divider {
  height: 0;
  border: 0;
  border-top: 1px solid #334155;
  margin: 16px 0 2px;
  width: 100%;
  display: block;
  flex: 0 0 auto;
}

/* Media gallery field */
.ab-media-preview {
  border: 1px dashed #334155;
  border-radius: 8px;
  background: #0f172a;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}
.ab-media-preview img {
  max-width: 100%;
  max-height: 140px;
  display: block;
  object-fit: contain;
}
.ab-media-preview--empty {
  color: #64748b;
  font: 600 11px system-ui, sans-serif;
}
.ab-media-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.ab-media-row .ab-media-url { flex: 1; min-width: 0; }
.ab-media-pick {
  flex-shrink: 0;
  white-space: nowrap;
  gap: 6px !important;
}
.ab-media-pick svg { width: 14px; height: 14px; }
.ab-cat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ab-cat-item {
  border: 1px solid #1e293b;
  background: #111827;
  border-radius: 8px;
  padding: 14px 8px 10px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  color: #cbd5e1;
  font: 600 11px system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color .12s, background .12s, color .12s;
}
.ab-cat-item:hover {
  border-color: #7c3aed;
  background: #1e1b4b;
  color: #f8fafc;
}
.ab-cat-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
}
.ab-cat-item:hover .ab-cat-icon { color: #c4b5fd; }
.ab-cat-icon svg { width: 22px; height: 22px; }
.ab-cat-label { line-height: 1.2; }

/* Site settings panel */
.ab-settings-tabs {
  display: flex;
  gap: 0;
  margin: 0 0 14px;
  border-bottom: 2px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0b1220;
  padding-top: 2px;
}
.ab-settings-tab {
  flex: 1 1 50%;
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: #94a3b8;
  padding: 10px 8px;
  font: 700 11px system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.ab-settings-tab:hover { color: #e2e8f0; }
.ab-settings-tab.is-active {
  color: #c4b5fd;
  border-bottom-color: #7c3aed;
}
.ab-ss-mode-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.ab-ss-mode {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #111827;
  color: #e2e8f0 !important;
  font: 600 12px system-ui, sans-serif !important;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.ab-ss-mode input {
  width: 16px !important;
  height: 16px !important;
  accent-color: #7c3aed;
  margin: 0;
  flex-shrink: 0;
}
.ab-ss-mode.is-on {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.15);
  color: #f5f3ff !important;
}
#ab-site-settings .ab-field select,
#ab-site-settings .ab-field input[type="text"],
#ab-site-settings .ab-field input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #475569 !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  border-radius: 8px;
  padding: 9px 10px;
  font: 13px system-ui, sans-serif !important;
  -webkit-text-fill-color: #f8fafc;
}
#ab-site-settings .ab-field label {
  display: block;
  font: 600 11px system-ui, sans-serif;
  color: #94a3b8 !important;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ab-ss-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.ab-ss-bg-preview {
  margin: 8px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #1e293b;
  max-height: 120px;
}
.ab-ss-bg-preview img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.ab-settings-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1e293b;
}
.ab-g-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ab-g-size-row select {
  flex: 1 1 auto;
  min-width: 0;
}
.ab-g-size-num {
  width: 72px !important;
  flex: 0 0 72px;
  text-align: center;
}
.ab-g-size-unit {
  font: 600 11px system-ui, sans-serif;
  color: #64748b;
  flex: 0 0 auto;
}
.ab-field--font-global select {
  width: 100%;
}
.ab-settings-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 12px system-ui, sans-serif;
  color: #e2e8f0;
  margin-bottom: 12px;
}
.ab-settings-section-title svg { width: 16px; height: 16px; color: #a78bfa; }
.ab-settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #111827;
  color: #cbd5e1;
  font: 600 12px system-ui, sans-serif;
  cursor: pointer;
  position: relative;
  text-transform: none !important;
  letter-spacing: 0 !important;
  width: 100%;
  box-sizing: border-box;
}
.ab-settings-toggle svg { width: 16px; height: 16px; flex-shrink: 0; color: #94a3b8; }
.ab-settings-toggle .ab-settings-toggle-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}
/* Custom check pill (native input is visually hidden) */
.ab-settings-toggle .ab-check-ui {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #475569;
  background: #0f172a;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
  transition: border-color .15s, background .15s;
}
.ab-settings-toggle .ab-check-ui::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .12s;
}
.ab-settings-toggle.is-on {
  border-color: #7c3aed;
  background: #1e1b4b;
  color: #f8fafc;
}
.ab-settings-toggle.is-on svg { color: #c4b5fd; }
.ab-settings-toggle.is-on .ab-check-ui {
  border-color: #7c3aed;
  background: #7c3aed;
}
.ab-settings-toggle.is-on .ab-check-ui::after {
  transform: rotate(45deg) scale(1);
}
.ab-field-custom { margin-top: -6px; }
.ab-custom-label {
  display: block;
  font: 600 11px system-ui, sans-serif;
  color: #a78bfa !important;
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
}
.ab-custom-input {
  border: 1px solid #7c3aed !important;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}
.ab-canvas-wrap {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto !important; /* barra de scroll da página no editor */
  -webkit-overflow-scrolling: touch;
  background: #334155;
  /* Slim gutters so the page preview uses almost all available width */
  padding: 12px;
  box-sizing: border-box;
}
/* Theme part editor (header/footer): edge-to-edge canvas, no gray side pad */
.ab-body--theme-part .ab-canvas-wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.ab-body--theme-part .ab-canvas,
.ab-body--theme-part .ab-page-preview {
  border-radius: 0 !important;
  max-width: none !important;
  width: 100% !important;
}
.ab-canvas {
  /* Fill the available center column — match real browser width, not a 1100px card */
  max-width: none;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  color: #0f172a;
  min-height: 480px;
  height: auto; /* cresce com o conteúdo para o wrap poder rolar */
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  padding: 0;
  overflow: visible; /* não cortar a página — scroll fica no wrap */
  box-sizing: border-box;
}
.ab-page-preview {
  background: #fff;
  color: #0f172a;
  min-height: 480px;
}
.ab-theme-chrome {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.ab-theme-chrome--footer {
  border-bottom: 0;
  border-top: 1px solid #e2e8f0;
}
.ab-theme-chrome-label {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 5;
  background: #0f172a;
  color: #e2e8f0;
  font: 600 10px/1 system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0.75;
  pointer-events: none;
}
/* Edit header/footer from page canvas (Theme Builder). */
.ab-theme-chrome-edit {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 6;
  appearance: none;
  border: 0;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  font: 600 11px/1.2 system-ui, sans-serif;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  opacity: 0.92;
  transition: opacity 0.15s, background 0.15s, transform 0.12s;
}
.ab-theme-chrome-edit:hover {
  opacity: 1;
  background: #1d4ed8;
  transform: translateY(-1px);
}
.ab-theme-chrome:hover .ab-theme-chrome-edit {
  opacity: 1;
}
.ab-chrome-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ab-chrome-edit-row .ab-btn {
  flex: 1 1 auto;
  min-width: 120px;
  text-align: center;
  justify-content: center;
}
.ab-theme-iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 72px;
  height: 100px;
  border: 0;
  background: #fff;
  overflow: hidden;
  pointer-events: none; /* visual only in editor */
}
.ab-theme-chrome--header .ab-theme-iframe {
  min-height: 88px;
}
.ab-theme-chrome--footer .ab-theme-iframe {
  min-height: 80px;
}
/* Mobile canvas: header chrome must fit full logo + Menu button (like public site) */
.ab-page-preview.ab-bp-mobile .ab-theme-chrome {
  overflow: visible;
  max-width: 100%;
}
.ab-page-preview.ab-bp-mobile .ab-theme-chrome--header .ab-theme-iframe {
  /* Room for ~100px logo + Menu toggle + padding — JS postMessage adjusts after paint */
  min-height: 168px;
  height: 180px;
  overflow: hidden;
  pointer-events: auto;
}
.ab-page-preview.ab-bp-tablet .ab-theme-chrome--header .ab-theme-iframe {
  min-height: 100px;
  height: auto;
}
.ab-theme-chrome--off {
  display: none !important;
}
.ab-page-body {
  /* Same gutters as public .ab-content-wrap (must match front.css --ab-page-gutter) */
  --ab-page-gutter: 20px;
  padding: 0 0 3rem;
  padding-left: var(--ab-page-gutter);
  padding-right: var(--ab-page-gutter);
  min-height: 200px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  position: relative; /* site bg image/carousel layers */
  /* Isolate admin chrome: theme variables apply inside canvas */
  color: var(--wp--preset--color--foreground, #000);
  background-color: var(--wp--preset--color--background, #fff);
}
/*
 * Theme Builder (header/footer/single): no side gutters on the canvas —
 * full-bleed sections must match the public edge-to-edge footer/header.
 * Content padding lives on each section’s styles.
 */
.ab-page-body.ab-page-body--theme-part,
.ab-page-preview.ab-bp-desktop .ab-page-body.ab-page-body--theme-part,
.ab-page-preview.ab-bp-tablet .ab-page-body.ab-page-body--theme-part,
.ab-page-preview.ab-bp-mobile .ab-page-body.ab-page-body--theme-part {
  --ab-page-gutter: 0px;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* Match public mobile/tablet gutters (page editor only) */
.ab-page-preview.ab-bp-mobile .ab-page-body:not(.ab-page-body--theme-part) {
  --ab-page-gutter: 16px;
  padding-left: 16px;
  padding-right: 16px;
}
.ab-page-preview.ab-bp-tablet .ab-page-body:not(.ab-page-body--theme-part) {
  --ab-page-gutter: 20px;
  padding-left: 20px;
  padding-right: 20px;
}
.ab-page-preview.ab-bp-desktop .ab-page-body:not(.ab-page-body--theme-part) {
  --ab-page-gutter: 24px;
  padding-left: 24px;
  padding-right: 24px;
}
/* Don't let WP admin forms override canvas typography */
.ab-page-body,
.ab-page-body h1,
.ab-page-body h2,
.ab-page-body h3,
.ab-page-body p,
.ab-page-body a {
  font-family: inherit;
}
.ab-page-body .ab-document--editor {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.ab-theme-fallback-header,
.ab-theme-fallback-footer {
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 24px;
}
.ab-theme-fallback-footer {
  border-bottom: 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 24px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}
.ab-theme-fallback-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.ab-theme-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ab-theme-brand img { max-height: 48px; width: auto; }
.ab-theme-site-title {
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  font-size: 1.1rem;
}
.ab-theme-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ab-theme-nav a {
  color: #334155;
  text-decoration: none;
  font-size: 14px;
}
.ab-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font: 600 12px system-ui, sans-serif;
  cursor: pointer;
  user-select: none;
  position: relative;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-sizing: border-box;
  margin-bottom: 8px;
}
.ab-toggle .ab-toggle-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
  white-space: normal;
}
.ab-toggle .ab-check-ui {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #475569;
  background: #0f172a;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
}
.ab-toggle .ab-check-ui::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .12s;
}
.ab-toggle.is-on {
  border-color: #7c3aed;
  background: #2e1065;
}
.ab-toggle.is-on .ab-check-ui {
  border-color: #7c3aed;
  background: #7c3aed;
}
.ab-toggle.is-on .ab-check-ui::after {
  transform: rotate(45deg) scale(1);
}
.ab-top-toggles {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ab-bp-group {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 2px;
}
.ab-bp-btn {
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 36px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ab-bp-btn svg { width: 18px; height: 18px; display: block; }
.ab-bp-btn:hover { color: #e2e8f0; background: #1e293b; }
.ab-bp-btn.is-active {
  background: #7c3aed;
  color: #fff;
}
.ab-bp-badge {
  display: none;
  font: 600 10px system-ui, sans-serif;
  color: #c4b5fd;
  padding: 0 6px;
}
/* Props device icons */
.ab-device-icons {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.ab-dev {
  border: 0;
  background: transparent;
  color: #64748b;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ab-dev svg { width: 14px; height: 14px; }
.ab-dev:hover { color: #e2e8f0; background: #1e293b; }
.ab-dev.is-on { color: #fff; background: #7c3aed; }
.ab-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.ab-preset-btn {
  border: 1px solid #334155;
  background: #111827;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}
.ab-preset-btn:hover {
  border-color: #7c3aed;
  background: #1e1b4b;
}
.ab-layers li {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ab-layer-handle {
  opacity: 0.5;
  cursor: grab;
  font-size: 12px;
}
.ab-layers li.is-dragging { opacity: 0.45; }
.ab-layers li.ab-layer-drop {
  outline: 1px dashed #a78bfa;
  background: rgba(124, 58, 237, 0.15);
}
.ab-color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ab-color-preview {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #334155;
  flex-shrink: 0;
  box-sizing: border-box;
  /* checkerboard for transparency preview */
  background-color: transparent;
  background-image:
    linear-gradient(45deg, #475569 25%, transparent 25%),
    linear-gradient(-45deg, #475569 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #475569 75%),
    linear-gradient(-45deg, transparent 75%, #475569 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}
.ab-color-swatch {
  width: 40px !important;
  min-width: 40px;
  height: 36px;
  padding: 2px !important;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.ab-color-row input[type="text"],
.ab-color-hex {
  flex: 1;
  min-width: 0;
}
.ab-color-clear {
  flex-shrink: 0;
  padding: 8px 10px !important;
}
.ab-color-alpha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.ab-color-alpha-label {
  font: 600 11px system-ui, sans-serif;
  color: #94a3b8;
  flex-shrink: 0;
  min-width: 88px;
}
.ab-color-alpha {
  flex: 1;
  min-width: 0;
  accent-color: #7c3aed;
  cursor: pointer;
  height: 6px;
}
.ab-color-alpha-val {
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #e2e8f0;
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}
.ab-field-color .ab-field-hint code {
  font-size: 10px;
  word-break: break-all;
}

/* Background solid / gradient panel */
.ab-field-bg {
  margin-bottom: 12px;
}
.ab-bg-mode-tabs {
  display: flex;
  gap: 4px;
  margin: 6px 0 10px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 3px;
}
.ab-bg-mode-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font: 600 12px system-ui, sans-serif;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.ab-bg-mode-tab.is-on {
  background: #7c3aed;
  color: #fff;
}
.ab-bg-preview {
  height: 40px;
  border-radius: 8px;
  border: 1px solid #334155;
  margin-bottom: 10px;
  background-color: #1e293b;
  background-image:
    linear-gradient(45deg, #334155 25%, transparent 25%),
    linear-gradient(-45deg, #334155 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #334155 75%),
    linear-gradient(-45deg, transparent 75%, #334155 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.ab-bg-stops {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ab-bg-stop {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ab-bg-stop-swatch {
  width: 36px !important;
  min-width: 36px;
  height: 32px;
  padding: 2px !important;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.ab-bg-stop-color {
  flex: 1;
  min-width: 0;
}
.ab-bg-stop-pos {
  width: 56px !important;
  flex-shrink: 0;
}
.ab-bg-stop-pct {
  font: 600 11px system-ui, sans-serif;
  color: #64748b;
  flex-shrink: 0;
}
.ab-bg-stop-rm {
  flex-shrink: 0;
  padding: 6px 10px !important;
}
.ab-bg-angle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ab-bg-angle-row label {
  width: 100%;
  margin: 0 !important;
}
.ab-bg-grad-angle {
  flex: 1;
  min-width: 120px;
  accent-color: #7c3aed;
}
.ab-bg-angle-val {
  font: 600 11px ui-monospace, monospace;
  color: #e2e8f0;
  min-width: 36px;
  text-align: right;
}
.ab-bg-grad-pane .ab-field {
  margin-bottom: 10px;
}
.ab-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ab-field-label-row label {
  margin-bottom: 0 !important;
}
.ab-device-icons {
  display: inline-flex;
  gap: 2px;
  background: #0b1220;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 2px;
}
.ab-dev {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.ab-dev:hover { color: #e2e8f0; background: #1e293b; }
.ab-dev.is-on {
  background: #7c3aed;
  color: #fff;
}
.ab-bp-props {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: #1e1b4b;
  border: 1px solid #5b21b6;
  border-radius: 8px;
}
.ab-bp-props-label {
  font: 600 11px system-ui, sans-serif;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ab-bp-props-name {
  color: #f8fafc;
  font-size: 13px;
}
.ab-field-hint code {
  color: #c4b5fd;
  font-size: 11px;
}
.ab-page-preview.ab-bp-tablet,
.ab-page-preview.ab-bp-mobile {
  box-shadow: 0 0 0 1px #7c3aed, 0 20px 50px rgba(0,0,0,.35);
  border-radius: 8px;
  overflow: hidden;
}
/* Editor mobile canvas: stack grids/rows like the public page (≤767). */
.ab-page-preview.ab-bp-mobile .ab-type-section {
  grid-template-columns: 1fr !important;
  flex-direction: column !important;
}
.ab-page-preview.ab-bp-mobile .ab-type-section > .ab-type-container {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
}
/* Desktop/tablet: keep multi-column grid visible (25/75 etc.) */
.ab-page-preview.ab-bp-desktop .ab-type-section.ab-section--grid,
.ab-page-preview:not(.ab-bp-mobile):not(.ab-bp-tablet) .ab-type-section.ab-section--grid {
  /* inline style already has 12 tracks — don't force 1fr */
}
/* Badge hint when mobile/tablet view changes layout */
.ab-view-hint {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #1e1b4b;
  color: #e2e8f0;
  font: 600 12px/1.45 system-ui, sans-serif;
  border-radius: 8px;
  border: 1px solid #4c1d95;
}
.ab-view-hint--mobile,
.ab-view-hint--tablet {
  display: block;
}

/* Template library modal (editor) — apply layout popup */
.ab-tpl-lib-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ab-tpl-lib-panel {
  width: min(560px, 100%);
  max-height: min(80vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color: #e2e8f0;
}
.ab-tpl-lib-panel--wide {
  width: min(920px, 100%);
  max-height: min(88vh, 860px);
}
.ab-tpl-lib-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #1e293b;
  font-size: 15px;
}
.ab-tpl-lib-sub {
  margin: 4px 0 0;
  font: 400 12px/1.4 system-ui, sans-serif;
  color: #94a3b8;
  max-width: 52ch;
}
.ab-tpl-lib-toolbar {
  padding: 10px 16px 0;
}
.ab-tpl-lib-search {
  width: 100%;
  box-sizing: border-box;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  padding: 9px 12px;
  font: 14px system-ui, sans-serif;
}
.ab-tpl-lib-search:focus {
  outline: none;
  border-color: #7c3aed;
}
.ab-tpl-lib-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid #1e293b;
}
.ab-tpl-lib-tab {
  appearance: none;
  border: 1px solid #334155;
  background: #1e293b;
  color: #cbd5e1;
  border-radius: 999px;
  padding: 5px 12px;
  font: 600 12px system-ui, sans-serif;
  cursor: pointer;
}
.ab-tpl-lib-tab.is-on {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.ab-tpl-lib-list {
  overflow: auto;
  padding: 8px 12px 12px;
  flex: 1;
}
.ab-tpl-lib-grid {
  overflow: auto;
  padding: 14px 16px;
  flex: 1 1 auto;
  min-height: 280px;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 12px;
  align-content: start;
}
/* Título de categoria na biblioteca (Escolar, Empresa, Blog…) — ocupa a linha inteira do grid */
.ab-tpl-cat-title {
  grid-column: 1 / -1;
  font: 700 12px/1.2 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
  margin: 10px 0 2px;
  padding: 12px 0 8px;
  border-bottom: 1px solid #334155;
}
.ab-tpl-cat-title:first-child {
  margin-top: 0;
  padding-top: 4px;
}
.ab-tpl-lib-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  display: flex !important;
  flex-direction: column !important;
  min-height: 200px;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.ab-tpl-lib-card:hover {
  border-color: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ab-tpl-lib-card:hover .ab-tpl-lib-card__overlay {
  opacity: 1;
}
.ab-tpl-lib-card__thumb {
  position: relative;
  flex: 0 0 auto;
  height: 140px !important;
  min-height: 140px !important;
  background: #1e293b;
  overflow: hidden;
}
.ab-tpl-lib-card__img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #e2e8f0;
}
.ab-tpl-lib-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 8px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.2) 55%, transparent 100%);
  color: #f8fafc;
  font: 600 11px/1.3 system-ui, sans-serif;
  text-align: center;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.ab-tpl-lib-card__ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 28px system-ui, sans-serif;
  color: #a78bfa;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
}
.ab-tpl-lib-card__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.ab-tpl-lib-card__body strong {
  font-size: 13px;
  line-height: 1.3;
}
.ab-tpl-lib-card__meta {
  font-size: 11px;
  color: #64748b;
}
.ab-tpl-lib-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #1e293b;
}
.ab-tpl-lib-item:last-child {
  border-bottom: 0;
}
.ab-tpl-lib-item .ab-btn {
  flex-shrink: 0;
}
.ab-tpl-lib-foot {
  margin: 0;
  padding: 8px 16px 12px;
  border-top: 1px solid #1e293b;
}
.ab-btn--sm {
  padding: 6px 10px !important;
  font-size: 12px !important;
  gap: 6px;
  display: inline-flex;
  align-items: center;
}
.ab-btn--sm svg {
  width: 14px;
  height: 14px;
}
.ab-field { margin-bottom: 14px; }
.ab-field label {
  display: block;
  font: 600 11px system-ui, sans-serif;
  color: #94a3b8 !important;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── 4-side dimensions (margin / padding / radius / border) ───────────── */
.ab-field-dim { margin-bottom: 16px; }
.ab-dim__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: -4px 0 8px;
}
.ab-dim__unit {
  width: auto !important;
  min-width: 56px;
  max-width: 72px;
  padding: 5px 6px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}
.ab-dim__link {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  background: #0f172a !important;
  color: #94a3b8 !important;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ab-dim__link:hover { border-color: #7c3aed !important; color: #e2e8f0 !important; }
.ab-dim__link.is-linked {
  border-color: #7c3aed !important;
  background: #2e1065 !important;
  color: #c4b5fd !important;
}
.ab-dim__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.ab-dim__cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
}
.ab-dim__cell .ab-dim__input {
  width: 100% !important;
  min-width: 0 !important;
  text-align: center;
  padding: 7px 4px !important;
  font-size: 12px !important;
  font-variant-numeric: tabular-nums;
}
.ab-dim__side {
  display: block;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  line-height: 1;
  user-select: none;
}
.ab-border-meta { margin-top: 10px; }
.ab-border-meta__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.ab-border-meta__row label {
  font: 600 10px system-ui, sans-serif;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ab-field-border-box .ab-field-color {
  margin-bottom: 0;
}
.ab-field-dim .ab-field-hint code {
  font-size: 11px;
  color: #c4b5fd;
}
/* Force readable form controls (theme CSS must not wash text).
   NEVER style checkbox/radio here — switches use custom UI. */
.ab-panel .ab-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
.ab-panel .ab-field select,
.ab-panel .ab-field textarea,
.ab-props .ab-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
.ab-props .ab-field select,
.ab-props .ab-field textarea,
#ab-props input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
#ab-props select,
#ab-props textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #475569 !important;
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-radius: 8px;
  padding: 9px 10px;
  font: 13px system-ui, sans-serif !important;
  color-scheme: dark;
  -webkit-text-fill-color: #f8fafc;
  opacity: 1 !important;
  line-height: 1.4;
}
#ab-props input::placeholder,
#ab-props textarea::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8;
  opacity: 1;
}
#ab-props input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
#ab-props select:focus,
#ab-props textarea:focus {
  outline: none;
  border-color: #a78bfa !important;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.35);
}
/* Dropdown list items (Windows/Chrome often ignore parent color) */
#ab-props select option,
.ab-panel select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}
#ab-props select option:checked,
#ab-props select option:hover {
  background-color: #6d28d9 !important;
  color: #ffffff !important;
}
#ab-props input[readonly] {
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1;
  background: #1e293b !important;
}
.ab-field textarea { min-height: 100px; resize: vertical; }
.ab-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}
.ab-props-section-title {
  font: 700 11px system-ui, sans-serif;
  color: #c4b5fd;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 16px 0 10px;
  padding-top: 12px;
  border-top: 1px solid #1e293b;
}
.ab-props-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.ab-props-empty { color: #94a3b8; font-size: 13px; line-height: 1.5; }

/* ── Props panel: tabs + search + accordion groups ───────────────────────── */
.ab-props-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0f172a;
  padding: 0 0 10px;
  margin: 0 0 4px;
  border-bottom: 1px solid #1e293b;
}
.ab-props-type {
  font: 700 11px system-ui, sans-serif;
  color: #a78bfa;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.ab-props-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.ab-props-search-ico {
  position: absolute;
  left: 10px;
  font-size: 13px;
  opacity: 0.7;
  pointer-events: none;
}
.ab-props-search {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 32px 8px 32px !important;
  border-radius: 8px !important;
  border: 1px solid #334155 !important;
  background: #1e293b !important;
  color: #e2e8f0 !important;
  font-size: 13px !important;
}
.ab-props-search:focus {
  outline: none !important;
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25) !important;
}
.ab-props-search-clear {
  position: absolute;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.ab-props-search-clear:hover {
  background: #334155;
  color: #fff;
}
/* Props tabs — icon-only, underline active (Gutenberg) */
.ab-props-tabs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-around;
  gap: 0;
  margin: 0 0 10px;
  border-bottom: 2px solid #1e293b;
}
.ab-props-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: #94a3b8;
  padding: 10px 8px;
  border-radius: 0;
  cursor: pointer;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: color 0.12s, border-color 0.12s;
}
.ab-props-tab:hover {
  color: #e2e8f0;
}
.ab-props-tab.is-active {
  background: transparent;
  color: #c4b5fd;
  border-bottom-color: #7c3aed;
}
.ab-props-tab.is-empty {
  opacity: 0.4;
}
.ab-props-tab__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.ab-props-tab__ico svg {
  width: 20px;
  height: 20px;
}
.ab-props-tab__n {
  position: absolute;
  top: 4px;
  right: 6px;
  min-width: 14px;
  padding: 1px 4px;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font: 700 9px system-ui, sans-serif;
  text-align: center;
}
.ab-props-tab-panel {
  padding-top: 4px;
}

/* Nav menu items list (editable, Gutenberg-like) */
.ab-field-nav-items .ab-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  border: 1px solid #1e293b;
  border-radius: 10px;
  overflow: hidden;
  background: #0b1220;
}
.ab-nav-bulk {
  margin: 8px 0 6px;
  padding: 8px 10px;
  border: 1px solid #1e293b;
  border-radius: 10px;
  background: #0b1220;
}
.ab-nav-bulk.is-active {
  border-color: #5b21b6;
  background: #1e1b4b;
}
.ab-nav-bulk__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ab-nav-bulk__top .ab-btn {
  padding: 4px 8px !important;
  font-size: 11px !important;
  width: auto !important;
}
.ab-nav-bulk__count {
  margin-left: auto;
  font: 600 11px system-ui, sans-serif;
  color: #a78bfa;
}
.ab-nav-bulk__move {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #312e81;
}
.ab-nav-bulk__lbl {
  font: 600 11px system-ui, sans-serif;
  color: #c4b5fd;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ab-nav-bulk__parent {
  width: 100% !important;
}
.ab-nav-bulk__move .ab-btn {
  width: 100% !important;
}
.ab-nav-item {
  border-bottom: 1px solid #1e293b;
}
.ab-nav-item:last-child {
  border-bottom: 0;
}
.ab-nav-item.is-selected {
  background: rgba(76, 29, 149, 0.25);
}
.ab-nav-item.is-selected .ab-nav-item__toggle {
  color: #e9d5ff;
}
.ab-nav-item__row {
  display: flex;
  align-items: stretch;
  min-height: 40px;
}
.ab-nav-item__check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  cursor: pointer;
  position: relative;
  margin: 0;
  padding: 0;
}
.ab-nav-item__check input {
  position: absolute !important;
  opacity: 0 !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  cursor: pointer;
  z-index: 1;
}
.ab-nav-item__check .ab-check-ui {
  width: 16px;
  height: 16px;
  border: 2px solid #64748b;
  border-radius: 4px;
  background: #0f172a;
  pointer-events: none;
  box-sizing: border-box;
}
.ab-nav-item__check input:checked + .ab-check-ui {
  border-color: #7c3aed;
  background: #7c3aed;
  box-shadow: inset 0 0 0 2px #0f172a;
}
.ab-nav-item__toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 4px;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font: 500 13px system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.ab-nav-item__toggle:hover {
  background: #1e293b;
}
.ab-nav-item.is-open .ab-nav-item__toggle {
  background: #1e293b;
  color: #c4b5fd;
}
.ab-nav-item__ico {
  display: flex;
  flex-shrink: 0;
  color: #94a3b8;
}
.ab-nav-item__ico svg {
  width: 18px;
  height: 18px;
}
.ab-nav-item__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ab-nav-item__subn {
  color: #64748b;
  font-size: 11px;
}
.ab-nav-item__move {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
  gap: 0;
}
.ab-nav-item__up,
.ab-nav-item__down {
  width: 28px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}
.ab-nav-item__up:hover,
.ab-nav-item__down:hover {
  color: #c4b5fd;
  background: #1e293b;
}
.ab-nav-item__up:disabled,
.ab-nav-item__down:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}
.ab-nav-item__rm {
  flex-shrink: 0;
  width: 36px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
}
.ab-nav-item__rm:hover {
  color: #fca5a5;
  background: #3f1d1d;
}
.ab-nav-sub__move {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ab-nav-sub__up,
.ab-nav-sub__down {
  width: 22px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 8px;
  line-height: 1;
  cursor: pointer;
}
.ab-nav-sub__up:hover,
.ab-nav-sub__down:hover {
  color: #c4b5fd;
}
.ab-nav-sub__up:disabled,
.ab-nav-sub__down:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}
.ab-nav-sub {
  grid-template-columns: 1fr 1fr auto 28px !important;
}
.ab-nav-item__edit {
  padding: 8px 10px 12px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
}
.ab-nav-item__edit .ab-field {
  margin-bottom: 8px;
}
.ab-nav-item__children {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #1e293b;
}
.ab-nav-sub {
  display: grid;
  grid-template-columns: 1fr 1fr 28px;
  gap: 4px;
  margin-bottom: 4px;
  align-items: center;
}
.ab-nav-sub input {
  min-width: 0 !important;
  font-size: 12px !important;
  padding: 6px 8px !important;
}
.ab-nav-sub__rm {
  padding: 4px !important;
  min-width: 28px;
}
.ab-nav-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ab-nav-add__plus {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.ab-nav-item.is-readonly .ab-nav-item__toggle {
  cursor: default;
}
.ab-nav-item.is-readonly .ab-nav-item__toggle:hover {
  background: transparent;
}
/* Focal-point picker (drag ball inside square → object-position) */
.ab-field-focal { margin-bottom: 12px; }
.ab-focal {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 220px;
  margin: 0 auto;
  border-radius: 12px;
  border: 2px solid #334155;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.4);
  cursor: crosshair;
  touch-action: none;
  overflow: hidden;
  user-select: none;
}
.ab-focal__knob {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.45), 0 2px 8px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 2;
  pointer-events: auto;
}
.ab-focal__knob:active,
body.ab-focal-dragging .ab-focal__knob {
  cursor: grabbing;
  background: #a78bfa;
}
body.ab-focal-dragging {
  user-select: none !important;
  cursor: grabbing !important;
}
.ab-focal__readout {
  text-align: center;
  margin-top: 8px;
  font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #94a3b8;
}
.ab-focal__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}
.ab-focal__preset {
  appearance: none;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 999px;
  padding: 5px 10px;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}
.ab-focal__preset:hover {
  border-color: #7c3aed;
  background: #1e1b4b;
  color: #fff;
}

.ab-props-acc {
  border: 1px solid #1e293b;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #0b1220;
  overflow: hidden;
}
.ab-props-acc__hd {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font: 700 12px system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
}
.ab-props-acc__hd:hover {
  background: #1e293b;
}
.ab-props-acc__chev {
  display: inline-flex;
  width: 16px;
  color: #a78bfa;
  font-size: 12px;
  transition: transform 0.15s ease;
  transform: rotate(-90deg);
}
.ab-props-acc.is-open .ab-props-acc__chev {
  transform: rotate(0deg);
}
.ab-props-acc__title {
  flex: 1;
  letter-spacing: 0.02em;
}
.ab-props-acc__count {
  font: 600 10px system-ui, sans-serif;
  color: #64748b;
  background: #1e293b;
  border-radius: 999px;
  padding: 2px 7px;
}
.ab-props-acc__bd {
  display: none;
  padding: 0 12px 12px;
  border-top: 1px solid #1e293b;
}
.ab-props-acc.is-open .ab-props-acc__bd {
  display: block;
}
.ab-props-field + .ab-props-field {
  margin-top: 4px;
}
/* When tipografia group is empty of typography fields, still show bp row cleanly */
.ab-props-acc__bd > .ab-props-field:first-child {
  margin-top: 10px;
}
.ab-btn--danger { background: #7f1d1d; border-color: #991b1b; color: #fecaca; width: 100%; }
.ab-loading, .ab-error-box { color: #94a3b8; padding: 40px; text-align: center; }
.ab-error-box { max-width: 480px; margin: 80px auto; background: #1e1b4b; border: 1px solid #7c3aed; border-radius: 12px; color: #e2e8f0; }
.ab-layers { list-style: none; margin: 0; padding: 0; }
.ab-layers li {
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: #cbd5e1;
  /* padding-left set inline per depth — supports unlimited nesting */
}
.ab-layers li:hover { background: #1e293b; }
.ab-layers li.is-active { background: #4c1d95; color: #fff; }
.ab-layers li.is-parent .ab-layer-label { font-weight: 600; }
.ab-layers li.is-leaf .ab-layer-label { font-weight: 400; color: #e2e8f0; }
.ab-layers li.is-active .ab-layer-label { color: #fff; }
.ab-layer-branch {
  flex: 0 0 auto;
  width: 12px;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
}
.ab-layer-branch--root { width: 0; overflow: hidden; }
.ab-layers li.is-active .ab-layer-branch { color: #c4b5fd; }
.ab-layer-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Fallbacks if inline style missing (legacy) */
.ab-layers .depth-0 { padding-left: 8px; }
.ab-layers .depth-1 { padding-left: 22px; }
.ab-layers .depth-2 { padding-left: 36px; }
.ab-layers .depth-3 { padding-left: 50px; }
.ab-layers .depth-4 { padding-left: 64px; }
.ab-layers .depth-5 { padding-left: 78px; }
.ab-layers .depth-6 { padding-left: 92px; }
.ab-layers .depth-7 { padding-left: 106px; }
.ab-layers .depth-8 { padding-left: 120px; }
