body {
	margin: 0;
	unicode-bidi: bidi-override;
}

#popup_bg {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: rgba(128, 128, 128, 0.75);
	display: none;
	
	z-index: 254;
}

/* Source (the min- and max-widths in @media screen): https://stackoverflow.com/questions/19569703/em-based-css-media-query-showing-smaller-resolution-than-expected-on-ios-mobile */
/* portrait phone (< 480px) */
@media screen and (max-width:29.9999em) {
	#popup, #inner_popup {
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
	}
	
	#inner_popup {
		position: fixed;
	}
	
	.week {
		flex-wrap: wrap;
	}
	
	.day, .dummy-day {
		flex-grow: 1;
		flex-basis: 0;
		display: inline-block;
		width: 33.3%;
		min-width: 30%;
		max-width: 37%;
	}

	.week-number {
		flex-grow: 2;
		flex-basis: 0;
		display: inline-block;
		width: 66.7%;
		min-width: 63%;
		max-width: 70%;
	}
	
	/*.week-number-dummy {
		flex-grow: 0;
		flex-basis: 0;
		display: inline-block;
		width: 0%;
		min-width: 0%;
		max-width: 0%;
	} */
}

/* landscape phone and portrait tablet (>= 480px < 960px) */
@media screen and (min-width:30em) and (max-width:59.9999em), print and (orientation: portrait) {
	#popup, #inner_popup {
		top: 0;
		bottom: 0;
		left: 15%;
		right: 15%;
	}
	
	#inner_popup {
		position: fixed;
	}
	
	.week {
		flex-wrap: wrap;
	}
	
	.day, .dummy-day, .week-number {
		flex-grow: 1;
		flex-basis: 0;
		display: inline-block;
		width: 25%;
		min-width: 22%;
		max-width: 28%;
	}

	/*.week-number-dummy-4 {
		flex-grow: 0;
		flex-basis: 0;
		display: inline-block;
		width: 1%;
		min-width: 1%;
		max-width: 1%;
	} */
}

/* landscape tablet and normal monitor (>= 960px < 1440px) */
@media screen and (min-width:60em) and (max-width:89.9999em), print and (orientation: landscape)  {
	#popup {
		top: 2%;
		bottom: 3%;
		left: 20%;
		right: 20%;
	}
	
	#inner_popup {
		position: absolute; /* depends on mouse position */
	}
	
	.week {
		flex-wrap: nowrap;
	}
	
	.day, .dummy-day , .week-number {
		flex-grow: 1;
		flex-basis: 0;
		display: inline-block;
		width: 12.5%;
		min-width: 11%;
		max-width: 14%;
	}
	
	/*.week-number-dummy {
		display: none;
	} */
}

/* bigger monitor (>= 1440px) */
@media screen and (min-width:90em) {
	#popup {
		top: 3%;
		bottom: 5%;
		left: 25%;
		right: 25%;
	}
	
	#inner_popup {
		position: absolute; /* depends on mouse position */
	}
	
	.week {
		flex-wrap: nowrap;
	}
	
	.day, .dummy-day , .week-number {
		flex-grow: 1;
		flex-basis: 0;
		display: inline-block;
		width: 12.5%;
		min-width: 11%;
		max-width: 14%;
	}
	
	/*.week-number-dummy {
		display: none;
	} */
}

/* big monitor (>= 1920px) */
@media screen and (min-width:120em) {
	#popup {
		top: 5%;
		bottom: 5%;
		left: 35%;
		right: 35%;
	}
	
	#inner_popup {
		position: absolute; /* depends on mouse position */
	}
	
	.week {
		flex-wrap: nowrap;
	}
	
	.day, .dummy-day , .week-number {
		flex-grow: 1;
		flex-basis: 0;
		display: inline-block;
		width: 12.5%;
		min-width: 11%;
		max-width: 14%;
	}
	
	/*.week-number-dummy {
		display: none;
	} */
}

#popup, #outer_popup, #inner_popup {
	background-color: white;
	border-color: black;
	border-width: 0.05em;
	border-style: solid;
	display: none;
}

#popup {
	position: fixed;
	overflow: auto;
	z-index: 255;
}

#outer_popup {
	position: fixed;
	overflow: hidden;
	
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 256;
}

#inner_popup {
	/* position varies fixed/absolute, see @media */
	overflow: auto;
	z-index: 257;
}

.table-head {
	background-color: #aae7ff;
	color: black;
	font-family: sans-serif;
	font-weight: bold;
	padding-top: 0.1em;
	padding-bottom: 0.1em;
}

#titlebar { /* Titlebar in popup */
	background-color: #006088;
	color: #ffffff;
	font-family: sans-serif;
	font-weight: bold;
	padding: 0.3em;
	height: 1.0em;
	position: relative;
}

#calendar {
	overflow: hidden;
	width: 100%;
}

.month-number {
	text-align: center;
}

.day{
	position: relative;
	background-color: #e7e7e7;
	margin: 0.1em;
}

.dummy-day{
	background-color: #f6f6f6;
	color: #f6f6f6;
	margin: 0.1em;
}

.week-number {
	background-color: #d0d0d0;
	margin: 0.1em;
}

.week {
	display: flex;    
	width:100%;
	min-height:4em;
}

svg {
	height: 1.2em;
	min-width: 1.2em;
	
	position: relative;
	top: 0.3em;
}

