/* Shared rendered-design framework (`.cliq-widget-*`) — the SINGLE SOURCE, also
   imported by the host frontend, so the builder preview matches the live site.
   Everything else in this file is admin chrome (app `.cliqthemes-ui-*` + builder
   `.cb-*`) and is NOT shipped to the frontend. */
@use '../../shared/design';

$include-visual-builder: false !default;

.cliqthemes-ui-app {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: #1d2327;
    /* Cap the width on very wide screens and centre it so the UI doesn't stretch
       edge-to-edge on large monitors. */
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
}

/* The host page prints a plain WP <h1>; the React masthead replaces it. */
.cliqthemes-ui-admin-page > h1 { display: none; }

/* Branded banner strip — cream background, dotted texture + a host-supplied
   map motif, in the Cliq palette. Separate from the section nav below it. */
.cliqthemes-ui-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-radius: 16px;
    border: 1px solid #4713b8;
    /* Violet gradient (brand purples) with a lighter violet glow in the corner. */
    background:
        radial-gradient(130% 150% at 95% -10%, rgba(160, 110, 255, 0.5), rgba(131, 64, 255, 0) 46%),
        linear-gradient(120deg, #4a00d4 0%, #5900ff 46%, #8340ff 100%);
}
/* dotted texture, like the marketing site (light dots on the dark strip) */
.cliqthemes-ui-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1.2px, transparent 1.2px);
    background-size: 16px 16px;
    pointer-events: none;
}
.cliqthemes-ui-banner__brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}
.cliqthemes-ui-banner__logo { flex-shrink: 0; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25)); }
.cliqthemes-ui-banner__text { display: flex; flex-direction: column; line-height: 1.2; }
.cliqthemes-ui-banner__title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: #ffffff; }
.cliqthemes-ui-banner__by { font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, 0.62); }
/* Push all toolbar controls (Setup / Support / Documentation / lang) to the right. */
.cliqthemes-ui-banner__toolbar { position: relative; z-index: 1; margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; }
.cliqthemes-ui-banner__art {
    position: absolute;
    inset-inline-end: 18px;
    top: 50%;
    transform: translateY(-50%);
    height: 72%;
    width: auto;
    /* Decorative only, and it sits behind the right-aligned toolbar — keep it
       faint so it reads as texture, not competing with the button labels (the
       frosted pills above also blur it out where they overlap). */
    opacity: .6;
    pointer-events: none;
    z-index: 0;
}
@media ( max-width: 880px ) {
    .cliqthemes-ui-banner__art { display: none; }
}

.cliqthemes-ui-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cliqthemes-ui-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e7ecff;
    color: #3858e9;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cliqthemes-ui-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.cliqthemes-ui-subtitle {
    margin: 0;
    color: #54616c;
}

.cliqthemes-ui-tabs .components-tab-panel__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.cliqthemes-ui-tab-panel .components-tab-panel__tab-tab {
    text-transform: capitalize;
}

.cliqthemes-ui-tab-panel .components-button.is-active {
    background: #1d2327;
    color: #ffffff;
}

.cliqthemes-ui-tab-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.cliqthemes-ui-tab-meta .components-badge {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cliqthemes-ui-card {
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
    border: none;
}

.cliqthemes-ui-card-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.cliqthemes-ui-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.cliqthemes-ui-card-subtitle {
    display: inline-block;
    margin-top: 2px;
    font-size: 13px;
    color: #54616c;
}

.cliqthemes-ui-card .components-card__body {
    padding: 16px 24px 24px;
}

.cliqthemes-ui-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #54616c;
}

.cliqthemes-ui-empty,
.cliqthemes-ui-empty-state {
    padding: 24px;
    border: 1px dashed rgba(84, 97, 108, 0.4);
    border-radius: 8px;
    text-align: center;
    color: #54616c;
}

.cliqthemes-ui-table-wrapper {
    overflow-x: auto;
}

.cliqthemes-ui-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cliqthemes-ui-table thead {
    background: #f6f7f7;
}

.cliqthemes-ui-table th,
.cliqthemes-ui-table td {
    padding: 12px 16px;
    text-align: start;
    border-bottom: 1px solid #e2e6ea;
}

.cliqthemes-ui-table tbody tr:hover {
    background: #f9fafc;
}

.cliqthemes-ui-table td {
    color: #1d2327;
}

.cliqthemes-ui-table td span {
    color: inherit;
}

.cliqthemes-ui-table td:empty::after {
    content: '—';
    color: #a0a7ae;
}

.cliqthemes-ui-table tr:last-child td {
    border-bottom: none;
}

.cliqthemes-ui-table th.is-sortable {
    cursor: pointer;
}

.cliqthemes-ui-table-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
}

.cliqthemes-ui-table-sort svg {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.cliqthemes-ui-table-sort.is-sorted svg {
    opacity: 1;
}

.cliqthemes-ui-loading span {
    font-weight: 500;
}

.cliqthemes-ui-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Always-visible keyword search box (sits before "Add New"). */
.cliqthemes-ui-searchbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dcdfe4;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cliqthemes-ui-searchbox:focus-within {
    border-color: #3858e9;
    box-shadow: 0 0 0 2px rgba(56, 88, 233, 0.12);
}
.cliqthemes-ui-searchbox__icon { color: #94a3b8; flex-shrink: 0; }
/* Override the framework's global form-control normalization (which targets
   input[type=search] with !important) so the search input is a borderless,
   transparent field inside our pill rather than a box-in-a-box. The high
   specificity (app + box + input.class) beats that later global rule. */
.cliqthemes-ui-app .cliqthemes-ui-searchbox input.cliqthemes-ui-searchbox__input {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    font-size: 13px !important;
    line-height: 1.4;
    color: #0f172a;
    min-width: 200px;
    min-height: 0 !important;
    height: auto;
    padding: 0 !important;
    margin: 0;
}
.cliqthemes-ui-searchbox__input::-webkit-search-cancel-button { cursor: pointer; }

.cliqthemes-ui-button--filters.is-active {
    background: #1d2327;
    color: #ffffff;
}

.cliqthemes-ui-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-inline-start: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: #1d2327;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
}

.cliqthemes-ui-bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #54616c;
}

.cliqthemes-ui-selection-meta {
    font-size: 13px;
}

.cliqthemes-ui-table-checkbox {
    width: 40px;
    text-align: center;
}

.cliqthemes-ui-table-checkbox input[type='checkbox'] {
    cursor: pointer;
}

.cliqthemes-ui-table-actions {
    width: 96px;
    text-align: end;
}

.cliqthemes-ui-table-actions .components-button {
    margin-inline-start: 6px;
}

