

/*
Grid part:
*/
/*
.umb-block-grid__layout-container {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-gap: 10px;

    grid-auto-flow: row;
}


.umb-block-grid__layout-item {
    grid-column: span 4;
}
*/

.umb-block-grid-area-editor__grid-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--umb-block-grid--block-grid-columns, 1), minmax(0, 1fr));

    grid-gap: 0px;
    grid-auto-flow: row;
    grid-auto-rows: minmax(50px, auto);
}
.umb-block-grid-area-editor__grid-wrapper > * {
    grid-column: span var(--umb-block-grid--area-column-span, 12);
    grid-row: span var(--umb-block-grid--area-row-span, 1);
}

.umb-block-grid-area-editor__area {
    position: relative;
    background-color: @gray-11;
    box-sizing: border-box;
    cursor: move;
    
    &::after {
        content: '';
        position: absolute;
        pointer-events: none;
        inset: 0;
        border: 1px solid @gray-7;
        border-radius: 3px;
    }

    .umb-block-grid__area--actions {
        opacity: 0;
        transition: opacity 120ms;
    }

    &:hover,
    &:focus,
    &:focus-within,
    &.--active {
        .umb-block-grid__area--actions {
            opacity: 1;
        }
    }
}
.umb-block-grid-area-editor__area:hover {
    background-color: @gray-9;
    &::after {
        border-color: @blueDark;
    }
}
.umb-block-grid-area-editor__area .__label {
    margin-top: 15px;
    margin-left: 20px;
    opacity: 60%;
    pointer-events: none;
    user-select: none;
}

.umb-block-grid-area-editor__area-placeholder {
    background: transparent;
    border-radius: 3px;

    border: @blueDark solid 1px;
    border-radius: 3px;

    ::after {
        content: '';
        position:absolute;
        z-index:1;
        inset: 0;
        border-radius: 3px;
    
        transition: background-color 240ms ease-in;
        animation: umb-block-grid-area-editor__placeholder__pulse 400ms ease-in-out alternate infinite;
        @keyframes umb-block-grid-area-editor__placeholder__pulse {
            0%   { background-color: rgba(@blueMidLight, 0.33); }
            100% { background-color: rgba(@blueMidLight, 0.22); }
        }
    }
}


.umb-block-grid__area--actions {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0;
    background-color: rgba(255, 255, 255, .96);
    border-radius: 16px;
    padding-left: 5px;
    padding-right: 5px;
    .action {
        position: relative;
        display: inline-block;
        color: @ui-action-discreet-type;
        font-size: 18px;
        padding: 5px;
        &:hover {
            color: @ui-action-discreet-type-hover;
        }
    }
}

.umb-block-grid-area-editor__scale-handler {
    cursor: nwse-resize;
    position: absolute;
    Z-index:10;
    bottom: -4px;
    right: -4px;
    width:8px;
    height:8px;
    padding: 0;
    background-color: white;
    border: @blueDark solid 1px;
    opacity: 0;
    transition: opacity 120ms;
}

.umb-block-grid-area-editor__scale-handler::after {
    content: '';
    position: absolute;
    inset: -10px;
    background-color: rgba(0,0,0,0);
}
.umb-block-grid-area-editor__area:focus-within, 
.umb-block-grid-area-editor__area:hover {
    .umb-block-grid-area-editor__scale-handler {
        opacity: 1;
    }
}
.umb-block-grid-area-editor__scale-handler:focus {
    opacity: 1;
}
/* When inside scalebox its always visible: */
.umb-block-grid-area-editor__scalebox .umb-block-grid-area-editor__scale-handler {
    opacity: 1;
}

.umb-block-grid-area-editor__scale-handler:focus + .umb-block-grid-area-editor__scale-label,
.umb-block-grid-area-editor__scale-handler:hover + .umb-block-grid-area-editor__scale-label {
    opacity: 1;
}

.umb-block-grid-area-editor__scale-label {
    position: absolute;
    display: block;
    right: 0;
    top: 100%;
    margin-top: 6px;
    transform: translateX(50%);
    z-index: 2;

    background-color: white;
    color: black;
    font-size: 12px;
    padding: 0px 6px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 120ms;

    pointer-events: none;
    white-space: nowrap;
}


.umb-block-grid-area-editor__scalebox-backdrop {
    background-color: rgba(255, 255, 255, 0.1);
    position: absolute;
    top:0;
    left:0;
    bottom:0;
    right:0;
    z-index: 1;
    cursor: nwse-resize;
}
.umb-block-grid-area-editor__scalebox {
    position: absolute;
    top:0;
    left:0;
    z-index: 10;
    cursor: nwse-resize;

    border: @blueDark solid 1px;
    border-radius: 3px;

    transition: background-color 240ms ease-in;
    animation: umb-block-grid__scalebox__pulse 400ms ease-in-out alternate infinite;
    @keyframes umb-block-grid__scalebox__pulse {
        0%   { background-color: rgba(@blueMidLight, 0.33); }
        100% { background-color: rgba(@blueMidLight, 0.22); }
    }
}



.umb-block-grid-area-editor__create-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    height:50px;
    width:100%;
    
    color: @ui-action-discreet-type;
    font-weight: bold;
    margin: -1px;
    padding: 5px 15px;

    border: 1px dashed @ui-action-discreet-border;
    border-radius: @baseBorderRadius;
    box-sizing: border-box;
    
    &:not([disabled]):hover {
        color: @ui-action-discreet-type-hover;
        border-color: @ui-action-discreet-border-hover;
        text-decoration: none;
        z-index: 1;
    }
}
.umb-block-grid-area-editor__create-button[disabled] {
    color: @ui-disabled-type;
    border-color: @ui-disabled-border;
}