/* Page Builder admin UI - see pagebuilder-ui.js. Visual language matches the reference
   implementation's PageBuilder.vue: blue (#0d6efd) hover toolbars, dashed selection borders,
   centered modal overlays, grid-based layout/element pickers. */

.pagebuilder-mount {
  display: none;
  border: 1px solid #e0e0e0; padding: 10px; background: #fafafa;
}

/* Opened via the "Page Builder (Beta)" button - covers the whole viewport, like the reference
   implementation's fullscreen builder modal, regardless of where this element sits in the page DOM. */
.pagebuilder-mount.pb-fullscreen {
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 20000; /* above the KEditor modal (11000) and everything else on this page */
  padding: 0; margin: 0; background: #fff;
}
body.pb-modal-open { overflow: hidden; }

/* bootstrap-colorpicker's popup template is <div class="colorpicker dropdown-menu">, appended
   straight to <body> - it only carries Bootstrap 3's default .dropdown-menu z-index (1000),
   far below the fullscreen page builder overlay above (20000). It was rendering and
   positioning itself correctly on click, just completely hidden behind the opaque fullscreen
   background - looked identical to the click doing nothing at all. */
.colorpicker.dropdown-menu { z-index: 20050; }

.pb-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #263238; color: #fff; flex: 0 0 auto;
}
.pb-modal-header .pb-modal-title { font-size: 14px; }
.pb-modal-header .pb-modal-title i { margin-right: 6px; }
/* Current page's name (opts.pageTitle - see buildChrome() in pagebuilder-ui.js), lighter than
   the "Page Builder" brand text itself so the two don't compete for attention. */
