body {
	font-family: "TheMessage", Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
	color: white;
	background-color: white;
	border: 0;
	margin: 0;
	overflow-x: hidden;
}

@font-face {
    font-family: 'TheMessage';
    src: url('/fonts/TheMessage.eot');
    src: url('/fonts/TheMessage.eot?#iefix') format('embedded-opentype'),
        url('/fonts/TheMessage.woff2') format('woff2'),
        url('/fonts/TheMessage.woff') format('woff'),
        url('/fonts/TheMessage.ttf') format('truetype'),
        url('/fonts/TheMessage.svg#TheMessage') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TheMessage';
    src: url('/fonts/TheMessage-Bold.eot');
    src: url('/fonts/TheMessage-Bold.eot?#iefix') format('embedded-opentype'),
        url('/fonts/TheMessage-Bold.woff2') format('woff2'),
        url('/fonts/TheMessage-Bold.woff') format('woff'),
        url('/fonts/TheMessage-Bold.ttf') format('truetype'),
        url('/fonts/TheMessage-Bold.svg#TheMessage-Bold') format('svg');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

h1 {
	font-size: 2rem;
	line-height: 2;
}

/* Home ************************************************************************/

body#body_home:after{
	content:"";
	position:fixed; /* stretch a fixed position to the whole screen */
	top:0;
	height:100vh; /* fix for mobile browser address bar appearing disappearing */
	left:0;
	right:0;
	z-index:-1; /* needed to keep in the background */
	background: url('images/home/background.jpg') center center;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}

#home_header {
	position: fixed;
	top: 0;
	color: white;
	background-color:rgb(45, 172, 68);
	height: 10vh;
}

#selected_instrument {
	color: white;
	font-size: 1rem;
	visibility: visible;
	text-align: right;
}

#home_footer {
	height: 10vh;
	color: white;
	background-color:rgb(45, 172, 68);
}

#home_footer div {
	display:flex;
	font-size:1rem;
	flex-direction:column;
	background-color:rgb(45, 172, 68);
}

div.piece_container {
	width: 100%;
	display: flex;
	flex-direction: row;
	margin-bottom: 2rem;
	margin-left: 2rem;
}

div.piece_cover {
	width: 2.5rem;
	height: 2.5rem;
	background-color: white;
	margin-right: 2vh;
}

/*div.piece_container:nth-child(odd) div.piece_cover {
	margin-left: 3.5rem;
}*/

div.piece_metadata {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

a.copyright:link, a.copyright:visited {
	color: white;
	text-decoration: none;
	font-weight: bold;
}

a.copyright:hover {
	color: #cfcecd;
}

a.link_to_piece:link, a.link_to_piece:visited {
	color: white;
	font-size: 1.2rem;
    font-weight: bold;
	line-height: 1.2;
	text-decoration: none;
}

a.link_to_piece:hover {
	color: #cfcecd;
}

div.logo_container {
	height: 5vh;
	margin-right: 2vh;
	background-size: contain;
	background-repeat: no-repeat;
	background-position-x: left;
	background-position-y: center;
	cursor: pointer;
}

#home_footer div div.two_logos {
	display: flex;
	flex-direction: row;
}

div#logo_sanoma {
	background-image: url('/images/logos/logo_sanoma.svg');
}

div#logo_unimi {
	background-image: url('/images/logos/logo_unimi.png');
}

div#logo_lim {
	background-image: url('/images/logos/logo_lim.svg');
	width: 7vh;
}

section#piece_menu {
	background-color: #009639;
	padding: 10vh;
	padding-bottom: 15vh;
	position:relative;
	top:100vh;
}

#button_goto_pieces {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 15vh; /* Set the width of your div */
	min-width: 150px;
	height: 6vh; /* Set the height of your div */
	min-height: 40px;
	color: white;
	background-color: #2dac44;
	text-align: center;
	line-height: max(6vh,40px); /* Set the same value as the height for vertical centering */
	cursor: pointer;
	border: 1px solid white;
	font-size: 1.2rem;
	font-weight: bold;
	display: flex;
	align-content: center;
	align-items: center;
	justify-content: center;
}

