/* Shared form controls for the opt-in admin preview (wdt_ui=preview). Loaded on every preview screen. */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh {
    --wdt-radius-control: 14px;
    --wdt-color-action-hover: #05508f;
    --wdt-color-on-action: #fff;
    --wdt-focus-ring: 0 0 0 3px #6d9df033;
}
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .wdt-browse-refresh {
    --wdt-color-action-hover: #b3d1ff;
    --wdt-color-on-action: #0d1830;
    --wdt-focus-ring: 0 0 0 3px #8db9ff40;
}

/* Fields: one radius, one hover/focus treatment. The rendered table (the preview container) keeps its own skin. */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(.form-control, textarea, .bootstrap-select, .bootstrap-select > .btn, .input-group-addon, .wdt-custom-number-input):not(:where(#wpdt-view-container, #wpdatatable-preview-container) *),
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(.checkbox, .radio, .toggle-switch):not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) label {
    border-radius: var(--wdt-radius-control) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(.form-control, textarea):not(:where(#wpdt-view-container, #wpdatatable-preview-container) *):is(:hover, :focus) {
    border-radius: var(--wdt-radius-control) !important;
    border-color: var(--wdt-color-action) !important;
    outline: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(.form-control, textarea):not(:where(#wpdt-view-container, #wpdatatable-preview-container) *):focus {
    box-shadow: var(--wdt-focus-ring) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .fg-line::after {
    display: none;
}

/* The legacy 300px cap cut long table names off */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .fg-line.wdt-table-name {
    max-width: min(650px, 100%);
}

/* Table name: keeps its shape on hover and focus */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-table-name .form-control,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-table-name #wdt-table-title-edit:is(:hover, :focus) {
    border-radius: var(--wdt-radius-control) !important;
}

/* Number input: the wrapper is the field, the input and its buttons sit inside it */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    min-width: 116px;
    padding: 0;
    background: var(--wdt-color-field) !important;
    border: 1px solid var(--wdt-color-border) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input:is(:hover, :focus-within) {
    border-color: var(--wdt-color-action) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input:focus-within {
    box-shadow: var(--wdt-focus-ring);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input .form-control,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input .form-control:is(:hover, :focus) {
    flex: 1;
    min-width: 2.5em;
    padding-left: 2px !important;
    padding-right: 2px !important;
    text-align: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input .wdt-btn-number,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input .wdt-btn-number:is(:hover, :focus, :active) {
    position: static;
    flex: 0 0 40px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--wdt-color-action) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input .wdt-btn-number:hover {
    background: color-mix(in srgb, var(--wdt-color-action) 12%, transparent) !important;
}

/* Dropdown: border, hover and open state belong to the whole control */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) {
    border: 1px solid var(--wdt-color-border) !important;
    background: var(--wdt-color-field) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) > .btn,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) > .btn:is(:hover, :focus, :active) {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *):is(:hover, .open, .show, :focus-within) {
    border-color: var(--wdt-color-action) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *):is(.open, .show, :focus-within) {
    box-shadow: var(--wdt-focus-ring);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .dropdown-menu {
    margin-top: 6px;
    border-radius: var(--wdt-radius-control) !important;
}
/* Search inside a dropdown reads as part of the menu */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .bs-searchbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 8px;
    margin: 0 0 4px;
    border-bottom: 1px solid var(--wdt-color-border);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .bs-searchbox::before,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .bs-searchbox::after {
    position: static;
    flex: none;
    font-size: 14px;
    line-height: 1;
    color: var(--wdt-color-muted);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .bs-searchbox .form-control,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .bs-searchbox .form-control:is(:hover, :focus) {
    flex: 1;
    height: 32px;
    min-height: 0;
    margin: 0;
    padding: 4px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font: var(--wdt-control-font);
}

/* Buttons share the pill shape */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .btn:not(.dropdown-toggle):not(.wdt-btn-number):not(.btn-link):not(.close) {
    border-radius: var(--wdt-radius-pill) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(#wdt-browse-button, #wdt-constructor-browse-button, .wdt-add-data-browse-button) {
    min-height: var(--wdt-control-height);
    padding: var(--wdt-control-padding) !important;
    border: 0 !important;
    font: var(--wdt-control-font);
}

/* Primary actions keep the preview palette on hover */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(.btn-primary, .wdt-add-new, .wdt-create-button):is(:hover, :focus, :active):not(:disabled) {
    background: var(--wdt-color-action-hover) !important;
    border-color: var(--wdt-color-action-hover) !important;
    color: var(--wdt-color-on-action) !important;
}

/* Wizard Next / Previous: the arrow sits beside the label */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(#wdt-chart-wizard-next-step, #wdt-chart-wizard-previous-step) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--wdt-control-height);
    padding: var(--wdt-control-padding) !important;
    font: var(--wdt-control-font);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-chart-wizard-next-step::after,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-chart-wizard-previous-step::before {
    position: static;
    margin: 0;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    color: inherit;
}

/* Option rows with a switch instead of the classic checkbox */
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch.toggle-switch {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh div.toggle-switch label,
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]:checked + label {
    padding: 10px 62px 10px 14px;
    background: var(--wdt-color-field) !important;
    border: 1px solid var(--wdt-color-border) !important;
    box-shadow: none !important;
    cursor: pointer;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh div.toggle-switch label:hover {
    border-color: var(--wdt-color-action) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox] {
    appearance: none !important;
    -webkit-appearance: none !important;
    position: absolute;
    top: 50%;
    right: 14px;
    left: auto;
    z-index: 1;
    width: 36px !important;
    height: 20px !important;
    min-width: 0;
    margin: 0 !important;
    transform: translateY(-50%);
    border: 0 !important;
    border-radius: var(--wdt-radius-pill) !important;
    background: color-mix(in srgb, var(--wdt-color-muted) 45%, transparent) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: pointer;
    transition: background-color .15s ease;
}
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]::before {
    content: "" !important;
    position: absolute;
    top: 3px;
    left: 3px;
    display: block;
    width: 14px;
    height: 14px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px #0003;
    transform: none;
    transition: transform .15s ease;
}
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]::after {
    content: none !important;
}
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]:checked {
    background: var(--wdt-color-action) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]:checked::before {
    transform: translateX(16px);
    background: var(--wdt-color-on-action);
}
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]:focus-visible {
    outline: 2px solid var(--wdt-color-action);
    outline-offset: 2px;
}
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]:disabled {
    opacity: .5 !important;
    cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
    html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox],
    html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]::before {
        transition: none;
    }
}

/* Tooltips */
html.wdt-preview-document body.wpdt-c .tooltip .tooltip-inner {
    max-width: 280px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #152133;
    color: #f4f7fc;
    font: 400 12px/1.5 Geist, Inter, sans-serif;
    box-shadow: 0 8px 24px #15213333;
    text-align: left;
}
html.wdt-preview-document body.wpdt-c .tooltip.in,
html.wdt-preview-document body.wpdt-c .tooltip.show {
    opacity: 1;
}
html.wdt-preview-document body.wpdt-c .tooltip.top .tooltip-arrow { border-top-color: #152133; }
html.wdt-preview-document body.wpdt-c .tooltip.bottom .tooltip-arrow { border-bottom-color: #152133; }
html.wdt-preview-document body.wpdt-c .tooltip.left .tooltip-arrow { border-left-color: #152133; }
html.wdt-preview-document body.wpdt-c .tooltip.right .tooltip-arrow { border-right-color: #152133; }
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .tooltip .tooltip-inner {
    background: #edf2ff;
    color: #152133;
}
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .tooltip.top .tooltip-arrow { border-top-color: #edf2ff; }
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .tooltip.bottom .tooltip-arrow { border-bottom-color: #edf2ff; }
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .tooltip.left .tooltip-arrow { border-left-color: #edf2ff; }
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .tooltip.right .tooltip-arrow { border-right-color: #edf2ff; }
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wpdt-icon-info-circle-thin {
    color: var(--wdt-color-muted);
    cursor: help;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wpdt-icon-info-circle-thin:hover {
    color: var(--wdt-color-action);
}

/* BETA / NEW tags */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh h4.wdt-beta-feature {
    float: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh p.wdt-beta-feature {
    display: inline-block;
    float: none;
    max-width: none;
    margin: 0 4px 0 6px;
    vertical-align: middle;
    padding: 2px 8px;
    border: 0;
    border-radius: var(--wdt-radius-pill);
    background: color-mix(in srgb, var(--wdt-color-action) 16%, transparent);
    color: var(--wdt-color-action) !important;
    font: 600 10px/1.6 Geist, Inter, sans-serif;
    letter-spacing: .06em;
}

/* Switch knob: undo the checkmark drawn for plain checkboxes on browse/utility screens */
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=checkbox]:checked::before {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    border: 0 !important;
    transform: translateX(16px) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh div.toggle-switch {
    padding: 0 !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(.toggle-switch, .radio, .checkbox) input[type=radio] {
    accent-color: var(--wdt-color-action);
}

/* Plain checkboxes: centered checkmark */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh input[type=checkbox]:not(.toggle-switch input) {
    position: relative !important;
    flex: none;
    accent-color: var(--wdt-color-action);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh:not(.wdt-editor-refresh) input[type=checkbox]:not(.toggle-switch input):checked {
    background: var(--wdt-color-action) !important;
    border-color: var(--wdt-color-action) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh:not(.wdt-editor-refresh) input[type=checkbox]:not(.toggle-switch input):checked::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 4px;
    margin: 0;
    border-color: var(--wdt-color-on-action);
    transform: translate(-50%, -70%) rotate(-45deg);
}

/* Number fields use the − / + buttons only */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
    text-align: center;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input input[type=number]::-webkit-inner-spin-button,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Tabs follow the field radius */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .tab-nav > li > a {
    border-radius: var(--wdt-radius-control) !important;
}

/* Color field: swatch first, reads as a color input even when empty */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-color-picker {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    gap: 10px;
    background: var(--wdt-color-field) !important;
    border: 1px solid var(--wdt-color-border) !important;
    border-radius: var(--wdt-radius-control) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-color-picker:is(:hover, :focus-within) {
    border-color: var(--wdt-color-action) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-color-picker .form-control,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-color-picker .form-control:is(:hover, :focus) {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh .wdt-color-picker.input-group .wpcolorpicker-icon.input-group-addon {
    order: -1;
    position: static;
    display: block;
    flex: none;
    width: 22px;
    min-width: 0;
    height: 22px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    overflow: hidden;
    /* Shows through while no color is chosen */
    background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e) !important;
    box-shadow: 0 0 0 2px var(--wdt-color-surface), 0 0 0 3px var(--wdt-color-border);
    cursor: pointer;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-color-picker .wpcolorpicker-icon i {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
}

/* Code editors */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor {
    border: 1px solid var(--wdt-color-border);
    border-radius: var(--wdt-radius-control);
    background: var(--wdt-color-field);
    color: var(--wdt-color-text);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor.ace_focus {
    border-color: var(--wdt-color-action);
    box-shadow: var(--wdt-focus-ring);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor .ace_gutter {
    background: color-mix(in srgb, var(--wdt-color-border) 55%, var(--wdt-color-field));
    color: var(--wdt-color-muted);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor :is(.ace_gutter-active-line, .ace_marker-layer .ace_active-line) {
    background: color-mix(in srgb, var(--wdt-color-action) 9%, transparent);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor .ace_marker-layer .ace_selection {
    background: color-mix(in srgb, var(--wdt-color-action) 24%, transparent);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor .ace_cursor {
    color: var(--wdt-color-text);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor .ace_print-margin {
    display: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor .ace_comment { color: var(--wdt-color-muted); font-style: italic; }
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor :is(.ace_keyword, .ace_meta.ace_tag, .ace_storage) { color: #b4237a; }
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor :is(.ace_string, .ace_constant.ace_other) { color: #1a7f4b; }
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor :is(.ace_constant.ace_numeric, .ace_constant.ace_language) { color: #9a5b00; }
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .ace_editor :is(.ace_support, .ace_entity.ace_name, .ace_variable) { color: var(--wdt-color-action); }
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .wdt-browse-refresh .ace_editor :is(.ace_keyword, .ace_meta.ace_tag, .ace_storage) { color: #ff9bd2; }
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .wdt-browse-refresh .ace_editor :is(.ace_string, .ace_constant.ace_other) { color: #8fe3b0; }
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .wdt-browse-refresh .ace_editor :is(.ace_constant.ace_numeric, .ace_constant.ace_language) { color: #ffd08a; }

/* Webhooks list inside the table editor */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-webhooks-toolbar {
    width: auto;
    padding: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table {
    border: 1px solid var(--wdt-color-border);
    border-radius: var(--wdt-radius-soft);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: var(--wdt-color-surface);
    box-shadow: none;
    font: var(--wdt-control-font);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table :is(th, td) {
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid var(--wdt-color-border);
    background: transparent;
    color: var(--wdt-color-text);
    font: var(--wdt-control-font);
    vertical-align: middle;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table thead :is(th, td) {
    background: var(--wdt-color-field);
    color: var(--wdt-color-muted);
    font-size: 12px;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table thead th a {
    padding: 0;
    color: inherit;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table tbody tr:last-child :is(th, td) {
    border-bottom: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table.striped > tbody > tr:nth-child(odd) {
    background: transparent;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table tbody tr:hover {
    background: color-mix(in srgb, var(--wdt-color-field) 60%, transparent);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table .no-items td {
    padding: 28px 16px;
    color: var(--wdt-color-muted);
    text-align: center;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh table.wdt-webhooks-table a {
    color: var(--wdt-color-action);
}

/* Chart wizard: column picker */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container > .card {
    border: 0;
    border-radius: var(--wdt-radius-soft) !important;
    background: var(--wdt-color-surface) !important;
    box-shadow: none !important;
    outline: 1px solid var(--wdt-color-border);
    outline-offset: -1px;
    height: auto;
    overflow: hidden;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .card-header {
    border-bottom: 1px solid var(--wdt-color-border);
    padding: 14px 18px !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .card-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 14px 18px !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .chart-column-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: var(--wdt-radius-control) !important;
    background: var(--wdt-color-field) !important;
    box-shadow: none !important;
    text-align: left;
    font: var(--wdt-control-font);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .chart-column-block strong {
    margin-right: auto;
    padding-right: 4px;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .chart-column-block::after {
    float: none;
    font-size: 16px;
    line-height: 1;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .wdt-chart-bulk-columns,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .wdt-chart-bulk-columns:is(:hover, :focus) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 14px !important;
    border: 0 !important;
    background: var(--wdt-color-field) !important;
    color: var(--wdt-color-action) !important;
    box-shadow: none !important;
    font: var(--wdt-control-font);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .wdt-chart-bulk-columns:hover {
    box-shadow: var(--wdt-focus-ring) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-chart-column-picker-container .wdt-chart-bulk-columns::after {
    position: static;
    margin: 0;
    font-size: 11px;
    line-height: 1;
}

/* Chart wizard: settings beside the preview */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-chart-settings-and-preview > :first-child {
    max-height: 720px;
    overflow-y: auto;
    border: 1px solid var(--wdt-color-border);
    border-radius: var(--wdt-radius-soft);
    background: var(--wdt-color-surface) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-chart-settings-and-preview > :last-child {
    position: sticky;
    top: 48px;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-chart-settings-and-preview .chart-preview-container {
    padding: 18px;
    border: 1px solid var(--wdt-color-border);
    border-radius: var(--wdt-radius-soft);
    background: var(--wdt-color-surface);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-chart-settings-and-preview h4 {
    font: var(--wdt-field-label-font);
    color: var(--wdt-color-text);
}

/* Scroll areas inside preview panels */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(#wdt-chart-settings-and-preview > :first-child, .wdt-chart-column-picker-container .card-body, .bootstrap-select .dropdown-menu .inner, .modal-body, .wdt-table-scroll) {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--wdt-color-muted) 45%, transparent) transparent;
}

/* Modals */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal .modal-title,
html.wdt-preview-document body.wpdt-c .modal.wpdt-c .modal-title {
    font: 600 18px/1.3 "Space Grotesk", Geist, sans-serif;
}
html.wdt-preview-document body.wpdt-c .modal.wpdt-c .modal-footer hr,
html.wdt-preview-document body.wpdt-c .modal.wpdt-c .modal-body + hr {
    display: none;
}

/* Header tools: documentation button and theme switch match the other pills */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-header-tools button.wdt-documentation,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-header-tools button.wdt-documentation:is(:hover, :focus) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid var(--wdt-color-border);
    border-radius: var(--wdt-radius-pill);
    background: var(--wdt-color-surface);
    color: var(--wdt-color-text);
    font: 500 12px/1.4 Geist, Inter, sans-serif;
    cursor: pointer;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-header-tools button.wdt-documentation:hover {
    border-color: var(--wdt-color-action);
    color: var(--wdt-color-action);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 14px;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-theme-toggle:hover {
    border-color: var(--wdt-color-action);
    color: var(--wdt-color-action);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-theme-toggle > span[aria-hidden] {
    flex: none;
    width: 14px;
    height: 14px;
    margin: 0;
    overflow: hidden;
    font-size: 0;
    background: currentColor;
    /* moon: the switch offers dark mode */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .wdt-browse-refresh .wdt-theme-toggle > span[aria-hidden] {
    /* sun: the switch offers light mode */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath stroke='%23000' stroke-width='2' stroke-linecap='round' d='M12 1v3M12 20v3M1 12h3M20 12h3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath stroke='%23000' stroke-width='2' stroke-linecap='round' d='M12 1v3M12 20v3M1 12h3M20 12h3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E");
}

/* Browse lists: room for the last action's tooltip, so hovering it does not add a scrollbar */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-browse-table td.column-functions {
    padding-right: 32px;
}

/* Radio options inside option rows: native control in the theme color, selected row outlined */
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh div.toggle-switch.toggle-switch input[type=radio] {
    accent-color: var(--wdt-color-action);
    color-scheme: inherit;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh div.toggle-switch input[type=radio]:checked + label {
    padding: 10px 62px 10px 14px;
    background: var(--wdt-color-field) !important;
    border: 1px solid var(--wdt-color-action) !important;
}

/* Permissions list: row actions use the same outline icons as the table and chart lists */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex :is(.wdt-edit-permission, .wdt-delete-permission) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--wdt-color-muted);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex :is(.wdt-edit-permission, .wdt-delete-permission):is(:hover, :focus-visible) {
    background: var(--wdt-color-field);
    color: var(--wdt-color-action);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex .wdt-delete-permission:is(:hover, :focus-visible) {
    color: #b52b3a;
}
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .wdt-browse-refresh .wdt-function-flex .wdt-delete-permission:is(:hover, :focus-visible) {
    color: #ff98a8;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex :is(.wdt-edit-permission, .wdt-delete-permission) i {
    color: inherit;
    line-height: 1;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex :is(.wdt-edit-permission, .wdt-delete-permission) i::before {
    content: "" !important;
    display: inline-block !important;
    position: static !important;
    width: 18px !important;
    height: 18px !important;
    background: currentColor;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex .wdt-edit-permission i::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9a2.8 2.8 0 0 0-4-4L4 16v4z'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9a2.8 2.8 0 0 0-4-4L4 16v4z'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex .wdt-delete-permission i::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Settings tabs: visible fields fill each line before the next one starts, whichever .row they sit in */
@media (min-width: 768px) {
    html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-table-settings .tab-pane.active:has(> .row):not(#webhooks-settings) {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -15px;
    }
    html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-table-settings .tab-pane.active:not(#webhooks-settings) > .row:not(.hidden) {
        display: contents;
    }
    html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-table-settings .tab-pane.active:not(#webhooks-settings) > .row::before,
    html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-table-settings .tab-pane.active:not(#webhooks-settings) > .row::after {
        display: none;
    }
}

/* Dropdown: the toggle never draws its own frame or glow, and the open menu is a single panel below the control */
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh .bootstrap-select.bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) > .btn.btn.dropdown-toggle,
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh .bootstrap-select.bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) > .btn.btn.dropdown-toggle:is(:hover, :focus, :focus-visible, :active) {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
    filter: none;
    transform: none;
    transition: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *):not(.dropup) > .dropdown-menu {
    top: 100% !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *).dropup > .dropdown-menu {
    margin: 0 0 6px;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .dropdown-menu ul.dropdown-menu.inner {
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Number input: − / + fill the field height, centered, with no button glow */
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh .wdt-custom-number-input.wdt-custom-number-input .btn.btn.wdt-btn-number,
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh .wdt-custom-number-input.wdt-custom-number-input .btn.btn.wdt-btn-number:is(:hover, :focus, :focus-visible, :active) {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    height: auto !important;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none;
    transform: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-custom-number-input .wdt-btn-number i {
    position: static;
    margin: 0;
    line-height: 1;
}

/* Table name: readable while editing in both themes */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-table-name #wdt-table-title-edit:is(:hover, :focus) {
    background: var(--wdt-color-field) !important;
    color: var(--wdt-color-text) !important;
}

/* Hint popovers match the tooltips */
html.wdt-preview-document {
    --wdt-tip-bg: #152133;
    --wdt-tip-text: #f4f7fc;
}
html.wdt-preview-document[data-wdt-theme=dark] {
    --wdt-tip-bg: #edf2ff;
    --wdt-tip-text: #152133;
}
html.wdt-preview-document body.wpdt-c .popover {
    max-width: 300px;
    padding: 0;
    border: 0 !important;
    border-radius: 12px;
    background: var(--wdt-tip-bg) !important;
    color: var(--wdt-tip-text) !important;
    box-shadow: 0 8px 24px #15213333;
    font: 400 12px/1.5 Geist, Inter, sans-serif;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
}
html.wdt-preview-document body.wpdt-c .popover.popover .popover-title.popover-title {
    margin: 0;
    padding: 12px 14px 8px;
    border: 0;
    border-radius: 12px 12px 0 0;
    background: transparent !important;
    color: var(--wdt-tip-text) !important;
    font: 600 12px/1.4 Geist, Inter, sans-serif;
    text-transform: none;
}
html.wdt-preview-document body.wpdt-c .popover .popover-content {
    padding: 0 14px 12px;
    color: inherit !important;
}
html.wdt-preview-document body.wpdt-c .popover .popover-title:empty + .popover-content {
    padding-top: 12px;
}
html.wdt-preview-document body.wpdt-c .popover .thumbnail {
    margin: 0 0 10px;
    padding: 4px;
    border: 0;
    border-radius: 8px;
    background: #fff;
}
html.wdt-preview-document body.wpdt-c .popover > .arrow,
html.wdt-preview-document body.wpdt-c .popover > .arrow::after {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}
html.wdt-preview-document body.wpdt-c .popover.top > .arrow::after { border-top-color: var(--wdt-tip-bg); }
html.wdt-preview-document body.wpdt-c .popover.bottom > .arrow::after { border-bottom-color: var(--wdt-tip-bg); }
html.wdt-preview-document body.wpdt-c .popover.left > .arrow::after { border-left-color: var(--wdt-tip-bg); }
html.wdt-preview-document body.wpdt-c .popover.right > .arrow::after { border-right-color: var(--wdt-tip-bg); }

/* Settings page: footer actions sit inside the card padding */
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .card.plugin-settings > .row {
    margin: 0 !important;
    padding: 0 24px 24px !important;
}

/* Permissions: search field spacing and icon */
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-permissions-list-table-wrap > .container {
    width: 100%;
    padding: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-permissions-list-table-wrap > .container:first-child {
    margin-bottom: 16px;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-permissions-list-table-wrap > .container:last-child {
    margin-top: 16px;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wpdt-search-box .fg-line > i {
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--wdt-color-muted) !important;
    font-size: 14px;
    line-height: 1;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wpdt-search-box input {
    padding-left: 40px;
}

/* Permissions list: same framed table as the webhooks list */
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh table.wdt-permissions-table {
    border: 1px solid var(--wdt-color-border);
    border-radius: var(--wdt-radius-soft);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font: var(--wdt-control-font);
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh table.wdt-permissions-table :is(th, td) {
    border: 0;
    border-bottom: 1px solid var(--wdt-color-border);
    vertical-align: middle;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh table.wdt-permissions-table thead :is(th, td) {
    background: var(--wdt-color-field) !important;
    color: var(--wdt-color-muted) !important;
    font-size: 12px;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh table.wdt-permissions-table thead th a {
    padding: 0;
    color: inherit;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh table.wdt-permissions-table tbody tr:last-child :is(th, td) {
    border-bottom: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh table.wdt-permissions-table .no-items td {
    padding: 28px 16px;
    color: var(--wdt-color-muted) !important;
    text-align: center;
}

/* Addons: cards keep the card padding */
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .card-body.wpdt-add-ons-card {
    padding: 8px 24px 24px !important;
}

/* Chart wizard: header action inside the card padding */
html.wdt-preview-document body.wpdt-c .wdt-editor-refresh .wdt-chart-wizard > .wdt-admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
html.wdt-preview-document body.wpdt-c .wdt-editor-refresh .wdt-chart-wizard > .wdt-admin-card-header h2 {
    margin: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-editor-refresh .wdt-chart-wizard > .wdt-admin-card-header .actions {
    position: static;
    flex: none;
    margin: 0;
    padding: 0 !important;
}
html.wdt-preview-document body.wpdt-c .wdt-editor-refresh .wdt-chart-wizard > .wdt-admin-card-header .actions :is(li, .btn) {
    margin: 0;
}

/* Chart wizard: the settings column scrolls vertically only */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-chart-settings-and-preview > :first-child,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #chart-container-tabs .chart-options-container {
    overflow-x: hidden;
}
/* Room for the focus ring of fields at the left edge of the clipped column */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #chart-container-tabs .chart-options-container {
    margin-left: -4px;
    padding-left: 4px;
}

/* Chart wizard: range picker */
html.wdt-preview-document body.wpdt-c #wdt-range-picker .modal-content {
    border: 0;
    border-radius: 22px !important;
    overflow: hidden;
    background: var(--wdt-color-surface) !important;
    color: var(--wdt-color-text);
    box-shadow: 0 20px 70px #0005;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker .modal-header {
    padding: 22px 24px 14px !important;
    border: 0 !important;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker .modal-body {
    padding: 0 24px !important;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker #pick-range-table-container {
    max-height: min(400px, 55vh);
    border: 1px solid var(--wdt-color-border);
    border-radius: var(--wdt-radius-control);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--wdt-color-muted) 45%, transparent) transparent;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font: var(--wdt-control-font);
    user-select: none;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table :is(th, td) {
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--wdt-color-border);
    background: var(--wdt-color-surface);
    color: var(--wdt-color-text);
    font: var(--wdt-control-font);
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: color-mix(in srgb, var(--wdt-color-field) 100%, var(--wdt-color-surface)) !important;
    color: var(--wdt-color-muted);
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table :is(thead th:first-child, td.pick-row) {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 44px;
    padding-right: 6px;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table thead th:first-child {
    z-index: 3;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table tbody tr:last-child td {
    border-bottom: 0;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table tbody td:not(.pick-row):hover {
    background: color-mix(in srgb, var(--wdt-color-action) 8%, var(--wdt-color-surface));
    cursor: cell;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table tbody td.selected,
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table tbody td.selected:hover {
    background: color-mix(in srgb, var(--wdt-color-action) 18%, var(--wdt-color-surface));
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table .checkbox {
    display: flex;
    width: auto;
    min-height: 0;
    margin: 6px 0 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table td .checkbox {
    margin: 0;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table input[type=checkbox]:is(.pick-column-range, .add-row-to-range) {
    appearance: none;
    -webkit-appearance: none;
    position: relative !important;
    display: block;
    width: 16px !important;
    height: 16px !important;
    min-width: 0;
    margin: 0 !important;
    border: 1px solid var(--wdt-color-muted) !important;
    border-radius: 4px !important;
    background: var(--wdt-color-surface) !important;
    box-shadow: none !important;
    cursor: pointer;
    transform: none;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table input[type=checkbox]:is(.pick-column-range, .add-row-to-range):checked {
    border-color: var(--wdt-color-action) !important;
    background: var(--wdt-color-action) !important;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table input[type=checkbox]:is(.pick-column-range, .add-row-to-range)::before {
    content: none !important;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table input[type=checkbox]:is(.pick-column-range, .add-row-to-range):checked::before {
    content: "" !important;
    position: absolute;
    inset: 0;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--wdt-color-on-action) !important;
    transform: none !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") center / 12px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker table.range-picker-table input[type=checkbox]:focus-visible {
    outline: 2px solid var(--wdt-color-action) !important;
    outline-offset: 2px;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker .modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 18px 24px 22px !important;
    border: 0 !important;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker .modal-footer::before,
html.wdt-preview-document body.wpdt-c #wdt-range-picker .modal-footer::after,
html.wdt-preview-document body.wpdt-c #wdt-range-picker .modal-footer hr {
    display: none;
}
html.wdt-preview-document body.wpdt-c #wdt-range-picker .modal-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--wdt-control-height);
    margin: 0 !important;
    padding: var(--wdt-control-padding) !important;
    border: 0 !important;
    border-radius: var(--wdt-radius-pill) !important;
    font: var(--wdt-control-font);
}

/* Get Help and Getting Started: page footer is a centered block, not a grid row */
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh :is(.wdt-support, .wdt-getting-started) > .row:last-child {
    display: block;
    margin: 28px 0 0;
    text-align: center;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh :is(.wdt-support, .wdt-getting-started) .wdt-footer-title {
    margin: 0;
    color: var(--wdt-color-muted) !important;
    font: 400 13px/1.5 Geist, Inter, sans-serif;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh :is(.wdt-support, .wdt-getting-started) .wpdt-footer-links {
    margin: 8px 0 0;
    padding: 0;
    color: var(--wdt-color-muted);
    font: 400 13px/1.5 Geist, Inter, sans-serif;
}

/* Get Help: cards follow the preview panels */
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-support .card-columns .card {
    overflow: hidden;
    border-radius: 22px !important;
    box-shadow: none !important;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-support .card-columns .card-body {
    border-radius: 22px !important;
    box-shadow: none !important;
}

/* Getting Started */
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started > .row {
    margin: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-block {
    float: none;
    width: auto;
    padding: 28px !important;
    border-radius: 22px !important;
    background: var(--wdt-color-surface) !important;
    box-shadow: none !important;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .card.wdt-getting-started-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-card > .card-header {
    display: block;
    flex: 0 0 100%;
    padding: 0 0 24px !important;
    border-radius: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-card > .card-header h5 {
    margin: 0 0 10px;
    color: var(--wdt-color-text) !important;
    font: 500 24px/1.3 "Space Grotesk", Geist, sans-serif;
    letter-spacing: -.5px;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-card > .card-header h5 i {
    color: var(--wdt-color-action);
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-card > .card-header p {
    max-width: 980px;
    margin: 0;
    color: var(--wdt-color-muted) !important;
    font: 400 13px/1.65 Geist, Inter, sans-serif;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-card > .card-columns {
    float: none;
    flex: 1 1 50%;
    min-width: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .card.wdt-tutorial-card {
    margin-bottom: 14px !important;
    border-radius: var(--wdt-radius-soft) !important;
    background: var(--wdt-color-field) !important;
    box-shadow: none !important;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-tutorial-card .card-body {
    align-items: center;
    gap: 20px;
    padding: 18px 20px !important;
    border-radius: var(--wdt-radius-soft);
    background: transparent !important;
    box-shadow: none !important;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-tutorial-img {
    display: grid;
    place-items: center;
    flex: none;
    width: 64px;
    height: 64px;
    padding: 10px;
    border-radius: var(--wdt-radius-control);
    /* The tutorial icons are drawn for a light surface */
    background: #fff;
}
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .wdt-utility-refresh .wdt-tutorial-img {
    background: #edf2ff;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-tutorial-img img {
    width: 100%;
    height: 100%;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-tutorial-desc {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    font: 400 13px/1.55 Geist, Inter, sans-serif;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-tutorial-desc span {
    color: var(--wdt-color-text) !important;
    font: inherit;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-tutorial-desc > span {
    font-weight: 600;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-tutorial-desc > span > span {
    color: var(--wdt-color-muted) !important;
    font-weight: 400;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-tutorial-button {
    position: static;
    flex: none;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-card > .card-columns:not(.wdt-getting-started-img-section) {
    flex-basis: 58%;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-block .wdt-getting-started-img-section {
    position: static;
    align-self: stretch;
    flex-basis: 36%;
    min-height: 420px;
    background-position: center !important;
    background-size: min(92%, 520px) auto !important;
}
html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-admin-card-header h2 a {
    color: var(--wdt-color-text);
}
/* Nested cards do not repeat the panel glow */
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh.wdt-utility-refresh .wdt-getting-started .card:is(.wdt-getting-started-card, .wdt-tutorial-card) {
    box-shadow: none !important;
}
@media (max-width: 1100px) {
    html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-card > .card-columns {
        flex-basis: 100%;
        padding: 0 !important;
    }
    html.wdt-preview-document body.wpdt-c .wdt-utility-refresh .wdt-getting-started-block .wdt-getting-started-img-section {
        display: none;
    }
}

/* Tutorial popovers: pill buttons on the tooltip surface */
html.wdt-preview-document body.wpdt-c .popover.tour .popover-navigation .btn {
    min-height: 34px;
    padding: 7px 16px;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    font: 500 13px/1.4 Geist, Inter, sans-serif;
}
html.wdt-preview-document body.wpdt-c .popover.tour .popover-navigation .btn:not(.btn-primary):not(.btn-warning) {
    background: color-mix(in srgb, var(--wdt-tip-text) 12%, transparent);
    color: var(--wdt-tip-text);
}
html.wdt-preview-document body.wpdt-c .popover.tour .popover-navigation {
    border-top-color: color-mix(in srgb, var(--wdt-tip-text) 14%, transparent);
}
html.wdt-preview-document body.wpdt-c .popover.tour {
    max-width: 380px;
}

/* Simple table editor: the spreadsheet keeps its own light skin, so its text and cell editor do not follow the admin theme */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .handsontable {
    color: #3c434a;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .handsontable textarea.handsontableInput,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .handsontable textarea.handsontableInput:is(:hover, :focus) {
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: inherit;
    box-shadow: inset 0 0 0 2px #4b89ff !important;
    outline: 0;
}

/* One modal shell for every admin modal: the folder-dialog card, outline Cancel, filled primary, red destructive.
   The table-preview edit dialog keeps the front-end skin and the range picker has its own layout. */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-content {
    overflow: visible;
    border: 0;
    border-radius: 20px;
    background: var(--wdt-color-surface) !important;
    box-shadow: 0 24px 80px #101b3340;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) :is(.modal-header, .modal-body, .modal-footer) {
    background: transparent !important;
    border: 0;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-content .modal-header {
    position: relative;
    padding: 22px 24px 10px;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-header .modal-title {
    margin: 0;
    padding-right: 36px;
    font: 500 21px/1.4 "Space Grotesk", Geist, sans-serif;
    color: var(--wdt-color-text) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-content .modal-header .close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    opacity: 1;
    color: var(--wdt-color-muted) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-content .modal-header .close:is(:hover, :focus) {
    color: var(--wdt-color-text) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-content .modal-body {
    padding: 14px 24px 20px;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-content .modal-body small {
    font-size: 14px;
    line-height: 1.55;
    color: var(--wdt-color-muted);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-content .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0 24px 22px;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer::before,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer::after,
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer hr {
    display: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer .pull-left {
    margin-right: auto;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer .btn {
    float: none;
    min-height: 40px;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    font: 500 13px/1.4 Geist, Inter, sans-serif;
    text-transform: none;
    box-shadow: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer .btn:is(.btn-primary, .btn-success, .btn-icon-text) {
    background: var(--wdt-color-action) !important;
    color: var(--wdt-color-surface) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer .btn:is([data-dismiss=modal], [data-toggle=modal], .btn-default, .btn-secondary, .btn-link):not(.btn-primary, .btn-success) {
    background: var(--wdt-color-field) !important;
    color: var(--wdt-color-text) !important;
    border-color: var(--wdt-color-border) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer .btn.btn-danger:not([data-dismiss]):not([data-toggle]),
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer :is(#wpdt-delete-folder-modal, #wpdt-remove-folder-modal, #wdt-remove-column-submit) {
    background: #d63c3c !important;
    color: #fff !important;
    border-color: transparent !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal):not(#wdt-range-picker) .modal-footer .btn:is(:hover, :focus) {
    filter: brightness(1.08);
}

/* Folder sort and column menus: body text with a check, not link blue */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wpdt-folders-card .buttons :is(.sort-menu, .columns-menu) {
    top: 46px;
    right: 0;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--wdt-color-border);
    border-radius: 14px;
    background: var(--wdt-color-surface);
    box-shadow: 0 12px 32px #101b3326;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wpdt-folders-card .buttons :is(.sort-menu, .columns-menu) li > a {
    padding: 0 38px 0 12px !important;
    border-radius: 9px;
    font: 500 13px/36px Geist, Inter, sans-serif;
    color: var(--wdt-color-text) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wpdt-folders-card .buttons .columns-menu li:not(.active) > a {
    color: var(--wdt-color-muted) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wpdt-folders-card .buttons :is(.sort-menu, .columns-menu) li.active > a::before {
    top: 11px;
    right: 12px;
    color: var(--wdt-color-action);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wpdt-folders-card .buttons :is(.sort-menu, .columns-menu) li > a:hover {
    background: var(--wdt-color-field) !important;
    color: var(--wdt-color-text) !important;
}

/* Hints inside modals: a themed callout with no close of its own, so the dialog has a single X */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal) .alert {
    border: 0;
    border-radius: 12px;
    background: var(--wdt-color-field) !important;
    color: var(--wdt-color-text) !important;
    box-shadow: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal) .alert :is(.wdt-alert-title, .wdt-alert-subtitle, li) {
    color: inherit;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal:not(#wdt-frontend-modal) .alert > .close {
    display: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-alert-caution {
    color: #c62828 !important;
}
html[data-wdt-theme=dark] body.wpdt-c .wdt-browse-refresh .wdt-alert-caution {
    color: #ff9c9c !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-formula-editor-modal .formula-columns-container .wdt-column-block {
    border-radius: 9px;
    background: var(--wdt-color-field) !important;
    color: var(--wdt-color-text) !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-formula-editor-modal .formula-columns-container .wdt-column-block :is(span, i) {
    color: inherit !important;
}

/* Closed selects end in an ellipsis; the button title carries the full value */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select > .dropdown-toggle .filter-option-inner-inner {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Helper line under the table name */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh.wdt-editor-refresh .wdt-table-settings .card-header small {
    font-size: 12px;
    line-height: 1.5;
    color: var(--wdt-color-muted);
}

/* Placeholders carry real hints here, so they keep readable contrast */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh :is(input, textarea):not(:where(#wpdt-view-container, #wpdatatable-preview-container) *)::placeholder {
    color: var(--wdt-color-muted);
    opacity: .85;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) > .dropdown-toggle.bs-placeholder .filter-option-inner-inner {
    color: var(--wdt-color-muted);
}

/* Select arrows follow the text colour in every panel, not only inside .select wrappers */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) > .dropdown-toggle::before {
    color: var(--wdt-color-text);
}

/* Colour picker popup (rendered on body, outside the themed wrapper) */
html.wdt-preview-document body.wpdt-c .pcr-app {
    z-index: 100000;
    border-radius: 14px;
    box-shadow: 0 16px 48px #101b3338;
}
html.wdt-preview-document body.wpdt-c .pcr-app .pcr-interaction input {
    border-radius: 8px;
}
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .pcr-app {
    background: #192235;
    border: 1px solid #35435c;
}
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .pcr-app .pcr-interaction .pcr-result {
    background: #263247;
    color: #edf2ff;
}
html.wdt-preview-document[data-wdt-theme=dark] body.wpdt-c .pcr-app .pcr-interaction .pcr-type:not(.active) {
    background: #263247;
    color: #b0bfd6;
}

/* Selects inside modals: themed search row, arrow clear of the edge */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .modal .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .bs-searchbox {
    background: transparent !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh.wdt-utility-refresh .modal .bootstrap-select > .dropdown-toggle::before {
    right: 10px;
}

/* Header links take the same pill as the other header tools */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-header-tools a.wdt-classic-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid var(--wdt-color-border);
    border-radius: var(--wdt-radius-pill);
    background: var(--wdt-color-surface);
    color: var(--wdt-color-text);
    font: 500 12px/1.4 Geist, Inter, sans-serif;
    text-decoration: none;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-header-tools a.wdt-classic-link:is(:hover, :focus-visible) {
    border-color: var(--wdt-color-action);
    color: var(--wdt-color-action);
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-header-tools a.wdt-classic-link span {
    margin: 0;
}

/* Chat composer: the composer shows focus, the textarea inside it stays borderless */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-ai-start.wdt-ai-start textarea:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) {
    /* A rounded corner clips the caret of the empty, unpadded field */
    border-radius: 0 !important;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-ai-start.wdt-ai-start textarea:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *):is(:hover, :focus) {
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0;
}
/* Dashboard start links react on hover like the other buttons */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh.wdt-dashboard-refresh .wdt-home-manual a {
    transition: border-color .18s, color .18s, box-shadow .18s;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh.wdt-dashboard-refresh .wdt-home-manual a:is(:hover, :focus-visible) {
    border-color: var(--wdt-color-action);
    color: var(--wdt-color-action);
    box-shadow: var(--wdt-focus-ring);
}

/* Permissions row actions: the icon sits in the middle of its hover circle */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex :is(.wdt-edit-permission, .wdt-delete-permission) {
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 50%;
}
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .wdt-function-flex :is(.wdt-edit-permission, .wdt-delete-permission) i {
    position: static !important;
}

/* "No results" row of a searchable select */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh .bootstrap-select:not(:where(#wpdt-view-container, #wpdatatable-preview-container) *) .dropdown-menu li.no-results {
    margin: 0;
    padding: 9px 12px;
    background: transparent !important;
    color: var(--wdt-color-muted) !important;
    font: var(--wdt-control-font);
}

/* Colour field: the whole field shows focus, the text input inside it stays borderless */
html.wdt-preview-document body.wpdt-c .wdt-datatables-admin-wrap.wdt-browse-refresh .wdt-color-picker.input-group .form-control:is(:hover, :focus) {
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0;
}

/* Edit entry dialog: the select value follows the field's own type and height instead of the classic 36px line */
html.wdt-preview-document body.wpdt-c .wdt-browse-refresh #wdt-frontend-modal .bootstrap-select.editDialogInput > .dropdown-toggle .filter-option .filter-option-inner-inner {
    height: auto !important;
    padding: 0 !important;
    font: inherit;
    line-height: 20px;
    color: inherit;
}
