/*
Styles a 3-color table for ranked divisions of a league

Leading diagonals are in 'dark', as are top-line headers for names and scores
Names and scores are in 'mid', the rest is 'light'

All text is in same colour (so choose 'dark' sensibly) and set at table level
*/

table.division {
    border-collapse: collapse;
    border-spacing: 0px;
    margin: auto;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    border-left: none;
    border-top: none;
    width: 520px;
    font-size: 11px;
    text-align: center;
    margin-bottom: 20px;
    color: #000;
}

table.division th {font-weight: normal;}

table.division th,
table.division td {
    border-top: 1px solid black;
    border-left: 1px solid black;
    height: 20px;
}

table.division th.x-col,
table.division td.x-col {
    font-weight: bold;
}

table.division tr th:first-child,
table.division tr td:first-child {
    text-align: left;
    padding-left: 4px;
}

table.division tr:first-child th:first-child,
table.division tr:first-child td:first-child {
    font-weight: bold;
}

/* All the width sizes - and in this order */

table.division td, table.division th {min-width: 20px;}
table.division td.x-col, table.division th.x-col {width: 35px;}
table.division tr:first-child td:first-child, table.division tr:first-child th:first-child {min-width: 100px;}

table.wide-cols td, table.wide-cols th {min-width: 35px;}

/* All the colouring */

/* light-colour */
table.division {            /* default colour for ordinary cells */
    background-color: #fff;
}
/* mid-colour */
table.division tr:first-child,      /* default for top line (team TLAs) */
table.division tr th:first-child,   /* special cols data (VPs, IMPs etc.) */
table.division tr td:first-child,   /* special cols data (VPs, IMPs etc.) */
table.division td.x-col {           /* team names */
    background-color: #6699cc;
    color: #fff;
}
/* dark-colour */
table.division td.x-x,                          /* same team match-ups */
table.division tr:first-child td:first-child,   /* top-left name-header */
table.division tr:first-child th:first-child,   /* top-left name-header */
table.division tr:first-child th.x-col,
table.division tr:first-child td.x-col  {       /* special cols header (VPs, IMPs etc.) */
    background-color: #00008B;
    color: #fff;
}

table.home-away {width: 640px;}
table.home-away td.x-x {width: 4.5em}

/* This is an alternate for those divisions that use team-name links

table.division tr th:first-child {padding:0}
table.division tr:first-child th:first-child {padding-left:4px}

table.division th > a {
    font-weight: normal;
    color: #fff;
    display: block;
    height: 100%;
    padding-left:4px
}
*/

table.division th > a {
    font-weight: normal;
    color: #fff;
    display: block;
}

table.division th > a:visited {color: #fff;}

table.division th > a:hover {
    color: #00008B;
    background: #fff;
}

table.division + p.adjustment {
    margin-top: -10px;
    margin-bottom: 20px;
}

table.division tr th:first-child {padding: 0;}
table.division tr:first-child th:first-child {padding-left:4px}
table.division th > a {padding: 3px 4px;}