.pb-modal-title-page { font-weight: 400; color: #b0bec5; }
.pb-modal-header-actions .btn { margin-left: 6px; }

.pagebuilder-mount.pb-fullscreen .pb-canvas-tabs { padding: 0 16px; margin-bottom: 0; flex: 0 0 auto; }
.pagebuilder-mount.pb-fullscreen .pb-layout { flex: 1 1 auto; overflow: hidden; padding: 10px 16px; }
.pagebuilder-mount.pb-fullscreen .pb-canvas-view { height: 100%; overflow-y: auto; padding-right: 4px; }
.pagebuilder-mount.pb-fullscreen .pb-settings { height: 100%; max-height: none; }
.pb-settings  .form-control {
    padding-right: 2px !important; /* override Bootstrap 3's .has-feedback padding-right: 42px */
}
/* Canvas mode tabs (Visual / HTML / Preview) */
.pb-canvas-tabs { display: flex; border-bottom: 1px solid #ddd; margin-bottom: 10px; }
.pb-canvas-tabs .pb-tab-btn {
  padding: 8px 16px; border: none; background: #f8f9fa; cursor: pointer;
  border-bottom: 2px solid transparent; font-size: 12px;
}
.pb-canvas-tabs .pb-tab-btn.active { background: #fff; border-bottom-color: #0d6efd; color: #0d6efd; }
.pb-canvas-tabs .pb-tab-btn:hover { background: #e9ecef; }
.pb-canvas-tabs .pb-tab-btn i { margin-right: 4px; }

.pb-layout { display: flex; gap: 10px; align-items: flex-start; }

.pb-canvas-view { flex: 1 1 auto; min-height: 200px; }
.pb-canvas {
  min-height: 200px;
  border: 1px dashed #ccc;
  background: #fff;
  padding: 10px;
  border-radius: 3px;
}
.pb-empty-state { display: flex; align-items: center; justify-content: center; height: 200px; color: #999; font-size: 13px; }

/* Section */
/* .pb-section-wrap is purely structural editor chrome - drag handle, hover/selection border,
   the toolbar - and carries NONE of the section's own settings (no sectionStyles, no identity
   classes). .pb-section (inner, one level down - see renderCanvas() in pagebuilder-ui.js) is
   the "real" node instead: it gets the section's actual classes AND inline style, same as the
   published <section> does, and on purpose has ZERO CSS of its own here, so nothing an admin
   sets (Overflow: Hidden, Z-Index, etc.) can ever visually break the toolbar above it - they no
   longer share a node at all, unlike before. Transparent border at rest (not a visible color) -
   this chrome should only ever be a hover/selection affordance, never real box-model the
   published page doesn't also have.

   Every rule below requires .pb-editing, not just .pb-section-wrap/.pb-column/.pb-element on
   their own - page.twig (the exported/published page) deliberately reuses those same structural
   class names (see the comment at the top of page.twig) so canvas and export share one DOM
   shape, but .pb-editing itself is only ever added by renderCanvas() here, never by page.twig.
   Without that guard, these bare-class selectors would also match page.twig's output wherever
   it's rendered alongside this stylesheet - namely the Preview tab, which renders in this same
   admin document (a plain div, not an iframe) - so hovering "preview" content picked up the
   editor's own dashed hover borders/backgrounds, plus a stray 1-2px transparent-but-real border
   even at rest that the actual published page never has. */
.pb-section-wrap.pb-editing {
  position: relative;
  border: 2px dashed transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.pb-section-wrap.pb-editing:hover { border-color: #0d6efd; background: rgba(13, 110, 253, 0.02); }
.pb-section-wrap.pb-editing.pb-selected { border-color: #0d6efd !important; background: rgba(13, 110, 253, 0.05); }
/* Toggled by pagebuilder-ui.js's drag & drop dragover handling - highlights whichever
   section/column will actually receive the item currently being dragged. */
.pb-section-wrap.pb-editing.pb-drag-over { border-color: #198754 !important; background: rgba(25, 135, 84, 0.08) !important; }
.pb-section-toolbar {
  position: absolute; top: 0; right: 0; z-index: 10;
  display: none; gap: 2px; padding: 2px; background: #0d6efd;
}
.pb-section-wrap.pb-editing:hover .pb-section-toolbar { display: flex; }
.kr-d-flex{
  display: flex !important;
} 
.kr-flex-wrap {
  flex-wrap: wrap !important;
}
/* Flex utility classes used by pb_section_view()'s rowClasses (align-items-* and justify-content-*,
   driven by Section > Design's "Column Align Items"/"Column Justify Content" fields) - this
   project is currently on Bootstrap 3, which never defines these (they're Bootstrap 4+ flex
   utilities), so previously they rendered with zero effect both here and on the published page.
   Defined here for the admin canvas/Preview tab; the identical block inside page.twig is what
   makes them work on the actual published page, which doesn't load this stylesheet. Naming/
   semantics deliberately match Bootstrap 4/5's own utilities wherever they overlap (align-
   items-*, justify-content-start/center/end) so upgrading Bootstrap later makes these purely
   redundant rather than needing a rewrite; justify-content-space-between/-around aren't real
   Bootstrap class names (it uses -between/-around) and will keep needing this definition. */
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-stretch { align-items: stretch !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-space-between { justify-content: space-between !important; }
.justify-content-space-around { justify-content: space-around !important; }
/* Responsive display utility classes used by visibilityClass() (pagebuilder-twig-helpers.js) -
   d-none/d-sm-block/d-md-none/d-lg-none/d-lg-block, produced by the Visibility checkboxes
   (Hide on Desktop/Tablet/Mobile, present on every block type's Extra/Design tab) - same
   underlying issue as the align-items-* and justify-content-* classes above: real Bootstrap 4/5
   utility classes this project's Bootstrap 3 never defines, so "Hide on ..." rendered with
   zero visual effect both here and on the published page. Breakpoints (576/768/992/1200px)
   and naming match Bootstrap 4/5's own grid-breakpoints exactly, so upgrading Bootstrap later
   makes this purely redundant. Also defined again, identically, inside page.twig's <style>
   block for the actual published page, which doesn't load this stylesheet. */
.d-none { display: none !important; }
.d-block { display: block !important; }
@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
}
@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
}
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
}
@media (min-width: 1200px) {
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
}
/* Columns */
.pb-columns { display: flex; flex-wrap: wrap; }
/* See the .pb-editing note above .pb-section-wrap - same reasoning applies to every rule below. */
.pb-column.pb-editing { position: relative; border: 1px dashed transparent; border-radius: 3px; box-sizing: border-box; }
.pb-column.pb-editing:hover { border-color: #6c757d; }
/* Only an empty column (no elements - see the .pb-empty class in renderCanvas(),
   pagebuilder-ui.js) gets a minimum height, so its "Add Element" dropzone has room to show and
   the column stays clickable/droppable; once it has real content it sizes purely from that
   content, matching the published page instead of always carrying an extra 80px of editor
   padding no setting ever asked for. */
.pb-column.pb-editing.pb-empty { min-height: 80px; }
.pb-column.pb-editing.pb-selected { border: 2px solid #0d6efd !important; }
/* Toggled by pagebuilder-ui.js's drag & drop dragover handling - see .pb-section-wrap.pb-drag-over above. */
.pb-column.pb-editing.pb-drag-over { border-color: #198754 !important; background: rgba(25, 135, 84, 0.15) !important; }
.pb-column-toolbar {
  position: absolute; top: 0; left: 0; z-index: 10;
  display: none; gap: 2px; padding: 2px; background: #0d6efd; border-radius: 0 3px 0 0;
}
.pb-column.pb-editing:hover .pb-column-toolbar,
.pb-column.pb-editing.pb-selected .pb-column-toolbar { display: flex; }
.pb-column-dropzone {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: #999; cursor: pointer; font-size: 12px; text-align: center;
}
.pb-column-dropzone:hover { color: #0d6efd; }
.pb-column-dropzone i { font-size: 32px; }
.pb-column-content { width: 100%; height: 100%; }

/* Elements */
/* See the .pb-editing note above .pb-section-wrap - same reasoning applies to every rule below. */
.pb-element.pb-editing { position: relative; border: 1px dashed transparent; border-radius: 3px; }
.pb-element.pb-editing:hover { border-color: #66afe9; }
.pb-element.pb-editing.pb-selected { border: 2px solid #0d6efd !important; }
.pb-element-toolbar {
  display: none;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 20;
  background: #0d6efd; color: #fff; border-radius: 4px; padding: 2px 4px; white-space: nowrap;
}
.pb-element.pb-editing:hover .pb-element-toolbar { display: flex; align-items: center; gap: 2px; }
.pb-element-toolbar .pb-drag-handle { cursor: grab; padding: 0 4px; }
.pb-element-toolbar .pb-drag-handle:active { cursor: grabbing; }
.pb-section-toolbar .btn, .pb-column-toolbar .btn, .pb-element-toolbar .btn { padding: 1px 6px; }

/* Floating Bold/Italic/Link/Color toolbar shown over a text-block selection while editing in
   place - see _updateInlineFormatToolbar()/buildInlineFormatToolbar() in pagebuilder-ui.js.
   Positioned absolutely (top/left set by JS, tracking the current selection) rather than
   centered like the section/column/element toolbars above. z-index above the column/element
   modals (9999) since it needs to stay usable even while editing text inside one, though that's
   not a real scenario today. */
.pb-inline-format-toolbar {
  position: absolute; z-index: 20100;
  display: flex; align-items: center; gap: 2px;
  background: #263238; padding: 4px; border-radius: 4px;
}
.pb-inline-format-toolbar .btn { padding: 1px 6px; }
.pb-inline-format-color { width: 22px; height: 22px; padding: 0; border: none; border-radius: 3px; cursor: pointer; background: none; }

/* Progressive-disclosure toolbar, matching the reference implementation's .section-actions/.column-actions/
   .element-actions: the drag-handle and delete button (built directly into the toolbar,
   outside .pb-toolbar-actions - see toolbarHtml() in pagebuilder-ui.js) stay visible as soon
   as the toolbar itself shows; the rest (settings/add/copy/etc.) sit in .pb-toolbar-actions,
   collapsed to zero width, and only slide open once the toolbar itself is hovered. */
.pb-toolbar-actions { display: flex; align-items: center; gap: 2px; max-width: 0; overflow: hidden; transition: max-width 0.3s ease; }
.pb-section-toolbar:hover .pb-toolbar-actions,
.pb-column-toolbar:hover .pb-toolbar-actions,
.pb-element-toolbar:hover .pb-toolbar-actions {
  max-width: 300px;
}
/* Requires .pb-editing (see the note above .pb-section-wrap) for a different reason than the
   border/hover rules above: page.twig's .pb-element-preview is the SAME rendered block content
   (real links, buttons, etc.) that should stay genuinely clickable in Preview/the published
   page - pointer-events:none is only correct while actively editing, where clicks need to pass
   through to select the block instead of activating whatever it contains. Without this guard,
   Preview (sharing this stylesheet - see the note above) would make every link/button inside
   every block inert. */
.pb-element.pb-editing .pb-element-preview { pointer-events: none; }
/* pointer-events isn't just a hit-test flag on the element itself - it's inherited, so "none"
   above cascades to every descendant too, including a text block's own content. Without this,
   double-click-to-edit (pagebuilder-ui.js's dblclick handler on
   .pb-element[data-block-type="text"] .pb-element-preview [class*="kr-text-"]) could never
   fire in the first place: the double-click needed to set contenteditable="true" was itself
   being swallowed by pointer-events:none, and the rule below that re-enables pointer-events
   only applied to elements that already had contenteditable="true" - which nothing ever did
   yet. Re-enabling it unconditionally for text blocks' own wrapper breaks that deadlock; other
   block types (image/button/html/etc.) are untouched, so clicks still pass through their
   preview to select the block instead of activating whatever's rendered inside it. */
.pb-element.pb-editing[data-block-type="text"] .pb-element-preview [class*="kr-text-"] { pointer-events: auto; }
.pb-element.pb-editing .pb-element-preview [contenteditable="true"] { pointer-events: auto; outline: 1px dashed #66afe9; }

/* Slider block's dynamic slide list (rebuilt by pagebuilder-ui.js, not server-rendered) */
.pb-slide-row { border: 1px solid #ddd; border-radius: 3px; padding: 8px; margin-bottom: 8px; background: #fff; }
.pb-slide-row-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pb-slide-row-header .btn { padding: 1px 6px; }
.pb-slide-image-preview { margin-bottom: 6px; min-height: 20px; }
.pb-slide-row .form-control { margin-top: 6px; }
.pb-slide-upload-spinner { margin-left: 6px; }
.pb-slide-row .input-group { margin-top: 6px; }
.pb-slide-row .input-group .form-control { margin-top: 0; }
.pb-slide-link-upload-spinner { margin-left: 6px; }

/* Settings sidebar - matches the reference implementation's .builder-inspector: one border separating it from the
   canvas, plain background, no shadow/card treatment. */
.pb-settings {
  flex: 0 0 300px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 3px;
  max-height: 640px;
  overflow-y: auto;
}

/* Element/Page inspector tabs - matches the reference implementation's own Element Options/Page Options/Global Options
   tab bar (PageBuilder.vue), reusing this file's existing .pb-canvas-tabs/.pb-tab-btn visual
   language (active = white bg + blue underline) instead of inventing a new tab style. */
.pb-inspector-tabs { display: flex; border-bottom: 1px solid #ddd; }
.pb-inspector-tab {
  flex: 1 1 auto; padding: 8px 10px; border: none; background: #f8f9fa; cursor: pointer;
  border-bottom: 2px solid transparent; font-size: 12px;
}
.pb-inspector-tab.active { background: #fff; border-bottom-color: #0d6efd; color: #0d6efd; }
.pb-inspector-tab:hover { background: #e9ecef; }

/* Labels which kind of thing the fields below belong to (Text/Image/.../Section/Column - see
   settingsTitleLabel()/_showTargetSettingsPanel in pagebuilder-ui.js) - section/column settings
   otherwise look identical to any element's own General/Design tabs, with no other visual clue
   which one you're actually looking at. */
.pb-settings-title {
  padding: 10px 15px 0; font-size: 13px; font-weight: 700; color: #333;
  text-transform: uppercase; letter-spacing: .03em;
}

.pb-settings-empty { color: #999; font-size: 12px; padding: 15px; text-align: center; }

/* .pb-settings-panel { padding: 15px; } */
.pb-settings-panel .form-group { margin-bottom: 14px; margin-inline:0; }
.pb-settings-panel .form-group:last-child { margin-bottom: 0; }
.pb-settings-panel label.control-label {
  font-size: 12px; font-weight: normal; color: #333; margin-bottom: 4px; display: block; text-align: left;
}

/* Bootstrap 3's default .checkbox relies on 20px of label padding-left plus an absolutely-
   positioned input pulled back with a negative margin - built for a full-width form, it just
   leaves an oversized, uneven gap in this 300px sidebar. Laid out as a plain flex row instead:
   the input sits inline (no more absolute positioning/negative margin), spaced from its label
   with gap instead of padding. */
.pb-settings-panel .checkbox { margin: 0 0 14px; }
.pb-settings-panel .checkbox:last-child { margin-bottom: 0; }
.pb-settings-panel .checkbox label {
  display: flex; align-items: center; gap: 6px; padding-left: 0;
  font-size: 12px; font-weight: normal; color: #333; cursor: pointer;
}
.pb-settings-panel .checkbox input[type="checkbox"] { position: static; margin: 0; }

/* Margin/Padding/Border-width Top/Right/Bottom/Left groups are wrapped two-per-row in the
   *.html.twig panels as <div class="row"><div class="col-xs-6">...</div><div class="col-xs-6">
   ...</div></div>, mirroring the reference implementation's own <div class="row mb-2"><div class="col-6">...Top...
   </div><div class="col-6">...Right...</div></div> layout for the same fields. Bootstrap 3's
   default 15px gutter is too wide for this 300px sidebar, so it's tightened here. */
.pb-settings-panel .row { margin-left: -5px; margin-right: -5px; }
.pb-settings-panel .row > [class*="col-"] { padding-left: 5px; padding-right: 5px; }

/* Page Options' Custom CSS/JS fields (CodeMirror 5 - see _ensureCodeEditors in
   pagebuilder-ui.js) - bordered/rounded to match this panel's other form controls, sized to
   fit the 300px sidebar instead of CodeMirror's 300px-tall default. */
.pb-settings-panel .CodeMirror { border: 1px solid #ddd; border-radius: 3px; height: 220px; font-size: 12px; }

/* Text block's Content field (Quill - see _ensureTextContentEditor in pagebuilder-ui.js). Quill
   inserts its auto-generated toolbar as a sibling BEFORE the .pb-text-content-editor container
   (which it then turns into .ql-container itself) rather than wrapping it, so these are scoped
   to the settings panel generally instead of nested under .pb-text-content-editor. */
.pb-settings-panel .ql-toolbar.ql-snow { border: 1px solid #ccc; border-bottom: none; border-radius: 3px 3px 0 0; padding: 4px; }
.pb-settings-panel .ql-container.ql-snow { border: 1px solid #ccc; border-radius: 0 0 3px 3px; font-size: 13px; }
.pb-settings-panel .ql-editor { min-height: 160px; }

/* Content field's "Source" toggle (.pb-text-source-toggle in pagebuilder-ui.js) - swaps the
   Quill editor above for this plain textarea of raw HTML, matching CKEditor's old Source button
   before Quill replaced it. Same monospace/bordered treatment as the Page Options tab's Custom
   CSS/JS CodeMirror fields above, for the same "this is code, not prose" reason.
   .pb-field-header holds the label and the toggle button on the label's own row - a float
   (pull-right) here overflowed the <label> instead of being contained by it (labels don't
   naturally clear their own floated children), letting the button hang below the label's text
   and overlap the Quill toolbar right under it; flexbox keeps both baseline-aligned on one row
   with no overflow to clear in the first place. */
.pb-settings-panel .pb-field-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pb-settings-panel .pb-field-header .control-label { margin-bottom: 0; }
.pb-settings-panel .pb-text-source-editor {
  border: 1px solid #ddd; border-radius: 3px; font-family: monospace; font-size: 12px;
  width: 100%; padding: 6px; box-sizing: border-box;
}

/* HTML block's Content field - a real CodeMirror editor now (_ensureHtmlContentEditor in
   pagebuilder-ui.js), htmlmixed mode, same dracula theme as the Page Options tab's Custom CSS/
   JS fields. Its "full screen" toggle (.pb-html-fullscreen-toggle/-close, _setHtmlFullscreen)
   expands the SAME instance in place (not a copy in a separate modal) via .pb-html-fullscreen-
   mode on the .form-group, so there's nothing to keep in sync. CodeMirror.fromTextArea() hides
   the original <textarea> and inserts its own .CodeMirror wrapper as a sibling right after it -
   that's what actually needs the fixed-position/z-index treatment while full screen, not the
   (now invisible) textarea itself. z-index above the page builder's own fullscreen mount
   (20000, see the top of this file) and its highest existing element (20100, the inline format
   toolbar) - this needs to sit above both, since the builder itself already covers the page. */
.pb-html-fullscreen-backdrop {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); z-index: 20200;
}
.pb-html-fullscreen-backdrop.pb-open { display: block; }
.pb-html-fullscreen-close { display: none; position: fixed; top: 40px; right: 40px; z-index: 20202; }
.pb-html-fullscreen-mode .pb-html-fullscreen-close { display: inline-block; }
.pb-settings-panel .pb-html-fullscreen-mode .CodeMirror {
  position: fixed; top: 30px; left: 30px; right: 30px; bottom: 30px;
  width: auto; height: auto; z-index: 20201; font-size: 14px;
}

/* Section headers within a tab, e.g. "Margin" / "Typography" - authored in the *.html.twig
   panels as <p class="help-block"><strong>Label</strong></p>, mirroring the reference implementation's plain <h6>Margin
   </h6>. Distinct from instructional notes like <p class="help-block">Leave empty to...</p>,
   which are left as Bootstrap's normal muted help-block styling. */
.pb-tab-content .help-block:has(> strong:only-child) { margin: 15px 0 8px; }
.pb-tab-content .help-block:has(> strong:only-child):first-child { margin-top: 0; }
.pb-tab-content .help-block:has(> strong:only-child) strong { font-size: 14px; font-weight: 700; color: #333; }

/* Tabs - Bootstrap 3's default nav-tabs, just made icon-only when inactive (see pb-tab-label
   below); no added borders/shadows beyond what nav-tabs already draws. */
.pb-tabs > li > a { padding: 6px 10px; font-size: 12px; }
.pb-tab-content { border: none !important; border-top: none; padding: 0px; border-radius: 0 0 3px 3px; }
.pb-tab-content > .tab-pane {padding: 5px !important;}
/* Icon-only for inactive tabs, icon+label for the active one - matches the reference implementation's settings tabs
   (e.g. TextSettings.vue), which only render the label <span v-if> the tab is selected.
   Bootstrap's tab.js already toggles li.active on click, so this needs no extra JS. */
.pb-tabs > li > a .pb-tab-label { display: none; }
.pb-tabs > li.active > a .pb-tab-label { display: inline; }

/* Dimension fields: number input + unit <select> side by side (vanilla-JS equivalent of
   the reference implementation's UnitInput.vue). The number input is hidden (via _syncUnitInputVisibility) when a
   keyword like "auto"/"inherit" is selected, and the select then expands to fill the row. */
.pb-unit-input { display: flex; gap: 4px; }
.pb-unit-input .pb-unit-number { flex: 1 1 auto; min-width: 0; }
.pb-unit-input .pb-unit-select { flex: 1 0 40px; padding-left: 4px; padding-right: 2px; }

/* Color fields: bootstrap-colorpicker's .input-group.color markup (vanilla-JS equivalent of
   the reference implementation's ColorPicker.vue/Pickr) - text input for manual hex/rgba entry plus the swatch button
   that opens the picker. */
.pb-color-field .input-group-btn > .btn { height: 30px; width: 30px; padding: 0; }
.pb-color-field .input-group-btn > .btn > i { display: block; height: 100%; border-radius: 2px; }

/* Image/video upload previews (image/video/section/column background settings panels) - bare
   <img>/<video> or a "No X selected" placeholder <span>, previously fully unstyled. Bootstrap
   3's own .img-thumbnail treatment (border + padding + radius), same as the reference implementation uses for its
   background-image preview <img class="img-thumbnail">, rather than a bespoke style. */
.pb-image-preview img, .pb-video-preview video, .pb-bg-image-preview img {
  padding: 4px; border: 1px solid #ddd; border-radius: 4px; max-width: 100%;
}
.pb-video-preview video { background: #fff; }
/* Slider's own per-slide image preview (renderSlidesList() in pagebuilder-ui.js) - unstyled
   before, unlike the Image/Design-panel previews above, so give it the same padding/border/
   radius treatment here rather than duplicating it a third time. */
.pb-slide-image-preview img { padding: 4px; border: 1px solid #ddd; border-radius: 4px; }
/* Image previews specifically (not the video preview - a video frame fills its own box either
   way) get a checkerboard behind them instead of solid white, so an uploaded PNG's transparency
   actually shows as transparent rather than silently looking like solid white background. Pure-
   CSS checkerboard via four offset diagonal gradients - no image asset needed. */
.pb-image-preview img, .pb-bg-image-preview img, .pb-slide-image-preview img {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #ccc 25%, transparent 25%),
    linear-gradient(-45deg, #ccc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ccc 75%),
    linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}
.pb-upload-spinner { color: #777; font-size: 12px; margin-left: 6px; }

.pb-html-preview, .pb-export-preview { font-family: monospace; font-size: 11px; }
.pb-preview-frame { border: 1px solid #ddd; background: #fff; padding: 10px; min-height: 200px; }

/* HTML tab - read-only CodeMirror instance (see _ensureHtmlPreviewEditor in pagebuilder-ui.js),
   own class rather than a bare .CodeMirror selector so this doesn't also resize the sidebar's
   OTHER CodeMirror fields (Page Options' Custom CSS/JS, the HTML block's own editor), which are
   meant to stay a small fixed height. Fills .pb-canvas-view (flex: 1 1 auto in the normal
   layout, height: 100% in the page builder's own full-screen mode - see the top of this file)
   with its own internal scrollbar, matching how .pb-canvas/.pb-preview-frame already behave for
   the other two tabs rather than growing to the exported HTML's full unbounded length.
   min-height covers the normal (non-full-screen) layout, where the flex parent's own height is
   only as tall as its content wants unless something gives it a floor. */
.pb-html-preview-cm { height: 100%; min-height: 300px; }

/* Modals (column-layout picker, element-type picker) */
.pb-modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 9999;
}
.pb-modal-overlay.pb-open { display: flex; }
.pb-modal-content { background: #fff; padding: 24px; border-radius: 8px; max-width: 560px; width: 90%; max-height: 80vh; overflow-y: auto; }
.pb-modal-content h4 { margin-top: 0; }

.pb-layout-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pb-layout-option { padding: 12px; border: 2px solid #dee2e6; border-radius: 6px; cursor: pointer; text-align: center; transition: all 0.2s; }
.pb-layout-option:hover { border-color: #0d6efd; background: #e7f3ff; }
.pb-layout-preview { display: flex; gap: 4px; height: 50px; margin-bottom: 8px; }
.pb-col-preview { background: #0d6efd; border-radius: 4px; opacity: 0.7; }

.pb-element-options { display: flex; flex-direction: column; gap: 8px; }
.pb-element-option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid #dee2e6; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.pb-element-option:hover { border-color: #0d6efd; background: #e7f3ff; }
.pb-element-option.pb-disabled { opacity: 0.4; cursor: not-allowed; }
.pb-element-option.pb-disabled:hover { border-color: #dee2e6; background: none; }

/* icon_radio()/justify_radio() macros (_builder_settings_macros.html.twig) - a row of
   icon+label cards standing in for a plain <select>, same visual language as
   .pb-layout-option/.pb-element-option above. flex-wrap + a ~30% basis (not a plain flex:1,
   which never wraps) is for justify_radio()'s 6-7-option groups (Content Alignment/Column
   Justify Content) - wraps to ~3 per row instead of squeezing everything into one; groups with
   3-4 options still just fill a single row exactly like before, since flex-grow still lets them
   share it evenly. */
.pb-icon-radio { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-icon-radio-option {
  flex: 1 1 30%; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border: 2px solid #dee2e6; border-radius: 6px; cursor: pointer;
  text-align: center; font-size: 11px; color: #555; transition: all 0.2s;
}
.pb-icon-radio-option i { font-size: 16px; color: #888; }
.pb-icon-radio-option:hover { border-color: #0d6efd; background: #e7f3ff; }
.pb-icon-radio-option.active { border-color: #0d6efd; background: #e7f3ff; color: #0d6efd; }
.pb-icon-radio-option.active i { color: #0d6efd; }

/* justify_radio()'s per-option mini flexbox diagram - three bars actually laid out with that
   option's real justify-content value (see the macro comment for why, over a static icon). */
.pb-justify-preview {
  display: flex; align-items: center; width: 100%; height: 16px;
  padding: 0 4px; border: 1px solid #dee2e6; border-radius: 2px; background: #fff;
}
.pb-justify-preview i { width: 4px; height: 8px; background: #999; border-radius: 1px; flex: 0 0 auto; }
/* justify_radio(field, options, vertical: true) - see the macro comment. Same bars, rotated
   layout: the strip runs top-to-bottom instead of left-to-right, and each bar rotates with it
   (a horizontal bar 4x8 becomes an 8x4 horizontal-looking bar stacked vertically) so the
   diagram reads as "these bars are being distributed along the vertical axis". */
.pb-justify-preview.pb-justify-preview-vertical { flex-direction: column; width: 16px; height: 40px; align-items: center; margin: 0 auto; }
.pb-justify-preview.pb-justify-preview-vertical i { width: 8px; height: 4px; }
.pb-icon-radio-option.active .pb-justify-preview { border-color: #0d6efd; }
.pb-icon-radio-option.active .pb-justify-preview i { background: #0d6efd; }

/* visibility_field() macro (_builder_settings_macros.html.twig) - three independent device-icon
   toggles standing in for the old plain checkbox list. Deliberately NOT blue/.pb-selected-
   styled like icon_radio()'s cards above: blue there means "the picked option"; here .active
   means "hidden on this device", the opposite of a normal selection, so it gets its own red/
   muted treatment instead - reusing blue for both would read as "Desktop is the chosen layout"
   rather than "hidden on Desktop". */
.pb-visibility-toggle { display: flex; gap: 6px; }
.pb-visibility-toggle-option {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border: 2px solid #dee2e6; border-radius: 6px; cursor: pointer;
  text-align: center; font-size: 11px; color: #555; transition: all 0.2s;
}
.pb-visibility-toggle-option i { font-size: 16px; color: #888; }
.pb-visibility-toggle-option:hover { border-color: #dc3545; background: #fdecea; }
/* position:relative here (not a separate rule) hosts the diagonal "hidden" slash below - hover
   alone (the same tint, lighter) means "click to hide", not hidden yet, so only .active draws it. */
.pb-visibility-toggle-option.active { position: relative; border-color: #dc3545; background: #fdecea; color: #dc3545; }
.pb-visibility-toggle-option.active i { color: #dc3545; }
.pb-visibility-toggle-option.active::before {
  content: ''; position: absolute; left: 8px; right: 8px; top: 50%;
  border-top: 2px solid #dc3545; transform: rotate(-20deg); pointer-events: none;
}

/* Nested Color/Gradient/Image sub-tabs inside Section/Column's Background tab. */
.pb-subtabs { margin-bottom: 10px; }
.pb-subtab-content { padding-top: 4px; border: none, !important; }

/* Section/Column background compositing: when a background image is combined with a solid
   color/gradient, the color/gradient renders as this separate layer on top of the image
   (rather than CSS-blending the two) - see applyBackgroundOverlayRouting() in
   pagebuilder-twig-helpers.js. The section/column itself gets position:relative so this
   absolute-fills correctly (see sectionView()/columnView()). */
.kr-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; }

/* Section/Column background-image Ken Burns (slow zoom) - the reference implementation defines
   this class/keyframes but never actually applies them anywhere (its own toggle is wired to
   nothing); this port applies it for real when the checkbox is on and a background image is set.
   Bare on/off toggle there - no per-instance duration/direction/scale options at this level (unlike the
   per-Image-block Ken Burns effect, which does have those). */
.kenburns { background-size: 110% !important; animation: kenburns 20s ease infinite alternate; }
@keyframes kenburns {
  0% { background-size: 110%; }
  100% { background-size: 125%; }
}

.pb-element-option i { font-size: 20px; width: 24px; text-align: center; color: #0d6efd; }
.kr-button{
  dsplay :block;
}
.kr-button-span-yes{
  display: flex;
}
.kr-button-span-no{display: inline-flex;}