﻿%row-type {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;

    i {
        position:absolute;
        left:50%;
        top:50%;
    }
}

%action {
    display:inline-block;
    text-indent: -2000px;
}

.table-cont {
    .btn {
        float:right;
    }
}

.table-wrap {
    margin-bottom: 10px;
    border-top: 3px solid $color-secondary;
	position:relative;

    .control-group-area & {
        border:1px solid $color-lightgrey!important;
    }

    .collection-actions {
        top:3px;
    }
}

.table {
    width:100.1%;

    &.header {
        margin-top:80px;
    }

    thead {
        background-color: #fff;

        .control-group-area & {
            background-color: $color-lightgrey;
        }
    }

    thead tr {
        th {
            padding:15px 10px;
            text-transform:uppercase;

            &.actions {
                text-indent:-2000px;
                overflow:hidden;
            }
        }
    }
    tbody {
        padding-top:20px;
        border-top: 20px solid white;

        &:first-of-type {
            padding-top:0;
            border-top: 0px;
        }

        tr {
            background-color:#fff;

            &:nth-child(odd) {
                //background-color:#f8f8f8;
            }

            td {
                border-top: 1px solid #dddddd;
                border-bottom: 1px solid #dddddd;
                padding: 10px;
                position:relative;

                img.img-polaroid {
                    width:120px;
                    height:70px;
                }

                label {
                    font-weight:$fontweight-regular;
                    font-weight: 400!important;
                    text-transform: none!important;
                }

                .row-type {
                    width:52px;
                    position:relative;
                }

                &.actions {
                    text-align:right;

                    .fa {
                        padding-right: 0;
                    }
                }
            }

            &.selected td:not(.empty), &:hover td:not(.empty) {
                background-color: $color-selected;
            }

            a {
                color:#000;
            }

            strong {
                font-weight:bold;
            }

            &:last-of-type {
                td {
                    border-bottom:0px;
                }
            }
        }
    }
}

/**
    When nested in a fieldset reduce the border size, because the parent
    fieldset also has a 3px top border
*/
fieldset .table thead {
    border-top-width:0px;
}

/**
    Highlight valid/invalid cell data.
    Ideally these would alternate slightly with striped rows, here we just 
    have to override the existing bootstrap class
*/
.table td.error, .table-striped tbody tr:nth-child(odd) td.error {
    background-color: #FC4C54;
    color: #fff;
}
.table td.warning, .table-striped tbody tr:nth-child(odd) td.warning {
    background-color: #EBC942;
    color: #fff;
}
.table td.success, .table-striped tbody tr:nth-child(odd) td.success {
    background-color: #22D65B;
    color: #fff;
}
.table tr.inactive, .table tr.inactive a {
    color: #888;
}

.table tr.inactive img {
    opacity: 0.5;
}

.table-group-heading {
    @include border-top-left-radius(2px);
    @include border-top-right-radius(2px);
    background:$color-lightgrey;
    padding:10px;
    font-weight: $fontweight-bold;
}