.griffinforms-app-formlayout-form {
    max-width: 1024px;
    margin: 24px auto !important;
}

input[type=color], input[type=date], input[type=datetime-local], input[type=datetime], input[type=email], input[type=month], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], input[type=week], textarea {
    font-size: inherit !important;
}

/* Reset file upload button styling - will be set by theme or no-theme CSS */
.griffinforms-app-formlayout-form input[type="file"]::file-selector-button {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-left: -6px !important;
}

/* Force no border-radius on file selector button for all forms */
.griffinforms-app-formlayout-form input[type="file"]::file-selector-button {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Hide action buttons in form layout view. Too many buttons can make view cluttered. */
.griffinforms-app-formlayout-addrow_btns,
.griffinforms-app-formlayout-addpage_btns {
    visibility: hidden;
} 

/* Shows add page buttons when hovering above a page container. */
.griffinforms-app-formlayout-formpage-container:hover .griffinforms-app-formlayout-addpage_btns {
    visibility: visible;
} 

/* Shows add row buttons when hovering above a page contents. */
.griffinforms-app-formlayout-formpage:hover .griffinforms-app-formlayout-addrow_btns {
    visibility: visible;
}

.griffinforms-app-formlayout-pagerow-columns-container {
    flex-wrap: nowrap;
}

.griffinforms-app-formlayout-pagerow-columns-container .ui-sortable-placeholder {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100%;
}

/* Themed builder phone input group layout (when theme is applied) */
#griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}

#griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select {
    flex: 0 0 28% !important;
    max-width: 28% !important;
    width: 28% !important;
    min-width: 120px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: var(--gf-phone-caret-image, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolyline points='2,4 6,8 10,4' fill='none' stroke='%236c757d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")) !important;
    background-position: calc(100% - 14px) 50% !important;
    background-size: 12px 12px !important;
    background-repeat: no-repeat !important;
    padding-right: 44px !important;
}

#griffinforms-app-presentationarea .griffinforms-app-formlayout-form .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

#griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="flag_code_name"] {
    flex: 0 0 35% !important;
    max-width: 35% !important;
    width: 35% !important;
    min-width: 140px !important;
    max-width: 220px !important;
}

#griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="flag_code"] {
    flex: 0 0 28% !important;
    max-width: 28% !important;
    width: 28% !important;
    min-width: 120px !important;
    max-width: 180px !important;
}

#griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="code_only"] {
    flex: 0 0 16% !important;
    max-width: 16% !important;
    width: 16% !important;
    min-width: 76px !important;
    max-width: 110px !important;
}

#griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group input.form-control[type="tel"] {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

#griffinforms-app-presentationarea .griffinforms-app-formlayout-form .griffinforms-app-field-form_control .griffinforms-phone-input-group input.form-control[type="tel"] {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

#griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .form-control {
    flex: 1 1 auto !important;
    width: 1% !important;
    min-width: 0 !important;
}

@media (max-width: 575.98px) {
    #griffinforms-app-presentationarea .griffinforms-app-formlayout-form:not(.gf-no-theme) .griffinforms-app-field-form_control .griffinforms-phone-input-group .griffinforms-phone-country-select.form-select[data-gf-phone-display-mode="code_only"] {
        background-image: none !important;
        padding-right: 12px !important;
    }
}

:root {
    /* Neutral helper styling that works on light and dark themes */
    --gf-sort-helper-bg: var(--gf-color-surface-rgba-75);
    --gf-sort-helper-shadow: var(--gf-shadow-floating-md);
    --gf-sort-helper-border: 2px solid var(--gf-color-primary-rgba-50);
    --gf-fe-action-surface: rgba(255, 255, 255, 0.98);
    --gf-fe-action-border: #1d2327;
    --gf-fe-action-border-active: var(--gf-color-primary);
    --gf-fe-action-icon: #1d2327;
    --gf-fe-action-icon-muted: #1d2327;
    --gf-fe-action-hover-bg: transparent;
    --gf-fe-action-active-bg: rgba(240, 240, 241, 1);
    --gf-fe-action-hover-icon: var(--gf-color-primary);
    --gf-fe-action-divider: rgba(29, 35, 39, 0.16);
    --gf-fe-action-shadow: none;
    --gf-fe-action-btn-width: 44px;
    --gf-fe-action-menu-width: 250px;
}

.gf-fe-action-cluster {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 2px;
    border-radius: 4px;
    background: var(--gf-fe-action-surface);
    border: 1px solid var(--gf-fe-action-border);
    box-shadow: var(--gf-fe-action-shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s, border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    overflow: visible;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(calc(-100% - 8px));
    /* Must be above .gf-sub-toolbar (100000003) so option sub-toolbars cannot
       block clicks on the main field toolbar */
    z-index: 100000004;
}

.gf-fe-action-group {
    display: inline-flex;
    gap: 0;
    padding: 2px;
    border-radius: 4px;
    background: var(--gf-fe-action-surface);
    border: 1px solid var(--gf-fe-action-border);
    box-shadow: var(--gf-fe-action-shadow);
    overflow: hidden;
}

.gf-fe-action-group[aria-label="Move row"],
.gf-fe-action-group[aria-label="Move page"] {
    flex-direction: column;
}

.gf-fe-action-btn,
.gf-edit-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--gf-fe-action-btn-width);
    height: 36px;
    border-radius: 0;
    background: transparent;
    color: var(--gf-fe-action-icon-muted);
    border: none;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    box-shadow: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.gf-fe-action-btn:hover,
.gf-edit-icon-btn:hover {
    background: var(--gf-fe-action-hover-bg);
    color: var(--gf-fe-action-hover-icon);
}

.gf-fe-action-cluster > * + *::before,
.gf-fe-action-group > * + *::before {
    content: "";
    position: absolute;
    left: 0;
    top: -3px;
    bottom: -3px;
    width: 1px;
    background: var(--gf-fe-action-border);
}

.gf-fe-action-btn:active,
.gf-edit-icon-btn:active,
.gf-fe-action-btn.is-active,
.gf-edit-icon-btn.is-active {
    background: transparent;
    color: var(--gf-fe-action-icon-muted);
    box-shadow: none;
}

.gf-fe-action-btn:active::after,
.gf-edit-icon-btn:active::after,
.gf-fe-action-btn.is-active::after,
.gf-edit-icon-btn.is-active::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--gf-fe-action-border-active);
    border-radius: 4px;
    transform: scale(0.76, 0.84);
    transform-origin: center;
    box-sizing: border-box;
    pointer-events: none;
}

