
/*
// Monthly (Events Calendar and Date Picker) 2.2.2 by Kevin Thornbloom # https://github.com/kthornbloom/Monthly
// License: Creative Commons Attribution-ShareAlike 4.0 International License.
// with fixes by unixman r.20190412
*/

/* Overall wrapper */
.monthly {
	background: #F3F3F5;
	color: #545454;
	user-select: none;
	position: relative;
}

/* Top bar containing title, navigation, and buttons */
.monthly-header {
	position: relative;
	text-align: center;
	padding: 0.5rem;
	background: #fff;
	height: 3rem;
	box-sizing: border-box;
}
/* Center area of top bar containing title and buttons */
.monthly-header-title {
	text-transform: uppercase;
}

/* Buttons for reverting to "today", and closing event list */
.monthly-header-title a:link,
.monthly-header-title a:visited {
	display: inline-block;
	border: 1px solid #ccc;
	color: #545454;
	text-decoration: none;
	height: 1.75rem;
	line-height: 1.65rem;
	padding: 0 0.65rem 0 0.65rem;
	box-sizing: border-box;
	transition: background .1s;
}
/* Add some roundy-ness */
.monthly-header-title a:first-of-type {
	border-top-left-radius: 1rem;
	border-bottom-left-radius: 1rem;
}
.monthly-header-title a:last-of-type {
	border-top-right-radius: 1rem;
	border-bottom-right-radius: 1rem;
}
.monthly-header-title a:hover {
	background: #8b8b8b;
	border: 1px solid #8b8b8b;
	color: #fff;
}
.monthly-header-title a:active {
	background: #222;
	border: 1px solid #222;
	transition: none;
}
/* current month/yr block */
.monthly-header-title-date,
.monthly-header-title-date:hover {
	background: #eee!important;
	border: 1px solid #ccc!important;
	color: #545454!important;
	cursor: default;
}
/* Button to reset to current month */
.monthly-reset {
	border-left: 0!important;
}
.monthly-reset::before {
	content: '\21BB';
	margin-right: 0.25rem;
}
/* Button to return to month view */
.monthly-cal {
	border-right: 0!important;
}
.monthly-cal::before {
	content: '\2637';
	margin-right: 0.25rem;
}

/* wrapper for left/right buttons to make the clickable area bigger */
.monthly-prev,
.monthly-next {
	position: absolute;
	top: 0;
	width: 3rem;
	height: 100%;
	opacity: .5;
}
.monthly-prev {
	left: 0;
}
.monthly-next {
	right: 0;
}
.monthly-prev:hover,
.monthly-next:hover {
	opacity: 1;
}

/* Arrows */
.monthly-prev::after,
.monthly-next::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	border-style: solid;
	border-color: #222;
	width: 0.6rem;
	height: 0.6rem;
	margin: -0.4rem 0 0 -0.4rem;
	transform: rotate(45deg);
}
/* Left Arrow */
.monthly-prev::after{
	border-width: 0 0 0.2rem 0.2rem;
}
/* Right Arrow */
.monthly-next::after {
	border-width: 0.2rem 0.2rem 0 0;
}

/* Day of the week headings */
.monthly-day-title-wrap {
	display: table;
	table-layout: fixed;
	width: 100%;
	background: #fff;
	border-bottom: 1px solid #EBEBEB;
}
.monthly-day-title-wrap div {
	width: 14.28%!important;
	display: table-cell;
	box-sizing: border-box;
	position: relative;
	text-align: center;
	text-transform: uppercase;
}

/* Calendar days wrapper */
.monthly-day-wrap {
	display: table;
	table-layout: fixed;
	width: 100%;
	overflow: hidden;
}
.monthly-week {
	display: table-row;
	width: 100%;
}
/* Calendar Days */
.monthly-day, .monthly-day-blank {
	width: 14.28%!important;
	display: table-cell;
	vertical-align: top;
	box-sizing: border-box;
	position: relative;
	color: inherit;
	background: #fff;
	box-shadow: 0 0 0 1px #EBEBEB;
	transition: .25s;
	padding: 0;
	text-decoration: none;
}

/* Trick to make the days' width equal their height */
.monthly-day::before {
	content: '';
	display: block;
	padding-top: 100%;
	float: left;
}

/* Hover effect for non event calendar days */
.monthly-day-wrap > a:hover {
	background: #A1C2E3;
}

/* Days that are part of previous or next month */
.monthly-day-blank {
	background: #F3F3F5;
}

.monthly-day-event {
	cursor: pointer;
}

/* Event calendar day number styles */
.monthly-day-event > .monthly-day-number {
	position: absolute;
	line-height: 1rem;
	top: 0.2rem;
	left: 0.25rem;
}

/* Non-Event calendar day number styles */
.monthly-day-pick > .monthly-indicator-wrap {
	margin: 0;
}

.monthly-day-pick > .monthly-day-number::before,
.monthly-day-pick > .monthly-day-number::after {
	content: '';
	display: block;
	padding-top: calc(50% - 0.8rem);
	width: 0;
	height: 0;
}