#button_goto_pieces:hover {
	background-color: #009639;
}

img.open_close_icon {
	width: 1.5rem; 
	height: 1.5rem;
	margin-right: 0.5rem;
}

input#home_search {
	font-size: 1.2rem; 
	padding: 0.5rem; 
	font-family: 'TheMessage', Gotham, 'Helvetica Neue', Helvetica, Arial, 'sans-serif'; 
	color: black
}

/* Header **********************************************************************/

header {
	display: flex;
	flex-direction: row;
	align-content: center;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 10vh;
	box-sizing: border-box;
	color: white;
}

div#header_left, div#header_left_home {
	width: 30vh;
	height: 8vh;
	padding-top: 1vh;
	box-sizing: border-box;
	/*background-image: url('/images/logos/logo_musicstudio_demo.png');*/
	/*background-image: url('/images/logos/logo_musicstudio.png');*/
	background-image: url('/images/logos/logo_musicstudio_no_sanoma.png');
	background-size: contain;
	background-repeat: no-repeat;
	background-position-y: center;
	margin-left: 1vh;
	cursor: pointer;
}

div#header_left_home {
	/*background-image: url('/images/logos/logo_musicstudio_no_sanoma_demo.png');*/
	background-image: url('/images/logos/logo_musicstudio_no_sanoma.png');
}


div#header_right {
	padding: 2.5vh;
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
    align-items: center;
    justify-items: center;
	width: 30vh;
	height: 10vh;
	box-sizing: border-box;
	background-size: cover;
	background-position: bottom;
}

svg text {
	fill: white;
	font-family: "TheMessage", Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
	font-size: 2vh;
	font-weight: bold;
	dominant-baseline: middle;
	text-anchor: center;
}

svg text.lettering {
	font-weight: normal;
	font-size: 1.3vh;
}

/* Section: main ****************************************************************/

section#section_main {
	width: 100vw;
	height: 60vh;
	display: flex;
	flex-direction: row;
	align-content: center;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
}

/* Metadata and score */

div#score_container {
	margin-top: 5vh;
	width: 70vw;
	height: 55vh;
	display: flex;
	flex-direction: column;
	align-content: center;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}

div.metadata {
	display: flex;
	flex-direction: column;
	align-content: flex-start;
	justify-content: center;
	align-items: center;
	color: white;
	box-sizing: border-box;
}

span#title {
	font-size: min(3.5vw,3.5vh);
	font-weight: bold;
	text-align: center;
}

span#title img {
	width: min(2.5vw,2.5vh);
	height: min(2.5vw,2.5vh);
	margin-left: min(1vw,1vh);
}

span#subtitle, span#author, span#accessible {
	font-size: min(1.5vw,1.5vh);
	font-weight: normal;
	text-align: center;
}

span#simplified {
	cursor: pointer;
}

canvas#score {
	width: 70vw;
	height: 55vh;
	background-size: contain; 
	background-repeat: no-repeat;
	background-position: center;
    box-sizing: border-box;
}


/* Section: main ****************************************************************/

/* Instruments */

.instrument {
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	width: 100%;
	height: 20vh;
	display: none;
    flex-direction: column;
    align-content: center;
    align-items: center;
}

#horizontal_instr_container {
	width: 100vw;
	height: 20vh;
	bottom: 0;
	display: flex;
	flex-direction: column;
	flex-direction: row;
	align-content: center;
	justify-content: center;
	align-items: center;
	background-size: contain; 
	background-repeat: no-repeat;
	background-position: center;
}

div#guitar {
	background-image: url("images/instruments/guitar.svg");
}

div#piano {
	background-image: url("images/instruments/piano.svg");
}

div#ukulele {
	background-image: url("images/instruments/ukulele.svg");
}

div#xylophone {
	background-image: url("images/instruments/xylophone.svg");
}

.svg_horizontal_instrument {
	width: 24vw;
	height: 18vh;
}