.gf-fe-action-btn:focus-visible,
.gf-edit-icon-btn:focus-visible {
    outline: 2px solid var(--gf-color-primary-rgba-50);
    outline-offset: 2px;
}

.gf-fe-action-btn .material-symbols-outlined,
.gf-edit-icon-btn .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
    font-variation-settings: "wght" 400;
}

.gf-fe-action-btn[disabled],
.gf-fe-action-btn.disabled,
.gf-edit-icon-btn[disabled],
.gf-edit-icon-btn.disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.gf-fe-action-btn > *,
.gf-edit-icon-btn > *,
.gf-fe-action-composite-btn > *,
.gf-inserter-btn > *,
.gf-inserter-static-btn > * {
    pointer-events: none;
}

.gf-fe-action-meta {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 10px;
    color: var(--gf-fe-action-icon-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
    position: relative;
}

.gf-fe-action-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: calc(-1 * (var(--gf-fe-action-menu-width) - var(--gf-fe-action-btn-width)));
    left: auto;
    min-width: var(--gf-fe-action-menu-width);
    padding: 6px 0;
    border-radius: 4px;
    border: 1px solid var(--gf-fe-action-border);
    background: var(--gf-fe-action-surface);
    box-shadow: none;
    z-index: 100000002;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.16s ease, transform 0.16s ease;
    will-change: opacity, transform;
}

.gf-fe-action-menu[hidden] {
    display: none;
}

.gf-fe-action-cluster > .gf-fe-action-menu::before {
    content: none !important;
}

.gf-fe-action-menu.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gf-fe-action-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--gf-fe-action-icon-muted);
    font-size: 13px;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
    position: relative;
    border-radius: 4px;
}

.gf-fe-action-menu-item:disabled,
.gf-fe-action-menu-item[aria-disabled="true"] {
    color: rgba(29, 35, 39, 0.35);
    cursor: not-allowed;
    pointer-events: none;
}

.gf-fe-action-menu-item:hover {
    background: transparent;
    color: var(--gf-fe-action-hover-icon);
}

.gf-fe-action-menu-item:focus-visible {
    color: var(--gf-fe-action-icon-muted);
    background: transparent;
}

.gf-fe-action-menu-item:hover:focus-visible {
    color: var(--gf-fe-action-icon-muted);
    background: transparent;
}

.gf-fe-action-menu-item:active,
.gf-fe-action-menu-item:focus-visible:active,
.gf-fe-action-menu-item.is-active {
    color: var(--gf-fe-action-icon-muted);
    background: transparent;
}

.gf-fe-action-menu-item:focus-visible {
    box-shadow: 0 0 0 1.5px var(--gf-fe-action-border-active);
    outline: 3px solid transparent;
    outline-offset: 0;
}

.gf-fe-action-menu-item:active::after,
.gf-fe-action-menu-item.is-active::after {
    content: "";
    position: absolute;
    inset: 3px 6px;
    border: 1.5px solid var(--gf-fe-action-border-active);
    border-radius: 4px;
    pointer-events: none;
}

.gf-fe-action-menu-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: inherit;
}

.gf-fe-action-menu-right-icon,
.gf-fe-action-menu-right-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: inherit;
}

.gf-fe-action-menu-right-icon .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
    font-variation-settings: "wght" 400;
}

.gf-fe-action-menu-right-icon .gf-fe-action-svg {
    width: 22px;
    height: 22px;
    display: block;
}

.gf-fe-action-menu-divider {
    height: 1px;
    margin: 6px 0;
    background: var(--gf-fe-action-divider);
}

.gf-fe-action-menu-item-danger {
    color: var(--gf-fe-action-icon-muted);
}

.gf-fe-action-menu-item-danger:disabled,
.gf-fe-action-menu-item-danger[aria-disabled="true"] {
    color: rgba(29, 35, 39, 0.35);
}

.gf-fe-action-menu-item-danger:hover {
    background: transparent;
    color: var(--gf-fe-action-hover-icon);
}

.gf-fe-action-menu-item-danger:focus-visible {
    color: var(--gf-fe-action-icon-muted);
    background: transparent;
}

.gf-fe-action-menu-item-danger:hover:focus-visible {
    color: var(--gf-fe-action-icon-muted);
    background: transparent;
}

.gf-fe-action-menu-item-danger:active,
.gf-fe-action-menu-item-danger:focus-visible:active,
.gf-fe-action-menu-item-danger.is-active {
    color: var(--gf-fe-action-icon-muted);
    background: transparent;
}

.gf-fe-action-menu > *::before,
.gf-fe-action-menu-item::before {
    content: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .gf-fe-action-menu {
        transition: none;
        transform: none;
    }

    .gf-fe-action-menu.is-open {
        transform: none;
    }
}

.gf-fe-action-composite {
    display: inline-flex;
    flex-direction: row;
    width: 44px;
    height: 36px;
    position: relative;
}

.gf-fe-action-composite--vertical {
    flex-direction: column;
}

.gf-fe-action-composite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 50%;
    width: 100%;
    min-height: 0;
    border: none;
    background: transparent;
    color: var(--gf-fe-action-icon-muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.gf-fe-action-composite-btn:hover {
    background: var(--gf-fe-action-hover-bg);
    color: var(--gf-fe-action-hover-icon);
}

.gf-fe-action-composite-btn:active,
.gf-fe-action-composite-btn.is-active {
    background: transparent;
    color: var(--gf-fe-action-icon-muted);
}

.gf-fe-action-composite-btn:active::after,
.gf-fe-action-composite-btn.is-active::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--gf-fe-action-border-active);
    border-radius: 4px;
    transform: scale(0.76, 0.84);
    transform-origin: center;
    box-sizing: border-box;
    pointer-events: none;
}

.gf-fe-action-composite-btn:focus-visible {
    outline: 2px solid var(--gf-color-primary-rgba-50);
    outline-offset: 2px;
}

.gf-fe-action-composite-btn .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
    font-variation-settings: "wght" 400;
}

.gf-fe-action-composite-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gf-fe-drag-btn {
    cursor: grab;
}

.gf-fe-drag-btn:hover {
    cursor: grab;
}

.gf-fe-drag-btn:active {
    cursor: grabbing;
}

.gf-fe-drag-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gf-fe-action-svg {
    width: 24px;
    height: 24px;
    display: block;
}

