/*
    web-calendar to display multiple ics-calendars in a browser
    source code available at https://github.com/cbz20/Web-Calendar/
    Copyright (C) 2025 Claudius Zibrowius

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

:root {
	--rub-calendar-blue: #17365c;
	--rub-calendar-green: #8dae10;
	--rub-calendar-grey: #e7e7e7;
}

.calendar-container {
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px;
	min-width: 900px;
}


.calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--rub-calendar-blue);
}

#calendar-title {
	font-size: 24px;
	text-align: center;
	font-weight: bold;
	color: var(--rub-calendar-blue);
	padding: 10px;
	cursor: pointer;
}

#calendar-title:hover {
	color: var(--rub-calendar-green);
}

.calendar-summary{	
	font-weight: bold;
	font-size: 24px;
	color: var(--rub-calendar-blue);
	justify-content: left;
}

.calendar-location{	
	margin-top: 5px;
	margin-bottom: 10px;
}

.calendar-abstract{	
	margin-top: 10px;
}

.calendar-blue {
	color: var(--rub-calendar-blue);
}

/* Modal */

.calendar-modal {
	display: none;
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.75);
	justify-content: center;
	align-items: center;
}

.calendar-modal-content {
	background-color: white;
	border: 2px solid var(--rub-calendar-blue);
	padding: 10px;
	margin-top: 0px;
	border-radius: 8px;
	display: inline-block;
	overflow-y: initial !important;
	word-wrap: break-word;
	max-width: 730px;
	max-height: 90vh;
}

.calendar-modal-header {
	font-size: 18px;
	margin-bottom: 5px;
	padding: 10px 10px 0px 10px;
}

.calendar-modal-body {
	font-size: 14px;
	padding: 0px 10px 0px 10px;
	margin-top: 0px;
	margin-bottom: 5px;
	max-height: 60vh;
	overflow-y: auto;
}

.calendar-modal-body h2 {
	color: var(--rub-calendar-blue);
}

.calendar-modal-center-container {
	width: 100%;
	text-align: center;

}

.calendar-modal-content p {
	text-align: justify;
}

.calendar-no-scroll {
	/* avoid scrolling when overlay is displayed */
	overflow: hidden;
}

.linkInCalendarAbstract {
	font-weight: 550;
}

/* buttons */
.calendar-label {
	color: #999;
	cursor: pointer;
	padding-left: 3px;
}

.calendar-checkbox {
	cursor: pointer;
}

.calendar-checkbox:hover:not(.dummy-calendar-button) {
	background-image: linear-gradient(rgba(0, 0, 0, 0.2) 0 0);
}

.calendar-dummy-checkbox{
	color: var(--rub-calendar-green);
	accent-color: var(--rub-calendar-green);
	cursor: default;
}

.setting-calendar-buttons {
	background-color: var(--rub-calendar-blue);
}

.setting-calendar-buttons:hover {
	background-color: var(--rub-calendar-green);
}

.dummy-calendar-button {
	background-color: var(--rub-calendar-blue);
}

.dummy-calendar-button:hover {
	background-image: none;
	background-color: var(--rub-calendar-blue);
	cursor: default;
}

.toggle-calendar-buttons-header {
	max-width: fit-content;
	margin-left: auto;
	margin-right: auto;
}

.toggle-calendar-buttons,
.calendar-header button {
	padding: 6px 8px;
	margin: 2px 2px;
	font-size: 16px;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.calendar-svg-icon {
    height: 100%;
	width: 15px;
	user-select: none;
}

#calendar-help {
	font-size: 16px;
	padding: 10px 10px;
	color: var(--rub-calendar-blue);
	cursor: pointer;
}

#calendar-togglemode{
    text-align: center;
	font-size: 10px;
	padding: 10px 10px;
	color: var(--rub-calendar-blue);
	cursor: pointer;
}

#calendar-error-message {
	color: red;
	font-weight: 600;
	text-align: center;
	width: 100%;
	display: block;
}

.calendar-hide-me {
	display: none;
}

/* accordion */

.calendar-accordion {
            width: 100%;
            width: 670px;
            margin: 5px auto;
            border: 0px solid var(--rub-calendar-grey);
            border-radius: 5px;
            overflow: hidden;
}

.calendar-accordion-header {
            background: var(--rub-calendar-grey);
            color: var(--rub-calendar-blue);
            padding: 10px;
            font-weight: bold;
            cursor: pointer;
            border-bottom: 0px solid var(--rub-calendar-grey);
            display: flex;
            justify-content: space-between;
            align-items: center;
}

.calendar-accordion-content {
            max-height: 0;
            overflow: hidden;
            padding: 5px 10px;
            border-bottom: 0px solid var(--rub-calendar-grey);
            background: #f9f9f9;
            transition: max-height 0.3s ease-out;
}

.calendar-accordion-content p{
	margin-top: 1em;
	margin-bottom: 1em;
}

.calendar-arrow {
            font-family: FontAwesome;
            transition: transform 0.3s ease;
}

.calendar-arrow::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f054";
}


.calendar-active .calendar-arrow {
            transform: rotate(90deg);
}

.calendar-active + .calendar-accordion-content {
            max-height: 2000px;
            padding: 0px 10px;
}

@media (max-width: 1300px) {

    .calendar-container {
        min-width: unset;
        max-width: 100%;
        padding: 8px;
    }

    .calendar-header {
        flex-wrap: wrap;
        justify-content: center;
    }

    .weekview-col-date,
    .weekview-col-time,
    .weekview-col-location {
        width: auto;
    }

    .calendar-weekview {
        font-size: 14px;
    }

    .weekview-event-calendar-summary {
        white-space: normal;
        word-break: break-word;
    }

    .weekview-event-time,
    .weekview-event-location {
        padding: 2px 4px;
    }
    
    .mobile-calendar-button-wrapper{
        width: 100%;
        text-align: center;
    }
}

