.text-replacer-pairs-header,
.text-replacer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.text-replacer-pairs-header {
    flex-wrap: wrap;
}

.text-replacer-pairs-header .btn,
.text-replacer-actions .btn {
    white-space: nowrap;
}

.text-replacer-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
    align-items: end;
    gap: .5rem;
    margin-bottom: .5rem;
}

.text-replacer-pair-field {
    min-width: 0;
}

.text-replacer-remove-pair {
    display: inline-flex;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    align-self: end;
}

.text-replacer-remove-pair-icon {
    display: block;
    width: 14px;
    height: 14px;
    line-height: 0;
}

.text-replacer-remove-pair-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 575.98px) {
    .text-replacer-pair {
        grid-template-columns: minmax(0, 1fr) 38px;
    }

    .text-replacer-pair-find {
        grid-column: 1 / -1;
    }

    .text-replacer-pair-replace {
        grid-column: 1;
        grid-row: 2;
    }

    .text-replacer-remove-pair {
        grid-column: 2;
        grid-row: 2;
    }

    .text-replacer-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .text-replacer-actions > div:first-child .btn {
        width: 100%;
    }
}