.gf-page-move-btn,
.gf-row-move-btn,
.gf-col-move-btn {
    color: var(--gf-fe-action-icon-muted);
}

.griffinforms-app-formlayout-formpage[data-gf-selected="true"] > .gf-fe-action-cluster,
.griffinforms-app-formlayout-pagerow[data-gf-selected="true"] > .gf-fe-action-cluster,
.griffinforms-app-formlayout-field[data-gf-selected="true"] > .gf-fe-action-cluster,
.griffinforms-app-formlayout-rowcolumn[data-gf-selected="true"] > .gf-fe-action-cluster {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.griffinforms-app-formlayout-formpage[data-gf-selected-child] > .gf-fe-action-cluster,
.griffinforms-app-formlayout-pagerow[data-gf-selected-child] > .gf-fe-action-cluster,
.griffinforms-app-formlayout-rowcolumn[data-gf-selected-child] > .gf-fe-action-cluster {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.griffinforms-app-formlayout-pagerow-columns-container .ui-sortable-helper {
    background: var(--gf-sort-helper-bg);
    box-shadow: var(--gf-sort-helper-shadow);
    outline: var(--gf-sort-helper-border);
    border-radius: 4px;
}

.griffinforms-app-formlayout-formpage-rows-container .ui-sortable-helper {
    background: var(--gf-sort-helper-bg) !important;
    box-shadow: var(--gf-sort-helper-shadow);
    outline: var(--gf-sort-helper-border);
    border-radius: 4px;
    margin: 0;
}

.griffinforms-app-formlayout-pagerow.gf-no-theme {
    background: var(--gf-color-surface);
}

.griffinforms-app-formlayout-formpage,
.griffinforms-app-formlayout-pagerow,
.griffinforms-app-formlayout-field {
    border-radius: 4px;
}

.griffinforms-app-formlayout-pagerow {
    position: relative;
}

.griffinforms-app-formlayout-field {
    position: relative;
    overflow: visible;
    padding-left: 0.5rem !important;
}

.griffinforms-app-formlayout-formpage-rows-container {
    min-height: 140px !important;
}

.gf-row-dragging {
    display: none !important;
}

.gf-field-dragging {
    display: none !important;
}

.griffinforms-app-formlayout-rowcolumn[data-gf-selected-child="field"] {
    outline: 1px dashed var(--gf-color-primary);
}

.griffinforms-app-formlayout-formpage {
    position: relative;
}

.gf-field-placeholder {
    box-shadow: none !important;
    background: var(--gf-color-primary-rgba-12) !important;
    border: 1px dashed var(--gf-color-primary) !important;
    color: var(--gf-color-primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.gf-page-move-btn {
    line-height: 1;
}

.gf-page-move-btn .material-symbols-outlined {
    font-size: 18px !important;
}

.gf-page-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gf-row-move-btn {
    line-height: 1;
}

.gf-row-move-btn .material-symbols-outlined {
    font-size: 18px !important;
}

.gf-row-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.griffinforms-app-formlayout-pagerow-drag-placeholder {
    height: 4px !important;
    min-height: 4px !important;
    background: var(--gf-color-primary) !important;
    border: none !important;
    margin: 6px 0 !important;
    border-radius: 2px !important;
}

@keyframes gf-placeholder-bounce {
    0%, 100% {
        transform: translateY(-2px);
    }
    50% {
        transform: translateY(2px);
    }
}

.gf-placeholder-arrow {
    display: inline-block;
    animation: gf-placeholder-bounce 1s ease-in-out infinite;
}

.griffinforms-app-formlayout-pagerow-drag-placeholder {
    height: 4px !important;
    min-height: 4px !important;
    background: var(--gf-color-primary) !important;
    border: none !important;
    margin: 6px 0 !important;
    border-radius: 2px !important;
}

.griffinforms-app-formlayout-rowcolumn {
    position: relative;
}

.gf-col-move-btn {
    line-height: 1;
}

.gf-col-move-btn .material-symbols-outlined {
    font-size: 18px !important;
}

.gf-col-move-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gf-col-move-left,
.gf-col-move-right {
    line-height: 1;
}

/* Adds animation to newly added form elements to make them standout. */
.griffinforms-new-formelement {
    transform-origin: center top;
    animation: gf-element-insert 560ms cubic-bezier(0.2, 0.85, 0.25, 1) both;
    will-change: transform, opacity;
}

@keyframes gf-element-insert {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
    45% {
        opacity: 1;
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .griffinforms-new-formelement {
        animation: gf-element-insert-reduced 160ms ease-out both;
    }
}

@keyframes gf-element-insert-reduced {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ui-resizable-handle.ui-resizable-e {
    background-color: var(--gf-color-surface-rgba-90);
    border: 2px solid var(--gf-color-primary-rgba-65);
    border-radius: 999px;
    height: 12px;
    width: 12px;
    top: 50%;
    right: -7px;
    transform: translateY(-50%);
    cursor: ew-resize;
    z-index: 9999999999;
    box-shadow: 0 0 0 2px var(--gf-color-surface);
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

/* Show resize handle only when the column is selected */
.griffinforms-app-formlayout-rowcolumn[data-gf-selected="true"] .ui-resizable-handle.ui-resizable-e {
    opacity: 1;
}

/* Also show resize handle when a field inside is selected */
.griffinforms-app-formlayout-rowcolumn[data-gf-selected-child="field"] .ui-resizable-handle.ui-resizable-e {
    opacity: 1;
}

/* Adds visual highlight to selected form elements */
*[data-gf-fe=true][data-gf-selected="true"] {
    outline: 1px solid var(--gf-color-primary);
    z-index: 99999999;
}

*[data-gf-fe=true] {
    background-color: transparent;
}

.griffinforms-app-fe-btn,
.gf-btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem;
    font-weight: 500 !important;
    letter-spacing: 0.3px;;
}

@keyframes droppablePulse {
    0% {
      background-color: var(--gf-color-primary-rgba-02);
    }
    50% {
      background-color: var(--gf-color-primary-rgba-10);
    }
    100% {
      background-color: var(--gf-color-primary-rgba-02);
    }
  }
  
  .griffinforms-fe-droppable {
    animation: droppablePulse 1.5s ease-in-out infinite;
    border-radius: 0.25rem !important;
  }

.griffinforms-app-text_update_field:focus,
.griffinforms-app-textarea_update_field:focus {
    color: var(--gf-color-primary);
}

.griffinforms-app-text_update_field::placeholder,
.griffinforms-app-textarea_update_field::placeholder {
    color: var(--gf-color-text-light);
}

.gf-builder-metadata-surface {
    position: relative;
}

.gf-builder-metadata-surface[data-gf-empty="true"] {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.25rem);
    transition: max-height 0.18s ease, opacity 0.14s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

.griffinforms-app-formlayout-form[data-gf-form-selected="true"]:not([data-gf-selected-child]) > .gf-builder-form-meta-shell .gf-builder-metadata-surface[data-gf-empty="true"] {
    max-height: 6rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.griffinforms-app-formlayout-form[data-gf-selected-child] > .gf-builder-form-meta-shell .gf-builder-metadata-surface[data-gf-empty="true"] {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.25rem);
}

.griffinforms-app-formlayout-formpage[data-gf-selected="true"][data-gf-metadata-visible="true"]:not([data-gf-selected-child]) > .gf-builder-page-meta-shell .gf-builder-metadata-surface[data-gf-empty="true"],
.griffinforms-app-formlayout-pagerow[data-gf-selected="true"][data-gf-metadata-visible="true"]:not([data-gf-selected-child]) > .flex-fill > .gf-builder-row-meta-shell .gf-builder-metadata-surface[data-gf-empty="true"] {
    max-height: 6rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.griffinforms-app-formlayout-formpage[data-gf-selected-child][data-gf-metadata-visible="true"] > .gf-builder-page-meta-shell .gf-builder-metadata-surface[data-gf-empty="true"],
.griffinforms-app-formlayout-pagerow[data-gf-selected-child][data-gf-metadata-visible="true"] > .flex-fill > .gf-builder-row-meta-shell .gf-builder-metadata-surface[data-gf-empty="true"] {
    max-height: 6rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.15rem);
}

.gf-builder-metadata-editor {
    width: 100%;
    background: transparent !important;
    border: 1px dashed transparent !important;
    border-radius: 4px;
    box-shadow: none !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.gf-builder-metadata-surface[data-gf-empty="true"] .gf-builder-metadata-editor {
    border-color: var(--gf-color-primary-rgba-30) !important;
    background: var(--gf-color-primary-rgba-06) !important;
}

.gf-builder-metadata-surface[data-gf-empty="true"] .gf-builder-metadata-editor:hover {
    border-color: var(--gf-color-primary-rgba-40) !important;
    background: var(--gf-color-primary-rgba-08) !important;
}

.gf-builder-metadata-surface[data-gf-empty="true"] .gf-builder-metadata-editor:focus {
    border-color: var(--gf-color-primary-rgba-30) !important;
    background: var(--gf-color-primary-rgba-06) !important;
}

.gf-builder-metadata-surface--input .gf-builder-metadata-editor {
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
}

.gf-builder-metadata-surface--input .gf-builder-metadata-editor:focus {
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
}

.gf-builder-metadata-surface--textarea .gf-builder-metadata-editor {
    display: block;
    min-height: 2.25rem !important;
    padding: 0.35rem 0.5rem !important;
    resize: none;
    line-height: 1.4 !important;
    overflow: visible !important;
}

.gf-builder-metadata-surface--textarea .gf-builder-metadata-editor:focus {
    min-height: 2.25rem !important;
    padding: 0.35rem 0.5rem !important;
    line-height: 1.4 !important;
}

.gf-builder-metadata-surface[data-gf-empty="true"] .gf-builder-metadata-editor::placeholder {
    color: var(--gf-color-text-light);
}

.gf-builder-metadata-surface--textarea[data-gf-empty="true"] .gf-builder-metadata-editor {
    min-height: 3rem !important;
}

/* Default styling for empty columns with thin stripes */
.griffinforms-app-formlayout-empty-rowcolumn {
    background-image: repeating-linear-gradient(
        45deg, 
        var(--gf-color-primary-rgba-10) 0px, 
        var(--gf-color-primary-rgba-10) 3px, 
        transparent 3px, 
        transparent 6px
    ) !important;
    min-height: 75px; /* Ensure column is visible */
    transition: background-color 0.2s ease, border 0.2s ease;
}

/* Class for empty rows */
.griffinforms-app-formlayout-empty-pagerow {
    background-image: repeating-linear-gradient(
        45deg, 
        var(--gf-color-primary-rgba-05) 0px, 
        var(--gf-color-primary-rgba-05) 3px, 
        transparent 3px, 
        transparent 6px
    ) !important;
    min-height: 75px; /* Ensure column is visible */
    transition: background-color 0.2s ease, border 0.2s ease;
}

.gf-row-id-label,
.gf-formpage-id-label,
.gf-field-label {
    color: var(--gf-color-primary);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    font-weight: 500;
    line-height: 1;
}

/* Soften borders for form controls inside form editor (textual inputs only) */
.griffinforms-app-field-form_control input[type="text"],
.griffinforms-app-field-form_control input[type="email"],
.griffinforms-app-field-form_control input[type="number"],
.griffinforms-app-field-form_control input[type="url"],
.griffinforms-app-field-form_control input[type="date"],
.griffinforms-app-field-form_control select,
.griffinforms-app-field-form_control textarea {
/*     border: 1.5px solid #d0d4d9 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0.25rem 0.5rem !important; */
}

/* Highlight focus with violet border and soft glow, only for textual input types */
.griffinforms-app-field-form_control input[type="text"]:focus,
.griffinforms-app-field-form_control input[type="email"]:focus,
.griffinforms-app-field-form_control input[type="number"]:focus,
.griffinforms-app-field-form_control input[type="url"]:focus,
.griffinforms-app-field-form_control input[type="date"]:focus,
.griffinforms-app-field-form_control select:focus,
.griffinforms-app-field-form_control textarea:focus {
/*     border-color: #000 !important;
    box-shadow: none !important; */
}


/* Custom scrollbar styling for form layout editor */
#griffinforms-app-presentationarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#griffinforms-app-presentationarea::-webkit-scrollbar-track {
    background: var(--gf-color-scrollbar-track);
    border-radius: 4px;
}

#griffinforms-app-presentationarea::-webkit-scrollbar-thumb {
    background-color: var(--gf-color-scrollbar-thumb);
    border-radius: 4px;
    border: 2px solid var(--gf-color-scrollbar-track);
}

#griffinforms-app-presentationarea::-webkit-scrollbar-thumb:hover {
    background-color: var(--gf-color-scrollbar-thumb-hover);
}

/* Firefox scrollbar styling */
#griffinforms-app-presentationarea {
    scrollbar-width: thin;
    scrollbar-color: var(--gf-color-scrollbar-thumb) var(--gf-color-scrollbar-track);
}

/*Custom styling for checkboxes*/
.griffinforms-app-field-form_control input[type="checkbox"] {
    border-radius: 3px !important;
}


/* Adds a subtle scale animation to highlight the currently selected layout element in the form tree */
@keyframes gfScrollScale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1);
  }
}

