/* Calendar Style */

div.calendar{
	width: 100%; display: flex; overflow: hidden; flex-direction: column;
	border: solid 1px hsl(var(--hue),var(--saturation),80%);
}

div.calendar--header{
	display: flex; justify-content: space-between; width: 100%; align-items: center; min-height: 32px;
	color: hsl(var(--hue),var(--saturation),30%);
	background-color: hsl(var(--hue),var(--saturation),90%);
}

div.calendar--previous, div.calendar--next{
	width: 32px; height: 32px; flex-shrink: 0; font-size: 24px; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}

div.calendar--previous:hover, div.calendar--next:hover{
	background-color: hsl(var(--hue),var(--saturation),85%);
}

div.calendar--title{
	flex-shrink: 1; display: flex; overflow: hidden;
}

div.calendar--month{
	overflow: hidden; cursor: pointer; padding: 2px;
}

div.calendar--month:hover{
	background-color: hsl(var(--hue),var(--saturation),85%);
}

div.calendar--year{
	overflow: hidden; cursor: pointer; padding: 2px;
}

div.calendar--year:hover{
	background-color: hsl(var(--hue),var(--saturation),85%);
}

div.calendar--days{
	display: flex; justify-content: space-between; width: 100%; align-items: center; min-height: 32px;
	color: hsl(var(--hue),var(--saturation),50%);
	background-color: hsl(var(--hue),var(--saturation),95%);
}

div.calendar--day {
	flex-shrink: 1; flex-grow: 1; text-align: center; overflow: hidden; flex-basis: 0;
}

div.calendar--day.calendar--week {
	flex-shrink: 0; flex-basis: 24px; flex-grow: 0;
}

div.calendar--row{
	border-top: solid 1px hsl(var(--hue),var(--saturation),85%);
	display: flex; justify-content: space-between; width: 100%; min-height: 44px;
}

div.calendar--cell {
	flex-shrink: 1; flex-grow: 1; flex-basis: 0; display: block; position: relative; width: 0;
	border-left: solid 1px hsl(var(--hue),var(--saturation),85%); padding: 1px 1px 12px 1px; text-align: center;
}

div.calendar.--selectable div.calendar--cell:hover {
	background-color: hsl(var(--hue),var(--saturation),95%); cursor: pointer;
}

div.calendar.--selectable div.calendar--cell.--selected {
	background-color: hsl(var(--hue),var(--saturation),90%);
}

div.calendar--cell:first-of-type{
	border-left: none;
}

div.calendar--cell.calendar--week {
	flex-shrink: 0; flex-basis: 24px; flex-grow: 0; cursor: default;
	font-size: 10px; line-height: 1;
	color: hsl(var(--hue),var(--saturation),65%);
}

div.calendar.--selectable div.calendar--cell.calendar--week:hover {
	background-color: transparent; cursor: default;
}

div.calendar--item-date {
	width: 100%; display: flex;
}

div.calendar--date {
	font-size: 10px; color: hsl(var(--hue),var(--saturation),50%);
	line-height: 1; margin-left: auto; padding: 1px;
}

.--today div.calendar--date {
	color: hsl(var(--hue),var(--saturation),90%);
	background-color: hsl(var(--hue),var(--saturation),40%);
}

.--disabled div.calendar--date{
	color: hsl(var(--hue),var(--saturation),80%);
}

div.calendar--cm-icon {
	--lightness: 50%;
	cursor: pointer; flex-shrink: 0; font-size: 24px; width: 24px; height: 24px;
	color: hsl(var(--hue),var(--saturation),var(--lightness));
}

div.calendar--cm-icon:hover {
	background-color: hsl(var(--hue),var(--saturation),calc(var(--lightness-bg) + var(--lightness-hover)));
}

/* Calendar Item Style */

div.calendar--item {
	width: calc(100% - 2px); font-size: 10px; line-height: 16px; padding: 0 2px;
	border: solid 1px hsl(var(--hue),var(--saturation),60%); border-radius: 3px; 
	position: absolute; z-index: 100; max-width: none; text-align: left;
	color: hsl(var(--hue),var(--saturation),80%); overflow: hidden;
	background-color: hsl(var(--hue),var(--saturation),40%); white-space: nowrap;
}

div.calendar--item.--hover {
	border-color: hsl(var(--hue),var(--saturation),60%);
	color: hsl(var(--hue),var(--saturation),30%);
	background-color: hsl(var(--hue),var(--saturation),90%);
}

div.calendar--item-over {
	height: 19px; z-index: 200; position: relative;
	left: -1px; width: calc(100% + 3px); max-width: none;
}

.--disabled div.calendar--item-over {
	background-color: #fff8;
}

/* Calendar Item-Simple Style */

div.calendar--item-simple {
	width: 100%; font-size: 10px; line-height: 16px; padding: 0 2px; margin-top: 1px;
	border: solid 1px hsl(var(--hue),var(--saturation),60%); border-radius: 3px; 
	color: hsl(var(--hue),var(--saturation),80%); overflow: hidden; hyphens: auto;
	background-color: hsl(var(--hue),var(--saturation),40%); overflow-wrap: break-word;
}

.--disabled div.calendar--item-simple {
	opacity: .5;
}

div.calendar--item-simple:hover {
	border-color: hsl(var(--hue),var(--saturation),60%);
	color: hsl(var(--hue),var(--saturation),30%);
	background-color: hsl(var(--hue),var(--saturation),90%);
}

/* Calendar Item-Simple Flex Style */
div.calendar--item-simple.calendar--item-flex {
	display: flex; align-items: center; gap: 1px; flex-wrap: wrap;
}

/* Calendar Meal Style */

span.calendar--no-meal {
	color: hsl(0,100%,70%);
}

div.calendar--item-simple:hover span.calendar--no-meal {
	color: hsl(0,100%,50%);
}