﻿:root {
	--calendarHeight: calc(100dvh - 112.75px);
}

.calendar-header {
	background-color: #659dbd;
	height: 84.76px;
}

.header-title-non-abbr {
	width:270px;
}

.header-title-abbr {
	width:150px;
}

	@media (max-width:575px) {
		.calendar-header-text br{
			display:none;
		}
	}

.calendar-header-text {
	color: white;
}

.calendar-background {
    background-color: #fbeec1;
}

.calendar-headers {
    border-left: 1px solid #bc985a;
    border-bottom: 1px solid #bc985a;
    border-right: 1px solid #bc985a;
    height: 28px;
	max-width:20%;
	text-align: center;
}

.month-nav {
	margin: auto;
}

.month {
    text-align: center;
	display: flex;
	justify-content: center;
}

.month > * {
	margin: auto 0;
}

.view-nav {
	display: flex;
	position: relative;
}

.view-nav label {
	cursor: pointer;
}

.link-container{
	display: flex;
	column-gap: 8px;
	width: 100%;
	margin: auto 0;
	
}

.view-nav span + span {
	margin-top: 5px;
}

.view-nav > label {
	margin: auto 0;
	padding: 6px 12px;
}

.views-text {
    color: white;
}

#mobile-menu, .view-nav > label {
	display: none;
}

.views-links > label:before {
	content: 'Hide'
}
	
	.views-links:has(#hide-weekends:checked) > label:before {
		content: 'Show'
	}

.views-links + .views-links {
	border-left: 1px solid #fff;
	padding-left: 8px;
}

.views-links {
    color: white;
    text-decoration: none;
	text-align: center;
}

    .views-links:hover {
        color: #fbeec1;
    }
	
	@media (max-width:767px) {
		.view-nav {
			justify-content: right;
		}
	
		.view-nav > label {
			display: block;
		}
		
		.views-links {
			line-height: 42px;
			margin: 5px 0;
		}
				
		.views-links + .views-links {
			padding: 0;
			border-left: none;
			border-top: 1px solid #fff
		}

		.link-container {
			overflow: hidden;
			max-height: 0;
			transition: max-height .3s cubic-bezier(0.1, 0.7, 1.0, 0.1), max-width .3s cubic-bezier(0.1, 0.7, 1.0, 0.1);
			flex-direction: column;
			position: absolute;
			right: 0;
			top: 100%;
			background: #6ca0bd;
			z-index:1;
			padding: 0 5px;
			width: max-content;
		}
		
		.view-nav label > span {
			display: block;
			height: 3px;
			width: 30px;
			background: #fff;
		}
		
		.view-nav:not(:has(#mobile-menu:checked)).views-links + .views-links {
			border-left: 1px solid #fff;
			padding-left: 3px;
		}

		.view-nav:has(#mobile-menu:checked) .link-container {
				max-height: 200px;
				border: 1px solid white;
		}
	}

.links {
    text-decoration: none;
}

    .links:hover {
        color: #fbeec1;
    }

/*hides the checkbox but still alows it to be clicked*/
#hide-weekends {
	display: none;
}

.weekend {
    background-color: #daad86;
}

	/*style to hide weekends when menu is clicked*/
	body:has(#hide-weekends:checked) .weekend {
		display: none;
	}

.calendar-headers-text {
    text-align: center;
}

	@media (max-width:767px) {
		.calendar-day {
			padding: 0 3px;
		}
	}

/*month view*/

body:has(.control-calendar.month-view) #toggle-view-btn:before {
	content: 'Week View'
}

/*style for when there are 4 rows*/
.month-view .calendar-week {
    height: calc(var(--calendarHeight) / 4);
}

/*style for when there are 5 rows*/
.month-view .calendar-week:nth-last-child(5),
.month-view .calendar-week:nth-last-child(5) ~ .calendar-week {
    height: calc(var(--calendarHeight) / 5);
}

/*style for when there are 6 rows*/
.month-view .calendar-week:nth-last-child(6),
.month-view .calendar-week:nth-last-child(6) ~ .calendar-week {
    height: calc(var(--calendarHeight) / 6);
}	

	@media (max-width:767px){
		.month-view .calendar-week {
			height: calc((var(--calendarHeight) / 4) * .6);
		}

		.month-view .calendar-week:nth-last-child(5),
		.month-view .calendar-week:nth-last-child(5) ~ .calendar-week {
			height: calc((var(--calendarHeight) / 5) * .6);
		}

		.month-view .calendar-week:nth-last-child(6),
		.month-view .calendar-week:nth-last-child(6) ~ .calendar-week {
			height: calc((var(--calendarHeight) / 6) * .6);
		}
	}

