/* Fuentes */
@font-face {
  font-family: 'FuenteProyecto';
  src: url('fonts/fuente_proyecto.woff2') format('woff2'),
  url('fonts/fuente_proyecto.woff') format('woff');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'FuenteProyecto';
  src: url('fonts/fuente_proyecto.woff2') format('woff2'),
  url('fonts/fuente_proyecto.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'LibreFranklin';
  src: url("fonts/librefranklin-medium-webfont.woff2") format("woff2"),
  url("fonts/librefranklin-medium-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

/* General */
* {
  box-sizing: border-box;
}

html {
  margin: 0px;
}

body {
  overscroll-behavior-y: contain;
  font-family: LibreFranklin;
  margin: 0px;
  background-color: #777;
}

/* Cabecera */
header {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100vw;
  height: 6vh;
  background-color: #464646;
  z-index: 9;
  color: #fff;
  font-family: 'FuenteProyecto';
  vertical-align: top;
}

header img {
  display: inline-block;
  width: 4.7vh;
  height: 4.7vh;
}

header .anterior, header .siguiente, header .header-menu, header .cerrar-sesion, header .text, header .multi-user-selector  {
  display: inline-block;
  height: 5vh;
  line-height: 5vh;
  position: absolute;
  top: 0.5vh;
}

header .anterior{
  left: 7.5vh;
}

header .siguiente{
  left: 12.5vh;
}

header .header-menu {
  left: 0.5vh;
}

header .cerrar-sesion {
  right: 0.5vh;
}

header .multi-user-selector {
  right: 7vh;
}

header .text {
  left: 20vh;
  font-size: 1.7em;;
}

/* Menú lateral */
div.menu {
  width: calc(100% - 20px);
  height: 40px;
  position: absolute;
  top: calc(6vh + 8px);
  right: 10px;
  z-index: 10;
  text-align: right;
}

div.btn-menu {
  width: 30px;
  height: 30px;
  margin: 4px;
  display: inline-block;
}

div#lista {
  background-image: url('img/Menu_lista.png');
  background-size: 90% 90%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
}

div#cuadricula {
  background-image: url('img/menu_pantallas.png');
  background-size: 90% 90%;
  background-position: center;
  background-repeat: no-repeat;
}

div.scroll {
  width: 400px;
  height: 100%;
  background-color: rgba(70, 70, 68, 0);
  overflow-x: hidden;
  overflow-y: scroll; /* has to be scroll, not auto */
  -webkit-overflow-scrolling: touch;
}

.sidenav ul li .minimizador{
  display: inline-block;
  font-size: 20px;
  width: 1.25rem;
  transition: 0.3s;
}

.sidenav ul li.contraido>.minimizador {
  transform: rotate(-90deg);
}

.session {
  opacity: 0.85;
}

.sidenav {
  height: 100%;
  width: 400px;
  padding-top: calc(5vh + 56px);
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: rgba(70, 70, 68, 0.90);
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  -webkit-transform: translateX(-400px);
  transform: translateX(-400px);
  transition: 0.5s;
}

.sidenav.visible{
  /*
  Se elige 'transform: translateX()' para animar porque queda más fluido. Mirar: http://jsfiddle.net/sanchezandoni/azL3hvj2/
  */
  transform: translateX(0px);
}

.sidenav a {
  text-decoration: none;
  color: #ddd;
  display: inline-block;
  position: relative;
  width: calc(100% - 8px);
  padding: 2px;
}

header .multi-user-selector{
  display: none;
}

body.profesor header .multi-user-selector,
body.admin header .multi-user-selector{
  display: inherit;
}

header .multi-user-selector div{
  display: inline-block;
}
header .multi-user-selector img{
  vertical-align: middle;
}

header .multi-user-selector #activeUserName{
  font-family: 'LibreFranklin';
  margin-right: 1em;
}

#studentListSidenav{
  display: none;
}
body.profesor #studentListSidenav,
body.admin #studentListSidenav{
  display: block;
}

#studentListSidenav{
  right:0;
  left: auto;
  transform: translateX(400px);
  overflow-y:auto;
}

#studentListSidenav.visible{
  transform: translateX(0px);
}

#studentListSidenav ul li:before{
  content: "";
  background-image: url(img/alumno_2.png);
  background-size: contain;
  display: inline-block;
  width:20px;
  height: 20px;
  background-size: contain;
  margin-right: 0.3em;
}

