.schema-field-header {
    $minHeight: 42px;
    position: relative;
    display: flex;
    width: 100%;
    min-height: $minHeight;
    gap: 5px;
    padding: 0 5px;
    align-items: center;
    justify-content: stretch;
    background: var(--baseAlt1Color);
    border-radius: var(--baseRadius);
    transition: border-radius var(--baseAnimationSpeed);
    .form-field {
        margin: 0;
        .form-field-addon.prefix {
            left: 10px;
            ~ %input {
                padding-left: 37px;
            }
        }
    }
    .options-trigger {
        padding: 2px;
        margin: 0 3px;
        i {
            transition: transform var(--baseAnimationSpeed);
        }
    }
    .separator {
        flex-shrink: 0;
        width: 1px;
        height: $minHeight;
        background: rgba(#000, 0.05);
    }
    .drag-handle-wrapper {
        position: absolute;
        top: 0;
        left: auto;
        right: 100%;
        height: 100%;
        display: flex;
        align-items: center;
    }
    .drag-handle {
        padding: 0 5px;
        transform: translateX(5px);
        @include hide();
    }
    .form-field-single-multiple-select {
        width: 100px;
        flex-shrink: 0;
        .dropdown {
            min-width: 0;
        }
    }

    .field-labels {
        position: absolute;
        z-index: 1;
        right: 0px;
        top: 0px;
        gap: 2px;
        display: inline-flex;
        align-items: center;
        transition: opacity var(--baseAnimationSpeed);
        .label {
            min-height: 0;
            font-size: inherit;
            padding: 0px 2px;
            font-size: 0.7rem;
            line-height: 0.75rem;
            border-radius: var(--baseRadius);
        }
        ~ .inline-error-icon {
            margin-top: 4px;
            i {
                font-size: 1rem;
            }
        }
    }
    .form-field:focus-within {
        .field-labels {
            opacity: 0.2;
        }
    }
}

.schema-field-options {
    background: #fff;
    padding: var(--xsSpacing);
    border-bottom-left-radius: var(--baseRadius);
    border-bottom-right-radius: var(--baseRadius);
}

.schema-field-options-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: var(--baseSpacing);
    .form-field {
        margin: 0;
        width: auto;
    }
}

.schema-field {
    @extend %block;
    position: relative;
    margin: 0 0 var(--xsSpacing);
    border-radius: var(--baseRadius);
    background: var(--baseAlt1Color);
    transition: border var(--baseAnimationSpeed),
                box-shadow var(--baseAnimationSpeed);
    border: 2px solid var(--baseAlt1Color);
    // states
    &:not(.deleted):hover {
        .drag-handle {
            transform: translateX(0px);
            @include show();
        }
    }
    .dragover &,
    &.dragover {
        opacity: 0.5;
    }
    &.expanded {
        @include shadowize();
        border-color: var(--baseAlt2Color);
        .schema-field-header {
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
            .options-trigger {
                i {
                    transform: rotate(-60deg);
                }
            }
        }
        .schema-field-options {
            border-top: 2px solid var(--baseAlt2Color);
        }
    }
    &.deleted {
        .schema-field-header {
            background: var(--bodyColor);
        }
        .markers,
        .separator {
            opacity: 0.5;
        }
        %input {
            background: none;
            box-shadow: none;
        }
    }
}