.gf-scroll-selected {
  animation: gfScrollScale 1s ease-out;
  animation-iteration-count: infinite;
  outline: 1.5px solid var(--gf-color-primary-rgba-18);
  outline-offset: -1px;
}
.gf-inserter-bar {
    width: 100%;
    height: 4px;
    background-color: var(--gf-color-primary);
    position: relative;
    margin: 16px 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease-out;
}

.griffinforms-app-formlayout-addpage_btns:hover .gf-inserter-bar {
    transform: scaleX(1);
}

.griffinforms-app-formlayout-formpage:hover .gf-inserter-bar {
    transform: scaleX(1);
}

.gf-inserter-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--gf-color-primary);
    border: none;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gf-color-on-primary);
    opacity: 0;
    transition: opacity 0.2s ease 0.2s;
    z-index: 100000002;
    pointer-events: auto;
}

.griffinforms-app-formlayout-formpage-container:hover .gf-inserter-btn {
    opacity: 1;
}

.gf-inserter-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--gf-color-on-primary);
}
.gf-inserter-static-btn {
    position: relative;
    background-color: var(--gf-color-primary);
    border: none;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gf-color-on-primary);
    margin: 8px auto;
    z-index: 100000002;
    pointer-events: auto;
}

.gf-inserter-static-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--gf-color-on-primary);
}