/* Days in the past in "picker" mode */
.monthly-past-day {
	color: #999999;
	cursor: not-allowed;
}
.monthly-past-day::after{
	content: '';
	width: 150%;
	height: 2px;
	transform-origin: left top;
	transform: rotate(45deg);
	background: rgba(0, 0, 0, 0.1);
	position: absolute;
	left: 0;
	top: 0;
}
.monthly-past-day:hover {
	background: #fff!important;
}

/* Current day style */
.monthly-today .monthly-day-number {
	color: #FFF;
	background: #EA6565;
	border-radius: 0.75rem;
	top: 0.08rem;
	left: 0.05rem;
	font-size: 0.9rem;
	padding: 0;
	width: 1.25rem;
	height: 1.25rem;
	line-height: 1.25rem;
	text-align: center;
}
.monthly-day-pick.monthly-today .monthly-day-number {
	padding: 0.15rem;
	margin: calc(50% - 0.85rem) auto auto auto;
	font-size: 0.9rem;
}

/* Wrapper around events */
.monthly-indicator-wrap {
	position: relative;
	text-align: center;
	line-height: 0;
	max-width: 1.5rem;
	margin: 0 auto;
	padding-top: 1.2rem;
}

/* Event indicator dots */
.monthly-day .monthly-event-indicator {
	display: inline-block;
	margin: 0.05rem;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 0.25rem;
	vertical-align: middle;
	background: #7BA7CE;
}

.monthly-day .monthly-event-indicator span {
	color: transparent;
}

.monthly-day .monthly-event-indicator:hover {
	cursor: pointer;
}
/* Listing of events under calendar */
.monthly-event-list {
	background: rgba(233, 235, 236, 0.9);
	overflow: auto;
	position: absolute;
	top: 2.5rem;
	width: 100%;
	height: calc(100% - 2.5rem);
	display: none;
	transition: .25s;
	transform: scale(0);
}

/* Days in Events List */
.monthly-list-item {
	position: relative;
	padding: 0.5rem 0.7rem 0.25rem 4rem;
	display: none;
	border-top: 1px solid #D6D6D6;
	text-align: left;
}

.monthly-list-item::after{
	padding: 0.4rem 1rem;
	display: block;
	margin-bottom: 0.5rem;
 }

.monthly-event-list .monthly-today .monthly-event-list-date {
	color: #EA6565;
}

/* Events in Events List */
.monthly-event-list .listed-event {
	display: block;
	color: #fff;
	padding: 0.4rem 1rem;
	border-radius: 0.2rem;
	margin-bottom: 0.5rem;
}

.monthly-list-item a:link, .monthly-list-item a:visited {
	text-decoration: none;
}

.item-has-event {
	display: block;
}

.item-has-event::after{
	display: none!important;
}

.monthly-event-list-date {
	width: 4rem;
	position: absolute;
	left: 0;
	top: 1.2rem;
	text-align: center;
	font-weight: bold;
	line-height: 1.2rem;
}

.monthly-list-time-start,
.monthly-list-time-end {
	font-size: 0.8rem;
	display: inline-block;
}
.monthly-list-time-end:not(:empty)::before {
	content: '\2013';
	padding: 0 2px;
}

/* Events List custom webkit scrollbar */
.monthly-event-list::-webkit-scrollbar {width: 0.75rem;}

/* Track */
.monthly-event-list::-webkit-scrollbar-track {background: none;}

/* Handle */
.monthly-event-list::-webkit-scrollbar-thumb {
	background: #ccc;
	border: 1px solid #E9EBEC;
	border-radius: 0.5rem;
}
.monthly-event-list::-webkit-scrollbar-thumb:hover {background: #555;}

/* Language-specific. Default is English. */
.monthly-reset::after		{ content: 'Today'; }
.monthly-cal::after			{ content: 'Month'; }
.monthly-list-item::after	{ content: 'No Events'; }

/*
Calendar shows event titles if the device width allows for at least 3rem per day (rounded
up to 25rem total). This assumes the calendar font is close to the baseline font size and
the calendar takes up close to the full media width as the window is made smaller or the
font is zoomed. If one or both of these is not true, this will need to be overridden by
a layout-specific width, or you will need to use a library like css-element-queries to
establish the rules based on the calendar element width rather than the device width.
*/
@media (min-width: 25rem) {

	.monthly-day-event {
		padding-top: 1.3rem;
	}
	.monthly-day-event > .monthly-indicator-wrap {
		width: auto;
		max-width: none;
	}
	.monthly-indicator-wrap {
		padding: 0;
	}
	.monthly-day::before {
		padding-top: calc(100% - 1.2rem);
	}
	.monthly-day .monthly-event-indicator {
		display: block;
		margin: 0 0 1px 0;
		width: auto;
		height: 1.5rem;
		line-height: 1.2rem;
		padding: 0.125rem 0 0.1rem 0.125rem;
		border-radius: 0;
		overflow: hidden;
		background-color: #333;
		color: #333;
		text-decoration: none;
		white-space: nowrap;
		box-sizing: border-box;
	}
	.monthly-day .monthly-event-indicator.monthly-event-continued {
		box-shadow: -1px 0 0 0;
	}
	.monthly-day .monthly-event-indicator span {
		display: block;
		width: auto;
		margin: 0;
		color: #fff;
		padding: 0;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

}

/* END */
