/*
	All a user has to do to change the calendar size is
	change the font-size on the container and everything
	magically resizes accordingly. Relative units ftw!
	https://www.npmjs.com/package/js-datepicker
*/
.qs-datepicker-container {
	font-size: 1rem;
	font-family: sans-serif;
	color: black;
	position: absolute;
	width: 15.625em;
	display: flex;
	flex-direction: column;
	z-index: 1;
	user-select: none;
	border: 1px solid var(--box-shadow, '#808080');
	border-radius: .5em;
	overflow: hidden;
	background: white;
	box-shadow: 4px 4px 4px var(--box-shadow, '#808080');
	box-sizing: border-box;
}

.qs-centered {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.qs-hidden {
	display: none;
}

.qs-overlay {
	position: absolute;
	top: 0;
	left: 0;
	background: rgba(0, 0, 0, .70);
	color: white;
	width: 100%;
	height: 100%;
	padding: .5em;
	z-index: 1;
	opacity: 1;
	transition: opacity .3s;
	display: flex;
	flex-direction: column;
}

.qs-overlay.qs-hidden {
	opacity: 0;
	z-index: -1;
}

.qs-overlay-year {
	/* Overlay year input element.*/
	border: none;
	background: transparent;
	border-bottom: 1px solid white;
	border-radius: 0;
	color: white;
	font-size: 100%;
	padding: .25em 0;
	width: 80%;
	text-align: center;
	margin: 0 auto;
	display: block;
}

.qs-close {
	padding: .5em;
	cursor: pointer;
	position: absolute;
	top: 0;
	right: 0;
}

.qs-submit {
	border: 1px solid white;
	border-radius: .5em;
	padding: .5em;
	margin: 0 auto auto;
	cursor: pointer;
	background: rgba(128, 128, 128, .4);
}

.qs-submit.qs-disabled {
	color: gray;
	border-color: gray;
	cursor: not-allowed;
}

.qs-overlay-month-container {
	display: flex;
	flex-wrap: wrap;
	flex-grow: 1;
}

.qs-overlay-month {
	display: flex;
	justify-content: center;
	align-items: center;
	width: calc(100% / 3);
	cursor: pointer;
	opacity: .7;
	transition: opacity .15s;
}

.qs-overlay-month:active,
.qs-overlay-month:hover {
	opacity: 1;
	font-weight: bold;
}

.qs-controls {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-grow: 1;
	flex-shrink: 0;
	background: var(--panel-back-lt);
	color: var(--panel-text);
	filter: blur(0px);
	transition: filter .3s;
}

.qs-controls.qs-blur {
	filter: blur(5px);
}

.qs-arrow {
	height: 2em;
	width: 2em;
	position: relative;
	cursor: pointer;
	border-radius: .5em;
	transition: background .15s;
}

.qs-arrow:hover {
	background: rgba(0, 0, 0, .1);
}

.qs-arrow:after {
	content: '';
	position: absolute;
	top: 50%;
	transition: border .2s;
}

.qs-arrow.qs-left:after {
	content: '\25C0';
	right: 50%;
	transform: translate(25%, -50%);
}

.qs-arrow.qs-right:after {
	content: '\25B6';
	left: 50%;
	transform: translate(-25%, -50%);
}

.qs-month-year {
	font-weight: bold;
	transition: border .2s;
	border-bottom: 1px solid transparent;
	cursor: pointer;
}

.qs-month-year:hover {
	border-bottom: 1px solid gray;
}

.qs-month-year:focus,
.qs-month-year:active:focus {
	outline: none;
}

.qs-month {
	padding-right: .5ex;
}

.qs-year {
	padding-left: .5ex;
}

.qs-month-year span {
	display: inline;
}

.qs-squares {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-evenly;
	padding: 0.25em;
	filter: blur(0px);
	transition: filter .3s;
}

.qs-squares.qs-blur {
	filter: blur(5px);
}

.qs-square {
	width: 2em;
	height: 2em;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background .1s;
	border-radius: .3em;
}

.qs-square:not(.qs-empty):not(.qs-disabled):not(.qs-day):not(.qs-active):hover {
	background: var(--panel-back-lt);
}

/* Today's date*/
.qs-current {
	font-weight: bold;
	text-decoration: underline;
	color: var(--panel-back);
}

/*
	3 possibilities:
		1. Single, active date.
		2. Daterange start selection.
		3. Daterange end selection.
*/
.qs-active,
.qs-range-start,
.qs-range-end {
	background: var(--panel-back-lt);
}

/* // Daterange start selection. */
.qs-range-start:not(.qs-range-6) {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

/* // Daterange middle selections. */
.qs-range-middle {
	background: lighten(var(--panel-back-lt), 10%);
}

.qs-range-middle:not(.qs-range-0):not(.qs-range-6) {
	border-radius: 0;
}

.qs-range-middle.qs-range-0 {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.qs-range-middle.qs-range-6 {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

/* // Daterange end selection. */
.qs-range-end :not(.qs-range-0) {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.qs-disabled,
.qs-outside-current-month {
	opacity: .2;
}

.qs-disabled {
	cursor: not-allowed;
}

.qs-empty {
	cursor: default;
}

.qs-day {
	cursor: default;
	font-weight: bold;
	color: var(--panel-back-sel);
}

.qs-event {
	position: relative;
}

.qs-event:after {
	content: '';
	position: absolute;
	width: 15.625em * .03;
	height: 15.625em * .03;
	border-radius: 50%;
	background: #07f;
	bottom: 0;
	right: 0;
}
