@use "variables" as *;

:host {
    display: block;
    margin-bottom: $spacing-1;
    position: relative;
    transition: box-shadow $basic-speed;

    &:last-child {
        margin-bottom: 0;
    }
}

.row-columns {
    display: flex;
    background: $white;
    padding: $spacing-1;
    border-radius: 0 0 $border-radius-xl $border-radius-xl;
}

.row-columns__item {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: 0 $spacing-1;
    padding-bottom: 0;
    position: relative;
    // we need to make the width: 0 to give every item the same start point to grow.
    width: 0;

    &:after {
        background: $white;
        border: dashed 1px $color-palette-gray-600;
        bottom: 0;
        color: $color-palette-gray-600;
        content: var(--empty-message);
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        font-size: $font-size-xs;
        justify-content: center;
        min-height: $content-type-field-height;
        pointer-events: none;
        text-align: center;
        border-radius: $border-radius-md;
    }

    &::ng-deep {
        li {
            background-color: $white;
            height: $content-type-field-height;
            margin: 0;
        }
    }

    &:first-child {
        margin-left: 0;
    }

    &:last-of-type {
        margin-right: 0;
    }

    &.empty {
        background: $color-palette-gray-200;
        min-height: $content-type-field-height * 2;

        dot-content-type-field-dragabble-item {
            margin-bottom: 0;
        }

        &:after {
            min-height: 100%;
            margin-top: 0;
        }
    }

    &--over {
        &:after {
            display: none;
        }
    }
}

.row-header {
    background: #ffffff;
    border-radius: $border-radius-xl $border-radius-xl 0 0;
    display: flex;
    justify-content: center;
}

.row-header__drag {
    cursor: move;
    display: block;
    color: $color-palette-gray-400;
}

.row-header__remove {
    cursor: pointer;
    position: absolute;
    right: $spacing-1;
    top: $spacing-1;
}
