@import url(https://fonts.googleapis.com/css?family=Open+Sans);

a {
    font-family: 'Open Sans', sans-serif;
}

/*
 * ladder table — general
 * ____________________________________
 */

.ladder-table td.box_grey {
    background-color: #808080 !important;
}

.ladder-table td.score_field {
    min-width: 30px;
    text-align: center !important;
}

/* Centre the score column headers too */
.ladder-table th.score_field {
    text-align: center !important;
}

/*
 * DataTables overrides
 * Hide default chrome we don't want on compact grids
 * ____________________________________
 */

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dt-container .dt-length,
.dt-container .dt-search,
.dt-container .dt-info,
.dt-container .dt-paging {
    display: none !important;
}

/* DataTables 2.x injects a layout grid — kill any margins/paddings it brings */
.dt-container,
.dataTables_wrapper {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.dt-layout-row {
    margin: 0 !important;
}

.dt-layout-cell {
    padding: 0 !important;
}

.ladder-table {
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
}

.ladder-table thead th {
    white-space: nowrap;
}

.ladder-table thead th.dt-orderable-asc,
.ladder-table thead th.dt-orderable-desc {
    cursor: pointer;
}

/*
 * Name column — controlled width with ellipsis truncation
 * ____________________________________
 */

.ladder-table td.player_name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ladder-table td.player_name a,
.ladder-table td.player_name span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
 * desktop
 * ____________________________________
 */
@media (min-width: 979px) {
    .ladder-table {
        width: 100%;
        margin-bottom: 20px;
        font-family: 'Open Sans', sans-serif;
    }

    .ladder-table td.player_position {
        width: 28px;
    }

    .ladder-table td.player_name {
        min-width: 160px;
        max-width: 200px;
    }

    td.selectable:hover {
        background-color: #eee;
        cursor: pointer;
    }
}

/*
 * tablet / mobile
 * ____________________________________
 */
@media (max-width: 979px) {

    body {
        padding-right: 2px;
        padding-left: 2px;
    }

    .ladder-table td.score_field {
        min-width: 10px;
    }

    .ladder-table td.player_position,
    .ladder-table td.score_total {
        width: 10px;
    }

    /* Compact cell padding */
    .ladder-table td,
    .ladder-table th {
        padding: 2px 3px !important;
    }
}

/*
 * small mobile — name column compact
 * ____________________________________
 */
@media (max-width: 767px) {
    .ladder-table {
        font-size: 0.72rem;
    }

    .ladder-table td.player_name {
        min-width: 90px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ladder-table th.score_field,
    .ladder-table td.score_field {
        min-width: 26px !important;
        width: 26px !important;
    }
}

/* narrow mobile adjustments */
@media (max-width: 380px) {
    .ladder-table td.player_name {
        min-width: 80px;
    }
}

@media (max-width: 420px) {
    .score_field .astrix {
        display: none;
    }
}