/* Main building blocks */
header,
footer,
nav,
main,
section {
    display: block;
    max-width: 1300px;
    background: #fff;
    margin: 0 auto 24px auto;
}
/* Header and navigation */
nav {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: stretch;
    text-align: center;
}
nav .logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
nav .logo img {
    height: 60px;
    max-width: 100%;
    padding: 3px;
    box-sizing: border-box;
}
nav > * {
    flex: 1 1 auto;
    text-align: center;
    font-size: 18px;
    font-family: "Cuprum", sans-serif;
    box-sizing: border-box;
}
nav button,
nav div {
    padding: 0px 4px !important;
    background: none !important;
    border: none !important;
    margin: 0 !important;
    font: inherit;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
nav button {
    width: 100% !important;
}
nav button span,
nav div span,
nav div a {
    display: inline-block;
    padding: 16px 0;
    height: 100%;
    box-sizing: border-box;
}
nav button.active span,
nav button:hover span,
nav button:focus span {
    color: #c9343f;
    border-bottom: 4px solid #c9343f;
    padding-bottom: 12px;
}
header nav > :last-child {
    background: #e0e0e0;
}

main {
    padding: 4px;
    box-sizing: border-box;
}
main.index-buttons > form {
    display: inline-block;
}
hr.section {
    height:24px;
    background:#f4f4f4;
    display:block;
    border:0;
    margin:0 -4px;
}
/* Specific styles */
.tile {
    height: 150px;
    width: 150px;
    margin: 8px;
    display: inline-block;
}
.tile.small {
    height: 100px;
    width: 100px;
}
input.tile {
    box-shadow: 5px 5px 8px rgba(0,0,0,.25);
}
input.tile:hover {
    box-shadow: 5px 5px 8px #D83232;
}
/* Question and answer images and videos */
.media {
    max-width: 150px;
    max-height: 150px;
    margin: 4px 0;
}
.media.small {
    max-width: 100px;
    max-height: 100px;
}
.media.small {
    max-width: 100px;
    max-height: 100px;
}
.media.big {
    max-width: 300px;
    max-height: 300px;
}
/* New media */
.media-xs {
    max-width: 125px;
    max-height: 94px;
}
.media-s {
    max-width: 200px;
    max-height: 150px;
}
.media-m {
    max-width: 315px;
    max-height: 236px;
}
.media-l {
    max-width: 500px;
    max-height: 375px;
}
.media-xl {
    max-width: 800px;
    max-height: 600px;

}

/* https://codepen.io/gschier/pen/HCoqh */
figure.lightbox, figure.lightbox.small {
  background-position: center;
  position: relative;
  display: inline-block;
  transition: transform 0.8s;
  overflow: hidden;
  cursor: zoom-in;
  background-repeat: no-repeat;
  margin: 4px;

  /* A bit of padding around image */
  padding: 1em;
}

figure.lightbox img {
    /*transition: opacity .5s;*/
    transition: transform 0.8s;
    display: block;
    margin: 0 !important;
}

/* Hover-Effekt Bild / Active für Touch */
figure.lightbox.small:hover, figure.lightbox.small:active {
    transform: scale(3.0, 3.0);
}
/* */
table button {
    border: none;
    background: transparent;
    padding: 0 4px;
    font-weight: bold;
}
/* Tabs for tables and lists */
.tabs {
    overflow: hidden;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    background-color: #eee;
}
/* Style the buttons inside the tab */
.tabs button {
    background: transparent;
    float: left;
    border: none;
    transition: 0.2s;
}
.tabs button:hover,
.tabs button:focus {
    background-color: #ddd;
}
.tabs button.active {
    background-color: #ccc;
}
/* Style the tab content */
.tabcontent {
    display: none;
}
/* Progress bar */
div.bar {
    width: 160px;
    border: 1px solid #ccc;
    margin: 4px 0;
    padding: 1px;
}
div.bar span {
    background: #fecc00;
    height: 100%;
    display: block;
    text-indent: 4px;
    background: repeating-linear-gradient(
        90deg,
        #fecc00,
        #fecc00 40px,
        hsl(48, 100%, 60%) 40px,
        hsl(48, 100%, 60%) 80px
        );
}
input[type="radio"].readonly{
    pointer-events: none;
}

div.kreis {
    background-color: yellow;
    width: 30px;
    height: 30px;
    border-radius: 50px;
    box-shadow: -2px -2px 10px grey, 2px 2px 10px grey;
    margin: auto;
}

div.kreis .percent{
    visibility: hidden;
}

div.kreis:hover .percent{
    visibility: visible;
    color: black;
}

div.title {
    display: inline-block;
    float: left;
}

div.back {
    display: inline-block;
    float: right;
    text-align: right;
}

div.central {;
             text-align: center;
}

div.clear {
    clear: both;
}

.crop {
    white-space: nowrap;
    width:65px;
    overflow:hidden;
    height:30px;
    line-height:30px;
    text-overflow:ellipsis;
}

button.endTest {
    height: 50px;
    width: 100%;
    font-weight: bold;
    box-shadow: -1px -1px 3px #c9343f, 1px 1px 3px #c9343f
}

button.answerQuestion {
    height: 50px;
    width: 150px;
    font-weight: bold;
    box-shadow: -1px -1px 3px #c9343f, 1px 1px 3px #c9343f
}

.inline{
    display: inline;
}

.link-button {
    background: none;
    border: none;
    color: black;
    cursor: pointer;
}

.link-button:focus {
    outline:none;
}

.link-button:active{
   color:red;
}

/* Mobile */
@media (max-width: 720px) {
    header nav > :first-child {
        order: -3;
        width: 40%;
        min-width: 138px;
    }
    header nav > :last-child {
        order: -2;
        width: 60%;
    }
    header nav::before {
        order: -1;
        width: 100%;
        content: "\00a0";
        height: 0;
    }
    .tile {
        height: 120px;
        width: 120px;
    }
}
/***** MODAL DIALOG ****/
#modal {
	/* Underlay covers entire screen. */
	position: fixed;
	top:0px;
	bottom: 0px;
	left:0px;
	right:0px;
	background-color:rgba(0,0,0,0.5);
	z-index:1000;

	/* Flexbox centers the .modal-content vertically and horizontally */
	display:flex;
	flex-direction:column;
	align-items:center;

	/* Animate when opening */
	animation-name: fadeIn;
	animation-duration:150ms;
	animation-timing-function: ease;
    overflow-y: auto;
}