#studentListSidenav ul li{
  margin-bottom: 1em;
  width: 80%;
}
#studentListSidenav ul li.active{
  margin-bottom: 1em;
  background: rgba();
  border: solid #bbb 1px;
}

#studentListSidenav input.search{
  margin-left: 22px;
  font-size: 20px;
  border-radius: 0.3em;
  padding: 0.2em;
  background-image: url('img/lupa.png');
  background-repeat: no-repeat;
  /*background-size: contain;*/
  background-size: 10%;
  background-position: 98%;
  max-width: 60%;
}

#studentListSidenav .search-button{
  margin-left: 1em;
}

#studentListSidenav .filter-form *{
  display: inline-block;
  vertical-align: middle;
  margin-right: 1em;
}

.indspan {
  width: 100%;
  display: inline-block;
  float: left;
  color: #ddd;
  padding: 4px;
  background-color: rgba(70, 70, 68, 0.95);
  /*position: absolute;*/
  top: -2px;
  transition: all 0.4s ease-in-out;
}

.indspan.peque {
  font-size: 1.05rem;
}

.nav-header.peque {
  font-size: 1.4rem;
}

.miniatura {
  width: 100%;
  display: inline-block;
  float: right;
  max-height: 300px;
  transition: max-height 0.25s;
}

.sidenav a:hover, .offcanvas a:focus{
  color: #ddd;
}

.sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

.sidenav ul {
  list-style: none;
  padding-left: 10px;
  text-decoration: none;
  font-size: 20px;
  color: #ddd;
  display: block;
}

.sidenav#mySidenav ul{
  min-height: 101%; /*Corrige problema del menú: https://stackoverflow.com/a/33024813*/
}

.sidenav ul li {
  padding: 4px 4px 0px 12px;
}

.sidenav ul li a.activo {
  font-weight: bold;
  color:#fff;
  border: solid 1px #bbb;
  opacity: 1;
}

.sidenav ul li label {
  font-size: 1.75rem;
  opacity: 0.9;
}

.sidenav ul li ul li label {
  font-size: 1.625rem;
  opacity: 0.9;
}

.sidenav ul li ul li ul li label {
  font-size: 1.5rem;
  opacity: 0.9;
}

.sidenav.lista .miniatura{
  max-height: 0px;
}

.sidenav.lista .indspan{
  /*position: relative;*/
  background-color:inherit;
}

.sidenav.lista div#lista{
  opacity: 1;
}

.sidenav.lista #cuadricula{
  opacity: 0.3;
}

.nav-header {
  font-family: FuenteProyecto;
  font-weight: normal;
  font-style: italic;
}

.sidenav a.nav-header {
  font-size: 1.4rem;
  font-family: FuenteProyecto;
  font-weight: normal;
  font-style: italic;
}

.sidenav a.headerConEnlace {
  font-size: inherit;
  font-family: FuenteProyecto;
  font-weight: normal;
  font-style: italic;
}

.derecha {
  float: right;
  width: calc(100% - 1.25rem);
}

.sidenav li.contraido .nav.nav-list.tree{
  max-height: 0px;
  overflow: hidden;
}

/* Iframe */
#container{
  width: 100% !important;
  height: 94vh !important;
  position: absolute;
  top: 6vh;
  left: 0;
  right: 0;
  bottom: 0;
  margin-right:auto;
  margin-left:auto;
  max-width: 1024px;
  max-height: 768px;
  background-color: white;
}

/* Residuales */
div#emergente {
  display: none;
}

div#backupWidget {
  display: none;
}


/* Estylos de la ventana de error */
#error{
  display:none;
  width:100vw;
  height: 100vh;
  position:absolute;
  top:0;
  left:0;
  z-index:10;
  background-color: rgba(0,0,0,0.9);
}
#error>div{
  width:70vw;
  margin-left:15vw;
  height: 60vh;
  margin-top: 20vh;
  color: #ddd;
  font-size: 1.2em;
}
#error>div>p:first-child{
  font-size: 1.2em;
  text-align:center;
}
#error>div>p:last-child{
  text-align:center;
}
#error a{
  color:#fff;
}
#error button{
  width:20vw;
  height: 5vh;
  background-color: #f00;
  font-size: 1.4em;
  color:#ddd;
}