/*end of month view*/
/*week view*/

body:has(.control-calendar.week-view) #toggle-view-btn:before {
	content: 'Month View';
	display: block;
}

.week-view .calendar-week {
	display: none;
}

.week-view .calendar-week.active {
	display: flex;
}

.week-view .calendar-week{
	height: var(--calendarHeight);
}

@media (max-width:767px) {
	.week-view .calendar-week{
		height: calc(var(--calendarHeight) * .6);
	}
}	

/*end of week view*/
.calendar-day {
    border: 1px solid #bc986a;
    position: relative;
	display: grid;
	grid-template-rows: max-content;
	max-width: 14.28%;
	max-height: 100%;
}

	.calendar-day.active {
		border-color:#000;
		background:#0000002e
	}
	
	/*style for when the weekends are hidden via menu*/
	body:has(#hide-weekends:checked) .calendar-day {
		max-width: 20%;
	}

.calendar-noday {
    border: 1px solid #bc986a;
    height: 170px;
    background-color: #fbeec1;
}

.calendar-day-text {
    text-align: center;
	margin: 0;
	font-size: 3vh;
	width: fit-content;
	aspect-ratio: 1 / 1;
	margin-top: 3px;
}

.calendar-day-text.today {
    background-color: #0004;
    border-radius: 31px;
    text-align: center;
}

.events {
    overflow: auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 0 auto;
	max-height: 100%
}

	@media (max-width:767px) {
		.events {
			overflow:hidden;
		}
	}

.events-week {
    height: 96% !important;
}

.event {
    height: 30px;
    border-radius: 10px;
    padding: 0 5px;
}

	@media (max-width:767px) {		
		.calendar-day .event > *{
			display: none;
		}
	}

.event-text {
    text-align: center;
    padding: 0 7px;
}

.event-week {
    width: 100% !important;
    height: auto !important;
}

.detail {
    display: inline-block;
    position: relative;
	margin: 0 3px 5px
}

	@media (max-width: 767px) {
		.calendar-day .detail {
			min-width: 30%;
			margin-right: 3%;
			height: 10px;
			margin: 0 3% 5px 0;
			flex: 1;
		}
	}

    .detail .detail-text {
        visibility: hidden;
        font-size: 8pt;
        position: fixed;
        z-index: 1;
        width: 500px;
        border-radius: 3px;
        padding: 5px;
        background-color: #659dbd;
        color: white;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .control-calendar .detail:hover .detail-text {
        visibility: visible;
        opacity: 1;
    }
	
#bottom-section {
	display: none;
	background-color: #faecc1;
	text-align: center;
	padding: 5px;
}
	
	@media (max-width:767px) {
		#bottom-section{
			display: block;
			height: calc(var(--calendarHeight) * .4);
		}
	}
	
	@media (max-width:575px) {
		#bottom-section{
			display: block;
			height: calc(((var(--calendarHeight) - 1rem) * .4));
		}
	}
	@media (max-width:427px) {
		#bottom-section{
			display: block;
			height: calc((var(--calendarHeight) - 1rem) * .4);
		}
	}

.abbr{
	display: none;
}

.non-abbr{
	display: block;
}

@media (max-width:767px) {
	.abbr {
		display: block;
	}
	.non-abbr {
		display: none;
	}
}

.key .key-content {
    visibility: hidden;
    position: fixed;
    font-size: 11pt;
    z-index: 1;
    opacity: 0;
    border-radius: 3px;
    background-color: #fbeec1;
    border: 2px solid #bc986a;
    width: 450px;
	max-width: 90%;
}

.key:hover .key-content {
    visibility: visible;
    opacity: 85%;
    -webkit-animation-name: slideIn;
    -webkit-animation-duration: 0.4s;
    animation-name: slideIn;
    animation-duration: 0.4s
}

.key-row {
	padding: 3px 0;
}

.remove .key-row {
	display:none;
}

@-webkit-keyframes slideIn {
    from {
        left: -420px;
        opacity: 0
    }

    to {
        left: 0;
        opacity: 85%
    }
}

@keyframes slideIn {
    from {
        left: -420px;
        opacity: 0
    }

    to {
        left: 0;
        opacity: 85%
    }
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}
