$cell-dimension: 15px;
$column-width:    1px;

$tooltip-bg: rgba(0.85, 0.85, 0.85, 0.8);
$tooltip-border: rgb(0.85, 0.85, 0.85);
$tooltip-color: white;

$accent-gray: #aaa;

$tooltip-width:  235px;
$tooltip-height:  30px;
$tooltip-top:    -45px;

.contrib_grad0 { background-color: #eee; }
.contrib_grad1 { background-color: #d6e685; }
.contrib_grad2 { background-color: #8cc665; }
.contrib_grad3 { background-color: #44a340; }
.contrib_grad4 { background-color: #1e6823; }


/*------------------------------------*\
  # PANEL STYLES
\*------------------------------------*/

.panel {
  margin-left:  auto;
  margin-right: auto;
  margin-top: 40px;
  margin-bottom: 40px;
}

.panel-heading {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
}


/*------------------------------------*\
  # CELLS
\*------------------------------------*/

.calendar-row {
  display: table;
  border-spacing: ($column-width * 2) $column_width;
}

.cell {
  width:      $cell-dimension;
  height:     $cell-dimension;
  min-width:  $cell-dimension;
  min-height: $cell-dimension;
  margin: $column-width;
  display: table-cell;
  resize: none;
}

.cell:hover {
  border: 1px solid #333;
}

.contrib_empty:hover {
  border: none;
}

.weekday-heading {
  color: #ccc;
  text-align: right;
  font-size: 0.8em;
  padding-right: 3px;
  width: $cell-dimension * 2;
}

.month-heading {
  width: 2 * ($cell-dimension + $column-width);
  font-size: 0.8em;
  text-align: left;
  color: #aaa;
}

.legend {
  margin-top: 16px;
}


/*------------------------------------*\
  # TOOLTIPS
\*------------------------------------*/

// This tooltip code isn't mine - there are quite a few CSS-only tooltips
// if you search Google. I don't remember where I got this originally; it's
// been sitting in my back pocket for a while. :-/

.cell {
  position: relative;
  z-index: 24;
}

.cell:hover {
  z-index: 25;
}

.cell span {
  display: none;
}

.cell:hover span {
  width:  $tooltip-width;
  height: $tooltip-height;
  top:    $tooltip-top;
  left:   -($tooltip-width - $cell_dimension) / 2;

  display:  inline-block;
  position: absolute;

  background-color: $tooltip-bg;
  color: $tooltip-color;
  text-align: center;
  font-size: 12px;
  border-radius: 4px;
  line-height: $tooltip-height;
  vertical-align: middle;
}

.cell:hover span:before {
  border: solid;
  border-color: $tooltip-bg transparent;
  border-width: 7px 7px 0 7px;
  bottom: -7px;
  content: "";
  left: ($tooltip-width - $cell_dimension) / 2;
  position: absolute;
  z-index: 99;
}

.contrib_empty:hover span {
  display: none;
}


/*------------------------------------*\
  # STATISTICS
\*------------------------------------*/

.statistics.row {
  border-top: 1px solid #ddd;
  width: 100%;
  margin-left:  auto;
  margin-right: auto;
}

.statistics .col-md-4 {
  text-align: center;
  padding-bottom: 10px;
  padding-top: 12px;
}

.col-md-4.middle {
  border-left:  1px solid #ddd;
  border-right: 1px solid #ddd;
}

.annotation {
  color: $accent-gray;
  font-size: 0.85em;
  margin-bottom: 2px;
}

.big_stat {
  font-size: 2.4em;
  margin-bottom: 5px;
}