div.flute {
	position: relative;
	width: 7vw;
	height: 55vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    align-content: center;
    justify-content: space-evenly;
}

div#instr_flute_l {
	visibility: hidden;
	margin-right: 5vw;
}

div#instr_flute_r {
	visibility: hidden;
	margin-left: 5vw;
}

/* Pages ***********************************************************************/

.pages {
	position: relative;
	width: 3vw;
	height: 55vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
	justify-content: center;
	font-size: min(0.7rem, 1vh);
	color: black;
}

.page {
	display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
	justify-content: center;
	margin-top: min(50px,0.3vh);
}

#pages_l {
	visibility: hidden;
}

#pages_r {
	visibility: visible;
}

#page_label_l, #page_label_r {
	color: black;
	font-size: min(0.7rem, 1vh);
}

/* Footer **********************************************************************/

footer {
	position: fixed;
	bottom: 0;
	display: flex;
	flex-direction: row;
	align-content: center;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 10vh;
	padding: 2.5vh;
	box-sizing: border-box;
}

div.button {
	width: 5vh;
	height: 5vh;
	background-size: 80%;
	background-repeat: no-repeat;
	background-position: center;
	border: 2px solid white;
	cursor: pointer;
	transition: 0.3s;
}

div.button:hover {
	background-color: #CFCECD;
}

div.instrument_buttons, div.play_buttons {
	display: flex;
	flex-direction: row;
	align-content: center;
	align-items: center;
	justify-content: space-between;
}

div.left_buttons {
	width: 22.5vh;
}

div.instrument_buttons div.button {
	margin-left: 0.3vw;
	transition: 0.3s;
}

div.play_buttons div.button {
	margin-left: 1vh;
	margin-right: 1vh;
	background-size: 50%;
	transition: 0.3s;
}

div.button_small {
	width: 3vh;
	height: 3vh;
	background-size: 80%;
	background-repeat: no-repeat;
	background-position: center;
	color: white;
	border: 1px solid black;
	cursor: pointer;
	transition: 0.3s;
}

div#button_switch_left {
	background-image: url("images/icons/icon_move_to_right.svg");
	margin-left: 1vh;
}

div#button_switch_right {
	background-image: url("images/icons/icon_move_to_left.svg");
	margin-right: 1vh;
}

div#button_flip_vertical_left {
	background-image: url("images/icons/icon_flip_vertical.svg");
	margin-left: 1vh;
	margin-top: 1vh;
}

div#button_flip_vertical_right {
	background-image: url("images/icons/icon_flip_vertical.svg");
	margin-right: 1vh;
    margin-top: 1vh;
}

div.button_flip_horizontal {
	background-image: url("images/icons/icon_flip_horizontal.svg");
}

footer.bg_flute div.instrument_buttons div.button, footer.bg_flute div.play_buttons div.button, footer.bg_flute div.button {
	background-color: #009639;
	transition: 0.3s;
}

footer.bg_guitar div.instrument_buttons div.button, footer.bg_guitar div.play_buttons div.button, footer.bg_guitar div.button {
	background-color: #A61932;
	transition: 0.3s;
}

footer.bg_piano div.instrument_buttons div.button, footer.bg_piano div.play_buttons div.button, footer.bg_piano div.button {
	background-color: #764A98;
	transition: 0.3s;
}

footer.bg_flute div.instrument_buttons div.button:hover, footer.bg_flute div.play_buttons div.button:hover, footer.bg_flute div.button:hover,
footer.bg_guitar div.instrument_buttons div.button:hover, footer.bg_guitar div.play_buttons div.button:hover, footer.bg_guitar div.button:hover,
footer.bg_piano div.instrument_buttons div.button:hover, footer.bg_piano div.play_buttons div.button:hover, footer.bg_piano div.button:hover {
	background-color: #CFCECD;
}

div#button_home {
	background-image: url("images/icons/icon_home.svg");
}

div#button_help {
	background-image: url("images/icons/icon_help.png");
}

div#button_accessible {
	background-image: url("images/icons/icon_accessible.png");
}

