/**
 * BUIC: Select.
 */
.buic-select {
    display: table;
    width: 100%;
    margin-top: 4px;

    & > div {
        display: table-row;

        // Select
        & div:nth-child(odd) {
            display: table-cell;
            width: 100%;
        }

        // Buttons
        & div:nth-child(even) {
            display: table-cell;
            vertical-align: top;

            button {
                // btn-default + btn-xs
                @include button-variant($btn-default-color, $btn-default-bg, $btn-default-border);
                @include button-size($padding-xs-vertical, $padding-xs-vertical, $font-size-small, $line-height-small, $btn-border-radius-small);

                margin-left: 6px;
                margin-top: 4px;

                &:first-child {
                    margin-top: 3px;
                }

                &::before {
                    font-family: FontAwesome;
                    display: block;
                    width: $font-size-small * $line-height-small; // Make it quadratic (15px * 1.5)
                }

                &.select-all::before {
                    content: "\f00c";
                }

                &.select-none::before {
                    content: "\f00d";
                }
            }
        }
    }

    // Overwrite select2 that sets inline style width that is too wide.
    .select2-search__field {
        width: 100% !important;
    }

    // Allow wordwrap (and trimming). Fixes https://github.com/bolt/bolt/issues/4570
    .select2-selection--single .select2-selection__rendered {
        word-break: break-all;
        height: 2em;
        white-space: normal;
    }

}
