.transformation-block-editor span.btn {
    margin: 0;
    position: relative;
}

.transformation-block-editor #attribute-list {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 999;
    min-width: 400px;
    max-height: 260px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #c7c7c7;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.transformation-block-editor #attribute-list ul {
    margin: 0;
    list-style: none;
    padding: 5px 15px;
}

.transformation-block-editor #attribute-list li {
    color: #3a3633;
}

.transformation-block-editor #attribute-list ul li {
    color: #222 !important;
}

.transformation-block-editor .btn.block-edit:not(.active) > #attribute-list,
.transformation-block-editor .block-controls span.btn[data-block-type="token"]:not(.active) > #attribute-list,
.transformation-block-editor span.btn.if-select:not(.active) > #attribute-list {
    display: none;
}

.transformation-block-editor #attribute-list input[name="token_filter"] {
    position: sticky;
    top: 0;
    z-index: 2;
    display: block;
    width: 100%;
    padding: 4px 6px;
    color: #3a3633;
    background-color: #fff;
    border: 0;
    border-bottom: 1px solid #e2e2e2;
}

.transformation-block-editor div.text-add-edit {
    background-color: #f3f3f3;
    position: absolute;
    right: 0;
    top: 100%;
    padding: 4px;
    width: 250px;
    align-items: center;
    gap: 2px;
    display: none;
    z-index: 1000;
    overflow: visible;
}

.transformation-block-editor div.text-add-edit.token-add-edit {
    color: #3a3633;
    width: 460px;
    flex-wrap: wrap;
    gap: 4px;
}

.transformation-block-editor div.text-add-edit.token-add-edit input[name="token_input"] {
    flex: 1 1 100%;
    min-width: 0;
    padding: 4px 6px;
    color: #3a3633;
    background-color: #fff;
    border: 1px solid #c7c7c7;
}

.transformation-block-editor div.text-add-edit.token-add-edit .text-muted {
    color: #666;
    flex: 1 1 calc(100% - 54px);
    font-size: 11px;
    line-height: 1.3;
}

.transformation-block-editor div.text-add-edit.token-add-edit #attribute-list {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    width: 100%;
    min-width: 460px;
    max-height: 260px;
    overflow: auto;
    background-color: #fff;
    border: 1px solid #c7c7c7;
    z-index: 1001;
}

.transformation-block-editor div.text-add-edit.token-add-edit #attribute-list,
.transformation-block-editor div.text-add-edit.token-add-edit #attribute-list * {
    color: #3a3633;
}

.transformation-block-editor div.text-add-edit.token-add-edit #attribute-list input[name="token_filter"] {
    position: sticky;
    top: 0;
    z-index: 2;
    display: block;
    width: 100%;
    padding: 4px 6px;
    color: #3a3633;
    background-color: #fff;
    border: 0;
    border-bottom: 1px solid #e2e2e2;
}

.transformation-block-editor div.text-add-edit.token-add-edit #attribute-list ul {
    width: 100%;
    padding: 5px 0;
}

.transformation-block-editor div.text-add-edit.token-add-edit #attribute-list li {
    padding: 4px 10px;
    cursor: pointer;
    color: #222 !important;
}

.transformation-block-editor div.text-add-edit.token-add-edit #attribute-list li * {
    color: #222 !important;
}

.transformation-block-editor div.text-add-edit.token-add-edit #attribute-list li:hover {
    background-color: #f3f3f3;
}

.transformation-block-editor [data-type="if"] div.text-add-edit,
.transformation-block-editor [data-type="elseif"] div.text-add-edit {
    width: 750px;
}

.transformation-block-editor span.btn.active {
    background-color: #3a3633;
    color: #fff;
}

.transformation-block-editor span.btn.if-select {
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 220px;
    min-height: 34px;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    overflow: visible;
    color: #3a3633;
    font-weight: 400;
    text-align: left;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

.transformation-block-editor span.btn.if-select::after {
    content: "\25BE";
    margin-left: 8px;
    font-size: 10px;
    flex: 0 0 auto;
    color: #555;
}

.transformation-block-editor span.btn.if-select.active,
.transformation-block-editor span.btn.if-select:hover,
.transformation-block-editor span.btn.if-select:focus {
    background: #fff;
    color: #3a3633;
    border-color: #66afe9;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px rgba(102, 175, 233, 0.35);
}

.transformation-block-editor .text-add-edit select.if-attribute-select {
    display: none;
}

.transformation-block-editor .text-add-edit select.if-condition-select {
    width: 110px;
    flex: 0 0 110px;
}

.transformation-block-editor .block-controls {
    display: flex;
    gap: 4px;
}

.transformation-block-editor .block-add-btn.active > div,
.transformation-block-editor .block-controls span.btn.active[data-block-type="text"] > div {
    display: flex;
}

.transformation-block-editor .block-controls span.btn[data-block-type="text"] > div > input {
    flex: 1;
}

.transformation-block-editor span.block-text-edit-cancel,
.transformation-block-editor span.block-text-cancel {
    display: inline-block;
    width: 25px;
    flex: 0 0 25px;
    height: 25px;
    background-image: url("/backend/AppBundle/img/remove_white.svg");
    background-position: center;
    background-size: 15px;
    background-repeat: no-repeat;
    background-color: #be2528;
}

.transformation-block-editor span.block-text-edit-confirm,
.transformation-block-editor span.block-text-confirm {
    display: inline-block;
    width: 25px;
    flex: 0 0 25px;
    height: 25px;
    background-image: url("/backend/AppBundle/img/check_white.svg");
    background-position: center;
    background-size: 15px;
    background-repeat: no-repeat;
    background-color: #bbbe25;
}

.transformation-block-editor .block-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border: 1px solid #aaa;
}


.transformation-block-editor .block-list .block-item {
    cursor: pointer;
    font-size: 12px;
    color: #3a3633;
    background-color: #f3f3f3;
    border: 1px solid #f3f3f3;
    display: inline-flex;
    gap: 8px;
}

.transformation-block-editor .block-list .block-item .block-placeholder,
.transformation-block-editor .block-list .block-item .block-condition,
.transformation-block-editor .block-list .block-item .block-token,
.transformation-block-editor .block-list .block-item .block-text {
    padding: 3px !important;
}

.transformation-block-editor .block-list .block-item .block-remove {
    width: 20px;
    height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background-image: url("/backend/AppBundle/img/remove_white.svg");
    background-position: center;
    background-size: 10px;
    background-repeat: no-repeat;
}

.transformation-block-editor .block-list .block-item .block-edit {
    width: 20px;
    height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background-image: url("/backend/AppBundle/img/edit_white.svg");
    background-position: center;
    background-size: 10px;
    background-repeat: no-repeat;
    position: relative;
}

.transformation-block-editor .block-list .block-item .block-edit.active > .text-add-edit {
    display: flex;
}

[data-block-type="if"] .text-add-edit,
[data-block-type="elseif"] .text-add-edit {
    width: 750px !important;
}