#modal > .modal-underlay {
	/* underlay takes up the entire viewport. This is only
	required if you want to click to dismiss the popup */
	position: absolute;
	z-index: -1;
	top:0px;
	bottom:0px;
	left: 0px;
	right: 0px;
}

#modal > .modal-content {
	/* Position visible dialog near the top of the window */
	margin-top:10vh;

	/* Sizing for visible dialog */
	width:80%;
	max-width:600px;

	/* Display properties for visible dialog*/
	border:solid 1px #999;
	border-radius:8px;
	box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
	background-color:white;
	padding:20px;

	/* Animate when opening */
	animation-name:zoomIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}

#modal.closing {
	/* Animate when closing */
	animation-name: fadeOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}

#modal.closing > .modal-content {
	/* Aniate when closing */
	animation-name: zoomOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}

@keyframes fadeIn {
	0% {opacity: 0;}
	100% {opacity: 1;}
}

@keyframes fadeOut {
	0% {opacity: 1;}
	100% {opacity: 0;}
}

@keyframes zoomIn {
	0% {transform: scale(0.9);}
	100% {transform: scale(1);}
}

@keyframes zoomOut {
	0% {transform: scale(1);}
	100% {transform: scale(0.9);}
}

#snackbar {
  visibility: hidden; /* Hidden by default. Visible on click */
  min-width: 250px; /* Set a default minimum width */
  margin-left: -125px; /* Divide value of min-width by 2 */
  background-color: #fdca00; /* Black background color */
  color: #000000; /* White text color */
  text-align: center; /* Centered text */
  border-radius: 2px; /* Rounded borders */
  padding: 16px; /* Padding */
  position: fixed; /* Sit on top of the screen */
  z-index: 1; /* Add a z-index if needed */
  left: 50%; /* Center the snackbar */
  bottom: 30px; /* 30px from the bottom */
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
  visibility: visible; /* Show the snackbar */
  /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
  However, delay the fade out process for 2.5 seconds */
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}