/* calendar.css */
table.calendar {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    text-align: center;
    vertical-align: middle;
}

table.calendar.center {
    margin: 0 auto;
}

table.calendar.mid {
    font-size: 14px;
}

table.calendar thead, table.calendar tbody, table.calendar tfoot {
    display: block;
    width: 161px;
}

table.calendar.mid thead, table.calendar.mid tbody, table.calendar.mid tfoot {
    width: 217px;
}

table.calendar thead {
    border-top-right-radius: 3px;
    border-top-left-radius: 3px;
}

table.calendar.mid thead {
    border-top-right-radius: 4px;
    border-top-left-radius: 4px;
}

table.calendar tfoot {
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

table.calendar.mid tfoot {
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
}

table.calendar tbody {
    height: 246px;
    overflow-y: scroll;
    background-color: #e8e8e8;
}

table.calendar.mid tbody {
    height: 285px;
}

/* iOS */
table.calendar tbody::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 14px;
}

table.calendar tbody::-webkit-scrollbar-thumb {
    background-color: #999999;
    -webkit-border-radius: 13px;
}

table.calendar.mid tbody::-webkit-scrollbar-thumb {
    background-color: #999999;
    -webkit-border-radius: 17px;
}
/** */

table.calendar thead th, table.calendar tbody td {
    text-align: center;
    height: 25px;
    width: 25px;
}

table.calendar.mid thead th, table.calendar.mid tbody td {
    height: 35px;
    width: 35px;
}

table.calendar th.ym, table.calendar td.ym {
    width: 18px;
}

table.calendar.mid th.ym, table.calendar.mid td.ym {
    width: 25px;
}

table.calendar a:hover, table.calendar a.sel {
    display: block;
    border: 1px #333333 solid;
    -webkit-border-radius: 17px;
    -moz-border-radius: 17px;
    border-radius: 17px;
    height: 100%;
    width: 100%;
    line-height: 2.3;
    color: #fff;
    margin: 0;
    text-decoration: none;
}

table.calendar td.day a {
    display: block;
    outline: 0;
}

table.calendar tfoot p {
    margin: 0;
}

table.calendar thead th
{
    height: 18px;
}

table.calendar.mid thead th {
    height: 25px;
}

table.calendar tfoot td {
    width: 160px;
    font-size: 10px;
    height: 18px;
}

table.calendar.mid tfoot td {
    width: 215px;
    font-size: 12px;
    height: 25px;
}

table.calendar tbody td {
    height: 25px;
    line-height: 22px;
}

table.calendar h3 {
    margin: 0;
    padding-top: 2px;
    font-size: 12px;
}

table.calendar.mid h3 {
    font-size: 16px;
}

table.calendar tbody td.ym, table.calendar thead th.ym {
    width:19px;
}

table.calendar.mid tbody td.ym, table.calendar.mid thead th.ym {
    width:25px;
}

table.calendar tbody td.ym div.v-outer {
    position: relative;
    display: block;
}

table.calendar span.v-inner {
    display:block;
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translateX(-50%) translateY(-50%) rotate(-90deg);
    -moz-transform: translateX(-50%) translateY(-50%) rotate(-90deg);
    -ms-transform: translateX(-50%) translateY(-50%) rotate(-90deg);
    transform: translateX(-50%) translateY(-50%) rotate(-90deg);
    white-space:nowrap;
}

/** day cells */

table.calendar td, #legend dt div {
    background: url('../images/availability2.svg');
    background-size: 24px 120px;
    background-position: center 75%;
    background-repeat: no-repeat;
}

table.calendar.mid td {
    background-size: 34px 170px;
}

table.calendar td.h,
table.calendar td.b,
table.calendar td.ym {
    background: none;
    background-color: #dddddd;
}

table.calendar tbody td.day, #legend dt div.day {
    font-weight: bold;
    background-position: center top;
}

table.calendar tbody td.mrn, #legend dt div.mrn {
    font-weight: bold;
    background-position: center 25%;
}
table.calendar tbody td.aft, #legend dt div.aft {
    font-weight: bold;
    background-position: center 50%;
}

table.calendar tbody td.hold_day, #legend dt div.hold_day {
    font-weight: bold;
    background-position: center bottom; !important
}

#calmsg {
    font-size: 10px;
    line-height: 1;
}

.mid #calmsg {
    font-size: 12px;
    line-height: 1;
}

