/* https://css-tricks.com/responsive-data-tables/ */

/* 
Generic Styling, for Desktops/Laptops 
*/
table { 
  width: 100%; 
  border-collapse: collapse; 
}
/* Zebra striping
tr:nth-of-type(even) { 
  background: #eee; 
} */
tr.row2 {
  background: #f2f2f2;
}
tr.row1 {
  background: #f2f2ff;
}
th { 
  background: #9966ff; 
  color: white; 
  font-weight: bold; 
  padding: 6px; 
  border: 1px solid #ccc; 
  text-align: left; 
}

td {
	width: 100%;
	border: none;
	padding-left: 5px;
}
/* Me invento la clase 'Orok' que solo se aplica a la fila donde se da la información general del curso */
/* El propósito es que en la fila de información detallada no se incluya el encabezado "Curso" ni se pinten los bordes */
td.Orok {
  padding: 6px; 
  border: 1px solid #ccc; 
  text-align: left;
}
/* 
Max width before this PARTICULAR table gets nasty
This query will take effect for any screen smaller than 760px
and also iPads specifically.
*/
@media 
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px)  {

	/* Force table to not be like tables anymore */
	table, thead, tbody, th, td, tr { 
		display: block; 
	}
	
	/* Hide table headers (but not display: none;, for accessibility) */
	/* De los encabezados, no esconde el correspondiente a la ACTIVIDAD */
	thead tr.izkutatu { 
		position: absolute;
		top: -9999px;
		left: -9999px;
	}
	
	tr { border: 1px solid #ccc; }
	
	td {
		width: 100%;
		border: none;
		background: none;
		padding-left: 5px;
	}
	
/* Me invento la clase 'Orok' que solo se aplica a la fila donde se da la información general del curso */
/* El propósito es que en la fila de información detallada no se incluya el encabezado "Curso" ni se pinten los bordes */
	td.Orok { 
		/* Behave  like a "row" */
		border: none;
		border-bottom: 1px solid #eee; 
		position: relative;
		padding-left: 20%;
	}
	td.Orok:before { 
		/* Now like a table header */
		position: absolute;
		/* Top/left values mimic padding */
		top: 6px;
		left: 6px;
		width: 45%; 
		padding-right: 10px; 
		white-space: nowrap;
	}
	/*
	Label the data
	*/
	td.Orok:nth-of-type(1):before { content: "Curso"; }
	td.Orok:nth-of-type(2):before { content: "Inicio"; }
	td.Orok:nth-of-type(3):before { content: "Final"; }
	td.Orok:nth-of-type(4):before { content: ""; }
}
