.month-table
{
	margin-left: auto;
	margin-right: auto;
    width: 100%;
    table-layout: fixed;
    column-count: 7;
	margin-bottom: 10px;
	border-collapse: collapse;
}

.month-header td,
.day-header td
{
    text-align: center;
	color: black;
	border-radius: 10px 10px 0 0;
}

.month-header td
{
 	border: none;
    font-size: 18px;
    font-weight: bold;
	padding-bottom: 8px;
}

.day-header td
{
 	border: 2px solid darkgrey;
	border-radius: 0;
    font-size: 14px;
	padding-top: 5px;
	padding-bottom: 4px;
}

td.calendar-cell > div
{
    display: flex;
    flex-direction: column;
    height: 100%;
}

td.calendar-cell > div:first-child
{
    display: none;
}

td.calendar-cell
{
    position: relative;         /* required for relative positioning of .hover */
 	border: 2px solid darkgrey;
    vertical-align: top;
    height: 24px;
    min-height: 20px;
    max-height: 20px;
    padding: 0;
    margin: 0;
    overflow: visible;
}

td.lead-in, td.lead-out
{
    border: none;
}

/* Special styling for today
 */
td.is-today
{
    border: 3px solid crimson;
    color: black;
}

/* Special styling for past days
 */
.before-today
{
    color: dimGrey;
}

/* Styling for the contents of each day cell
 */

div.day-number
{
    margin-top: 0;
    text-align: center;
    font-size: 16px;
    padding: 3px 0px 2px 0px;
    flex-grow: 0;
}

/* list of events */
.events-div
{
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.events-div:nth-child(2)
{
    position: relative;
    text-align: center;
}

.events-div img
{
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* individual event in list */
.event-div
{
    display: flex;
    flex-direction: row;
    font-size: 13px;
    overflow: visible;
    border-width: 0;
    border: none;
}

/* first child is the event time */
.event-div > div:first-child,
.event-div > a:first-child
{
    text-align: right;
    flex-grow: 0;
    overflow: hidden;
    white-space: normal;
    font-size: 12px;
    padding: 3px 8px 3px 0px;   /* 8 pixels between time and event */
    width: 25%;
    min-width: 25%;
}

/* second (last) child is the event text */
.event-div > div:last-child,
.event-div > a:last-child
{
    text-align: left;
    flex-grow: 1;
    flex-shrink: 1;
    padding: 3px 0px 3px 0px;
}

.all-day-text
{
    border: none;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0px 0px 6px white;
    text-align: center;
    vertical-align: middle;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: auto;
}

#errors
{
	margin-top: 30px;
    margin-left: 30px;
    font-family: "Courier New", Courier, monospace;
    font-size: 12pt;
}

td.calendar-cell:hover .hover
{
 	border: 3px solid darkgoldenrod;
	border-radius: 5px;
    background: linear-gradient(to bottom, antiquewhite, burlywood);
    color: black;
    display: flex;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    min-width: 240px;
    max-width: 340px;
    height: auto;
    min-height: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
}

td.hover div:first-child .all-day-text
{
    font-size: 24px;
    padding: 0;
}
td.hover div:first-child .event-div div:first-child
{
    font-size: 14px;
}
td.hover div:first-child .event-div div
{
    font-size: 16px;
}
td.hover div:first-child .events-div
{
    display: relative;
}

td.hover
{
    background: darkgoldenrod;
    color: white;
}

td.hover div:first-child .day-number
{
    background:  darkgoldenrod;
    color: white;
    text-align: center;
    font-size: 18px;
    margin-top: 0;
    padding: 4px 8px 4px 8px;
}