/* Address field layout styling */
.gf-address-admin-city-postal {
    gap: 0;
    align-items: stretch;
}

.gf-address-admin-city-postal > .form-floating.flex-grow-1 > .gf-address-admin-city {
    border-top-left-radius: var(--bs-border-radius, 0.375rem) !important;
    border-bottom-left-radius: var(--bs-border-radius, 0.375rem) !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.gf-address-admin-city-postal > .form-floating.gf-address-admin-postal {
    flex: 0 0 200px;
}

.gf-address-admin-city-postal > .form-floating.gf-address-admin-postal > .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: var(--bs-border-radius, 0.375rem) !important;
    border-bottom-right-radius: var(--bs-border-radius, 0.375rem) !important;
}

.gf-address-admin-city-postal > .form-floating > .form-control:focus {
    position: relative;
    z-index: 2;
}

/* Floating label styling for address fields in form layout preview */
.griffinforms-app-field-form_control .form-floating > label {
    position: absolute;
    top: calc(50% - 0.75rem);
    left: 0.75rem;
    z-index: 2;
    height: auto;
    padding: 0;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    border: none;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out;
    font-size: 0.875rem;
    background-color: transparent;
}

/* Apply field label color to floating labels in no-theme mode */
.griffinforms-app-formlayout-form.gf-no-theme .griffinforms-app-field-form_control .form-floating > label {
    color: inherit;
}

.griffinforms-app-field-form_control .form-floating > label::after {
    display: none !important;
}

.griffinforms-app-field-form_control .form-floating > input:focus ~ label,
.griffinforms-app-field-form_control .form-floating > input:not(:placeholder-shown) ~ label,
.griffinforms-app-field-form_control .form-floating > textarea:focus ~ label,
.griffinforms-app-field-form_control .form-floating > textarea:not(:placeholder-shown) ~ label,
.griffinforms-app-field-form_control .form-floating > select ~ label {
    top: 0.3rem;
    transform: scale(.75) translateX(.15rem);
    color: #666;
    background-color: transparent;
}

/* File upload field button styling */
input[type="file"][data-gf-style-group] {
    padding: 3px !important;
}

.griffinforms-container input[type="file"]::file-selector-button {
    padding: 0.375rem 0.75rem;
    margin-right: 0.75rem;
    font-size: 0.875rem !important;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: transparent;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out;
}

input[type="file"][data-gf-style-group]::file-selector-button:hover {
    border-color: #adb5bd;
}

/* ── Extension unavailable notice ─────────────────────────────────────────── */

