/* Modified from https://gist.github.com/jbonney/6032785  */
.rotate div {position: absolute;}

.rotate {
     -moz-transform: rotate(-90.0deg);  /* FF3.5+ */
       -o-transform: rotate(-90.0deg);  /* Opera 10.5 */
  -webkit-transform: rotate(-90.0deg);  /* Saf3.1+, Chrome */
             filter:  progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083);  /* IE6,IE7 */
         -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083)"; /* IE8 */
            padding: 0px 0px 0px 0px;
             margin: 0px;		 
	   writing-mode: bt-lr;
        text-indent: 0.5em;
}
	 
.table-header-rotated th.row-header{
  width: auto;
}

.table-header-rotated td{
  width: 40px; /* original 40 */
  border-top: 1px solid #dddddd;
  border-left: 1px solid #dddddd;
  border-right: 1px solid #dddddd;
  vertical-align: middle;
  text-align: center;
}

.table-header-rotated th.rotate-45{
  height: 180px; /* original 80 */
  width: 70px; /* original 40 */
  min-width: 70px; /* original 40 */
  max-width: 70px; /* original 40 */
  position: relative;
  vertical-align: bottom;
  padding: 0;
  font-size: 13px; /* original 12px */
  line-height: 1.0; /* original 0.8 */
}

.table-header-rotated th.rotate-45 > div{
  position: relative;
  top: 0px;
  left: 80px; /* 80 * tan(45) / 2 = 40 where 80 is the height on the cell and 45 is the transform angle; original 40 */
  height: 100%;
  -ms-transform:skew(-45deg,0deg);
  -moz-transform:skew(-45deg,0deg);
  -webkit-transform:skew(-45deg,0deg);
  -o-transform:skew(-45deg,0deg);
  transform:skew(-45deg,0deg);
\\  overflow: hidden;
  border-left: 1px solid #cccccc;
  border-right: 1px solid #cccccc;
  border-top: 1px solid #cccccc;
}

.table-header-rotated th.rotate-45 span {
  -ms-transform:skew(45deg,0deg) rotate(315deg);
  -moz-transform:skew(45deg,0deg) rotate(315deg);
  -webkit-transform:skew(45deg,0deg) rotate(315deg);
  -o-transform:skew(45deg,0deg) rotate(315deg);
  transform:skew(45deg,0deg) rotate(315deg);
  position: absolute;
  bottom: 30px; /* 40 cos(45) = 28 with an additional 2px margin*/
  left: -15px; /*Because it looked good, but there is probably a mathematical link here as well; original -25px */
  display: inline-block;
  // width: 100%;
  width: 85px; /* 80 / cos(45) - 40 cos (45) = 85 where 80 is the height of the cell, 40 the width of the cell and 45 the transform angle*/
  text-align: bottom; /* original left */
   white-space: nowrap; /*whether to display in one line or not*/
}