/* Bare row actions: minimal icon buttons with a CSS-only tooltip. */
.cliqthemes-ui-rowacts { display: inline-flex; gap: 4px; justify-content: flex-end; }
.cliqthemes-ui-iconact {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.cliqthemes-ui-iconact:hover { background: #eef2f7; color: #1e293b; }
.cliqthemes-ui-iconact--danger:hover { background: #fee2e2; color: #dc2626; }
.cliqthemes-ui-iconact:focus-visible { outline: 2px solid #3858e9; outline-offset: 1px; }
.cliqthemes-ui-iconact::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(3px);
    padding: 4px 8px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease;
    z-index: 20;
}
.cliqthemes-ui-iconact:hover::after,
.cliqthemes-ui-iconact:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.cliqthemes-ui-filters {
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #f9fafc;
}

.cliqthemes-ui-filters__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cliqthemes-ui-filters__summary {
    font-size: 13px;
    color: #54616c;
}

.cliqthemes-ui-filters__actions {
    display: flex;
    gap: 8px;
}

/* Fixed-track grid (top-aligned) rather than a centered flex row: fields keep a
   stable column, and a field growing taller (help text, or a dropdown) never
   re-centers its neighbours — killing the layout shift the old <Flex> caused. */
.cliqthemes-ui-filters__controls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    align-items: start;
    margin-top: 12px;
    gap: 16px;
}

.cliqthemes-ui-filters__control {
    position: relative; /* positioning context for the floated dropdown below */
    min-width: 0;       /* let the grid track shrink instead of overflowing */
}

/* WP's ComboboxControl renders its open suggestions <ul> as a normal-flow flex
   child (flex: 1 0 100%) of the container — NOT a portal — so opening it grows
   the filter cell and shoves the row. Float the <ul> below the field so it
   overlays instead (same treatment as .cb-store-pick). */
.cliqthemes-ui-filters__control .components-combobox-control__suggestions-container {
    position: relative;
}
.cliqthemes-ui-filters__control .components-form-token-field__suggestions-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 260px;
    overflow-y: auto;
    margin: 0;
    padding: 4px;
    border: 1px solid #d5d8dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}
.cliqthemes-ui-filters__control .components-form-token-field__suggestion {
    border-radius: 6px;
    min-height: 36px;
    padding: 8px 12px !important;
    line-height: 1.3;
}
.cliqthemes-ui-filters__control .components-form-token-field__suggestion.is-selected {
    background: #eef2ff !important;
    color: #1d2327 !important;
}

.cliqthemes-ui-table-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.cliqthemes-ui-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cliqthemes-ui-pagination__status {
    font-size: 13px;
    color: #54616c;
}

.cliqthemes-ui-pagination__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cliqthemes-ui-pagination__summary {
    font-size: 13px;
    color: #54616c;
}

.cliqthemes-ui-remote-select {
    position: relative;
}

.cliqthemes-ui-remote-select.is-loading .components-base-control__field,
.cliqthemes-ui-remote-select.is-loading .components-form-token-field {
    opacity: 0.7;
}

.cliqthemes-ui-remote-select__spinner {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
}

.cliqthemes-ui-remote-select--error {
    padding: 12px 0;
}

.cliqthemes-ui-field-help {
    margin-top: 8px;
    font-size: 12px;
    color: #54616c;
}

/* ComboboxControl keeps its suggestions list in the component tree instead of
   a portal. Anchor it below the input so opening a long list never changes the
   record-form grid height or moves neighbouring fields. */
.cliqthemes-ui-select-field {
    position: relative;
    min-width: 0;
}

.cliqthemes-ui-form-field:has( .cliqthemes-ui-select-field:focus-within ) {
    position: relative;
    z-index: 50;
}

.cliqthemes-ui-select-field .components-combobox-control__suggestions-container {
    position: relative;
}

.cliqthemes-ui-select-field .components-form-token-field__suggestions-list {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 50;
    max-height: min(320px, 45vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 4px;
    border: 1px solid #d5d8dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
}

.cliqthemes-ui-select-field .components-form-token-field__suggestion {
    min-height: 36px;
    padding: 8px 12px !important;
    border-radius: 6px;
    line-height: 1.3;
}

.cliqthemes-ui-select-field .components-form-token-field__suggestion.is-selected {
    background: #3858e9 !important;
    color: #fff !important;
}

.cliqthemes-ui-error {
    margin-top: 4px;
    font-size: 12px;
    color: #dc2626;
}

.cliqthemes-ui-map-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cliqthemes-ui-map-field__search {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.cliqthemes-ui-map-field__search .components-base-control {
    flex: 1 1 auto;
}

.cliqthemes-ui-map-field__coords {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cliqthemes-ui-map-field__canvas-wrap {
    position: relative;
    height: 340px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #e2e6ea;
    background: #eef2f7;
}

.cliqthemes-ui-map-field__canvas {
    width: 100%;
    height: 100%;
}

.cliqthemes-ui-map-field__loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.cliqthemes-ui-map-pin {
    background: transparent;
    border: 0;
}

/* ===== Submitted form payload (read-only) ===== */
.cliqthemes-ui-submission { width: 100%; border-collapse: collapse; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.cliqthemes-ui-submission th,
.cliqthemes-ui-submission td { text-align: start; padding: 8px 12px; border-bottom: 1px solid #eef2f7; font-size: 13px; vertical-align: top; }
.cliqthemes-ui-submission tr:last-child th,
.cliqthemes-ui-submission tr:last-child td { border-bottom: 0; }
.cliqthemes-ui-submission th { width: 38%; color: #475569; font-weight: 600; background: #f8fafc; }
.cliqthemes-ui-submission td { color: #0f172a; word-break: break-word; }
.cliqthemes-ui-submission__empty { color: #94a3b8; font-style: italic; margin: 0; }

/* ===== Unified Builder screen (list + chooser + editor) ===== */
@if $include-visual-builder {
.cb-builder__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.cb-builder__back { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: #475569; font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 0; }
.cb-builder__back:hover { color: #3858e9; }
.cb-builder__head .cb-type-chip { align-self: center; margin-inline-start: auto; }
.cb-builder__head .cb-type-chip + .cliqthemes-ui-button { margin-inline-start: 12px; }
/* Editor header: back · type · name (flex) · save — all on one line. */
.cb-builder__head--editor { align-items: center; gap: 12px; }
.cb-builder__head--editor .cb-builder__back { padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; }
.cb-builder__head--editor .cb-type-chip { margin-inline-start: 0; }
.cb-builder__name { flex: 1; min-width: 0; }
.cb-builder__name .components-base-control { margin-bottom: 0 !important; }
.cb-builder__name .components-text-control__input { font-size: 14px !important; font-weight: 600 !important; }
.cb-builder__empty { text-align: center; padding: 48px 20px; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; }
.cb-builder__empty p { margin: 0 0 14px; }

/* Builder sub-tabs — mirrors the main nav tab styling. */
/* Builder list bar: sub-tabs on the left, "New" on the right (no separate header band). */
.cb-builder__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cb-builder__bar .cb-builder__tabs { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.cb-builder__new { flex-shrink: 0; }
.cb-builder__tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin-bottom: 18px; background: #fff; border: 1px solid #e8ebef; border-radius: 12px; }
.cb-builder__tab { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #475569; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; }
.cb-builder__tab:hover { background: #f1f5f9; color: #0f172a; }
.cb-builder__tab.is-active { background: #3858e9; color: #fff; }
.cb-builder__tab svg { flex-shrink: 0; }
.cb-builder__tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: rgba(15,23,42,0.08); color: inherit; font-size: 11px; font-weight: 700; }
.cb-builder__tab.is-active .cb-builder__tab-count { background: rgba(255,255,255,0.25); }

.cb-builder__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cb-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cb-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 14px rgba(15,23,42,.07); }
.cb-card__icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.cb-card__icon--form { background: #eef2ff; color: #3858e9; }
.cb-card__icon--layout { background: #ecfdf5; color: #059669; }
.cb-card__body { min-width: 0; flex: 1; }
.cb-card__name { display: block; font-weight: 600; color: #0f172a; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-card__meta { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.cb-card__inactive { font-size: 11px; color: #94a3b8; }
.cb-card__actions { display: flex; gap: 2px; }

/* Design ID badge — on list cards and in the editor toolbar. */
.cb-card__id,
.cb-builder__id { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: #64748b; background: #f1f5f9; border-radius: 6px; padding: 2px 7px; letter-spacing: .02em; }
.cb-builder__id { font-size: 12px; }

/* "Remove shadow" reset link in the Box shadow panel. */
.cb-reset-btn.components-button.is-link { align-self: flex-start; font-size: 12px; }

.cb-type-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px; }
.cb-type-chip--form { background: #eef2ff; color: #3858e9; }
.cb-type-chip--layout { background: #ecfdf5; color: #059669; }

.cb-chooser { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 2px; }
.cb-chooser__card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: start; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cb-chooser__card:hover { border-color: #3858e9; box-shadow: 0 0 0 3px rgba(56,88,233,.12); }
.cb-chooser__label { font-weight: 700; color: #0f172a; font-size: 14px; }
.cb-chooser__desc { font-size: 12px; color: #64748b; }
.cb-chooser-modal .components-modal__content { max-width: 520px; }

/* Starter-layout gallery (build types that register `presets`). */
/* Starting-layout gallery ---------------------------------------------------
   Each card previews its kit: a miniature of the real layout — search bar,
   result cards and map, in the kit's own palette, corner radius and column
   split. Every colour arrives as a custom property from the generated rules in
   kitPaletteCss(), so no element here carries a style attribute. */
.cb-kits-modal .components-modal__content { max-width: 880px; }
.cb-kits__loading { display: flex; justify-content: center; padding: 56px; }
.cb-kits__intro { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: #64748b; max-width: 62ch; }

.cb-kits { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.cb-kits > li { margin: 0; display: flex; }

.cb-kit {
	position: relative; display: flex; flex-direction: column; width: 100%; gap: 0;
	padding: 0; overflow: hidden; text-align: start; cursor: pointer;
	background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cb-kit:hover:not(:disabled) { border-color: #3858e9; box-shadow: 0 8px 20px rgba(15, 23, 42, .10); transform: translateY(-2px); }
.cb-kit:focus-visible { outline: 2px solid #3858e9; outline-offset: 2px; }
.cb-kit:disabled { cursor: default; }
.cb-kit:disabled:not(.is-busy) { opacity: .5; }

/* --- the miniature ---------------------------------------------------- */
.cb-kit__thumb {
	display: flex; flex-direction: column; gap: 6px; height: 116px; padding: 10px;
	background: var(--cbk-canvas); border-bottom: 1px solid #e2e8f0;
}
.cb-kit__search {
	height: 14px; flex: 0 0 auto; border-radius: min(var(--cbk-radius), 7px);
	background: var(--cbk-surface); border: 1px solid var(--cbk-border);
	position: relative;
}
/* the search button, in the kit's accent */
.cb-kit__search::after {
	content: ''; position: absolute; inset-block: 2px; inset-inline-end: 2px; width: 26%;
	border-radius: min(var(--cbk-radius), 5px); background: var(--cbk-accent);
}
.cb-kit__body { display: flex; gap: 6px; flex: 1 1 auto; min-height: 0; }
/* Column ratio mirrors the kit's own 12-column split. */
.cb-kit__list { display: flex; flex-direction: column; gap: 5px; flex: var(--cbk-list) 1 0; min-width: 0; }
.cb-kit__card {
	flex: 1 1 0; min-height: 0; border-radius: min(var(--cbk-radius), 8px);
	background: var(--cbk-surface); border: 1px solid var(--cbk-border);
	position: relative; overflow: hidden;
}
/* a title line + a muted line, suggesting card content */
.cb-kit__card::before,
.cb-kit__card::after {
	content: ''; position: absolute; inset-inline: 5px; height: 2px; border-radius: 2px;
}
.cb-kit__card::before { top: 5px; width: 52%; background: var(--cbk-heading); }
.cb-kit__card::after { top: 11px; width: 34%; background: var(--cbk-muted); opacity: .65; }
.cb-kit__map {
	flex: var(--cbk-map) 1 0; min-width: 0; position: relative; overflow: hidden;
	border-radius: min(var(--cbk-radius), 8px);
	background: var(--cbk-surface); border: 1px solid var(--cbk-border);
	/* a hint of map geography, tinted by the kit */
	background-image:
		linear-gradient(115deg, transparent 46%, var(--cbk-border) 46%, var(--cbk-border) 49%, transparent 49%),
		linear-gradient(200deg, transparent 62%, var(--cbk-border) 62%, var(--cbk-border) 64%, transparent 64%);
}
.cb-kit__pin { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--cbk-accent); border: 2px solid var(--cbk-on-accent); top: 34%; inset-inline-start: 30%; }
.cb-kit__pin--b { top: 58%; inset-inline-start: 58%; }
.cb-kit.is-map-first .cb-kit__body { flex-direction: row-reverse; }

/* --- the label -------------------------------------------------------- */
.cb-kit__meta { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.cb-kit__name { font-size: 14px; font-weight: 700; color: #0f172a; }
.cb-kit__sig { font-size: 11px; font-weight: 600; color: #64748b; text-transform: none; }
.cb-kit__desc { font-size: 12px; line-height: 1.45; color: #64748b; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cb-kit__busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .72); }

/* --- blank, kept out of the gallery so it never reads as a kit --------- */
.cb-kits__footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid #f1f5f9; }
.cb-kits__blank {
	display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
	font-size: 13px; font-weight: 600; color: #475569; cursor: pointer;
	background: #fff; border: 1px solid #d5d8dc; border-radius: 9px;
	transition: border-color .15s, color .15s;
}
.cb-kits__blank:hover:not(:disabled) { border-color: #3858e9; color: #3858e9; }
.cb-kits__blank:disabled { opacity: .5; cursor: default; }

@media (max-width: 600px) {
	.cb-kits { grid-template-columns: 1fr; }
}

/* Builder view toggle (grid/list) + list view with multi-select. */
.cb-builder__bar-actions { display: inline-flex; align-items: center; gap: 8px; }
.cb-viewtoggle { display: inline-flex; border: 1px solid #d5d8dc; border-radius: 9px; overflow: hidden; background: #fff; }
.cb-viewtoggle__btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; background: transparent; color: #64748b; cursor: pointer; }
.cb-viewtoggle__btn + .cb-viewtoggle__btn { border-inline-start: 1px solid #e2e8f0; }
.cb-viewtoggle__btn.is-active { background: #eef2ff; color: #3858e9; }
.cb-listview { background: #fff; border: 1px solid #e9ecf1; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.cb-listrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 150px 70px 90px; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.cb-listrow:last-child { border-bottom: 0; }
.cb-listrow:not(.cb-listrow--head):hover { background: #f8faff; }
.cb-listrow.is-selected { background: #eef2ff; }
.cb-listrow--head { background: #f8fafc; color: #64748b; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; cursor: default; }
.cb-listrow__check { display: inline-flex; }
.cb-listrow__check input[type="checkbox"] { margin: 0; }
.cb-listrow__name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-listrow__id { color: #64748b; font-size: 12px; }
.cb-listrow__actions { display: inline-flex; justify-content: flex-end; gap: 4px; }
.cb-listrow__actions-head { text-align: end; }
@media (max-width: 782px) {
	.cb-listrow { grid-template-columns: 34px minmax(0, 1fr) 90px; }
	.cb-listrow > :nth-child(3), .cb-listrow > :nth-child(4) { display: none; }
}
.cb-duplicate-modal .components-modal__content { width: min(720px, 92vw); }
.cb-duplicate { display: grid; gap: 16px; }
.cb-duplicate__intro { margin: 0; color: #475569; font-size: 14px; }
.cb-duplicate__options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cb-duplicate__option { position: relative; display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 6px 11px; min-height: 170px; padding: 18px 18px 46px; color: #334155; text-align: start; border: 1px solid #dbe2ea; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.cb-duplicate__option:hover:not(:disabled) { border-color: #94a3b8; background: #f8fafc; }
.cb-duplicate__option:disabled { cursor: not-allowed; opacity: .55; }
.cb-duplicate__option.is-selected { border-color: #3858e9; background: #f8faff; box-shadow: 0 0 0 2px rgba(56,88,233,.14); }
.cb-duplicate__icon { display: inline-flex; align-items: center; justify-content: center; grid-row: span 2; width: 38px; height: 38px; color: #3858e9; border-radius: 10px; background: #eef2ff; }
.cb-duplicate__option strong { align-self: end; color: #1e293b; font-size: 14px; }
.cb-duplicate__option > strong + span { grid-column: 2; color: #64748b; font-size: 12px; line-height: 1.45; }
.cb-duplicate__option .cb-duplicate__selected { position: absolute; inset-inline-start: 18px; bottom: 15px; display: none; align-items: center; gap: 5px; color: #3858e9; font-size: 12px; font-weight: 700; }
.cb-duplicate__option.is-selected .cb-duplicate__selected { display: inline-flex; }
.cb-duplicate__naming { padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.cb-duplicate__busy { display: flex; align-items: center; justify-content: center; gap: 8px; color: #3858e9; font-size: 13px; font-weight: 600; }
.cb-duplicate__footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 2px; }
@media (max-width: 640px) {
	.cb-duplicate__options { grid-template-columns: 1fr; }
	.cb-duplicate__option { min-height: 0; }
}

/* ===== Builder field (inside Form/Layout record editor) ===== */
.cliqthemes-ui-builder-field { width: 100%; }
.cliqthemes-ui-builder-field__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cliqthemes-ui-builder-field__label { font-weight: 600; color: #1e293b; font-size: 13px; }
.cliqthemes-ui-builder-field__tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

/* Editor toolbar merged into the builder bar: back · chip · name · copy share ONE
   line with the preview controls (record picker · devices · preview) + Save. */
.cliqthemes-ui-builder-field__bar .cb-builder__back { padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; height: 40px; box-sizing: border-box; display: inline-flex; align-items: center; background: #fff; cursor: pointer; flex-shrink: 0; }
.cliqthemes-ui-builder-field__bar .cb-type-chip { margin-inline-start: 0; flex-shrink: 0; }
.cliqthemes-ui-builder-field__bar .cb-builder__name { flex: 1 1 160px; min-width: 120px; }
.cliqthemes-ui-builder-field__bar .cb-builder__name .components-text-control__input { height: 40px; box-sizing: border-box; }
.cliqthemes-ui-builder-field__bar .cb-builder__copy { flex-shrink: 0; height: 40px; box-sizing: border-box; }
.cliqthemes-ui-builder-field__bar .cliqthemes-ui-button { height: 40px; min-height: 40px; box-sizing: border-box; }
.cliqthemes-ui-builder-field__tools .components-base-control { margin-bottom: 0; }

/* ===== Visual builder (form + layout) ===== */
.cb { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1100px){ .cb { grid-template-columns: 1fr; } }

// The canvas/stage (col 1) stays pinned in view while the inspector (col 2,
// often the taller column once a field's settings list grows) scrolls past
// it in the page's normal flow. Offset accounts for WP's fixed #wpadminbar
// (32px desktop / 46px ≤782px); max-height + its own scroll keeps a
// canvas taller than the viewport from being clipped by the sticky pin.
// Disabled under the 1100px breakpoint where the grid stacks to one column.
.cb-canvas, .cb-stage {
	position: sticky;
	top: calc(32px + 16px);
	align-self: start;
	max-height: calc(100vh - 32px - 32px);
	overflow-y: auto;
}
@media (max-width: 782px) {
	.cb-canvas, .cb-stage { top: calc(46px + 16px); max-height: calc(100vh - 46px - 32px); }
}
@media (max-width: 1100px) {
	.cb-canvas, .cb-stage { position: static; max-height: none; overflow-y: visible; }
}

.cb-canvas { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; min-height: 200px; }
.cb-canvas__bar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.cb-canvas__container-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d5d8dc; background: #fff; color: #475569; border-radius: 7px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.cb-canvas__container-btn.is-active { border-color: #3858e9; color: #3858e9; box-shadow: 0 0 0 2px rgba(56,88,233,.14); }
.cb-canvas__color-scheme-btn { color: #5900ff; border-color: #ddd6fe; background: #faf8ff; }
.cb-canvas__color-scheme-btn:hover { border-color: #8340ff; background: #f5f0ff; }

.cb-color-scheme-modal { width: min(760px, 92vw); }
.cb-color-scheme { display: grid; gap: 18px; }
.cb-color-scheme__note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; color: #3b2a64; border: 1px solid #ddd6fe; border-radius: 12px; background: radial-gradient(130% 150% at 95% -10%,#a06eff26,#8340ff00 46%),#faf8ff; }
.cb-color-scheme__note svg { flex: 0 0 auto; margin-top: 2px; color: #5900ff; }
.cb-color-scheme__note p { display: grid; gap: 3px; margin: 0; line-height: 1.45; }
.cb-color-scheme__note strong { color: #321378; }
.cb-color-scheme__scope { margin: -6px 2px 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.cb-color-scheme__error { margin: -6px 0 0; padding: 10px 12px; color: #991b1b; border: 1px solid #fecaca; border-radius: 9px; background: #fef2f2; }
.cb-color-scheme__list { display: grid; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 2px 8px 2px 2px; }
.cb-color-scheme__row { display: grid; grid-template-columns: minmax(150px, 1fr) 24px minmax(220px, 1.35fr); align-items: end; gap: 12px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.cb-color-scheme__current { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.cb-color-scheme__current code { overflow: hidden; color: #334155; text-overflow: ellipsis; white-space: nowrap; }
.cb-color-scheme__swatch { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #d5d8dc; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.cb-color-scheme__arrow { align-self: center; color: #8340ff; font-size: 20px; text-align: center; }
.cb-color-scheme__row .cb-colorctl { min-width: 0; }
.cb-color-scheme__empty { margin: 0; padding: 22px; color: #64748b; text-align: center; border: 1px dashed #cbd5e1; border-radius: 12px; }
.cb-color-scheme__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
@media (max-width: 620px) {
	.cb-color-scheme__row { grid-template-columns: 1fr; align-items: stretch; }
	.cb-color-scheme__arrow { transform: rotate(90deg); }
}
.cb-mobile-width { margin-top: 6px; }
.cb-mobile-width .components-base-control__label { display: inline-flex; align-items: center; gap: 5px; }
.cb-empty { text-align: center; color: #94a3b8; padding: 30px; font-size: 13px; }

.cb-row { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; margin-bottom: 12px; transition: box-shadow .15s, border-color .15s; }
.cb-row.is-selected { border-color: #3858e9; box-shadow: 0 0 0 3px rgba(56,88,233,.14); }
.cb-row.is-droptarget { border-color: #3858e9; box-shadow: 0 -3px 0 #3858e9 inset; }
.cb-row__bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cb-row__title { font-size: 12px; font-weight: 600; color: #475569; }
.cb-row__actions { margin-inline-start: auto; display: flex; gap: 2px; }
.cb-row__grip { cursor: grab; color: #94a3b8; }
.cb-row__cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }

.cb-col { grid-column: span 12; display: flex; flex-direction: column; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 8px; background: #fafbfc; min-width: 0; min-height: 70px; transition: border-color .15s, box-shadow .15s; }
.cb-col.is-selected { border-style: solid; border-color: #3858e9; box-shadow: 0 0 0 2px rgba(56,88,233,.12); }
.cb-col__bar { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cb-col__grip { cursor: grab; }
.cb-col__span { font-size: 11px; font-weight: 600; color: #64748b; background: #eef2f7; border-radius: 5px; padding: 1px 6px; }
.cb-col__bar .cb-icon-btn:last-child { margin-inline-start: auto; }
.cb-col__items { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: start; }
.cb-col__items .cb-add-item { grid-column: 1 / -1; }
.cb-item__w { font-size: 10px; font-weight: 700; color: #3858e9; background: #eef2ff; border-radius: 5px; padding: 1px 5px; flex-shrink: 0; }

.cb-item { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 7px; padding: 6px 8px; cursor: pointer; font-size: 12px; }
.cb-item.is-selected { border-color: #3858e9; box-shadow: 0 0 0 2px rgba(56,88,233,.14); }
.cb-item.is-droptarget { box-shadow: 0 -2px 0 #3858e9 inset; }
.cb-item__grip { color: #cbd5e1; cursor: grab; flex-shrink: 0; }
.cb-item__label { font-weight: 600; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-item__type { margin-inline-start: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; }
.cb-add-item { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px dashed #cbd5e1; background: #fff; color: #475569; border-radius: 7px; padding: 6px; font-size: 12px; cursor: pointer; }
.cb-add-item:hover { border-color: #3858e9; color: #3858e9; }

.cb-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; background: transparent; color: #64748b; border-radius: 6px; cursor: pointer; }
.cb-icon-btn:hover { background: #eef2f7; color: #334155; }
.cb-icon-btn--danger:hover { background: #fee2e2; color: #dc2626; }

.cb-addrow { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 12px; background: #fff; }
.cb-addrow__label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 10px; }

.cb-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.cb-preset { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; padding: 7px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; cursor: pointer; }
.cb-preset:hover { border-color: #3858e9; }
.cb-preset__bars { display: flex; gap: 2px; width: 100%; height: 16px; }
.cb-preset__bars i { background: #c7d2fe; border-radius: 2px; }
.cb-preset__label { font-size: 10px; color: #64748b; }

/* Inspector */
.cb-inspector { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; }
.cb-inspector__empty { color: #94a3b8; text-align: center; padding: 24px 8px; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cb-inspector__title { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; font-size: 14px; color: #0f172a; }
.cb-inspector__close { position: absolute; top: 10px; inset-inline-end: 10px; border: 0; background: #f1f5f9; border-radius: 6px; width: 24px; height: 24px; cursor: pointer; color: #64748b; }
.cb-inspector .components-base-control { margin-bottom: 10px; }

/* Builder segmented controls (Width/Align/Direction/…). WordPress 6.8's
   ToggleGroupControl options are Emotion buttons with no stable option class;
   its moving ::before indicator was therefore stacking on top of our old rules
   and producing the doubled black/blue outline. Target the stable data-value /
   aria-checked contract instead and own the indicator entirely here. */
.cb .components-toggle-group-control.cb-seg {
    display: flex !important;
    width: 100%;
    min-height: 32px !important;
    height: 32px !important;
    gap: 2px;
    padding: 3px !important;
    border: 1px solid #e1e7f0 !important;
    border-radius: 8px !important;
    background: #f4f6fa !important;
    box-shadow: none !important;
    outline: 0 !important;
}
.cb .components-toggle-group-control.cb-seg:hover { border-color: #d5ddea !important; }
.cb .components-toggle-group-control.cb-seg:focus-within {
    border-color: #c7d2fe !important;
    box-shadow: 0 0 0 2px rgba(79,70,229,.08) !important;
    outline: 0 !important;
}
.cb .components-toggle-group-control.cb-seg::before { display: none !important; content: none !important; }
.cb .components-toggle-group-control.cb-seg > div { flex: 1 1 0; min-width: 0; }
.cb .cb-seg button[data-value] {
    appearance: none !important;
    width: 100%;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 5px !important;
    background: transparent !important;
    color: #667085 !important;
    box-shadow: none !important;
    outline: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, box-shadow .15s ease !important;
}
.cb .cb-seg button[data-value]:hover { color: #344054 !important; background: rgba(255,255,255,.52) !important; }
.cb .cb-seg button[data-value][aria-checked="true"],
.cb .cb-seg button[data-value][aria-pressed="true"] {
    color: #4338ca !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 0 0 1px rgba(99,102,241,.08) !important;
}
.cb .cb-seg button[data-value]:focus-visible {
    outline: 2px solid #818cf8 !important;
    outline-offset: -1px !important;
}

.cb-style { border-top: 1px solid #eef2f7; margin-top: 10px; padding-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.cb-style__heading { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #94a3b8; margin-top: 4px; }
.cb-style__heading:first-child { margin-top: 0; }
/* Keep nested WP controls tidy. NOTE: do NOT add `width: 100%` here — it makes
   WordPress's RangeControl resolve its rail against an indefinite width and
   collapse the slider to a lone thumb ("dot") next to the number box. */
.cb-style .components-base-control,
.cb-style .components-box-control,
.cb-style .components-border-control,
.cb-style .components-font-size-picker { margin-bottom: 0 !important; }
.cb-style .components-font-size-picker__header { margin-bottom: 6px; }

.cb-font-preview { margin: 4px 0 12px; font-size: 15px; color: #334155; line-height: 1.3; }
.cb-icon-preview { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; color: #475569; font-size: 12px; margin: 4px 0; svg { flex-shrink: 0; } }

/* Compact icon picker. The searchable grid opens in a popover so several icon
   controls can sit in the inspector without making the panel excessively tall. */
.cb-icon-picker { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cb-icon-picker__label { font-size: 11px; font-weight: 500; color: #1e293b; display: block; }
.cb-icon-picker__trigger { display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: 54px; height: 34px; padding: 0 6px; border: 1px solid #d5d8dc; border-radius: 7px; background: #fff; color: #475569; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, color .15s ease; &:hover { border-color: #94a3b8; color: #0f172a; } &:focus-visible, &.is-open { outline: none; border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,.12); color: #4f46e5; } }
.cb-icon-picker__trigger-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; font-size: 14px; line-height: 1; }
.cb-icon-picker__trigger-chevron { flex-shrink: 0; transition: transform .15s ease; }
.cb-icon-picker__trigger.is-open .cb-icon-picker__trigger-chevron { transform: rotate(180deg); }

.cliq-widget-location-control { position: relative; display: block; width: 100%; min-width: 0; height: 100%; }
.cliq-widget-location-control > input { width: 100%; padding-inline-end: var(--cliq-sl-field-height, 46px) !important; }
.cliq-widget-location-action {
	position: absolute;
	top: 2px;
	inset-inline-end: 2px;
	display: grid;
	place-items: center;
	width: max(16px, calc(var(--cliq-sl-field-height, 46px) - 4px));
	height: calc(100% - 4px);
	border-inline-start: 1px solid #d8dee8;
	border-radius: 5px;
	background: #f1f4f8;
	color: #25324a;
	pointer-events: none;
}
.cliq-widget-location-action svg {
	width: max(12px, min(21px, calc(var(--cliq-sl-field-height, 46px) - 8px)));
	height: max(12px, min(21px, calc(var(--cliq-sl-field-height, 46px) - 8px)));
}
.cb-icon-picker__popover { position: absolute; z-index: 100; top: calc(100% + 6px); left: 0; width: 268px; max-width: calc(100vw - 40px); padding: 8px; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; box-shadow: 0 12px 28px rgba(15,23,42,.16); }
.cb-icon-picker__bar { display: flex; align-items: center; gap: 4px; }
.cb-icon-picker__search { flex: 1; height: 28px; padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px; color: #334155; background: #fff; outline: none; &:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.12); } }
.cb-icon-picker__clear { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; border: 0; background: #f1f5f9; border-radius: 5px; cursor: pointer; color: #64748b; &:hover { background: #fee2e2; color: #dc2626; } }
.cb-icon-picker__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; max-height: 210px; overflow-y: auto; padding: 6px 0 0; }
.cb-icon-picker__btn { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid transparent; border-radius: 5px; background: transparent; cursor: pointer; color: #64748b; padding: 0; &:hover { background: #f1f5f9; border-color: #e2e8f0; color: #0f172a; } &.is-active { background: #eff2ff; border-color: #6366f1; color: #4f46e5; } }
.cb-icon-picker__empty { grid-column: 1 / -1; padding: 18px 6px; color: #94a3b8; font-size: 12px; text-align: center; }

/* ===== Builder inspector: layout / rhythm only — WP components render native. ===== */

/* Vertical rhythm + labels for the top (non-style) fields. */
.cb-inspector > .components-base-control,
.cb-inspector > .components-toggle-control { margin-bottom: 16px !important; }
.cb-inspector .components-base-control__label {
    display: block;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b !important;
    margin-bottom: 6px !important;
    padding: 0 !important;
}
.cb-inspector .components-base-control__help { font-size: 11px !important; color: #94a3b8 !important; margin-top: 6px !important; }


/* Keep the style section tight (it uses flex gap, not margins). */
.cb-style .components-base-control { margin-bottom: 0 !important; }
.cb-colorctl { margin-bottom: 0 !important; }

/* WP-native colour control */
.cb-colorctl { margin-bottom: 10px; }
.cb-colorctl .components-base-control__label { display: block; margin-bottom: 4px; }
.cb-colorctl__dd { display: block; }
.cb-colorctl__swatch { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid #d5d8dc; border-radius: 8px; padding: 5px 8px; background: #fff; cursor: pointer; font-size: 12px; color: #475569; }
.cb-colorctl__chip { width: 22px; height: 22px; border-radius: 5px; border: 1px solid #e2e8f0; flex-shrink: 0; background-image: linear-gradient(45deg,#eee 25%,transparent 25%),linear-gradient(-45deg,#eee 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eee 75%),linear-gradient(-45deg,transparent 75%,#eee 75%); background-size: 8px 8px; background-position: 0 0,0 4px,4px -4px,-4px 0; }
.cb-colorctl__swatch em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-colorctl__body { padding: 12px; min-width: 240px; }
.cb-colorctl__clear { margin-top: 8px; }
.cb-style__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Unit control + its "Auto" toggle (width/height of media fields). */
.cb-unit-auto { display: flex; flex-direction: column; gap: 6px; }
.cb-unit-auto .components-toggle-control { margin-bottom: 0; }

.cb-panel-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 14px; }

/* One compact control rhythm throughout the inspector. Core components have
   mixed legacy/next heights, which made adjacent text, number and combobox
   fields look uneven. Keep labels and help text outside the fixed control box. */
.cb-inspector .components-text-control__input {
    box-sizing: border-box !important;
    min-height: 40px !important;
}
.cb-inspector .components-base-control__field {
    margin-bottom: 0 !important;
}
.cb-panel-body > .components-base-control,
.cb-panel-body > .components-toggle-control,
.cb-panel-body > .cb-colorctl,
.cb-panel-body > .cb-icon-picker {
    margin: 0 !important;
}
.cb-panel-body .components-base-control__label,
.cb-panel-body .cb-icon-picker__label {
    margin-bottom: 6px !important;
    line-height: 1.25 !important;
}

/* Consistent accordion look for EVERY Inspector panel across the builder —
   layout item/row/column/container, widget-specific settings, form fields,
   the Marker editor. `.cb-style` is the one wrapper class every one of these
   sections uses (already the case for SchemaControls' style groups; the
   others adopt it too), so this single rule set styles all of them alike —
   no per-section CSS needed.
   The toggle is FULL WIDTH (WordPress core sets `width: 100%` on it with
   enough specificity that fighting it — e.g. `display: inline-flex` alone —
   silently does nothing; don't re-attempt a narrow pill here). Each panel
   gets real margin between it and the next — NOT just a 1px border — so two
   adjacent OPEN (solid-colour) panels never visually touch/merge into one
   blob. Rectangular corner radius, not a stadium/pill radius, since a huge
   border-radius on a full-width element just rounds the far-left/far-right
   ends into a stretched capsule shape. */
.cb-style .components-panel__body {
    border: 0;
    margin: 0 0 10px;
    padding: 0;
}
.cb-style .components-panel__body:last-of-type {
    margin-bottom: 0;
}
/* Core pulls the title out with `margin:-16px` on an OPEN panel to cancel its
   own 16px body padding — but we zero that padding, so left unchecked the open
   title bleeds 16px in every direction, overlapping the panel above it and
   spilling outside the inspector. The `.is-opened > …` selector matches core's
   own specificity and, because our sheet is enqueued after `wp-components`,
   wins on source order. This is what actually killed the "overlapping" look. */
.cb-style .components-panel__body-title,
.cb-style .components-panel__body.is-opened > .components-panel__body-title {
    margin: 0;
}
.cb-style .components-panel__body-toggle {
    padding: 10px 14px;
    border-radius: 10px;
    background: #f3f6ff;
    color: #3056e3;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.cb-style .components-panel__body-toggle:hover,
.cb-style .components-panel__body-toggle:focus {
    background: #e3e9ff;
}
.cb-style .components-panel__body.is-opened .components-panel__body-toggle {
    background: #3056e3;
    color: #fff;
    box-shadow: 0 6px 16px rgba(48, 86, 227, 0.22);
}
.cb-style .components-panel__body .cb-panel-body {
    padding: 14px 4px 4px;
}

/* (button-icon spacing + entrance-animation keyframes live in the shared design
   framework, imported at the top of this file.) */

/* ===== Builder live preview ===== */
.cliqthemes-ui-builder-screen-v2 { display: flex; flex-direction: column; gap: 18px; }
.cliqthemes-ui-builder-screen__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.cliqthemes-ui-builder-screen__head .cliqthemes-ui-panel__title { margin: 0; }
.cb-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Device preview: gray stage + a constrained white "frame" so the rendered
   item's real width is obvious (not full-bleed). */
.cb-device-toggle { display: inline-flex; align-items: stretch; border: 1px solid #d5d8dc; border-radius: 8px; overflow: hidden; height: 40px; }
.cb-device-toggle__btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; border: 0; background: #fff; color: #64748b; cursor: pointer; padding: 0; }
.cb-device-toggle__btn + .cb-device-toggle__btn { border-inline-start: 1px solid #e2e8f0; }
.cb-device-toggle__btn.is-active { background: #3858e9; color: #fff; }
/* Preview-record picker: flatten the ComboboxControl into a clean 40px field so
   it lines up with the device toggle + button (was an unstyled, mismatched box).
   WP renders the open suggestions <ul> as a normal-flow flex child of
   .components-combobox-control__suggestions-container (flex-wrap: wrap; the <ul>
   is flex:1 0 100%) — NOT a portal/floated menu — so opening it used to grow
   this toolbar row and shove the device toggle / Save button around. Floating
   the <ul> below fixes that; the container itself becomes the resting field. */
.cliqthemes-ui-builder-field__tools .cb-store-pick { min-width: 200px; }
.cb-store-pick .components-base-control__field { margin-bottom: 0; }
.cb-store-pick .components-combobox-control__suggestions-container {
	position: relative;
	box-sizing: border-box;
	min-height: 40px;
	border: 1px solid #d5d8dc;
	border-radius: 8px;
	background: #fff;
	padding: 0 6px;
}
.cb-store-pick .components-combobox-control__suggestions-container:focus-within {
	border-color: #3858e9;
	box-shadow: 0 0 0 2px rgba(56, 88, 233, .12);
}
.cb-store-pick .components-combobox-control__input { min-height: 38px !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; font-size: 13px; }
.cb-store-pick .components-form-token-field__suggestions-list {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 40;
	max-height: 260px;
	overflow-y: auto;
	margin: 0;
	padding: 4px;
	border: 1px solid #d5d8dc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}
.cb-store-pick .components-form-token-field__suggestion { border-radius: 6px; }
.cb-store-pick .components-form-token-field__suggestion.is-selected { background: #eef2ff !important; color: #1d2327 !important; }
.cliqthemes-ui-builder-field__tools .cliqthemes-ui-button { flex-shrink: 0; height: 40px; min-height: 40px; box-sizing: border-box; }
.cliqthemes-ui-builder-field__tools .cb-device-toggle { box-sizing: border-box; }
/* All header/toolbar controls share a 40px height + centred alignment. */
.cliqthemes-ui-builder-field__bar { align-items: center; }
.cb-builder__head--editor .cb-builder__name .components-text-control__input { height: 40px; box-sizing: border-box; }
.cb-builder__head--editor .cliqthemes-ui-button { height: 40px; min-height: 40px; box-sizing: border-box; }
.cb-builder__head--editor .cb-builder__back { height: 40px; box-sizing: border-box; }

/* Compact "Copy shortcode" button in the editor head (host templates). */
.cb-builder__copy { display: inline-flex; align-items: center; gap: 6px; height: 40px; box-sizing: border-box; padding: 0 14px; border: 1px solid #d5d8dc; background: #fff; color: #475569; border-radius: 8px; font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.cb-builder__copy:hover { border-color: #3858e9; color: #3858e9; }

.cb-stage { background: #eef2f7; border: 1px solid #e2e8f0; border-radius: 12px; padding: 24px 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 200px; }
/* Width readout so the device toggle clearly shows what size is being previewed. */
.cb-stage__meta { font-size: 12px; font-weight: 600; color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 999px; padding: 4px 14px; }
.cb-frame { width: 100%; background: #fff; border: 1px solid #e9ecf1; border-radius: 12px; padding: 16px; box-shadow: 0 4px 14px rgba(15,23,42,.08); transition: width .2s ease, max-width .2s ease; }
/* Mobile preview gets a phone-bezel so the device context is obvious. */
.cb-frame--mobile { border: 6px solid #1e293b; border-radius: 26px; padding: 18px 12px; box-shadow: 0 12px 34px rgba(15,23,42,.22); }

/* Search-form preview presentation. This chrome is deliberately scoped to the
   admin preview: generated element rules still render inside it unchanged, but
   the canvas now feels like a composed product surface rather than loose native
   controls on an empty white rectangle. */
.cb-stage--search {
	background:
		radial-gradient(circle at 12% 8%, rgba(99, 102, 241, .16), transparent 34%),
		radial-gradient(circle at 92% 90%, rgba(14, 165, 233, .12), transparent 36%),
		linear-gradient(145deg, #f8faff 0%, #eef2ff 52%, #f0f9ff 100%);
	border-color: #dbe4ff;
	padding: 30px 22px;
}
.cb-stage--search .cb-stage__meta { color: #4338ca; border-color: #dbe2ff; box-shadow: 0 5px 16px rgba(79,70,229,.09); }
.cb-stage__preview-note { width: min(100%, 760px); box-sizing: border-box; display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border: 1px solid rgba(99,102,241,.18); border-radius: 10px; background: rgba(255,255,255,.78); color: #64748b; box-shadow: 0 8px 24px rgba(79,70,229,.06); font-size: 11.5px; line-height: 1.5; }
.cb-stage__preview-note > svg { flex: 0 0 auto; margin-top: 1px; color: #6366f1; }
.cb-stage__preview-note span { display: grid; gap: 2px; }
.cb-stage__preview-note strong { color: #334155; font-size: 12px; }
.cb-frame--search { overflow: hidden; padding: 0; border: 1px solid rgba(148,163,184,.28); border-radius: 18px; box-shadow: 0 24px 60px rgba(30,41,59,.15), 0 3px 10px rgba(30,41,59,.06); }
.cb-frame--search.cb-frame--mobile { border: 6px solid #172033; border-radius: 28px; }
.cb-frame__preview-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; color: #334155; background: linear-gradient(180deg, #fff, #f8fafc); border-bottom: 1px solid #e8edf5; }
.cb-frame__preview-head span { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.cb-frame__preview-head span svg { color: #4f46e5; }
.cb-frame__preview-head em { color: #94a3b8; font-size: 10.5px; font-style: normal; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.cb-frame--mobile .cb-frame__preview-head { margin: -18px -12px 0; padding: 0 16px; }
.cb-frame--mobile .cb-frame__preview-head em { display: none; }

/* The `.cliq-widget-*` rendered-design framework (reset, grid, btn/logo/icon,
   gallery, keyframes, reveal) is imported once at the top of this file from the
   shared partial — preview === frontend. Only ADMIN-PREVIEW-ONLY form mocks
   (`.cliq-widget-field*`, the form row rhythm) live below. */
.cliq-widget-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #475569; }
.cliq-widget-field__label { font-weight: 600; color: #334155; }
.cliq-widget-field input:not([type=checkbox]):not([type=radio]), .cliq-widget-field textarea, .cliq-widget-field select { border: 1px solid #d5d8dc; border-radius: 9px; padding: 9px 11px; width: 100%; background: #fff; font-size: 13px; box-sizing: border-box; }
/* A shared minimum keeps mixed controls aligned without cancelling their
   builder-owned padding. Controls remain free to grow for larger content. */
.cliq-widget-field input:not([type=checkbox]):not([type=radio]), .cliq-widget-field select { height: auto; min-height: var(--cliq-sl-field-height, 46px); }
.cliq-widget-field .cui-slider { min-height: var(--cliq-sl-field-height, 46px); }
.cliq-widget-field textarea { min-height: 92px; }
/* Focus polish — mirrors the frontend so the canvas reads the same. */
.cliq-widget-field input:not([type=checkbox]):not([type=radio]), .cliq-widget-field select, .cliq-widget-field textarea { transition: border-color .15s ease, box-shadow .15s ease; }
.cliq-widget-field input:not([type=checkbox]):not([type=radio]):focus, .cliq-widget-field select:focus, .cliq-widget-field textarea:focus { outline: none; border-color: #3858e9; box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.18); }
.cliq-widget-field input:not([type=checkbox]):not([type=radio]):hover, .cliq-widget-field select:hover { border-color: #94a3b8; }
.cliq-widget-field__check { display: inline-flex; align-items: center; gap: 8px; }
.cliq-widget-field__choices { display: flex; flex-direction: column; gap: 4px; }
/* Static checkbox/radio box mock — sibling of the toggle switch mock below;
   both are non-interactive canvas visuals, the live/SSR equivalents (built
   from a real hidden input + this same box-and-check shape) live in the
   host's own frontend stylesheet, not here. */
.cliq-widget-field__box { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; border: 1.5px solid #cbd5e1; background: #fff; position: relative; }
.cliq-widget-field__box--checkbox { border-radius: 4px; }
.cliq-widget-field__box--radio { border-radius: 50%; }
/* Theme the vendored slider control (range field preview) to the admin
   canvas's own indigo palette instead of its default. */
.cliq-widget-field .cui-slider {
	--cui-slider-track-bg: #e2e8f0;
	--cui-slider-selection-bg: #3858e9;
	--cui-slider-handle-bg: #fff;
	--cui-slider-handle-border: #3858e9;
	--cui-slider-handle-border-focus: #6366f1;
}

/* Fallback defaults for the SEARCH preview only. Explicit builder styling is emitted
   later in a scoped <style> and therefore continues to win over these fallbacks. */
.cliq-widget-design--search-preview {
	--cliq-sl-primary: #4f46e5;
	--cliq-sl-primary-strong: #4338ca;
	--cliq-sl-on-primary: #fff;
	--cliq-sl-surface: #fff;
	--cliq-sl-heading: #0f172a;
	--cliq-sl-text: #1e293b;
	--cliq-sl-muted: #64748b;
	--cliq-sl-border: #d8e0ec;
	--cliq-sl-radius: 12px;
	--cliq-sl-radius-sm: 12px;
	--cliq-col-gap: 14px;
	position: relative;
	padding: clamp(22px, 4vw, 42px);
	background: linear-gradient(155deg, #fff 0%, #fbfcff 100%);
}
.cliq-widget-design--search-preview::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(99,102,241,.025), transparent 42%); }
.cliq-widget-design--search-preview > * { position: relative; }
.cliq-widget-design--search-preview .cliq-widget-row + .cliq-widget-row { margin-top: 16px; }
.cliq-widget-design--search-preview .cliq-widget-field { gap: 8px; }
.cliq-widget-design--search-preview .cliq-widget-field__label {
	color: var(--cliq-sl-label-color, #344256);
	font-family: var(--cliq-sl-label-font-family, inherit);
	font-size: var(--cliq-sl-label-size, 12px);
	font-weight: var(--cliq-sl-label-weight, 600);
	letter-spacing: .055em;
	line-height: var(--cliq-sl-label-line-height, 1.25);
	text-transform: uppercase;
}
.cliq-widget-design--search-preview .cliq-sl-ff { gap: var(--cliq-sl-label-gap, 6px); }
.cliq-widget-design--search-preview .cliq-sl-ff > .cliq-sl-w__label { width: 100%; min-width: 0; min-height: 1.25em; margin: 0; overflow: var(--cliq-sl-label-overflow, hidden); text-overflow: var(--cliq-sl-label-text-overflow, ellipsis); white-space: var(--cliq-sl-label-white-space, nowrap); }
.cliq-widget-design--search-preview .cliq-sl-ff__control { display: flex; align-items: center; width: 100%; height: auto; min-width: 0; min-height: var(--cliq-sl-field-height, 46px); }
.cliq-widget-design--search-preview .cliq-sl-ff__control.is-fluid-control { min-height: var(--cliq-sl-field-height, 46px); }
.cliq-widget-design--search-preview .cliq-sl-ff__control > * { min-width: 0; }
.cliq-widget-design--search-preview :where(.cliq-widget-field input:not([type=checkbox]):not([type=radio]), .cliq-widget-field textarea, .cliq-widget-field select, .cliq-widget-preview-select) {
	height: auto;
	min-height: var(--cliq-sl-field-height, 46px);
	box-shadow: 0 1px 2px rgba(15,23,42,.035), inset 0 1px 0 rgba(255,255,255,.72);
}

.cliq-widget-preview-glide-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--glide-option-gap, 8px);
	height: auto !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}
.cliq-widget-preview-glide-option {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: var(--glide-chip-padding, 9px 14px);
	border: 1px solid var(--glide-chip-border, #d7d9dc);
	border-radius: var(--glide-chip-radius, var(--glide-radius, 999px));
	background: var(--glide-chip-bg, var(--glide-bg, #fff));
	color: var(--glide-color, inherit);
}
.cliq-widget-preview-glide-option:hover { background: var(--glide-hover, #f2f5f7); }
.cliq-widget-preview-glide-option.is-selected {
	border-color: var(--glide-chip-selected-border, var(--glide-border-focus, #93aabf));
	background: var(--glide-chip-selected-bg, var(--glide-active, #e2eaf0));
	color: var(--glide-chip-selected-color, var(--glide-active-color, inherit));
}
.cliq-widget-preview-glide-list {
	display: grid;
	height: auto !important;
	padding: 0 !important;
	overflow: hidden;
	border-color: var(--glide-border-focus, #93aabf) !important;
	border-radius: var(--glide-radius, 0);
	background: var(--glide-bg, #fff);
}
.cliq-widget-preview-glide-list__option {
	display: flex;
	align-items: center;
	min-height: 38px;
	padding: 8px 12px;
	background: var(--glide-bg, #fff);
	color: var(--glide-color, inherit);
}
.cliq-widget-preview-glide-list__option:hover { background: var(--glide-hover, #f2f5f7); }
.cliq-widget-preview-glide-list__option.is-selected { background: var(--glide-active, #e2eaf0); color: var(--glide-active-color, inherit); }
.cliq-widget-preview-glide-accordion { display: grid; width: 100%; }
.cliq-widget-preview-glide-accordion > .cliq-widget-preview-select { border-radius: var(--glide-radius, 0) var(--glide-radius, 0) 0 0; }
.cliq-widget-preview-glide-accordion > .cliq-widget-preview-glide-list { border-top: 0; border-radius: 0 0 var(--glide-radius, 0) var(--glide-radius, 0); }
.cliq-widget-design--search-preview .cliq-widget-field input::placeholder,
.cliq-widget-design--search-preview .cliq-widget-field textarea::placeholder { color: #94a3b8; opacity: 1; }
.cliq-widget-design--search-preview .cliq-widget-preview-select { width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #64748b; cursor: default; }
.cliq-widget-design--search-preview .cliq-widget-preview-select svg { flex: 0 0 auto; color: var(--glide-placeholder, #94a3b8); }
.cliq-widget-design--search-preview :where(.cliq-sl-search__btn, .cliq-sl-search__geo) { height: auto; min-height: var(--cliq-sl-field-height, 46px); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: default; box-shadow: 0 8px 20px rgba(79,70,229,.18); transition: transform .18s ease, box-shadow .18s ease; }
.cliq-widget-design--search-preview .cliq-sl-search__geo { box-shadow: 0 6px 16px rgba(79,70,229,.12); }
.cliq-widget-design--search-preview .cliq-widget-field__choices { gap: 8px; padding: 4px 0; }
.cliq-widget-design--search-preview .cliq-widget-field__check { min-height: 24px; color: #475569; }
.cliq-widget-design--search-preview .cliq-widget-field__box { border-color: #aebbd0; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.cliq-widget-design--search-preview .cliq-widget-toggle__sw { background: #c7d2fe; box-shadow: inset 0 0 0 1px rgba(79,70,229,.12); }
.cliq-widget-design--search-preview .cui-slider { margin-top: 3px; }

/* Preview remains a visual editor: clicking the rendered container, row,
   column or item opens the same inspector used by Structure mode. */
.cliq-widget-design--visual-editing { cursor: default; }
.cliq-widget-design--visual-editing .cliq-widget-cell.is-preview-selectable { cursor: pointer; }
.cliq-widget-design--visual-editing .cliq-widget-cell.is-preview-selectable:hover {
	outline: 1px dashed #8297f4;
	outline-offset: 2px;
}
.cliq-widget-design--visual-editing.is-preview-selected,
.cliq-widget-design--visual-editing .is-preview-selected {
	outline: 2px solid #3858e9;
	outline-offset: 2px;
	z-index: 5;
}
}

/* ===== Table skeleton loader (smooth, no layout shift) ===== */
.cliqthemes-ui-skel-row td { vertical-align: middle; }
.cliqthemes-ui-skel {
    display: block;
    height: 14px;
    width: 100%;
    max-width: 220px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef1f5 25%, #e2e6ec 37%, #eef1f5 63%);
    background-size: 400% 100%;
    animation: cliqthemes-ui-skel-shimmer 1.2s ease-in-out infinite;
}
.cliqthemes-ui-skel--check { width: 16px; height: 16px; border-radius: 4px; max-width: 16px; }
.cliqthemes-ui-skel--actions { width: 56px; height: 24px; border-radius: 6px; margin-inline-start: auto; }
@keyframes cliqthemes-ui-skel-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}
@media ( prefers-reduced-motion: reduce ) {
    .cliqthemes-ui-skel { animation: none; }
}

/* Toggle switch shown in the form-builder preview — framework-namespaced
   (`cliq-widget-*`), sibling of `.cliq-widget-field*`. Host widget-preview mocks
   use the host's OWN `.cliq-w-*` namespace and style their own switch. */
.cliq-widget-toggle__sw { width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; position: relative; }
.cliq-widget-toggle__sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.cliq-widget-field .cliq-sl-toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.cliq-widget-field .cliq-sl-toggle__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; }
.cliq-widget-field .cliq-sl-toggle__track {
	--cliq-sl-toggle-effective-track-h: min(var(--cliq-sl-toggle-track-h, 20px), var(--cliq-sl-field-height, var(--cliq-sl-toggle-track-h, 20px)));
	--cliq-sl-toggle-effective-thumb: min(var(--cliq-sl-toggle-thumb, 16px), calc(var(--cliq-sl-toggle-effective-track-h) - 4px));
	position: relative;
	flex: none;
	width: var(--cliq-sl-toggle-track-w, 34px);
	height: var(--cliq-sl-toggle-effective-track-h);
	border-radius: 999px;
	background: #cbd5e1;
	box-shadow: inset 0 0 0 1px var(--cliq-sl-toggle-border, transparent);
}
.cliq-widget-field .cliq-sl-toggle__thumb { position: relative; z-index: 2; display: block; width: var(--cliq-sl-toggle-effective-thumb); height: var(--cliq-sl-toggle-effective-thumb); margin: calc((var(--cliq-sl-toggle-effective-track-h) - var(--cliq-sl-toggle-effective-thumb)) / 2); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.16); }
.cliq-widget-field .cliq-sl-toggle__inline { position: absolute; z-index: 1; top: 50%; max-width: calc(50% - 5px); overflow: hidden; color: #475569; font-size: var(--cliq-sl-toggle-inline-size, 13px); line-height: 1; text-overflow: ellipsis; white-space: nowrap; transform: translateY(-50%); }
.cliq-widget-field .cliq-sl-toggle__inline--off { inset-inline-end: var(--cliq-sl-toggle-inline-inset, 10px); }
.cliq-widget-field .cliq-sl-toggle__inline--on { inset-inline-start: var(--cliq-sl-toggle-inline-inset, 10px); opacity: 0; }
.cliq-widget-field .cliq-sl-toggle.has-inline-label { --cliq-sl-toggle-track-w: 88px; --cliq-sl-toggle-track-h: 40px; --cliq-sl-toggle-thumb: 32px; }
.cliq-widget-field .cliq-sl-toggle.is-size-small { --cliq-sl-toggle-track-w: 28px; --cliq-sl-toggle-track-h: 16px; --cliq-sl-toggle-thumb: 12px; }
.cliq-widget-field .cliq-sl-toggle.is-size-medium { --cliq-sl-toggle-track-w: 34px; --cliq-sl-toggle-track-h: 20px; --cliq-sl-toggle-thumb: 16px; }
.cliq-widget-field .cliq-sl-toggle.is-size-large { --cliq-sl-toggle-track-w: 44px; --cliq-sl-toggle-track-h: 26px; --cliq-sl-toggle-thumb: 22px; }
.cliq-widget-field .cliq-sl-toggle.has-inline-label.is-size-small { --cliq-sl-toggle-track-w: 68px; --cliq-sl-toggle-track-h: 30px; --cliq-sl-toggle-thumb: 24px; --cliq-sl-toggle-inline-size: 11px; --cliq-sl-toggle-inline-inset: 8px; }
.cliq-widget-field .cliq-sl-toggle.has-inline-label.is-size-medium { --cliq-sl-toggle-track-w: 88px; --cliq-sl-toggle-track-h: 40px; --cliq-sl-toggle-thumb: 32px; }
.cliq-widget-field .cliq-sl-toggle.has-inline-label.is-size-large { --cliq-sl-toggle-track-w: 106px; --cliq-sl-toggle-track-h: 48px; --cliq-sl-toggle-thumb: 40px; --cliq-sl-toggle-inline-size: 15px; --cliq-sl-toggle-inline-inset: 12px; }
/* (`.cliq-widget-reveal` mechanics live in the shared design framework.) */

/* Icon picker field (categories) */
.cliqthemes-ui-icon-picker__bar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 6px 0 10px;
}
.cliqthemes-ui-icon-picker__search {
    flex: 1 1 auto;
}
.cliqthemes-ui-icon-picker__grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    max-height: 280px;
}
.cliqthemes-ui-icon-picker__grid .cliqthemes-ui-marker-editor__swatch {
    height: 44px;
}

/* Marker editor field. The reference mockup is a compact card — but nothing
   here ever constrained the component's own width, so when it's placed in a
   wide admin content area (not a narrow sidebar) every row just stretches
   to fill the available space: the shape grid has enough room to lay all
   ~18 swatches on one line instead of wrapping into a tidy grid, and the
   preview stage/sliders end up with huge dead space. Cap it so it always
   reads as a compact card regardless of its container. */
/* The Marker record form is just Name + the Marker Editor. Collapse its field
   grid to ONE centred column (matching the editor card's own max-width) so the
   Name field sits centred above the editor instead of in a stray half-column. */
.cliqthemes-ui-form-grid:has( .cliqthemes-ui-form-field.is-type-marker-editor ) {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin: 0 auto;
}
.cliqthemes-ui-marker-editor {
    box-sizing: border-box;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid #e7ebf2;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .08);
    border-radius: 14px;
    padding: 20px;
}
.cliqthemes-ui-marker-editor.is-loading { min-height: 520px; }
.cliqthemes-ui-marker-editor__skeleton-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    height: 38px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 10px;
    background: #f3f6ff;
}
.cliqthemes-ui-marker-editor__skeleton-tabs i,
.cliqthemes-ui-marker-editor__skeleton-swatches i,
.cliqthemes-ui-marker-editor__skeleton-line {
    display: block;
    border-radius: 7px;
    background: linear-gradient(90deg, #edf1f7 25%, #f8faff 50%, #edf1f7 75%);
    background-size: 200% 100%;
    animation: cliq-marker-skeleton 1.2s ease-in-out infinite;
}
.cliqthemes-ui-marker-editor__skeleton-stage { height: 200px; }
.cliqthemes-ui-marker-editor__skeleton-stage .components-spinner { margin: 0; }
.cliqthemes-ui-marker-editor__skeleton-controls { min-width: 0; }
.cliqthemes-ui-marker-editor__skeleton-swatches {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0 28px;
}
.cliqthemes-ui-marker-editor__skeleton-swatches i { height: 56px; border-radius: 12px; }
.cliqthemes-ui-marker-editor__skeleton-line { height: 12px; margin-top: 20px; }
.cliqthemes-ui-marker-editor__skeleton-line.is-short { width: 66%; }
@keyframes cliq-marker-skeleton { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
    .cliqthemes-ui-marker-editor__skeleton-tabs i,
    .cliqthemes-ui-marker-editor__skeleton-swatches i,
    .cliqthemes-ui-marker-editor__skeleton-line { animation: none; }
}
.cliqthemes-ui-marker-editor__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}
.cliqthemes-ui-marker-editor__mode {
    margin-bottom: 16px;
}
.cliqthemes-ui-marker-editor__upload {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.cliqthemes-ui-marker-editor__upload .cliqthemes-ui-marker-editor__stage {
    width: 100%;
}
/* Two-column library editor: the live preview on the LEFT, the Pin/Badge/Icon
   tabs + their controls on the RIGHT, so the whole editor fits one screen
   instead of stacking a tall preview above the controls. */
.cliqthemes-ui-marker-editor__split {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 18px;
    align-items: start;
}
.cliqthemes-ui-marker-editor__preview {
    position: sticky;
    top: 8px;
}
.cliqthemes-ui-marker-editor__controls {
    min-width: 0;
}
/* Native WordPress tabs, restyled as a clean pill row on a soft track instead
   of the default underline. */
.cliqthemes-ui-marker-editor__tabpanel .components-tab-panel__tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #f3f6ff;
    border-radius: 10px;
}
.cliqthemes-ui-marker-editor__tabpanel .components-tab-panel__tabs-item {
    border-radius: 7px;
    box-shadow: none !important;
    color: #64748b !important;
    flex: 1;
    font-size: 12.5px;
    font-weight: 600;
    height: 30px !important;
    justify-content: center;
    padding: 0 10px;
}
.cliqthemes-ui-marker-editor__tabpanel .components-tab-panel__tabs-item::after { display: none; }
.cliqthemes-ui-marker-editor__tabpanel .components-tab-panel__tabs-item:hover { color: #3056e3; }
/* Kill WordPress's default square focus ring on the tab buttons (that's what
   made the Icon-source row look boxed-in); keep a soft ring for keyboard users. */
.cliqthemes-ui-marker-editor__tabpanel .components-tab-panel__tabs-item:focus { outline: none; box-shadow: none; }
.cliqthemes-ui-marker-editor__tabpanel .components-tab-panel__tabs-item:focus-visible { box-shadow: 0 0 0 2px rgba(48, 86, 227, 0.4); }
.cliqthemes-ui-marker-editor__tabpanel .components-tab-panel__tabs-item.is-active {
    background: #fff;
    color: #3056e3;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.cliqthemes-ui-marker-editor__tabpanel .components-tab-panel__tabs-item.is-active:focus-visible {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), 0 0 0 2px rgba(48, 86, 227, 0.4);
}
/* Space between the Icon-source (outer) tab row and its content. */
.cliqthemes-ui-marker-editor__source > .components-tab-panel__tab-content { padding-top: 16px; }
.cliqthemes-ui-marker-editor__tab {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 14px;
}
/* Fill + Stroke share a 2-up grid; a lone colour control spans the full row. */
.cliqthemes-ui-marker-editor__color-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cliqthemes-ui-marker-editor__color-row > * { min-width: 0; }
.cliqthemes-ui-marker-editor__color-row > :only-child { grid-column: 1 / -1; }
/* A soft "stage" plate — subtle brand-tinted glow over a faint checkerboard —
   so the composed pin reads as a hero, not a stray icon on a flat background. */
.cliqthemes-ui-marker-editor__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background:
        radial-gradient(120px 90px at 50% 50%, rgba(56, 88, 233, 0.08), transparent 70%),
        repeating-conic-gradient(#fff 0deg 90deg, #f8fafc 0deg 180deg) 0 0 / 16px 16px;
    border: 1px solid #eef1f6;
}
.cliqthemes-ui-marker-editor__stage img {
    height: 128px;
    filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.18));
}
/* Section eyebrow — matches the small uppercase label convention used
   elsewhere in the inspector, instead of WP's default control label style. */
.cliqthemes-ui-marker-editor__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin: 0 0 8px;
}
.cliqthemes-ui-marker-editor__search {
    position: relative;
    margin-bottom: 10px;
}
.cliqthemes-ui-marker-editor__search-icon {
    position: absolute;
    inset-inline-start: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 1;
    pointer-events: none;
}
.cliqthemes-ui-marker-editor__search .components-text-control__input {
    padding-inline-start: 32px !important;
    height: 38px;
    box-sizing: border-box;
}
.cliqthemes-ui-marker-editor__shapes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}
.cliqthemes-ui-marker-editor__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
}
.cliqthemes-ui-marker-editor__swatch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}
.cliqthemes-ui-marker-editor__swatch:hover {
    border-color: #c7d2fe;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    z-index: 2;
}
.cliqthemes-ui-marker-editor__swatch.is-active {
    border-color: #3858e9;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.15);
}
/* Animated CSS tooltip showing the marker title */
.cliqthemes-ui-marker-editor__swatch::after {
    content: attr(data-title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    padding: 6px 8px;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
}
.cliqthemes-ui-marker-editor__swatch::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #0f172a;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease;
    z-index: 5;
}
.cliqthemes-ui-marker-editor__swatch:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.cliqthemes-ui-marker-editor__swatch:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Cluster style picker — same visual family as the marker-editor swatches
   above, but with a persistent label under each card (not a hover tooltip):
   there are only 8-9 options, so showing every label at once reads better
   than making the user hover each one to find out what it is. */
.cliqthemes-ui-cluster-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
}
.cliqthemes-ui-cluster-style-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px 10px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}
.cliqthemes-ui-cluster-style-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}
.cliqthemes-ui-cluster-style-card.is-active {
    border-color: #3858e9;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.15);
}
.cliqthemes-ui-cluster-style-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}
.cliqthemes-ui-cluster-style-preview--default {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    font-weight: 700;
}
.cliqthemes-ui-cluster-style-label {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    line-height: 1.3;
}
.cliqthemes-ui-cluster-style-card.is-active .cliqthemes-ui-cluster-style-label {
    color: #3858e9;
}

/* Multi-column field grid for form groups */
.cliqthemes-ui-form-grid {
    display: grid;
    gap: 18px 22px;
    align-items: start;
}
.cliqthemes-ui-form-grid--cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cliqthemes-ui-form-grid--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cliqthemes-ui-form-grid--cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cliqthemes-ui-form-grid .cliqthemes-ui-form-field.is-full-width {
    grid-column: 1 / -1;
}
@media (max-width: 782px) {
    .cliqthemes-ui-form-grid {
        grid-template-columns: 1fr;
    }
}

.cliqthemes-ui-tab-badge,
.cliqthemes-ui-form-modal .cliqthemes-ui-tab-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f4fe;
    color: #3858e9;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cliqthemes-ui-form-modal .components-modal__content {
    padding-bottom: 0;
}

.cliqthemes-ui-form-fields {
    display: grid;
    gap: 16px;
    margin-top: 8px;
}

.cliqthemes-ui-field-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #ca4a1f;
}

.cliqthemes-ui-form-actions {
    margin-top: 24px;
}

.cliqthemes-ui-confirm-dialog p {
    margin: 16px 0;
}

.cliqthemes-ui-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.cliqthemes-ui-table tr.is-selected {
    background: #eef2ff;
}

.cliqthemes-ui-table tr.is-selected td {
    border-bottom-color: #d7ddf7;
}
.cliqthemes-ui-form-inline {
    display: grid;
    gap: 24px;
    padding: 8px 0 0;
}
/* Record form wrapper — normally transparent; when a provider is read-only
   (e.g. Leads) it becomes a native disabled fieldset so every control inside is
   non-interactive. Reset the browser's default fieldset chrome. */
.cliqthemes-ui-form-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.cliqthemes-ui-form-fieldset[disabled] {
    opacity: 0.85;
}

.cliqthemes-ui-form-inline__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.cliqthemes-ui-button, .cliq-ui-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    background-color: #f6f7fb;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.components-button.cliqthemes-ui-button, .components-button.cliq-ui-button, .cliq-ui-button {
    height: auto;
    text-decoration: none;
    box-shadow: none;
}

.cliqthemes-ui-button:hover,
.cliq-ui-button:hover,
.cliqthemes-ui-button:focus,
.cliq-ui-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(29, 35, 39, 0.08);
}

.cliqthemes-ui-button:focus, .cliq-ui-button:focus {
    outline: 2px solid rgba(56, 88, 233, 0.35);
    outline-offset: 2px;
}

.cliqthemes-ui-button.is-busy,
.cliq-ui-button.is-busy,
.cliqthemes-ui-button:disabled,
.cliq-ui-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.cliqthemes-ui-button--primary, .cliq-ui-button--primary {
    background-color: #1d2327;
    color: #ffffff;
}

.cliqthemes-ui-button--primary:hover,
.cliq-ui-button--primary:hover,
.cliqthemes-ui-button--primary:focus,
.cliq-ui-button--primary:focus {
    background-color: #11161b;
}

.cliqthemes-ui-button--secondary, .cliq-ui-button--secondary {
    background-color: #eef1f5;
    border-color: #dfe4ea;
    color: #1d2327;
}

.cliqthemes-ui-button--secondary:hover,
.cliq-ui-button--secondary:hover,
.cliqthemes-ui-button--secondary:focus,
.cliq-ui-button--secondary:focus {
    background-color: #e4e9f1;
}

.cliqthemes-ui-button--ghost, .cliq-ui-button--ghost {
    background-color: transparent;
    border-color: transparent;
    color: #1d2327;
}

.cliqthemes-ui-button--ghost:hover,
.cliq-ui-button--ghost:hover,
.cliqthemes-ui-button--ghost:focus,
.cliq-ui-button--ghost:focus {
    background-color: rgba(29, 35, 39, 0.06);
}

.cliqthemes-ui-button--danger, .cliq-ui-button--danger {
    background-color: #fdecec;
    border-color: #f7c0c0;
    color: #b42318;
}

.cliqthemes-ui-button--danger:hover,
.cliq-ui-button--danger:hover,
.cliqthemes-ui-button--danger:focus,
.cliq-ui-button--danger:focus {
    background-color: #fbd4d4;
}

.cliqthemes-ui-button--outline, .cliq-ui-button--outline {
    background-color: transparent;
    border-color: #dfe4ea;
    color: #1d2327;
}

.cliqthemes-ui-button--outline:hover,
.cliq-ui-button--outline:hover,
.cliqthemes-ui-button--outline:focus,
.cliq-ui-button--outline:focus {
    background-color: #f7f9fc;
}

.cliqthemes-ui-button--small, .cliq-ui-button--small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.cliqthemes-ui-button__icon, .cliq-ui-button__icon {
    width: 16px;
    height: 16px;
}

.cliqthemes-ui-toolbar-actions .cliqthemes-ui-button, .cliq-ui-toolbar-actions .cliq-ui-button, .cliq-ui-button {
    min-width: 0;
}

.cliqthemes-ui-form-actions .cliqthemes-ui-button, .cliq-ui-form-actions .cliq-ui-button, .cliq-ui-button {
    min-width: 120px;
}

.cliqthemes-ui-form-sections {
    display: grid;
    gap: 24px;
}

.cliqthemes-ui-form-section__title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.cliqthemes-ui-form-group-fields {
    display: grid;
    gap: 16px;
}

.cliqthemes-ui-form-group-description {
    margin: 0 0 12px;
    color: #54616c;
}

.cliqthemes-ui-form-section--tabs .components-tab-panel__tabs {
    margin-bottom: 0;
}

.cliqthemes-ui-form-tab-panel {
    margin-top: 16px;
}

.cliqthemes-ui-form-tab-panel .cliqthemes-ui-form-field {
    margin-bottom: 16px;
}

.cliqthemes-ui-form-tab-panel .cliqthemes-ui-form-field:last-child {
    margin-bottom: 0;
}
.cliqthemes-ui-form-sections {
    display: grid;
    gap: 24px;
}

.cliqthemes-ui-form-section {
    background: #ffffff;
    border: 1px solid #e3e7ef;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cliqthemes-ui-form-section-panel {
    background: transparent;
}

.cliqthemes-ui-form-panel-group.components-panel__body {
    border-top: 1px solid #eef2f8;
    padding: 20px 0;
}

.cliqthemes-ui-form-panel-group.components-panel__body:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.cliqthemes-ui-form-panel-group.components-panel__body:last-of-type {
    padding-bottom: 0;
}

.cliqthemes-ui-form-section__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #101828;
}

.cliqthemes-ui-form-group-description {
    margin: 0 0 16px;
    color: #556275;
    font-size: 13px;
}

.cliqthemes-ui-form-group-fields {
    display: grid;
    gap: 18px;
}

.cliqthemes-ui-form-group-fields.has-2-columns,
.cliqthemes-ui-form-group-fields.has-3-columns,
.cliqthemes-ui-form-group-fields.has-4-columns {
    gap: 20px;
}


.cliqthemes-ui-form-section--tabs .cliqthemes-ui-form-section__title {
    margin-bottom: 12px;
}

.cliqthemes-ui-form-tab-panel-wrapper {
    margin-top: 6px;
}

.cliqthemes-ui-form-section--tabs .components-tab-panel__tabs {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    background: #eef3ff;
    padding: 6px;
    border-radius: 999px;
}

.cliqthemes-ui-form-section--tabs .components-tab-panel__tabs-item {
    border: none;
    background: transparent;
    color: #3056e3;
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 16px;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cliqthemes-ui-form-section--tabs .components-tab-panel__tabs-item:hover,
.cliqthemes-ui-form-section--tabs .components-tab-panel__tabs-item:focus {
    background: rgba(48, 86, 227, 0.1);
    color: #2746bb;
}

.cliqthemes-ui-form-section--tabs .components-tab-panel__tabs-item.is-active {
    background: #3056e3;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(48, 86, 227, 0.25);
}

.cliqthemes-ui-form-tab-panel {
    background: #ffffff;
    border: 1px solid #e3e7ef;
    border-radius: 14px;
    margin-top: 16px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05)!important;
}

.cliqthemes-ui-form-tab-panel .cliqthemes-ui-form-group-description {
    margin-bottom: 20px;
}


.cliqthemes-ui-form-panel-group.components-panel__body {
    border-top: 1px solid #eef2f8;
    padding: 20px 0;
}

.cliqthemes-ui-form-panel-group.components-panel__body:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.cliqthemes-ui-form-panel-group.components-panel__body:last-of-type {
    padding-bottom: 0;
}

.cliqthemes-ui-form-panel-group .components-panel__body-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.cliqthemes-ui-form-panel-group .components-panel__body-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f3f6ff;
    color: #3056e3;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cliqthemes-ui-form-panel-group .components-panel__body-toggle:hover,
.cliqthemes-ui-form-panel-group .components-panel__body-toggle:focus {
    background: #3056e3;
    color: #ffffff;
    border-color: #3056e3;
}

.cliqthemes-ui-form-panel-group .components-panel__body.is-open .components-panel__body-toggle {
    background: #3056e3;
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(48, 86, 227, 0.25);
}

.cliq-ui-field-error,
.cliqthemes-ui-field-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #ca4a1f;
}

.cliq-ui-media-field {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cliq-ui-media-preview,
.cliq-ui-gallery-thumb {
    background: #f6f7fb;
    border: 1px dashed #dce3f4;
    border-radius: 12px;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cliq-ui-media-placeholder,
.cliq-ui-gallery-thumb-placeholder,
.cliq-ui-gallery-placeholder {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    padding: 10px;
}

.cliq-ui-media-preview img,
.cliq-ui-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cliq-ui-gallery-thumb {
    position: relative;
}

.cliq-ui-gallery-thumb-remove {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: none;
    background: rgba(29, 35, 39, 0.75);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cliq-ui-gallery-thumb-remove:hover,
.cliq-ui-gallery-thumb-remove:focus {
    background: rgba(202, 74, 31, 0.85);
    outline: none;
}

.cliq-ui-media-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.cliq-ui-gallery-placeholder {
    min-height: 120px;
    min-width: 120px;
    border-radius: 12px;
    border: 1px dashed #dce3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9ff;
}

.cliq-ui-gallery-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* keep the "Select images" button compact, not full-width */
    gap: 12px;
}

.cliq-ui-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cliq-ui-radio-image-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.cliq-ui-radio-image-option {
    display: inline-flex;
    flex-direction: column;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #f6f7fb;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    text-decoration: none;
    color: inherit;
    min-width: 180px;
    padding: 0;
}

.cliq-ui-radio-image-option:hover,
.cliq-ui-radio-image-option:focus {
    border-color: #8da2fb;
    outline: none;
}

.cliq-ui-radio-image-option img {
    display: block;
    width: 180px;
    height: 110px;
    object-fit: cover;
}

.cliq-ui-radio-image-option span {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    text-align: center;
}

.cliq-ui-radio-image-option.is-selected {
    border-color: #3056e3;
    box-shadow: 0 12px 26px rgba(48, 86, 227, 0.22);
    transform: translateY(-2px);
}

.cliq-ui-color-field .components-color-picker {
    box-shadow: 0 12px 32px rgba(48, 86, 227, 0.08);
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
}

.cliq-ui-repeater-field {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cliq-ui-repeater-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cliq-ui-repeater-item {
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
}

.cliq-ui-repeater-item-fields {
    display: grid;
    gap: 12px;
}

.cliq-ui-repeater-item-actions {
    display: flex;
    justify-content: flex-end;
}

/* Inline (itemColumns) repeater = compact, one row per item: fields + a small icon
   Remove on a single line, no card padding, labels hidden (placeholders carry meaning).
   This is the "choices" editor for select/checkbox/radio custom fields. */
.cliq-ui-repeater-field.is-inline { gap: 8px; }
.cliq-ui-repeater-items.is-inline { gap: 0; }
.cliq-ui-repeater-item.is-inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #eef1f6;
    border-radius: 0;
}
.cliq-ui-repeater-item.is-inline .cliq-ui-repeater-item-fields { flex: 1; gap: 8px; }
.cliq-ui-repeater-item.is-inline .components-base-control__label { display: none; }
.cliq-ui-repeater-item.is-inline .components-base-control { margin-bottom: 0; }
.cliq-ui-repeater-remove--icon {
    min-width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    color: #94a3b8 !important;
    transition: color .15s ease, background-color .15s ease;
}
.cliq-ui-repeater-remove--icon:hover,
.cliq-ui-repeater-remove--icon:focus-visible {
    color: #dc2626 !important;
    background: #fef2f2 !important;
}
.cliq-ui-repeater-columns-head {
    display: grid;
    gap: 8px;
    padding: 0 0 6px;
    border-bottom: 1px solid #dfe5ee;
}
.cliq-ui-repeater-columns-head span {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .045em;
    line-height: 1.2;
    text-transform: uppercase;
}
.cliq-ui-repeater-item.is-inline .components-text-control__input {
    min-height: 38px;
    border-color: #dfe5ee;
    border-radius: 8px;
    box-shadow: none;
}
.cliq-ui-repeater-item.is-inline .components-text-control__input:focus {
    border-color: #3858e9;
    box-shadow: 0 0 0 1px #3858e9;
}
/* Compact "add choice" — a small icon, not a full-width button. */
.cliq-ui-repeater-field .cliq-ui-repeater-add--icon {
    align-self: flex-start;
    min-width: 32px;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #475569;
}

.cliq-ui-repeater-empty {
    padding: 12px;
    border: 1px dashed rgba(84, 97, 108, 0.4);
    border-radius: 6px;
    color: #54616c;
    text-align: center;
    font-size: 13px;
}

.cliq-ui-conditional-field .cliq-ui-conditional-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cliq-ui-conditional-field .cliq-ui-conditional-fields.has-2-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}
@media (max-width: 782px) {
    .cliq-ui-conditional-field .cliq-ui-conditional-fields.has-2-columns {
        grid-template-columns: 1fr;
    }
}


/* ---- Opening hours field (Modern SaaS) ---- */
.cliqthemes-ui-hours-field__label {
    display: block;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1d2327;
    margin-bottom: 10px;
}

.cliqthemes-ui-hours-field__grid {
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.cliqthemes-ui-hours-row {
    display: grid;
    grid-template-columns: 130px 220px 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f1;
}

.cliqthemes-ui-hours-row:last-child {
    border-bottom: none;
}

.cliqthemes-ui-hours-row:hover {
    background: #fbfbfc;
}

.cliqthemes-ui-hours-row__day {
    font-weight: 600;
    color: #1d2327;
}

.cliqthemes-ui-hours-row__toggles {
    display: flex;
    gap: 18px;
    align-items: center;
}

.cliqthemes-ui-hours-row__slots {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cliqthemes-ui-hours-row__muted {
    color: #8c98a4;
    font-style: italic;
    font-size: 13px;
}

.cliqthemes-ui-hours-slot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    background: #f6f7f7;
    border-radius: 8px;
}

.cliqthemes-ui-hours-slot__input {
    border: 1px solid #d5d8dc;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    background: #fff;
    min-height: 34px;
}

.cliqthemes-ui-hours-slot__input:focus {
    border-color: #3858e9;
    box-shadow: 0 0 0 1px #3858e9;
    outline: none;
}

.cliqthemes-ui-hours-slot__sep {
    color: #54616c;
    font-size: 12px;
}

.cliqthemes-ui-hours-row__add {
    white-space: nowrap;
}

/* ===== Top layout: page header + section nav (in-place, no second sidebar) ===== */
.cliqthemes-ui-app {
    max-width: 1920px;
}

.cliqthemes-ui-pageheader__title {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    color: #0f172a;
}
.cliqthemes-ui-pageheader__tagline {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.cliqthemes-ui-nav {
    align-self: stretch;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 5px;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.cliqthemes-ui-nav__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: none;
    background: transparent;
    color: #475569;
    font-weight: 600;
    font-size: 13.5px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.cliqthemes-ui-nav__item:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.cliqthemes-ui-nav__item.is-active {
    background: #3858e9;
    color: #fff;
    box-shadow: 0 4px 12px rgba(56, 88, 233, 0.35);
}

/* ===== Form field polish (scoped to admin app) ===== */

.cliqthemes-ui-app .components-base-control__label,
.cliqthemes-ui-app .cliqthemes-ui-form-field > label,
.cliqthemes-ui-app .cliqthemes-ui-hours-field__label {
    text-transform: none !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    color: #334155 !important;
    letter-spacing: 0 !important;
    margin-bottom: 6px !important;
}

/* Only style raw HTML inputs — never WP component internals (TextControl, UnitControl select, etc.) */
.cliqthemes-ui-app input[type="text"]:not([class*="components-"]),
.cliqthemes-ui-app input[type="email"]:not([class*="components-"]),
.cliqthemes-ui-app input[type="url"]:not([class*="components-"]),
.cliqthemes-ui-app input[type="tel"]:not([class*="components-"]),
.cliqthemes-ui-app input[type="number"]:not([class*="components-"]),
.cliqthemes-ui-app input[type="date"]:not([class*="components-"]),
.cliqthemes-ui-app input[type="search"]:not([class*="components-"]),
.cliqthemes-ui-app textarea:not([class*="components-"]),
.cliqthemes-ui-app select:not([class*="components-"]) {
    width: 100%;
    border-radius: 9px !important;
    border: 1px solid #d5d8dc;
    box-shadow: none !important;
    min-height: 42px;
    padding: 8px 12px !important;
    background: #fff;
    font-size: 14px;
    color: #0f172a;
}

.cliqthemes-ui-app input:not([class*="components-"]):focus,
.cliqthemes-ui-app textarea:not([class*="components-"]):focus,
.cliqthemes-ui-app select:not([class*="components-"]):focus {
    border-color: #3858e9 !important;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.15);
    outline: none !important;
}

/* Suppress mouse-click focus rings on WP component buttons in the inspector
   (keyboard navigation still shows them via :focus-visible). */
.cb-inspector .components-button:focus:not(:focus-visible),
.cb-style .components-panel__body-toggle:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.cliqthemes-ui-app .components-base-control__help { color: #64748b; font-size: 12px; }

/* Normalise any remaining uppercase field labels (e.g. select fields) */
.cliqthemes-ui-app .cliqthemes-ui-content label,
.cliqthemes-ui-app .components-input-control__label,
.cliqthemes-ui-app .cliqthemes-ui-form-field label,
.cliqthemes-ui-app .cliqthemes-ui-form-group-fields label {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    color: #334155 !important;
}

/* ===== Form section tabs (replaces accordions) ===== */
.cliqthemes-ui-app .cliqthemes-ui-form-tabs .components-tab-panel__tabs {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	width: max-content;
	max-width: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	margin-bottom: 20px;
	box-shadow: none;
}
.cliqthemes-ui-app .cliqthemes-ui-form-tabs .components-tab-panel__tabs-item.components-button {
	min-height: 26px !important;
	height: 26px !important;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	margin: 0;
	padding: 2px 9px !important;
	font-weight: 600;
	font-size: 11.5px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
	box-shadow: none;
	transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.cliqthemes-ui-app .cliqthemes-ui-form-tabs .components-tab-panel__tabs-item.components-button::after {
	content: none !important;
	display: none !important;
	border: 0 !important;
	box-shadow: none !important;
}
.cliqthemes-ui-app .cliqthemes-ui-form-tabs .components-tab-panel__tabs-item:hover {
	color: #1e293b;
	background: #fff;
	border-color: #cbd5e1;
}
.cliqthemes-ui-app .cliqthemes-ui-form-tabs .components-tab-panel__tabs-item:focus {
	outline: none;
	box-shadow: none;
}
.cliqthemes-ui-app .cliqthemes-ui-form-tabs .components-tab-panel__tabs-item:focus-visible {
	box-shadow: 0 0 0 2px rgba(56,88,233,.28);
}
.cliqthemes-ui-app .cliqthemes-ui-form-tabs .components-tab-panel__tabs-item.is-active {
	color: #fff;
	background: #3858e9;
	border-color: #3858e9;
	box-shadow: 0 2px 5px rgba(56,88,233,.18);
}
.cliqthemes-ui-form-group {
    margin-bottom: 28px;
}
.cliqthemes-ui-form-group:last-child {
    margin-bottom: 0;
}
.cliqthemes-ui-form-group__title {
    margin: 0 0 16px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    border-bottom: 1px solid #eef0f3;
    padding-bottom: 8px;
}

/* Constrain the inline color picker so it doesn't dominate the form */
.cliqthemes-ui-app .components-color-picker {
    max-width: 280px;
    border: 1px solid #e6e8eb;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}
.cliqthemes-ui-app .components-color-picker .react-colorful {
    height: 180px;
}

/* ===== Compact color field (swatch + popover) ===== */
.cliqthemes-ui-color-swatch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    border: 1px solid #d5d8dc;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    min-height: 40px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cliqthemes-ui-color-swatch:hover {
    border-color: #3858e9;
}
.cliqthemes-ui-color-swatch:focus-visible {
    outline: none;
    border-color: #3858e9;
    box-shadow: 0 0 0 3px rgba(56, 88, 233, 0.15);
}
.cliqthemes-ui-color-swatch__chip {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.cliqthemes-ui-color-swatch__value {
    font-size: 13px;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.cliqthemes-ui-color-field__popover .components-color-picker {
    width: 240px;
    max-width: 240px;
}

/* ===== List view polish (fresh / minimal) ===== */
.cliqthemes-ui-card-toolbar { padding: 22px 24px 10px; align-items: flex-start; }
.cliqthemes-ui-card-subtitle { color: #94a3b8; font-size: 12px; }
.cliqthemes-ui-card .components-card__body { padding: 8px 24px 20px; }

.cliqthemes-ui-table { font-size: 13.5px; border-collapse: separate; border-spacing: 0; }
.cliqthemes-ui-table thead th {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
    padding: 12px 18px;
    border-bottom: 1px solid #e6e8eb;
}
.cliqthemes-ui-table td {
    padding: 15px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.cliqthemes-ui-table tbody tr:hover { background: #f8fafc; }
.cliqthemes-ui-table tbody tr:last-child td { border-bottom: none; }

.cliqthemes-ui-bulk-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    margin-bottom: 14px;
    background: #eef2ff;
    border: 1px solid #dbe2fe;
    border-radius: 10px;
}
.cliqthemes-ui-selection-meta { font-weight: 600; color: #3858e9; font-size: 13px; }

.cliqthemes-ui-bulk-modal {
	width: min(520px, calc(100vw - 32px));
}
.cliqthemes-ui-bulk-modal__body {
	display: grid;
	gap: 18px;
	padding-top: 8px;
}
.cliqthemes-ui-bulk-modal__value {
	min-width: 0;
}
.cliqthemes-ui-bulk-modal__help {
	margin: -8px 0 0;
	color: #64748b;
	font-size: 12px;
	line-height: 1.5;
}
.cliqthemes-ui-bulk-modal__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid #e2e8f0;
}

/* ===== Column manager popover ===== */
.cliqthemes-ui-colmanager__pop .components-popover__content {
    min-width: 240px;
    padding: 8px;
}
.cliqthemes-ui-colmanager__hint {
    margin: 4px 8px 8px;
    font-size: 11px;
    color: #94a3b8;
}
.cliqthemes-ui-colitem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: grab;
}
.cliqthemes-ui-colitem:hover {
    background: #f1f5f9;
}
.cliqthemes-ui-colitem.is-dragging {
    opacity: 0.5;
    background: #eef2ff;
}
.cliqthemes-ui-colitem__grip {
    color: #cbd5e1;
    flex-shrink: 0;
}
.cliqthemes-ui-colitem__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    margin: 0;
}
.cliqthemes-ui-colitem__label input {
    margin: 0;
}

/* Inline image thumbnails in table cells (marker/category icons, etc.) */
.cliqthemes-ui-cell-thumb {
    height: 40px;
    width: auto;
    max-width: 64px;
    object-fit: contain;
    border-radius: 6px;
    vertical-align: middle;
}

/* ===== Shared framework primitives ===== */
/* Used across RecordsView, the builder engine and field editors. Screen-level
   styles (stat cards, panels, charts, sub-tabs) belong to the host plugin that
   registers those screens, not to this framework. */
.cliqthemes-ui-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 48px;
    color: #64748b;
    font-size: 14px;
    justify-content: center;
}
.cliqthemes-ui-muted {
    color: #64748b;
    font-size: 13px;
    margin: 0 0 14px;
}
.cliqthemes-ui-button__icon {
    vertical-align: middle;
    margin-inline-end: 6px;
}

/* Inline field-help tooltip (ⓘ) for builder controls — a light, animated bubble
   with a tail and a capped width, so help never sprawls across the panel. */
.cb-hint { position: relative; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; cursor: help; margin-inline-start: 5px; vertical-align: middle; border-radius: 50%; transition: color .15s; }
.cb-hint:hover, .cb-hint:focus-visible { color: #3056e3; outline: none; }
.cb-hint__bubble {
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(5px) scale(0.97);
    width: max-content;
    max-width: 250px;
    padding: 10px 12px;
    background: #fff;
    color: #334155;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 120;
    transition: opacity .2s ease, transform .24s cubic-bezier(.34, 1.56, .64, 1);
}
/* Tail — a small white diamond tucked under the bubble, shadowed to match. */
.cb-hint__bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 11px;
    height: 11px;
    margin: -6px 0 0 -5.5px;
    background: #fff;
    border-right: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    transform: rotate(45deg);
}
.cb-hint:hover .cb-hint__bubble,
.cb-hint:focus .cb-hint__bubble,
.cb-hint:focus-within .cb-hint__bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}
.cb-hint-label { display: inline-flex !important; align-items: center; min-width: 0; }
.components-base-control__label > .cb-hint-label { margin: 0 !important; padding: 0 !important; }
.cb-field-with-hint .components-base-control__label { display: none; }
.cb-field-with-hint > .cb-hint-label { display: inline-flex !important; margin-bottom: 6px !important; }

/* Icon-picker field summary (current icon + Change button) — grid stays hidden
   until the user opts in, so the form isn't heavy with 100+ recoloured SVGs. */
.cliqthemes-ui-icon-picker__summary { display: flex; align-items: center; gap: 12px; margin: 4px 0 4px; }
.cliqthemes-ui-icon-picker__current { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: #f8fafc; border: 1px solid #eef1f6; }
.cliqthemes-ui-icon-picker__current .cliqthemes-ui-muted { font-size: 11px; text-align: center; padding: 0 4px; }