.gf-ext-unavailable-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-left: 3px solid var(--gf-color-primary);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gf-ext-unavailable-notice__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 5px;
    background: var(--gf-color-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gf-ext-unavailable-notice__icon svg {
    width: 100%;
    height: 100%;
    fill: #fff;
}

.gf-ext-unavailable-notice__body {
    flex: 1;
    min-width: 0;
}

.gf-ext-unavailable-notice__badge {
    margin-bottom: 6px;
}

.gf-ext-unavailable-notice__title {
    font-size: 11px;
    font-weight: 600;
    color: #4c1aa8;
    line-height: 1.3;
    margin-bottom: 2px;
}

.gf-ext-unavailable-notice__text {
    font-size: 11px;
    color: #444;
    line-height: 1.4;
    margin-bottom: 0;
}

.gf-ext-unavailable-notice__link {
    display: inline-block;
    margin-top: 7px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #fff !important;
    background: var(--gf-color-primary);
    border-radius: 4px;
    text-decoration: none !important;
    line-height: 1.6;
    transition: background 0.15s ease;
}

.gf-ext-unavailable-notice__link:hover {
    background: #4c1aa8;
}

/* ─── Choice field inline option editing ──────────────────────────────────── */

.griffinforms-app-formlayout-field .gf-choice-field-wrap {
    flex-wrap: nowrap;
    gap: 0;
}

/* Option column */
.griffinforms-app-formlayout-field .gf-choice-field-column {
    position: relative;
    min-width: 80px;
    flex-shrink: 1;
}

/* Temp drag column — new column drop zone */
.griffinforms-app-formlayout-field .gf-choice-field-temp-column {
    min-width: 80px;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

/* "New column" label */
.griffinforms-app-formlayout-field .gf-choice-field-temp-column::before {
    content: "New column";
    font-size: 11px;
    font-weight: 500;
    color: var(--gf-fe-action-icon-muted, #888);
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

/* Active — item is over the zone */
.griffinforms-app-formlayout-field .gf-choice-field-temp-column.ui-sortable-over,
.griffinforms-app-formlayout-field .gf-choice-field-temp-column.gf-choice-field-temp-column--active {
    background: var(--gf-color-primary-rgba-10, rgba(108, 63, 207, 0.06));
    border-color: var(--gf-color-primary, #6c3fcf);
}

.griffinforms-app-formlayout-field .gf-choice-field-temp-column.ui-sortable-over::before,
.griffinforms-app-formlayout-field .gf-choice-field-temp-column.gf-choice-field-temp-column--active::before {
    display: none;
}

/* Hide add-option buttons while dragging */
.griffinforms-app-formlayout-field .gf-choice-field-wrap--dragging .gf-choice-field-add-option-wrap {
    visibility: hidden;
    pointer-events: none;
}

/* Option row */
.griffinforms-app-formlayout-field .gf-choice-option-row {
    position: relative;
}

/* Option label (contenteditable) */
.griffinforms-app-formlayout-field .gf-choice-option-label {
    cursor: text;
    border-radius: 1px;
    padding: 1px 3px;
    outline: none;
    min-width: 40px;
    display: inline-block;
    transition: background 0.15s ease;
}

.griffinforms-app-formlayout-field .gf-choice-option-label:hover {
    background: rgba(0, 0, 0, 0.04);
}

.griffinforms-app-formlayout-field .gf-choice-option-label:focus {
    background: rgba(0, 0, 0, 0.06);
    box-shadow: 0 0 0 1px var(--gf-color-primary-rgba-50, rgba(100, 60, 200, 0.4));
    color: var(--gf-color-primary);
}

/* ─── Sub-toolbar system ───────────────────────────────────────────────────────
 *
 * Reusable inline toolbar for inner builder elements (choice options, field
 * labels, field descriptions, etc). Visually distinct from the main
 * .gf-fe-action-cluster toolbar: smaller buttons (28×28 vs 44×36), tighter
 * padding, lighter shadow. Intentionally avoids .gf-fe-action-cluster and
 * all .gf-fe-action-* classes so the global builderRoot interceptors never
 * interfere with sub-toolbar clicks.
 *
 * Usage
 * -----
 *   <div class="gf-sub-toolbar" role="group" aria-label="…">
 *     <button class="gf-sub-toolbar-btn …">…</button>
 *     <div class="gf-sub-toolbar-composite">          ← vertical pair
 *       <button class="gf-sub-toolbar-btn …">…</button>
 *       <button class="gf-sub-toolbar-btn …">…</button>
 *     </div>
 *   </div>
 *
 * Show/hide: add .gf-sub-toolbar--visible to the toolbar itself, or use the
 * parent-state pattern (see choice field usage below).
 * ─────────────────────────────────────────────────────────────────────────── */

.gf-sub-toolbar {
    display: inline-flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: var(--gf-fe-action-surface, #fff);
    border: 1px solid var(--gf-fe-action-border, #ddd);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0s linear 0.12s;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(calc(-100% - 5px));
    z-index: 100000003;
    white-space: nowrap;
    overflow: hidden;
}

.gf-sub-toolbar.gf-sub-toolbar--visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.12s ease, visibility 0s linear 0s;
}

/* Sub-toolbar button */
.gf-sub-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--gf-fe-action-icon-muted, #444);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s ease, color 0.12s ease;
    position: relative;
}

.gf-sub-toolbar-btn:hover {
    background: transparent;
    color: var(--gf-fe-action-hover-icon, var(--gf-color-primary, #6c3fcf));
}

.gf-sub-toolbar-btn:active {
    background: transparent;
    color: var(--gf-fe-action-icon-muted, #444);
}

.gf-sub-toolbar-btn:active::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--gf-fe-action-border-active, var(--gf-color-primary, #6c3fcf));
    border-radius: 4px;
    transform: scale(0.76, 0.84);
    transform-origin: center;
    box-sizing: border-box;
    pointer-events: none;
}

.gf-sub-toolbar-btn:focus-visible {
    outline: 2px solid var(--gf-color-primary-rgba-50, rgba(108, 63, 207, 0.4));
    outline-offset: -2px;
}

.gf-sub-toolbar-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.gf-sub-toolbar-btn > * {
    pointer-events: none;
}

.gf-sub-toolbar-btn .gf-fe-action-svg {
    width: 18px;
    height: 18px;
}

/* Divider: full-height 1px rule between adjacent direct children */
.gf-sub-toolbar > * + * {
    border-left: 1px solid var(--gf-fe-action-border, #ddd);
}

/* Composite: stacked vertical pair (move up / move down), no outer border */
.gf-sub-toolbar-composite {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
}

.gf-sub-toolbar-composite .gf-sub-toolbar-btn {
    width: 26px;
    height: 16px;
}

.gf-sub-toolbar-composite .gf-sub-toolbar-btn + .gf-sub-toolbar-btn {
    border-left: none;
}

/* Horizontal composite: buttons side by side (e.g. move left / move right) */
.gf-sub-toolbar-composite--horizontal {
    flex-direction: row;
}

.gf-sub-toolbar-composite--horizontal .gf-sub-toolbar-btn {
    width: 26px;
    height: 32px;
}


/* ─── Choice option toolbar (applies sub-toolbar to .gf-choice-option-row) ── */

.griffinforms-app-formlayout-field .gf-choice-option-toolbar {
    top: 0;
    left: 0;
    transform: translateY(calc(-100% - 5px));
}

.griffinforms-app-formlayout-field .gf-choice-option-row--focused .gf-choice-option-toolbar {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.12s ease, visibility 0s linear 0s;
}

/* Drag handle — inside sub-toolbar, cursor override */
.griffinforms-app-formlayout-field .gf-choice-option-drag-handle {
    cursor: grab;
}

.griffinforms-app-formlayout-field .gf-choice-option-drag-handle:active {
    cursor: grabbing;
}

/* Value popover */
.griffinforms-app-formlayout-field .gf-choice-option-value-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100000004;
    background: var(--gf-fe-action-surface, #fff);
    border: 1px solid var(--gf-fe-action-border, #ddd);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 8px;
    min-width: 180px;
}

.griffinforms-app-formlayout-field .gf-choice-option-value-error {
    color: #c0392b;
    font-size: 11px;
    margin-top: 4px;
}

/* Add option inserter */
.griffinforms-app-formlayout-field .gf-choice-field-add-option-wrap {
    position: relative;
    margin: 6px 0 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.griffinforms-app-formlayout-field .gf-choice-field-column:hover .gf-choice-field-add-option-wrap {
    opacity: 1;
}

.griffinforms-app-formlayout-field .gf-choice-field-add-option-bar {
    height: 2px;
    background: var(--gf-color-primary, #6c3fcf);
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease-out;
}

.griffinforms-app-formlayout-field .gf-choice-field-column:hover .gf-choice-field-add-option-bar {
    transform: scaleX(1);
}

.griffinforms-app-formlayout-field .gf-choice-field-add-option-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gf-color-primary, #6c3fcf);
    color: var(--gf-color-on-primary, #fff);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000002;
}

.griffinforms-app-formlayout-field .gf-choice-field-add-option-btn .gf-choice-add-option-icon {
    font-size: 16px;
    line-height: 1;
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -1px;
}

.griffinforms-app-formlayout-field .gf-choice-field-add-option-btn > * {
    pointer-events: none;
}

/* Sortable placeholder */
.griffinforms-app-formlayout-field .gf-choice-option-row.ui-sortable-placeholder {
    visibility: visible !important;
    background: rgba(108, 63, 207, 0.08);
    border: 1px dashed var(--gf-color-primary, #6c3fcf);
    border-radius: 3px;
    min-height: 28px;
}

/* Siblings animate into position as placeholder moves */
.griffinforms-app-formlayout-field .gf-choice-option-row {
    transition: transform 0.18s ease;
}

/* Drag helper — card lifted off the surface */
.griffinforms-app-formlayout-field .gf-choice-field-column .ui-sortable-helper {
    background: #fff;
    border: 1px solid rgba(108, 63, 207, 0.25);
    outline: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 4px 8px;
    opacity: 0.96;
    cursor: grabbing;
}

/* Hide the floating toolbar on the drag clone */
.griffinforms-app-formlayout-field .gf-choice-field-column .ui-sortable-helper .gf-choice-option-toolbar {
    display: none;
}

/* Landing flash — brief highlight when item settles into its new position */
.griffinforms-app-formlayout-field .gf-choice-option-row--landing {
    animation: gf-option-land 0.35s ease forwards;
}

@keyframes gf-option-land {
    0%   { background: rgba(108, 63, 207, 0.14); border-radius: 3px; }
    100% { background: transparent; }
}

/* ─── Dropdown (select) field inline option editing ──────────────────────── */

.griffinforms-app-formlayout-field .gf-dropdown-field-wrap {
    position: relative;
}


/* Disable native select pointer events so the overlay intercepts all clicks */
.griffinforms-app-formlayout-field .gf-dropdown-select-preview {
    pointer-events: none;
}

/* Transparent overlay over the native select — captures clicks to open panel */
.griffinforms-app-formlayout-field .gf-dropdown-trigger-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
    z-index: 100000002;
}

/* ── Options panel ── */
.griffinforms-app-formlayout-field .gf-dropdown-options-panel {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: visible;
    background: var(--gf-fe-action-surface, #fff);
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    /* p-2 + extra top padding so toolbar above first row is not clipped */
    padding: 36px 8px 8px;
    z-index: 100000005;
    box-sizing: border-box;
    /* Override any text-align inherited from the select field's theme styles */
    text-align: left;
}

/* Hide form surface insert buttons while any dropdown panel is open so they
   cannot render on top of the panel regardless of stacking context */
body:has(.gf-dropdown-options-panel--open) .gf-inserter-btn,
body:has(.gf-dropdown-options-panel--open) .gf-inserter-static-btn {
    display: none !important;
}

/* When panel opens downward (default): flatten bottom of select + top of panel */
.griffinforms-app-formlayout-field .gf-dropdown-field-wrap:has(.gf-dropdown-options-panel--open:not(.gf-dropdown-options-panel--upward)) .gf-dropdown-select-preview {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.griffinforms-app-formlayout-field .gf-dropdown-field-wrap .gf-dropdown-options-panel--open:not(.gf-dropdown-options-panel--upward) {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    margin-top: calc(-1 * var(--gf-select-border-width, 1px)) !important;
}

/* When panel opens upward: flatten top of select + bottom of panel */
.griffinforms-app-formlayout-field .gf-dropdown-field-wrap:has(.gf-dropdown-options-panel--upward) .gf-dropdown-select-preview {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.griffinforms-app-formlayout-field .gf-dropdown-field-wrap .gf-dropdown-options-panel--upward {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-bottom: calc(-1 * var(--gf-select-border-width, 1px)) !important;
}

/* Group container; position:relative so toolbars can be absolutely positioned */
.griffinforms-app-formlayout-field .gf-dropdown-option-group {
    position: relative;
}

/* ── Group headers ── */
.griffinforms-app-formlayout-field .gf-dropdown-group-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gf-color-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* In simple mode, hide all group headers */
.griffinforms-app-formlayout-field .gf-dropdown-options-panel[data-gf-grouped="false"] .gf-dropdown-group-header {
    display: none;
}

/* In grouped mode, show the static "Ungrouped" header */
.griffinforms-app-formlayout-field .gf-dropdown-options-panel[data-gf-grouped="true"] .gf-dropdown-group-header--ungrouped {
    display: flex;
}

/* Editable group name */
.griffinforms-app-formlayout-field .gf-dropdown-group-name {
    flex: 1;
    min-width: 40px;
    outline: none;
    cursor: text;
    color: var(--gf-color-muted, #888);
    font-size: 11px;
    font-weight: 600;
    text-align: left;
}

.griffinforms-app-formlayout-field .gf-dropdown-group-name:focus {
    color: var(--gf-color-on-surface, #222);
}

/* Group toolbar (delete) */
.griffinforms-app-formlayout-field .gf-dropdown-group-toolbar {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.griffinforms-app-formlayout-field .gf-dropdown-group-header:hover .gf-dropdown-group-toolbar,
.griffinforms-app-formlayout-field .gf-dropdown-group-name:focus ~ .gf-dropdown-group-toolbar {
    opacity: 1;
}

/* ── Placeholder row (non-editable, muted) ── */
.griffinforms-app-formlayout-field .gf-dropdown-placeholder-row {
    padding: 5px 10px;
    font-size: 12px;
    color: var(--gf-color-muted, #aaa);
    font-style: italic;
    pointer-events: none;
    border-bottom: 1px solid var(--gf-fe-action-border, #eee);
    margin-bottom: 4px;
}

/* ── Empty state ── */
.griffinforms-app-formlayout-field .gf-dropdown-empty-state {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--gf-color-muted, #aaa);
    font-style: italic;
}

/* ── Add group button — bottom of panel, styled as secondary outline btn ── */
.griffinforms-app-formlayout-field .gf-dropdown-add-group-wrap {
    padding: 4px 0 2px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 6px;
}

.griffinforms-app-formlayout-field .gf-dropdown-add-group-btn {
    background: transparent;
    border: 1px solid var(--gf-color-primary, #6c3fcf);
    color: var(--gf-color-primary, #6c3fcf) !important;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.griffinforms-app-formlayout-field .gf-dropdown-add-group-btn:hover {
    background: rgba(108, 63, 207, 0.06);
    border-color: var(--gf-color-primary-dark, #5530a8);
    color: var(--gf-color-primary-dark, #5530a8) !important;
}

/* Option rows inside the panel inherit existing .gf-choice-option-row styles.
   The wrap needs min-height so the absolutely-positioned + button is not
   clipped by the panel's overflow-y:auto scroll container. The bar is also
   absolutely centered so it stays on the vertical midline of the wrap. */
.griffinforms-app-formlayout-field .gf-dropdown-options-panel .gf-choice-field-add-option-wrap {
    min-height: 24px;
    position: relative;
}

.griffinforms-app-formlayout-field .gf-dropdown-options-panel .gf-choice-field-add-option-bar {
    position: absolute;
    inset: 0;
    height: 2px;
    margin: auto;
    transform: scaleX(0);
}

.griffinforms-app-formlayout-field .gf-dropdown-option-group:hover > .gf-choice-field-add-option-wrap {
    opacity: 1;
}

.griffinforms-app-formlayout-field .gf-dropdown-option-group:hover > .gf-choice-field-add-option-wrap .gf-choice-field-add-option-bar {
    transform: scaleX(1);
}

/* Drag helper within dropdown groups */
.griffinforms-app-formlayout-field .gf-dropdown-option-group .ui-sortable-helper {
    background: #fff;
    border: 1px solid rgba(108, 63, 207, 0.25);
    outline: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 4px 8px;
    opacity: 0.96;
    cursor: grabbing;
}

.griffinforms-app-formlayout-field .gf-dropdown-option-group .ui-sortable-helper .gf-choice-option-toolbar {
    display: none;
}

/* Contenteditable heading span (used when a required indicator is present) */
.griffinforms-app-heading-ce {
    display: inline-block;
    cursor: text;
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
    border-radius: 3px;
    min-width: 2ch;
    text-align: left;
}

/* Indicator baseline-aligns with the first line of the label text */
.gf-builder-required-indicator {
    flex-shrink: 0;
}

.griffinforms-app-heading-ce:focus {
    outline: 2px solid var(--gf-color-primary, #0d6efd);
    outline-offset: 1px;
}

.griffinforms-app-heading-ce:empty::before {
    content: attr(data-placeholder);
    color: var(--gf-color-text-light, #aaa);
    pointer-events: none;
}

/* ── Payment field inline product editing ──────────────────────────────────── */
/* Focus/hover on name, price, desc editables is inherited from .gf-choice-option-label above. */

/* input-group layout for canvas image row — !important needed to beat Bootstrap
   and theme radius rules that fire at higher specificity */
.gf-payment-product-canvas .input-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
}
.gf-payment-product-canvas .input-group .gf-payment-canvas-image-pick {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-color: var(--bs-border-color, #dee2e6) !important;
    background: transparent !important;
}
.gf-payment-product-canvas .input-group .gf-payment-canvas-image-pick:hover,
.gf-payment-product-canvas .input-group .gf-payment-canvas-image-pick:focus {
    background-color: var(--bs-tertiary-bg, #f8f9fa) !important;
    border-color: var(--bs-border-color, #dee2e6) !important;
    color: var(--gf-color-primary, #6c3fcf) !important;
    box-shadow: none !important;
}

.gf-payment-product-desc-editable.gf-payment-product-desc-empty:empty::before {
    content: "Add description\2026";
    color: #aaa;
    pointer-events: none;
    font-style: italic;
}

.gf-payment-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gf-payment-add-image-btn {
    font-size: 0.75em;
}

.gf-payment-image-wrap {
    position: relative;
}

.gf-payment-product-canvas {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.gf-payment-canvas-header {
    font-weight: 600;
    font-size: 0.85em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #555;
}

.gf-payment-product-canvas .form-label {
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 2px;
    text-align: left;
    display: block;
}

.gf-payment-product-canvas,
.gf-payment-product-canvas * {
    text-align: left;
}

.gf-product-canvas-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
}

/* Currency symbol is non-editable; sits immediately before the price number */
.gf-payment-product-currency-symbol {
    user-select: none;
    pointer-events: none;
}

/* Product cards: position relative so sub-toolbar can anchor to top-left */
.gf-payment-product-card {
    position: relative;
}

/* Sub-toolbar: hidden by default, shown when card is focused */
.griffinforms-app-formlayout-field .gf-payment-product-toolbar {
    top: 0;
    left: 0;
    transform: translateY(calc(-100% - 5px));
}

.griffinforms-app-formlayout-field .gf-payment-product-card--focused .gf-payment-product-toolbar {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.12s ease, visibility 0s linear 0s;
}

/* Hide toolbar on the sortable drag helper */
.griffinforms-app-formlayout-field .gf-payment-product-card--dragging .gf-payment-product-toolbar {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Drag helper card: elevated appearance */
.gf-payment-product-card.ui-sortable-helper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    opacity: 0.95;
    z-index: 100000005;
}

/* Sortable placeholder — matches choice option row style */
.gf-preview-grid .ui-sortable-placeholder,
.gf-preview-stack .ui-sortable-placeholder {
    border: 1px dashed var(--gf-color-primary, #6c3fcf);
    border-radius: 3px;
    background: rgba(108, 63, 207, 0.08);
    visibility: visible !important;
}

/* WP media modal must sit above the builder's selected-field z-index (99999999).
   Backdrop, frame, and modal need distinct values so the modal is not buried
   behind the backdrop (same z-index makes DOM order the tiebreaker). */
.media-modal-backdrop {
    z-index: 100000010 !important;
}
.media-modal,
.media-frame {
    z-index: 100000011 !important;
}

/* Nav button inline label editing */
.griffinforms-app-formlayout-formpage [data-gf-nav-type][contenteditable] {
    cursor: text;
    outline: none;
}

.griffinforms-app-formlayout-formpage [data-gf-nav-type][contenteditable]:focus {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--gf-color-primary) 22%, transparent);
    border-radius: 4px;
}