div#button_leading {
	background-image: url("images/icons/icon_leading.png");
}

div#button_ensemble {
	background-image: url("images/icons/icon_ensemble.png");
}

div#button_lock {
	background-image: url("images/icons/icon_lock.png");
	border-color: white;
}

div#button_flute {
	background-image: url("images/icons/icon_flute.svg");
}

div#button_guitar {
	background-image: url("images/icons/icon_guitar.svg");
}

div#button_piano {
	background-image: url("images/icons/icon_piano.svg");
}

div#button_ukulele {
	background-image: url("images/icons/icon_guitar.svg");
	background-size: 60%;
}

div#button_xylophone {
	background-image: url("images/icons/icon_xylophone.svg");
	background-size: 60%;
}

div#button_rewind {
	background-image: url("images/icons/icon_rewind.svg");
}

div#button_metronome {
	background-image: url("images/icons/icon_metronome.svg");
	margin: 0;
	border-left: 0;
	border-right: 0;
	font-size: 0.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
	background-size: 60%;
	line-height: 1.5;
}

div#button_metronome_down {
	width: 1.25vh;
	margin: 0;
	background-image: url("images/icons/icon_play.svg");
	-webkit-transform:rotate(180deg);
  	-moz-transform: rotate(180deg);
 	-ms-transform: rotate(180deg);
  	-o-transform: rotate(180deg);
  	transform: rotate(180deg);
}

div#button_metronome_up {
	width: 1.25vh;
	margin: 0;
	margin-right: 2vh;
	background-image: url("images/icons/icon_play.svg");
}

div#button_play {
	background-image: url("images/icons/icon_play.svg");
}

div#time_container {
	position: fixed;
    bottom: 10vh;
    color: black;
    display: flex;
    flex-direction: row;
    font-size: 0.8rem;
	font-weight: normal;
    width: 100vw;
	padding:0;
    padding-left: 1vh;
	padding-right: 1vh;
    justify-content: space-between;
	box-sizing: border-box;
    align-content: center;
    align-items: center;
    height: 1.8rem;
}

div#time_bar_container {
	position: fixed;
    bottom: 10vh;
	left: 0;
    width: 100vw;
	background-color: white;
    height: 0.5vh;
	box-sizing: border-box;
	border-top: 1px solid #cfcecd;
}

div#time_bar {
	position: fixed;
    bottom: 10vh;
	left: 0;
    width: 0;
	background-color: #cfcecd;
    height: 0.5vh;
	box-sizing: border-box;
}

/* Instruments ************************************************************/

circle.flute_keys {
	visibility: hidden;
	stroke: white; 
	stroke-width: 0.5; 
	fill: #2DAC44;
}

circle.guitar_keys {
	visibility: hidden;
	stroke: white; 
	stroke-width: 0.5; 
	fill: #fb471f;
}

circle.piano_keys {
	visibility: hidden;
	stroke: black; 
	stroke-width: 0.5; 
	fill: #6CC4EA;
}

circle.ukulele_keys {
	visibility: hidden;
	stroke: white; 
	stroke-width: 0.5; 
	fill: #ffdc01;
}

circle.xylophone_keys {
	visibility: hidden;
	stroke: black; 
	stroke-width: 0.5; 
	fill: #D92B93;
}

/* Help *******************************************************************/

div#help_container {
	display: none;
	transition: opacity 0.5s ease;
	font-size: 0.9rem;
}