.column-flex-container {
	display: flex;
	flex-wrap: nowrap;
	margin-bottom: 0.1em;
}

.column-icon-container {
	flex: 0 0 1.4em;
	width: 1.4em;
	vertical-align: top;
}

.column-container {
	flex: 1 0 20em;
	flex-wrap: nowrap;
}

.Event-container.curicilum-true, .Timetable-container.curicilum-true {
	position: relative;
	min-height: 24em;
}

.Event-container.curicilum-false, .Timetable-container.curicilum-false {
	position: relative;
	min-height: 2.4em;
}

.Timetable-container.curicilum-false {
	display: none;
}

.Timetable-line {
	height: 0.075em;
	background-color: white;
	right: -999em;
	color: grey;
}

.Timetable-line.curicilum-true {
	position: absolute;
	left: 0.2em;
}

.Event-block.curicilum-true {
	position: absolute;
	left: 0.2em;
	right: 0.2em;
	
}

.event_container {
	position: relative;
}

.Event-block.curicilum-false, .Timetable-line.curicilum-false {
	position: static;
	margin: 0.2em;
}

.Event-block {
	min-height: 1.25em;
	border-color: black;
	border-width: 0.05em;
	border-style: solid;
	padding-bottom: 0.2em;
	overflow: hidden;
}

.event-badge-container {
	display: inline-block;
	position: relative;
	height: 1.6em;
	min-width: 1.6em;
	top: 0.3em;
}

.event-badge, .event-logo {
	position: absolute;
	top: 0;
	left: 0;
}

.Place-public {
	stroke: red;
	color: red;
}

.column-langcode {
	width: 9em;
}

.Mappicker {
	cursor: pointer;
}

.datepicker-container {
	display: flex;    
	width:100%;
	min-height:1em;
	flex-wrap: wrap;
}

.graph-datepicker-numerical-value {
	flex-grow: 1;
    flex-basis: 0;
	display: inline-block;
	width: 25%;
	min-width: 23%;
	max-width: 33%;
	text-align: center;
	overflow: hidden;
	background-color: #e7e7e7;
	margin: 0.1em;
}

.dt_N, .dt_ai, .dt_I {
	width: 0.7em;
	text-align: center;
}

.dt_ci, .dt_y, .dt_m, .dt_n, .dt_W, .dt_d, .dt_j, .dt_g, .dt_G, .dt_h, .dt_H, .dt_i, .dt_ii, .dt_s, .dt_si {
	width: 1.4em;
	text-align: center;
}

.dt_Y, .dt_M, .dt_D, .dt_S, .dt_jS, .dt_a, .dt_A, .dt_T {
	width: 2.8em;
	text-align: center;
}

.dt_O, .dt_P, .dt_Z {
	width: 4.2em;
	text-align: center;
}

.dt_cn, .dt_F, .dt_l, .dt_an, .dt_e {
	width: 6em;
	text-align: center;
}

.holiday-name {
	border-color: black;
	border-width: 0.05em;
	border-style: solid;
	margin: 0.2em;
	padding: 0.15em;
	font-size: 0.82em;
	font-family: sans-serif;
}

.graph-mini-flag {
	max-height: 0.6em;
	max-width: 0.9em;
	padding-left: 0.075em;
	padding-right: 0.075em;
	padding-bottom: 0.05em;
}

.graph-mini-flag-text {
	font-size: 0.82em;
	font-family: monospace;
}

.graph-flag {
	max-height: 0.8em;
	max-width: 1.2em;
	padding-left: 0.1em;
	padding-right: 0.1em;
}

/* Sources: 
	https://alfy.me/2014/07/26/lets-talk-about-rtl.html
	https://css-tricks.com/multiple-class-id-selectors/
*/

.graph-column-max {
	align-self: strech;
}

.graph-float-end {
	position: absolute;
	top: -0.12em;
	width: 1.4em;
	height: 1.4em;
}
.graph-float-end.rtl {
	left: 0;
}
.graph-float-end.ltr {
	right: 0;
}

.graph-align-opposite.rtl {
	text-align: left;
}
.graph-align-opposite.ltr {
	text-align: right;
}

.graph-hide, .graph-null-inner-container {
	display: none;
}

.graph-holiday.curicilum-false {
	min-height: 1.2em;
	overflow: hidden;
	font-size: 80%;
	border-width: 0.2em;
	border-color: black;
}

.graph-holiday.curicilum-true {
	display: none;
}

.graph-pointer {
	cursor: pointer;
}

.column-icon-container {
	padding-left: 0.2em;
	padding-right: 0.1em;
	vertical-align: top;
}

.column-icon-container svg {
	/*display: relative;*/
	top: 0.01em;
}

.graph-table {
	
}

.graph-table-row {
	display: flex;
}

.graph-table-drop {
	flex: 1 2 5em;
	margin: 0.1em;
	overflow: hidden;
}

.graph-table-text {
	flex: 2 2 12em;
	margin: 0.1em;
}

.graph-table-icon {
	flex: 0 0 1.4em;
	margin: 0.1em;
}

.is_block {
	display: block;
}

@media print {
	.event-add, .event-edit, .toggle-curicilum {
		display: none;
	}
	
	.month-number {
		page-break-before: always;
	}
	
	.week {
		page-break-inside: avoid;
	}
}
