.opacity(@opacity)
{
    @percent: (@opacity*100);
    opacity: @opacity;
    filter: alpha(opacity=@percent);
}

.turncate()
{
    overflow: hidden;
    -ms-text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.noTurncate()
{
    overflow: inherit !important;
    -ms-text-overflow: inherit !important;
    -o-text-overflow: inherit !important;
    text-overflow: inherit !important;
    white-space: inherit !important;
}

.bootgrid-header, .bootgrid-footer
{
    margin: 15px 0;

    a { outline: 0; }

    .search
    {
        display: inline-block;
        margin: 0 20px 0 0;
        vertical-align: middle;
        width: 180px;

        .glyphicon { top: 0; }

        &.search-field, .search-field
        {
            &::-ms-clear { display: none; }
        }
    }

    .pagination { margin: 0 !important; }
}

.bootgrid-header .actionBar,
.bootgrid-footer .infoBar
{
    text-align: right;

    .btn-group > .btn-group
    { 
        .dropdown-menu
        {
            text-align: left;

            .dropdown-item
            {
                cursor: pointer;
                display: block;
                margin: 0;
                padding: 3px 20px;
                white-space: nowrap;

                &:hover, &:focus
                {
                    color: #262626;
                    text-decoration: none;
                    background-color: #f5f5f5;
                }

                &.dropdown-item-checkbox,
                .dropdown-item-checkbox
                {
                    margin: 0 2px 4px 0;
                    vertical-align: middle;
                }
            }

            .dropdown-item.disabled
            {
                cursor: not-allowed;
            }
        }
    }
}

.bootgrid-table
{
    table-layout: fixed;

    a { outline: 0; }

    th
    {
        & > .column-header-anchor
        {
            color: #333;
            cursor: not-allowed;
            display: block;
            position: relative;
            text-decoration: none;

            &.sortable { cursor: pointer; }

            & > .text
            {
                display: block;
                margin: 0 16px 0 0;
                .turncate();
            }

            & > .icon
            {
                display: block;
                position: absolute;
                right: 0;
                top: 2px;
            }
        }

        &:hover, &:active { background: #fafafa; }
    }

    td
    {
        .turncate();

        &.loading, &.no-results
        {
            background: #fff;
            text-align: center;
        }
    }

    th.select-cell, td.select-cell
    {
        text-align: center;
        width: 30px;

        .select-box { margin: 0; outline: 0; }
    }
}

.table-responsive
{
    .bootgrid-table
    {
        table-layout: inherit !important;

        th > .column-header-anchor  > .text { .noTurncate(); }

        td { .noTurncate(); }
    }
}