#exercise{  
  max-width: 900px; 
}

/*#exercise{    
  padding-top:20px;  
  clear:both;
  overflow: hidden;  
  max-width: 900px; 
  margin: 0px auto;       
  min-height:600px;
  text-align: center;    
  border:0px;
  background-color: transparent;
  padding-bottom: 200px;
}
*/
#exercise #question {
  margin-bottom: 10px;
  margin-top: 0px;
  display: none;
}

#exercise #question img{    
  width: 200px;
  border:0px;
}

#exercise .tlacitko-control{
  display: inline-block;
  margin: 5px;  
  font-size: 18px;    
  width: 150px;
  padding: 12px;
  text-align:center;  
  border-radius:5px;  
  cursor: pointer;

  background-color: #e0e0e2;
  color: #34495E;   
}

#exercise .tlacitko-control:hover{ 
  color:white; 
  background-color: #2ecc71;
}

#grid {
  display: inline-grid;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background-color: #ecf0f1;

  gap: 1px;

  width: 100%;
  max-width: min(600px, 100vh - 150px); /* odhad tak, aby se vešel progress bar */
  min-width: 350px;
}

#grid .card {
  aspect-ratio: 1;

  margin: 0;
  border: 2px solid #ecf0f1;
  padding: 3px;

  display: flex;
  flex-direction: column;
  align-items: center;

  cursor: pointer;
  background-color: white;

  position: relative;
}

#grid .card h3 {
  font-size: 24px;
  margin: 20px 10px 0;
}

#grid .card p{
  margin-bottom: 10px;

  font-style: italic;
  color: var(--grayHover);
}

#grid .card:hover,
#grid .card.selected,
#grid .card.correct:hover {
  border-color: #3498db;
}

#grid .card.correct::after,
#grid .card.wrong::after {
  content: '';
  position: absolute;
  inset: 0;
}

#grid .card.correct{
  border-color: var(--greenHover);
}

#grid .card.correct::after {
  background-color: var(--green);
  opacity: 0;
  animation: var(--animation-blink);
  animation-iteration-count: 2;
  animation-name: blink-half;
}

@keyframes blink-half {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: .5;
  }
}

#grid .card.hint {
  border-color: var(--green);
  box-shadow: 0 0 5px 5px var(--green);
  z-index: 1;
}

#grid .card.wrong{
  border-color: var(--redHover);
  animation: var(--animation-shake);
  animation-name: shake-large;
}

#grid .card.wrong::after {
  background-color: var(--red);
  opacity: .5;
}

@keyframes shake-large {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(15px);
  }
  75% {
    transform: translateX(-15px);
  }
}

#grid .card .img-wrapper {
  flex: 1 1 0;
  width: 100%;
  position: relative;
}

#grid .card .img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

#grid .card img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#audio {
  height: 70px;
}

#sound{   
  margin:20px;
  display: inline-flex;  
  justify-content: center;  
  align-items: center;
    
  background-color: #dff9fb;
  cursor: pointer;
  border: 3px solid #80d5de;
  border-radius: 100px;
  height: 80px;
  width: 80px;
  margin-bottom: 0px;
}
#sound img{
  height: 50px;
  opacity: 0.4;
}

#sound:hover{   
  border:3px solid #16a6fc;
}
#sound:hover img{   
  opacity: 0.7;
}

#sound.playing{
  border:3px solid #16a6fc;
}
#sound.playing img{
  opacity: 0.7;
}

#exercise .audiometer{    
  display: inline-flex;  
  justify-content: flex-start;  
  align-items: flex-start;      
  height: 3px;
  overflow: hidden;  
  width: 100px;
  border-radius: 3px;
  margin-bottom: 10px;
}

#exercise .audiometer-fill{
  background-color: #28b7ef;
  height: 100%;   
  width: 0px;
}

/********************** WHITE SCREEN *****************************/
#exercise .xyz{ 

}

/********************** MOBILNI VERZE *****************************/

/* NB: výška zahrnuje 150px na progress bar a audio */
@media screen and (max-width: 550px), screen and (max-height: 700px) {

  #grid .card h3 {
    font-size: 20px;
    margin: 10px 5px 0;
  }

}

@media screen and (max-width: 400px), screen and (max-height: 550px) {
  #grid .card h3 {
    font-size: 18px;
  }

  #grid .card p {
    font-size: 14px;
  }
}