div.help {
	padding: 15px;
	color: black;
	position: fixed;
	font-size: 0.8vw;
	background-image: url('/images/other/cloud.svg');
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

/* Media query ************************************************************/

@media screen and (orientation:portrait) {
	
	#home_header {
		height: 8vh;
	}

	div.logo_container {
		width: 30vw;
		height: 7vh;
	}

	div#logo_lim {
		background-image: url('/images/logos/logo_lim.svg');
		width: 7vh;
	}
	
	#button_goto_pieces {
		width: 15vh;
		height: 4vh;
		line-height: 4vh; 
		font-size: 1rem;
		font-weight: bold;
	}

	section#piece_menu {
		padding: 4vw;
		padding-bottom: 20vw;
		top:100vh;
	}
	
	div.piece_container {
		height: auto;
		margin-bottom: 2rem;
		margin-left: 2rem;
	}

	div.piece_cover {
		margin-right: 2vw;
		width: 1.5rem;
		height: 1.5rem;
	}

	div.piece_container:nth-child(odd) div.piece_cover {
		margin-left: 0;
	}
	
	a.link_to_piece:link, a.link_to_piece:visited {
		font-size: 1rem;
		line-height: 1;
	}
	
	input#home_search {
		font-size: 0.8rem; 
		padding: 0.2rem; 
	}
	
	div.button {
		width: 7vw;
		height: 7vw;
		border: 1px solid white;
	}
	
	div.button_small {
		margin-top: 1vw;
		width: 3vw;
		height: 3vw;
	}
	
	div.instrument_buttons div.button {
		margin: 0;
	}
	
	div.play_buttons div.button {
		margin-left: 1.25vw;
		margin-right: 1.25vw;
	}
	
	header {
		height: 8vh;
	}
	
	.instrument {
		width: 100%;
		height: 40vh;
	}
	
	#selected_instrument {
		visibility: collapse;
	}
	
	#home_footer div.home_small_texts {
		display: none;
	}
	
	small {
		display: none;
	}

	/*
	div#header_left, div#header_left_home {
		width: 30vw;
		height: 8vw;
		padding-top: 1vw;
		background-position-x: 1vw;
	}
	*/
	
	div#header_left_home {
		width: 40vw;
		height: 8vh;
		padding-top: 1vw;
		margin-left: 1vw;
	}

	div#header_right {
		padding: 2.5vw;
		width: 30vw;
		height: 10vw;
	}
	
	section#section_main {
		flex-direction: column;
		height: 82vh;
		margin-bottom: 5vh;
	}
	
	div#score_container {
		width: 99vw;
		height: 44vh;
		flex-direction: column;
		margin-top: 0;
	}
	
	canvas#score {
		width: 98vw;
		height: 44vh;
	}

	#horizontal_instr_container {
		padding-left: 5vw;
		padding-right: 5vw;
		box-sizing: border-box;
		height: 44vh;
	}
	
	.pages {
		flex-direction: row;
		font-size: 0;
		width: 100vw;
		height: auto;
	}
	
	.page {
		margin: 0;
		margin-left: 0.5vw;
		margin-right: 0.5vw;
		width: 0.5vw;
		height: 0.5vw;
	}
	
	div#pages_l {
		display: flex;
		visibility: visible;
		flexDirection: row;
	}
	
	div#pages_r {
		display: none;
	}
	
	div.flute {
	    width: 100%;
		height: 44vh;
		justify-content: center;
	}
	
	div#instr_flute_l, #button_switch_right, #button_lock, #button_help {
		display: none;
	}
	
	#button_play, #button_rewind {
		margin: 0;
	}
	
	.svg_horizontal_instrument {
		width: 85vw;
		height: 30vh;
	}
	
	div#time_container {
		bottom: 8vh;
		padding-left: 1vw;
		padding-right: 1vw;
		font-size: 0.7rem;
	}

	div#time_bar_container {
		font-size: 1rem;
		bottom: 8vh;
		width: 100vw;
		height: 0.5vw;
	}

	div#time_bar {
		bottom: 8vh;
		height: 0.5vw;
	}
	
	footer {
		height: 8vh;
		padding: 2.5vw;
	}
	
	h1 {
		font-size: 1.3rem;
	}
	
	div#header_left {
		display: none;
	}
	
	div.metadata {
		align-items: flex-start;
		margin-left: 2vw;
	}
	
	span#title {
    	font-size: 1.3rem;
		line-height: 0.7;
		text-align: left;
	}
	
	span#subtitle, span#author, span#accessible {
		font-size: 0.8rem;
		text-align: left;
	}
	
	#page_label_l, #page_label_r {
		margin-top: 1vw;
	}
}