/* colours */
/* all */


table.calendar tbody td, #legend dt {
    color: #999999;
    background-color: #dddddd;
}

table.calendar tbody td.e {
    background-color: #eeeeee;
}

table.calendar tbody td {
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
}

table.calendar tbody td.ym {
    border-right: none;
    border-bottom: 1px solid #ccc;
}

table.calendar tbody td.ym div {
    color: #fff;
}

table.calendar tfoot td {
    background: none;
}

table.calendar tfoot p {
    color: #ccc;
}

table.calendar h3 {
    color: #fff;
    text-shadow: -1px -1px #333;
}

table.calendar td.day,
table.calendar td.mrn,
table.calendar td.aft,
table.calendar td.hold_day,
#legend dt div.day,
#legend dt div.mrn,
#legend dt div.aft,
#legend dt div.hold_day
{
    color: #333;
}


/* black */
table.calendar.black thead,
table.calendar.black tfoot,
table.calendar.black thead tr.weekdays th.ym {
    color: #ddd;
    background-color: #000;
}

table.calendar.black thead tr.weekdays {
    color: #ddd;
    background-color: #666;
}

table.calendar.black tbody td.ym {
    background-color: #666;
}

table.calendar.black tbody td.ym div {
    color: #fff;
}

table.calendar.black td#calmsg {
    color: #fff;
    background-color: #666;
}
/* blue */

table.calendar.blue thead,
table.calendar.blue tfoot,
table.calendar.blue thead tr.weekdays th.ym {
    color: #ddd;
    background-color: #369;
}

table.calendar.blue thead tr.weekdays {
    color: #ddd;
    background-color: #69c;
}

table.calendar.blue tbody td.ym {
    background-color: #69c;
}

table.calendar.blue tbody td.ym  div {
    color: #fff;
}
table.calendar.blue td#calmsg {
    color: #fff;
    background-color: #69c;
}

table.calendar.blue td.day a:hover,  table.calendar.blue td.day a.sel{
    color: #fff;
    background-color: #6699cc;
}

/* green */

table.calendar.green thead,
table.calendar.green tfoot,
table.calendar.green thead tr.weekdays th.ym {
    color: #100066;
    background-color: #6694cc;
}

table.calendar.green thead tr.weekdays {
    color: #100066;
    background-color: #6694cc;
}

table.calendar.green tbody td.ym {
    background-color: #6685cc;
}

table.calendar.green tbody td.ym div {
    color: #066;
}
table.calendar.green td#calmsg {
    color: #fff;
    background-color: #6c9;
}

table.calendar.green td.day a:hover,  table.calendar.green td.day a.sel{
    /*color: #fff;*/
    background-color: #6c9;
}

table.calendar.green td.day a:hover {
    color: #066;
}

table.calendar.green td.day a.sel{
    color: #fff;
}
/* brown */

table.calendar.brown thead,
table.calendar.brown tfoot,
table.calendar.brown thead tr.weekdays th.ym {
    color: #ddd;
    background-color: #531;
}

table.calendar.brown thead tr.weekdays {
    color: #531;
    background-color: #d89030;
}

table.calendar.brown tbody td.ym {
    background-color: #d89030;
}

table.calendar.brown tbody td.ym div {
    color: #531;
}

table.calendar.brown tbody td#calmsg {
    color: #fff;
    background-color: #d89030;
}

/*---*/

#legend {
    font-size: 10px;
    display:none;
    background-color: white;
    position:absolute;
    z-index:10;
    left: 15px;
    top: 125px;
    width: 125px;
    padding: 0;
    text-align: center;
    border: 1px solid #999;
}

#legend div.closer {
    height: 5px;
}

#legend div.closer a {
    font-size: 14px;
    float: right;
    padding-right: 5px
}

#legend dl {
    float: left;
    margin: 10px;
    padding: 0;
}

#legend dt {
    float: left;
    clear: both;
    margin: 0;
    padding: 0;
    border: solid 1px #ccc;
}
#legend dd {
    margin: 0;
    padding: 8px 0 8px 8px;
    clear: none;
    float: left;
}

#legend dt div {
    margin: 0;
    width: 24px;
    height: 24px;
}
#legend-link {
    margin-top: 5px;
}

#legend-link a {
    padding-left: 9px;
    font-size: 9px;
    color: #999;
}

#legend-link a:hover {
    color: #333;
}