caption {
  text-align: left;
  grid-column: 1 / -1;
  font-size: 180%;
  font-weight: bold;
  padding: 10px 0;
}

/* declare a 7 column grid on the table */
#calendar {
  font-family: Tahoma;
  width: 95%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

#calendar tr, #calendar tbody {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
}

#calendar a {
  color: #8e352e;
  text-decoration: none;
}

#calendar td, #calendar th {
  padding: 5px;
  box-sizing:border-box;
  border: 1px solid #ccc;
}

#calendar .weekdays {
  background: #8e352e;  
}

#calendar .weekdays th {
  text-align: center;
  text-transform: uppercase;
  line-height: 20px;
  border: none !important;
  padding: 10px 6px;
  color: #fff;
  font-size: 13px;
}

#calendar td {
  min-height: 110px;
  display: flex;
  flex-direction: column;
}

#calendar .days li:hover {
  background: #d3d3d3;
}

#calendar .date {
  text-align: center;
  margin-bottom: 5px;
  padding: 4px;
  background: #333;
  color: #fff;
  width: 20px;
  border-radius: 50%;
  flex: 0 0 auto;
  align-self: flex-end;
}

#calendar .event {
  flex: 0 0 auto;
  font-size: 13px;
  border-radius: 4px;
  padding: 5px;
  margin-bottom: 5px;
  line-height: 14px;
  background: #e4f2f2;
  border: 1px solid #b5dbdc;
  color: #009aaf;
  text-decoration: none;
}

#calendar .event-desc {
  color: #666;
  margin: 3px 0 7px 0;
  text-decoration: none;	
}

#calendar .text-white {
  color: #fff;
}

#calendar .border-red {
  border-color: #f00;
}

#calendar .text-red {
  color: #f00;
}

#calendar .text-bold {
  font-weight: bold;
}

#calendar .other-month {
  background: #f5f5f5;
  color: #666;
}

#calendar .sunday {
  background: #8e352e;
}

#calendar .training {
  background: #228b22;
}

#calendar .no-training {
  background: #e8e8e8;
  color: #666;
}
/* must be after .no-training 
   to overrule the background color */
#calendar .day-past {
  background: #b0b0b0;
}

#calendar .not-a-day {
  background: #dcdcdc;
  color: #666;
}

.in-center {
  margin-left: auto;
  margin-right: auto;
}

.top-gap {
  margin-top: 30px
}

/* ============================
				Mobile Responsiveness
   ============================*/


@media(max-width: 768px) {

	#calendar .weekdays, #calendar .other-month {
		display: none;
	}

	#calendar li {
		height: auto !important;
		border: 1px solid #ededed;
		width: 100%;
		padding: 10px;
		margin-bottom: -1px;
	}
  
  #calendar, #calendar tr, #calendar tbody {
    grid-template-columns: 1fr;
  }
  
  #calendar  tr {
    grid-column: 1 / 2;
  }

	#calendar .date {
		align-self: flex-start;
	}
}