/*
 * Copyright (c) 2013-2018 the original author or authors.
 *
 * Licensed under the MIT License (the "License");
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at
 *
 *     http://www.opensource.org/licenses/mit-license.php
 *
 * Unless required by applicable law or agreed to in writing, 
 * software distributed under the License is distributed on an 
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
 * either express or implied. See the License for the specific 
 * language governing permissions and limitations under the License. 
 */

.table-widget {
    overflow-y: auto;
    overflow-x: auto;
    height: 100%;

    .widget-body {
        overflow-y: auto;
    }

    table th {
        border-bottom: @tableHeaderBorderBottom;
    }
 
    table {
        width: 100%;
        border-collapse: collapse;

        th {
            padding: 10px 8px;
            text-align: left;
            font-weight: 400;

            background-color: @headerColor;
            color: contrast(@headerColor, @color, white);
            a { color: contrast(@headerColor, @color, white) !important; }

            i { 
                display: inline;
                margin-left: 0.24rem;
            }

            &.group {
                text-align: center;
            }

            &.empty {
                background-color: @widgetBackgroundColor;
            }
        }

        td {
            padding: 6px 8px;
            border: 0px dashed @tableBorderColor;
            vertical-align: top;

            > a > i { opacity: 0; float: right; padding-top: 3px;}
            > a:hover > i { opacity: 1; }

            &.aLink {
                .aLink(@color);
            }
        }

        tbody > tr:hover {
            background-color: @tableRowHoverBackgroundColor;
        }

    }

    .paging {
        text-align: center;
        .box-sizing(border-box);
        * {
            .box-sizing(border-box);
        }
        *:before,
        *:after {
            .box-sizing(border-box);
        }

        .pagination {
            margin-bottom: 0.25rem;
            a {
                background-color: @headerColor;
                color: contrast(@headerColor, @color, white);
                border-bottom: 1px solid;
            }
        }

        .below-pager-message {
            font-style: italic;
            font-size: 90%;
        }
    }
}

.widget-noscroll .table-widget {
    overflow-y: hidden;
    overflow-x: hidden;
}
